Diff of /trunk/src/gpxview.h

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

revision 1 by harbaum, Sat Jun 20 11:08:47 2009 UTC revision 193 by harbaum, Tue Nov 17 20:13:09 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    // these are on maemo fremantle
28    #include <hildon/hildon-button.h>
29    #include <hildon/hildon-text-view.h>
30    #include <hildon/hildon-window-stack.h>
31    #define USE_HILDON_TEXT_VIEW
32  #define USE_STACKABLE_WINDOW  #define USE_STACKABLE_WINDOW
33    #define NO_COPY_N_PASTE
34    #define MENU_GPXLIST   0
35    #define MENU_CACHELIST 1
36    #define MENU_CACHE     2
37    #endif
38  #endif  #endif
39    
40    #ifdef BCT
41    #include "bct.h"
42  #endif  #endif
43    
44  #include "config.h"  #include "config.h"
# Line 41  Line 54 
54    
55  #ifdef USE_MAEMO  #ifdef USE_MAEMO
56  #include <hildon/hildon-program.h>  #include <hildon/hildon-program.h>
 #include <hildon/hildon-text-view.h>  
57  #include <hildon/hildon-file-chooser-dialog.h>  #include <hildon/hildon-file-chooser-dialog.h>
58  #include <hildon/hildon-file-system-model.h>  #include <hildon/hildon-file-system-model.h>
59  #include <hildon/hildon-bread-crumb-trail.h>  #include <hildon/hildon-bread-crumb-trail.h>
# Line 53  Line 65 
65  #if MAEMO_VERSION_MAJOR >= 5  #if MAEMO_VERSION_MAJOR >= 5
66  #define USE_PANNABLE_AREA  #define USE_PANNABLE_AREA
67  #include <hildon/hildon-pannable-area.h>  #include <hildon/hildon-pannable-area.h>
68    /* panning a gtkhtml view currently doesn't work well */
69    #define PANNABLE_HTML
70  #endif  #endif
71  #endif  #endif
72    
# Line 95  typedef struct { Line 109  typedef struct {
109    pos_t gps;                  /* saved last gps position */    pos_t gps;                  /* saved last gps position */
110    
111    char *image_path;           /* path to cache images in */    char *image_path;           /* path to cache images in */
   gboolean load_images;       /* load images and cache them */  
112    
113    int search;                 /* "search in" items */    int search;                 /* "search in" items */
114    char *search_str;    char *search_str;
115    int search_days;    int search_days;
116    
117      struct proxy_s *proxy;      /* proxy settings */
118    
119    int gpxlist_items;    int gpxlist_items;
120    int cachelist_items;    int cachelist_items;
121    guint cachelist_handler_id; /* update timer */    guint cachelist_handler_id; /* update timer */
# Line 119  typedef struct { Line 134  typedef struct {
134    gboolean compass_locked;    gboolean compass_locked;
135    int compass_damping;    int compass_damping;
136    
137      gboolean disable_gcvote;
138    
139    struct gps_state *gps_state;    struct gps_state *gps_state;
140    
141    /* 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 129  typedef struct { Line 146  typedef struct {
146    GtkWidget *menu_remove, *menu_close;    GtkWidget *menu_remove, *menu_close;
147  #endif  #endif
148    
149    #ifndef NO_COPY_N_PASTE
150    /* do enable/disable the edit entries */    /* do enable/disable the edit entries */
151    GtkWidget *menu_cut, *menu_copy, *menu_paste;    GtkWidget *menu_cut, *menu_copy, *menu_paste;
   GtkClipboard *clipboard;     /* clipboard for copy/paste */  
152    GtkTextBuffer *active_buffer;    GtkTextBuffer *active_buffer;
153    #endif
154    
155      GtkClipboard *clipboard;     /* clipboard for copy/paste */
156    
157    #ifdef USE_STACKABLE_WINDOW
158      GtkWidget *export_menu, *tools_menu;
159    #endif
160    
161    /* save result here to be able to "goto" it */    /* save result here to be able to "goto" it */
162    pos_t geomath;    pos_t geomath;
# Line 160  typedef struct { Line 184  typedef struct {
184    
185    gboolean cachelist_disable_screensaver;    gboolean cachelist_disable_screensaver;
186    gboolean goto_disable_screensaver;    gboolean goto_disable_screensaver;
   gboolean cachelist_update;  
187    
188    HildonProgram *program;    HildonProgram *program;
189    HildonWindow *window;    HildonWindow *window;
190    osso_context_t *osso_context;    osso_context_t *osso_context;
191    GtkWidget *bct;  #else
192    gpx_t *search_results;    GtkWidget *window;
193    #endif
194    
195      gboolean cachelist_update;
196    
197    #if defined(USE_BREAD_CRUMB_TRAIL) || defined(BCT)
198    /* reference to enable/disable these while walking the crumb trail */    /* reference to enable/disable these while walking the crumb trail */
199    GtkWidget *menu_import, *menu_export;    GtkWidget *menu_import, *menu_export;
200    GtkWidget *menu_search;    GtkWidget *menu_search;
201    
202      GtkWidget *bct;
203    #endif
204    
205    /* keep track of current "path" in the bread crumb trail */    /* keep track of current "path" in the bread crumb trail */
206    gpx_t *cur_gpx;    gpx_t *cur_gpx;
207    cache_t *cur_cache;    cache_t *cur_cache;
208    
209  #else    gpx_t *search_results;
210    GtkWidget *window;  
211    #ifdef ENABLE_OSM_GPS_MAP
212      struct {
213        struct map_context_s *context;
214        int source;
215        int zoom;
216        pos_t pos;
217      } map;
218  #endif  #endif
219    
220    GtkWidget *vbox;    GtkWidget *vbox;
221  } appdata_t;  } appdata_t;
222    
# Line 188  typedef struct { Line 226  typedef struct {
226  #include "gconf.h"  #include "gconf.h"
227  #include "html.h"  #include "html.h"
228  #include "icons.h"  #include "icons.h"
229    #include "gcvote.h"
230  #include "cache.h"  #include "cache.h"
231  #include "geomath.h"  #include "geomath.h"
232  #include "geotext.h"  #include "geotext.h"
# Line 196  typedef struct { Line 235  typedef struct {
235  #include "mm_poi.h"  #include "mm_poi.h"
236  #include "precpos.h"  #include "precpos.h"
237  #include "garmin_export.h"  #include "garmin_export.h"
238    #include "geotoad.h"
239    
240    #ifdef ENABLE_OSM_GPS_MAP
241    #include "map-tool.h"
242    #endif
243    
244  #ifdef USE_MAEMO  #ifdef USE_MAEMO
245  #include "dbus.h"  #include "dbus.h"
# Line 227  extern void main_after_settings_redraw(a Line 271  extern void main_after_settings_redraw(a
271  #include <stdarg.h>  #include <stdarg.h>
272  extern void errorf(const char *fmt, ...);  extern void errorf(const char *fmt, ...);
273  extern gboolean on_window_key_press(GtkWidget *widget,  extern gboolean on_window_key_press(GtkWidget *widget,
274                                      GdkEventKey *event, gpointer data);                                      GdkEventKey *event, appdata_t *appdata);
275    #ifdef USE_STACKABLE_WINDOW
276    HildonAppMenu *menu_create(appdata_t *appdata, int mode);
277    #endif
278    void cachelist_goto_cache(appdata_t *appdata, cache_t *cache);
279    void gpxlist_goto_cachelist(appdata_t *appdata, gpx_t *gpx);
280    
281  #endif // GPXVIEW_H  #endif // GPXVIEW_H

Legend:
Removed from v.1  
changed lines
  Added in v.193