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> |
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 |
#define MENU_GPXLIST 0 |
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> |
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> |
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 |
|
|
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; |
|
guint cachelist_handler_id; /* update timer */ |
|
123 |
gboolean cachelist_hide_found; |
gboolean cachelist_hide_found; |
124 |
|
|
125 |
/* geotext related */ |
/* geotext related */ |
131 |
GtkWidget *gpxview; |
GtkWidget *gpxview; |
132 |
GConfClient *gconf_client; |
GConfClient *gconf_client; |
133 |
|
|
|
pos_t manual_goto; |
|
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 */ |
149 |
#ifndef NO_COPY_N_PASTE |
#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 |
#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; |
163 |
|
|
177 |
|
|
178 |
#ifdef USE_MAEMO |
#ifdef USE_MAEMO |
179 |
gboolean fullscreen; |
gboolean fullscreen; |
180 |
|
#ifdef ENABLE_MAEMO_MAPPER |
181 |
pos_t mmpos; /* position received from Maemo Mapper */ |
pos_t mmpos; /* position received from Maemo Mapper */ |
182 |
gboolean mmpos_valid; |
gboolean mmpos_valid; |
183 |
|
#endif |
184 |
|
|
185 |
gboolean mmpoi_dontlaunch; |
gboolean mmpoi_dontlaunch; |
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 |
#ifdef USE_BREAD_CRUMB_TRAIL |
gboolean cachelist_update; |
198 |
|
|
199 |
|
#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 |
|
struct cache_context_s *cache_context; |
211 |
|
|
212 |
#else |
gpx_t *search_results; |
213 |
GtkWidget *window; |
|
214 |
|
#ifdef ENABLE_OSM_GPS_MAP |
215 |
|
struct { |
216 |
|
struct map_context_s *context; |
217 |
|
int source; |
218 |
|
int zoom; |
219 |
|
pos_t pos; |
220 |
|
} map; |
221 |
|
#endif |
222 |
|
|
223 |
|
/* username is also used to detect own caches (by log entry) */ |
224 |
|
char *username; |
225 |
|
|
226 |
|
/* stuff to call geotoad */ |
227 |
|
struct { |
228 |
|
char *password, *filename; |
229 |
|
float distance, lat, lon; |
230 |
|
int flags; |
231 |
|
} gt; |
232 |
|
|
233 |
|
#ifdef ESPEAK |
234 |
|
/* espeak handling */ |
235 |
|
struct { |
236 |
|
gboolean enabled; |
237 |
|
int sample_rate; // or init error |
238 |
|
} espeak; |
239 |
#endif |
#endif |
240 |
|
|
241 |
|
#ifndef USE_STACKABLE_WINDOW |
242 |
GtkWidget *vbox; |
GtkWidget *vbox; |
243 |
|
#endif |
244 |
} appdata_t; |
} appdata_t; |
245 |
|
|
246 |
/* all includes that rely on appdata_t go here ... */ |
/* all includes that rely on appdata_t go here ... */ |
249 |
#include "gconf.h" |
#include "gconf.h" |
250 |
#include "html.h" |
#include "html.h" |
251 |
#include "icons.h" |
#include "icons.h" |
252 |
|
#include "gcvote.h" |
253 |
#include "cache.h" |
#include "cache.h" |
254 |
#include "geomath.h" |
#include "geomath.h" |
255 |
#include "geotext.h" |
#include "geotext.h" |
258 |
#include "mm_poi.h" |
#include "mm_poi.h" |
259 |
#include "precpos.h" |
#include "precpos.h" |
260 |
#include "garmin_export.h" |
#include "garmin_export.h" |
261 |
|
#include "geotoad.h" |
262 |
|
#include "about.h" |
263 |
|
|
264 |
|
#ifdef ENABLE_OSM_GPS_MAP |
265 |
|
#include "map-tool.h" |
266 |
|
#endif |
267 |
|
|
268 |
#ifdef USE_MAEMO |
#ifdef USE_MAEMO |
269 |
#include "dbus.h" |
#include "dbus.h" |
295 |
#include <stdarg.h> |
#include <stdarg.h> |
296 |
extern void errorf(const char *fmt, ...); |
extern void errorf(const char *fmt, ...); |
297 |
extern gboolean on_window_key_press(GtkWidget *widget, |
extern gboolean on_window_key_press(GtkWidget *widget, |
298 |
GdkEventKey *event, gpointer data); |
GdkEventKey *event, appdata_t *appdata); |
299 |
#ifdef USE_STACKABLE_WINDOW |
#ifdef USE_STACKABLE_WINDOW |
300 |
HildonAppMenu *menu_create(appdata_t *appdata, int mode); |
HildonAppMenu *menu_create(appdata_t *appdata, int mode); |
301 |
#endif |
#endif |
302 |
|
void cachelist_goto_cache(appdata_t *appdata, cache_t *cache); |
303 |
|
void gpxlist_goto_cachelist(appdata_t *appdata, gpx_t *gpx); |
304 |
|
gboolean gpxlist_find(appdata_t *appdata, GtkTreeIter *iter, gpx_t *gpx); |
305 |
|
void gpxlist_set(GtkListStore *store, GtkTreeIter *iter, gpx_t *gpx); |
306 |
|
void gpxlist_add(appdata_t *appdata, gpx_t *new); |
307 |
|
void cachelist_redraw(appdata_t *appdata); |
308 |
|
|
309 |
#endif // GPXVIEW_H |
#endif // GPXVIEW_H |