Diff of /trunk/src/gpxview.h

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

revision 2 by harbaum, Sat Jun 20 11:44:14 2009 UTC revision 231 by harbaum, Mon Dec 7 16:14:50 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>
31    #include <hildon/hildon-text-view.h>
32    #include <hildon/hildon-window-stack.h>
33    #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
36    #define MENU_GPXLIST   0
37    #define MENU_CACHELIST 1
38    #define MENU_CACHE     2
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 43  Line 56 
56    
57  #ifdef USE_MAEMO  #ifdef USE_MAEMO
58  #include <hildon/hildon-program.h>  #include <hildon/hildon-program.h>
 #include <hildon/hildon-text-view.h>  
59  #include <hildon/hildon-file-chooser-dialog.h>  #include <hildon/hildon-file-chooser-dialog.h>
60  #include <hildon/hildon-file-system-model.h>  #include <hildon/hildon-file-system-model.h>
61  #include <hildon/hildon-bread-crumb-trail.h>  #include <hildon/hildon-bread-crumb-trail.h>
# Line 55  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 97  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 117  typedef struct { Line 132  typedef struct {
132    GtkWidget    *gpxview;    GtkWidget    *gpxview;
133    GConfClient *gconf_client;    GConfClient *gconf_client;
134    
   pos_t manual_goto;  
135    gboolean compass_locked;    gboolean compass_locked;
136    int compass_damping;    int compass_damping;
137    
138      gboolean disable_gcvote;
139    
140    struct gps_state *gps_state;    struct gps_state *gps_state;
141    
142    /* 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 134  typedef struct { Line 150  typedef struct {
150  #ifndef NO_COPY_N_PASTE  #ifndef NO_COPY_N_PASTE
151    /* do enable/disable the edit entries */    /* do enable/disable the edit entries */
152    GtkWidget *menu_cut, *menu_copy, *menu_paste;    GtkWidget *menu_cut, *menu_copy, *menu_paste;
   GtkClipboard *clipboard;     /* clipboard for copy/paste */  
153    GtkTextBuffer *active_buffer;    GtkTextBuffer *active_buffer;
154  #endif  #endif
155    
156      GtkClipboard *clipboard;     /* clipboard for copy/paste */
157    
158    #ifdef USE_STACKABLE_WINDOW
159      GtkWidget *export_menu, *tools_menu;
160    #endif
161    
162    /* save result here to be able to "goto" it */    /* save result here to be able to "goto" it */
163    pos_t geomath;    pos_t geomath;
164    
# Line 157  typedef struct { Line 178  typedef struct {
178    
179  #ifdef USE_MAEMO  #ifdef USE_MAEMO
180    gboolean fullscreen;    gboolean fullscreen;
181    #ifdef ENABLE_MAEMO_MAPPER
182    pos_t mmpos;                /* position received from Maemo Mapper */    pos_t mmpos;                /* position received from Maemo Mapper */
183    gboolean mmpos_valid;    gboolean mmpos_valid;
184    #endif
185    
186    gboolean mmpoi_dontlaunch;    gboolean mmpoi_dontlaunch;
187    
188    gboolean cachelist_disable_screensaver;    gboolean cachelist_disable_screensaver;
189    gboolean goto_disable_screensaver;    gboolean goto_disable_screensaver;
   gboolean cachelist_update;  
190    
191    HildonProgram *program;    HildonProgram *program;
192    HildonWindow *window;    HildonWindow *window;
193    osso_context_t *osso_context;    osso_context_t *osso_context;
194    GtkWidget *bct;  #else
195    gpx_t *search_results;    GtkWidget *window;
196    #endif
197    
198      gboolean cachelist_update;
199    
200    #if defined(USE_BREAD_CRUMB_TRAIL) || defined(BCT)
201    /* reference to enable/disable these while walking the crumb trail */    /* reference to enable/disable these while walking the crumb trail */
202    GtkWidget *menu_import, *menu_export;    GtkWidget *menu_import, *menu_export;
203    GtkWidget *menu_search;    GtkWidget *menu_search;
204    
205      GtkWidget *bct;
206    #endif
207    
208    /* keep track of current "path" in the bread crumb trail */    /* keep track of current "path" in the bread crumb trail */
209    gpx_t *cur_gpx;    gpx_t *cur_gpx;
210    cache_t *cur_cache;    cache_t *cur_cache;
211      struct cache_context_s *cache_context;
212    
213  #else    gpx_t *search_results;
214    GtkWidget *window;  
215    #ifdef ENABLE_OSM_GPS_MAP
216      struct {
217        struct map_context_s *context;
218        int source;
219        int zoom;
220        pos_t pos;
221      } map;
222  #endif  #endif
223    
224      /* username is also used to detect own caches (by log entry) */
225      char *username;
226    
227      /* stuff to call geotoad */
228      struct {
229        char *password, *filename;
230        float distance, lat, lon;
231        int flags;
232      } gt;
233    
234    GtkWidget *vbox;    GtkWidget *vbox;
235  } appdata_t;  } appdata_t;
236    
# Line 192  typedef struct { Line 240  typedef struct {
240  #include "gconf.h"  #include "gconf.h"
241  #include "html.h"  #include "html.h"
242  #include "icons.h"  #include "icons.h"
243    #include "gcvote.h"
244  #include "cache.h"  #include "cache.h"
245  #include "geomath.h"  #include "geomath.h"
246  #include "geotext.h"  #include "geotext.h"
# Line 200  typedef struct { Line 249  typedef struct {
249  #include "mm_poi.h"  #include "mm_poi.h"
250  #include "precpos.h"  #include "precpos.h"
251  #include "garmin_export.h"  #include "garmin_export.h"
252    #include "geotoad.h"
253    #include "about.h"
254    
255    #ifdef ENABLE_OSM_GPS_MAP
256    #include "map-tool.h"
257    #endif
258    
259  #ifdef USE_MAEMO  #ifdef USE_MAEMO
260  #include "dbus.h"  #include "dbus.h"
# Line 231  extern void main_after_settings_redraw(a Line 286  extern void main_after_settings_redraw(a
286  #include <stdarg.h>  #include <stdarg.h>
287  extern void errorf(const char *fmt, ...);  extern void errorf(const char *fmt, ...);
288  extern gboolean on_window_key_press(GtkWidget *widget,  extern gboolean on_window_key_press(GtkWidget *widget,
289                                      GdkEventKey *event, gpointer data);                                      GdkEventKey *event, appdata_t *appdata);
290    #ifdef USE_STACKABLE_WINDOW
291    HildonAppMenu *menu_create(appdata_t *appdata, int mode);
292    #endif
293    void cachelist_goto_cache(appdata_t *appdata, cache_t *cache);
294    void gpxlist_goto_cachelist(appdata_t *appdata, gpx_t *gpx);
295    gboolean gpxlist_find(appdata_t *appdata, GtkTreeIter *iter, gpx_t *gpx);
296    void gpxlist_set(GtkListStore *store, GtkTreeIter *iter, gpx_t *gpx);
297    void gpxlist_add(appdata_t *appdata, gpx_t *new);
298    void cachelist_redraw(appdata_t *appdata);
299    
300  #endif // GPXVIEW_H  #endif // GPXVIEW_H

Legend:
Removed from v.2  
changed lines
  Added in v.231