Diff of /trunk/src/gpxview.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 8 by harbaum, Thu Jun 25 19:08:48 2009 UTC revision 204 by harbaum, Mon Nov 23 18:32:06 2009 UTC
# Line 24  Line 24 
24  #if MAEMO_VERSION_MAJOR < 5  #if MAEMO_VERSION_MAJOR < 5
25  #define USE_BREAD_CRUMB_TRAIL  #define USE_BREAD_CRUMB_TRAIL
26  #else  #else
27    #define FREMANTLE
28    
29  // these are on maemo fremantle  // these are on maemo fremantle
30  #include <hildon/hildon-button.h>  #include <hildon/hildon-button.h>
31  #include <hildon/hildon-text-view.h>  #include <hildon/hildon-text-view.h>
32    #include <hildon/hildon-window-stack.h>
33  #define USE_HILDON_TEXT_VIEW  #define USE_HILDON_TEXT_VIEW
34  #define USE_STACKABLE_WINDOW  #define USE_STACKABLE_WINDOW
35  #define NO_COPY_N_PASTE  #define NO_COPY_N_PASTE
# Line 36  Line 39 
39  #endif  #endif
40  #endif  #endif
41    
42    #ifdef BCT
43    #include "bct.h"
44    #endif
45    
46  #include "config.h"  #include "config.h"
47    
48  #include <string.h>  #include <string.h>
# Line 60  Line 67 
67  #if MAEMO_VERSION_MAJOR >= 5  #if MAEMO_VERSION_MAJOR >= 5
68  #define USE_PANNABLE_AREA  #define USE_PANNABLE_AREA
69  #include <hildon/hildon-pannable-area.h>  #include <hildon/hildon-pannable-area.h>
70    /* panning a gtkhtml view currently doesn't work well */
71    #define PANNABLE_HTML
72  #endif  #endif
73  #endif  #endif
74    
# Line 102  typedef struct { Line 111  typedef struct {
111    pos_t gps;                  /* saved last gps position */    pos_t gps;                  /* saved last gps position */
112    
113    char *image_path;           /* path to cache images in */    char *image_path;           /* path to cache images in */
   gboolean load_images;       /* load images and cache them */  
114    
115    int search;                 /* "search in" items */    int search;                 /* "search in" items */
116    char *search_str;    char *search_str;
117    int search_days;    int search_days;
118    
119      struct proxy_s *proxy;      /* proxy settings */
120    
121    int gpxlist_items;    int gpxlist_items;
122    int cachelist_items;    int cachelist_items;
123    guint cachelist_handler_id; /* update timer */    guint cachelist_handler_id; /* update timer */
# Line 126  typedef struct { Line 136  typedef struct {
136    gboolean compass_locked;    gboolean compass_locked;
137    int compass_damping;    int compass_damping;
138    
139      gboolean disable_gcvote;
140    
141    struct gps_state *gps_state;    struct gps_state *gps_state;
142    
143    /* keep track of all html views so zoom events can be delivered */    /* keep track of all html views so zoom events can be delivered */
# Line 139  typedef struct { Line 151  typedef struct {
151  #ifndef NO_COPY_N_PASTE  #ifndef NO_COPY_N_PASTE
152    /* do enable/disable the edit entries */    /* do enable/disable the edit entries */
153    GtkWidget *menu_cut, *menu_copy, *menu_paste;    GtkWidget *menu_cut, *menu_copy, *menu_paste;
   GtkClipboard *clipboard;     /* clipboard for copy/paste */  
154    GtkTextBuffer *active_buffer;    GtkTextBuffer *active_buffer;
155  #endif  #endif
156    
157      GtkClipboard *clipboard;     /* clipboard for copy/paste */
158    
159    #ifdef USE_STACKABLE_WINDOW
160      GtkWidget *export_menu, *tools_menu;
161    #endif
162    
163    /* save result here to be able to "goto" it */    /* save result here to be able to "goto" it */
164    pos_t geomath;    pos_t geomath;
165    
# Line 169  typedef struct { Line 186  typedef struct {
186    
187    gboolean cachelist_disable_screensaver;    gboolean cachelist_disable_screensaver;
188    gboolean goto_disable_screensaver;    gboolean goto_disable_screensaver;
   gboolean cachelist_update;  
189    
190    HildonProgram *program;    HildonProgram *program;
191    HildonWindow *window;    HildonWindow *window;
192    osso_context_t *osso_context;    osso_context_t *osso_context;
193    GtkWidget *bct;  #else
194    gpx_t *search_results;    GtkWidget *window;
195    #endif
196    
197      gboolean cachelist_update;
198    
199  #ifdef USE_BREAD_CRUMB_TRAIL  #if defined(USE_BREAD_CRUMB_TRAIL) || defined(BCT)
200    /* reference to enable/disable these while walking the crumb trail */    /* reference to enable/disable these while walking the crumb trail */
201    GtkWidget *menu_import, *menu_export;    GtkWidget *menu_import, *menu_export;
202    GtkWidget *menu_search;    GtkWidget *menu_search;
203    
204      GtkWidget *bct;
205  #endif  #endif
206    
207    /* keep track of current "path" in the bread crumb trail */    /* keep track of current "path" in the bread crumb trail */
208    gpx_t *cur_gpx;    gpx_t *cur_gpx;
209    cache_t *cur_cache;    cache_t *cur_cache;
210    
211  #else    gpx_t *search_results;
212    GtkWidget *window;  
213  #endif  #ifdef ENABLE_OSM_GPS_MAP
214      struct {
215        struct map_context_s *context;
216        int source;
217        int zoom;
218        pos_t pos;
219      } map;
220    #endif
221    
222      /* username is also used to detect own caches (by log entry) */
223      char *username;
224    
225      /* stuff to call geotoad */
226      struct {
227        char *password, *filename;
228        float distance, lat, lon;
229        int flags;
230      } gt;
231    
232    GtkWidget *vbox;    GtkWidget *vbox;
233  } appdata_t;  } appdata_t;
234    
# Line 199  typedef struct { Line 238  typedef struct {
238  #include "gconf.h"  #include "gconf.h"
239  #include "html.h"  #include "html.h"
240  #include "icons.h"  #include "icons.h"
241    #include "gcvote.h"
242  #include "cache.h"  #include "cache.h"
243  #include "geomath.h"  #include "geomath.h"
244  #include "geotext.h"  #include "geotext.h"
# Line 207  typedef struct { Line 247  typedef struct {
247  #include "mm_poi.h"  #include "mm_poi.h"
248  #include "precpos.h"  #include "precpos.h"
249  #include "garmin_export.h"  #include "garmin_export.h"
250    #include "geotoad.h"
251    
252    #ifdef ENABLE_OSM_GPS_MAP
253    #include "map-tool.h"
254    #endif
255    
256  #ifdef USE_MAEMO  #ifdef USE_MAEMO
257  #include "dbus.h"  #include "dbus.h"
# Line 238  extern void main_after_settings_redraw(a Line 283  extern void main_after_settings_redraw(a
283  #include <stdarg.h>  #include <stdarg.h>
284  extern void errorf(const char *fmt, ...);  extern void errorf(const char *fmt, ...);
285  extern gboolean on_window_key_press(GtkWidget *widget,  extern gboolean on_window_key_press(GtkWidget *widget,
286                                      GdkEventKey *event, gpointer data);                                      GdkEventKey *event, appdata_t *appdata);
287  #ifdef USE_STACKABLE_WINDOW  #ifdef USE_STACKABLE_WINDOW
288  HildonAppMenu *menu_create(appdata_t *appdata, int mode);  HildonAppMenu *menu_create(appdata_t *appdata, int mode);
289  #endif  #endif
290    void cachelist_goto_cache(appdata_t *appdata, cache_t *cache);
291    void gpxlist_goto_cachelist(appdata_t *appdata, gpx_t *gpx);
292    
293  #endif // GPXVIEW_H  #endif // GPXVIEW_H

Legend:
Removed from v.8  
changed lines
  Added in v.204