1 |
/* |
/* |
2 |
|
* Copyright (C) 2008 Till Harbaum <till@harbaum.org>. |
3 |
|
* |
4 |
* This file is part of OSM2Go. |
* This file is part of OSM2Go. |
5 |
* |
* |
6 |
* OSM2Go is free software: you can redistribute it and/or modify |
* OSM2Go is free software: you can redistribute it and/or modify |
58 |
/* disable all menu entries related to map */ |
/* disable all menu entries related to map */ |
59 |
gtk_widget_set_sensitive(appdata->menu_osm, project_valid); |
gtk_widget_set_sensitive(appdata->menu_osm, project_valid); |
60 |
gtk_widget_set_sensitive(appdata->menu_item_osm_upload, osm_valid); |
gtk_widget_set_sensitive(appdata->menu_item_osm_upload, osm_valid); |
61 |
gtk_widget_set_sensitive(appdata->menu_item_osm_undo, osm_valid); |
if(appdata->menu_item_osm_undo) |
62 |
|
gtk_widget_set_sensitive(appdata->menu_item_osm_undo, osm_valid); |
63 |
gtk_widget_set_sensitive(appdata->menu_item_osm_save_changes, osm_valid); |
gtk_widget_set_sensitive(appdata->menu_item_osm_save_changes, osm_valid); |
64 |
gtk_widget_set_sensitive(appdata->menu_item_osm_undo_changes, osm_valid); |
gtk_widget_set_sensitive(appdata->menu_item_osm_undo_changes, osm_valid); |
65 |
gtk_widget_set_sensitive(appdata->track.menu_track, osm_valid); |
gtk_widget_set_sensitive(appdata->track.menu_track, osm_valid); |
75 |
/******************** begin of menu *********************/ |
/******************** begin of menu *********************/ |
76 |
|
|
77 |
static void |
static void |
78 |
cb_menu_project_open(GtkWidget *window, gpointer data) { |
cb_menu_project_open(GtkMenuItem *item, gpointer data) { |
79 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
80 |
project_load(appdata, NULL); |
project_load(appdata, NULL); |
81 |
main_ui_enable(appdata); |
main_ui_enable(appdata); |
82 |
} |
} |
83 |
|
|
84 |
static void |
static void |
85 |
cb_menu_project_close(GtkWidget *window, gpointer data) { |
cb_menu_project_close(GtkMenuItem *item, gpointer data) { |
86 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
87 |
project_close(appdata); |
project_close(appdata); |
88 |
main_ui_enable(appdata); |
main_ui_enable(appdata); |
89 |
} |
} |
90 |
|
|
91 |
static void |
static void |
92 |
cb_menu_about(GtkWidget *window, gpointer data) { |
cb_menu_about(GtkMenuItem *item, gpointer data) { |
93 |
GtkAboutDialog *about = GTK_ABOUT_DIALOG(gtk_about_dialog_new()); |
appdata_t *appdata = (appdata_t*)data; |
|
|
|
|
gtk_about_dialog_set_name(about, "OSM2Go"); |
|
|
gtk_about_dialog_set_version(about, VERSION); |
|
|
gtk_about_dialog_set_copyright(about, _("Copyright 2008")); |
|
94 |
|
|
95 |
const gchar *authors[] = { |
const gchar *authors[] = { |
96 |
"Till Harbaum <till@harbaum.org>", |
"Till Harbaum <till@harbaum.org>", |
97 |
"Andrew Chadwick <andrewc-osm2go@piffle.org>", |
"Andrew Chadwick <andrewc-osm2go@piffle.org>", |
98 |
NULL }; |
NULL }; |
99 |
|
|
100 |
gtk_about_dialog_set_authors(about, authors); |
const gchar *artists[] = { |
101 |
|
#ifdef USE_HILDON |
102 |
gtk_about_dialog_set_website(about, |
/* cyrillic doesn't seem to work on hildon */ |
103 |
_("http://www.harbaum.org/till/maemo")); |
"Andrew Zhilin <drew.zhilin@gmail.com>", |
104 |
|
#else |
105 |
gtk_about_dialog_set_comments(about, |
"Андрей Жилин <drew.zhilin@gmail.com>", |
106 |
_("Mobile OSM Editor")); |
#endif |
107 |
|
NULL }; |
108 |
|
|
109 |
gtk_widget_show_all(GTK_WIDGET(about)); |
gtk_show_about_dialog(GTK_WINDOW(appdata->window), |
110 |
gtk_dialog_run(GTK_DIALOG(about)); |
"name", "OSM2Go", |
111 |
gtk_widget_destroy(GTK_WIDGET(about)); |
"version", VERSION, |
112 |
|
"copyright", _("Copyright 2008-2009"), |
113 |
|
"authors", authors, |
114 |
|
"artists", artists, |
115 |
|
"website", _("http://www.harbaum.org/till/maemo"), |
116 |
|
"comments", _("Mobile OSM Editor"), |
117 |
|
NULL); |
118 |
} |
} |
119 |
|
|
120 |
void on_window_destroy (GtkWidget *widget, gpointer data); |
void on_window_destroy (GtkWidget *widget, gpointer data); |
121 |
|
|
122 |
static void |
static void |
123 |
cb_menu_quit(GtkWidget *window, gpointer data) { |
cb_menu_quit(GtkMenuItem *item, gpointer data) { |
124 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
125 |
gtk_widget_destroy(GTK_WIDGET(appdata->window)); |
gtk_widget_destroy(GTK_WIDGET(appdata->window)); |
126 |
} |
} |
127 |
|
|
128 |
static void |
static void |
129 |
cb_menu_upload(GtkWidget *window, gpointer data) { |
cb_menu_upload(GtkMenuItem *item, gpointer data) { |
130 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
131 |
if(!appdata->osm || !appdata->project) return; |
if(!appdata->osm || !appdata->project) return; |
132 |
|
|
134 |
} |
} |
135 |
|
|
136 |
static void |
static void |
137 |
cb_menu_download(GtkWidget *window, gpointer data) { |
cb_menu_download(GtkMenuItem *item, gpointer data) { |
138 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
139 |
if(!appdata->project) return; |
if(!appdata->project) return; |
140 |
|
|
161 |
} |
} |
162 |
|
|
163 |
static void |
static void |
164 |
cb_menu_wms_import(GtkWidget *window, gpointer data) { |
cb_menu_wms_import(GtkMenuItem *item, gpointer data) { |
165 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
166 |
wms_import(appdata); |
wms_import(appdata); |
167 |
} |
} |
168 |
|
|
169 |
static void |
static void |
170 |
cb_menu_wms_clear(GtkWidget *window, gpointer data) { |
cb_menu_wms_clear(GtkMenuItem *item, gpointer data) { |
171 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
172 |
wms_remove(appdata); |
wms_remove(appdata); |
173 |
} |
} |
174 |
|
|
175 |
static void |
static void |
176 |
cb_menu_wms_adjust(GtkWidget *window, gpointer data) { |
cb_menu_wms_adjust(GtkMenuItem *item, gpointer data) { |
177 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
178 |
map_action_set(appdata, MAP_ACTION_BG_ADJUST); |
map_action_set(appdata, MAP_ACTION_BG_ADJUST); |
179 |
} |
} |
181 |
/* ----------- hide objects for performance reasons ----------- */ |
/* ----------- hide objects for performance reasons ----------- */ |
182 |
|
|
183 |
static void |
static void |
184 |
cb_menu_map_hide_sel(GtkWidget *window, gpointer data) { |
cb_menu_map_hide_sel(GtkMenuItem *item, gpointer data) { |
185 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
186 |
map_hide_selected(appdata); |
map_hide_selected(appdata); |
187 |
} |
} |
188 |
|
|
189 |
static void |
static void |
190 |
cb_menu_map_show_all(GtkWidget *window, gpointer data) { |
cb_menu_map_show_all(GtkMenuItem *item, gpointer data) { |
191 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
192 |
map_show_all(appdata); |
map_show_all(appdata); |
193 |
} |
} |
196 |
|
|
197 |
#if 1 // mainly for testing |
#if 1 // mainly for testing |
198 |
static void |
static void |
199 |
cb_menu_redraw(GtkWidget *window, gpointer data) { |
cb_menu_redraw(GtkMenuItem *item, gpointer data) { |
200 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
201 |
|
|
202 |
/* redraw the entire map by destroying all map items and redrawing them */ |
/* redraw the entire map by destroying all map items and redrawing them */ |
220 |
#endif |
#endif |
221 |
|
|
222 |
static void |
static void |
223 |
cb_menu_style(GtkWidget *widget, gpointer data) { |
cb_menu_style(GtkMenuItem *item, gpointer data) { |
224 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
225 |
|
|
226 |
style_select(GTK_WIDGET(appdata->window), appdata); |
style_select(GTK_WIDGET(appdata->window), appdata); |
227 |
} |
} |
228 |
|
|
229 |
static void |
static void |
230 |
cb_menu_map_no_icons(GtkWidget *widget, gpointer data) { |
cb_menu_map_no_icons(GtkCheckMenuItem *item, gpointer data) { |
231 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
232 |
|
|
233 |
banner_busy_start(appdata, 1, "Redrawing..."); |
banner_busy_start(appdata, 1, "Redrawing..."); |
234 |
map_clear(appdata, MAP_LAYER_OBJECTS_ONLY); |
map_clear(appdata, MAP_LAYER_OBJECTS_ONLY); |
235 |
appdata->settings->no_icons = |
appdata->settings->no_icons = gtk_check_menu_item_get_active(item); |
|
gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); |
|
236 |
map_paint(appdata); |
map_paint(appdata); |
237 |
banner_busy_stop(appdata); //"Redrawing..." |
banner_busy_stop(appdata); //"Redrawing..." |
238 |
} |
} |
239 |
|
|
240 |
static void |
static void |
241 |
cb_menu_map_no_antialias(GtkWidget *widget, gpointer data) { |
cb_menu_map_no_antialias(GtkCheckMenuItem *item, gpointer data) { |
242 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
243 |
|
|
244 |
banner_busy_start(appdata, 1, "Redrawing..."); |
banner_busy_start(appdata, 1, "Redrawing..."); |
245 |
map_clear(appdata, MAP_LAYER_OBJECTS_ONLY); |
map_clear(appdata, MAP_LAYER_OBJECTS_ONLY); |
246 |
appdata->settings->no_antialias = |
appdata->settings->no_antialias = gtk_check_menu_item_get_active(item); |
|
gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); |
|
247 |
map_paint(appdata); |
map_paint(appdata); |
248 |
banner_busy_stop(appdata); //"Redrawing..." |
banner_busy_stop(appdata); //"Redrawing..." |
249 |
} |
} |
250 |
|
|
251 |
static void |
static void |
252 |
cb_menu_undo(GtkWidget *widget, gpointer data) { |
cb_menu_undo(GtkMenuItem *item, gpointer data) { |
253 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
254 |
|
|
255 |
undo(appdata); |
undo(appdata); |
258 |
} |
} |
259 |
|
|
260 |
static void |
static void |
261 |
cb_menu_save_changes(GtkWidget *widget, gpointer data) { |
cb_menu_save_changes(GtkMenuItem *item, gpointer data) { |
262 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
263 |
|
|
264 |
diff_save(appdata->project, appdata->osm); |
diff_save(appdata->project, appdata->osm); |
266 |
} |
} |
267 |
|
|
268 |
static void |
static void |
269 |
cb_menu_undo_changes(GtkWidget *widget, gpointer data) { |
cb_menu_undo_changes(GtkMenuItem *item, gpointer data) { |
270 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
271 |
|
|
272 |
if(!yes_no_f(GTK_WIDGET(appdata->window), NULL, 0, 0, |
if(!yes_no_f(GTK_WIDGET(appdata->window), NULL, 0, 0, |
273 |
_("Discard local changes?"), |
_("Discard local changes?"), |
274 |
_("Throw away all the changes you've not uploaded yet? This can't be undone."))) |
_("Throw away all the changes you've not " |
275 |
|
"uploaded yet? This can't be undone."))) |
276 |
return; |
return; |
277 |
|
|
278 |
banner_busy_start(appdata, 1, _("Redrawing...")); |
banner_busy_start(appdata, 1, _("Redrawing...")); |
287 |
} |
} |
288 |
|
|
289 |
static void |
static void |
290 |
cb_menu_fullscreen(GtkWidget *widget, gpointer data) { |
cb_menu_osm_relations(GtkMenuItem *item, gpointer data) { |
291 |
|
relation_list((appdata_t*)data); |
292 |
|
} |
293 |
|
|
294 |
|
static void |
295 |
|
cb_menu_fullscreen(GtkCheckMenuItem *item, gpointer data) { |
296 |
appdata_t *appdata = (appdata_t *)data; |
appdata_t *appdata = (appdata_t *)data; |
297 |
|
|
298 |
if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) |
if(gtk_check_menu_item_get_active(item)) |
299 |
gtk_window_fullscreen(GTK_WINDOW(appdata->window)); |
gtk_window_fullscreen(GTK_WINDOW(appdata->window)); |
300 |
else |
else |
301 |
gtk_window_unfullscreen(GTK_WINDOW(appdata->window)); |
gtk_window_unfullscreen(GTK_WINDOW(appdata->window)); |
302 |
} |
} |
303 |
|
|
304 |
static void |
static void |
305 |
cb_menu_zoomin(GtkWidget *widget, appdata_t *appdata) { |
cb_menu_zoomin(GtkMenuItem *item, appdata_t *appdata) { |
306 |
if(!appdata || !appdata->map) return; |
if(!appdata || !appdata->map) return; |
307 |
|
|
308 |
map_set_zoom(appdata->map, appdata->map->state->zoom*ZOOM_FACTOR_MENU, TRUE); |
map_set_zoom(appdata->map, appdata->map->state->zoom*ZOOM_FACTOR_MENU, TRUE); |
310 |
} |
} |
311 |
|
|
312 |
static void |
static void |
313 |
cb_menu_zoomout(GtkWidget *widget, appdata_t *appdata) { |
cb_menu_zoomout(GtkMenuItem *item, appdata_t *appdata) { |
314 |
if(!appdata || !appdata->map) return; |
if(!appdata || !appdata->map) return; |
315 |
|
|
316 |
map_set_zoom(appdata->map, appdata->map->state->zoom/ZOOM_FACTOR_MENU, TRUE); |
map_set_zoom(appdata->map, appdata->map->state->zoom/ZOOM_FACTOR_MENU, TRUE); |
318 |
} |
} |
319 |
|
|
320 |
static void |
static void |
321 |
cb_menu_track_import(GtkWidget *window, appdata_t *appdata) { |
cb_menu_track_import(GtkMenuItem *item, appdata_t *appdata) { |
322 |
|
|
323 |
/* open a file selector */ |
/* open a file selector */ |
324 |
GtkWidget *dialog; |
GtkWidget *dialog; |
367 |
} |
} |
368 |
|
|
369 |
static void |
static void |
370 |
cb_menu_track_gps(GtkWidget *window, gpointer data) { |
cb_menu_track_gps(GtkMenuItem *item, gpointer data) { |
371 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
372 |
|
|
373 |
if(gtk_check_menu_item_get_active( |
if(gtk_check_menu_item_get_active( |
379 |
} |
} |
380 |
|
|
381 |
static void |
static void |
382 |
cb_menu_track_export(GtkWidget *window, gpointer data) { |
cb_menu_track_export(GtkMenuItem *item, gpointer data) { |
383 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
384 |
messagef(GTK_WIDGET(appdata->window), _("NIY"), |
messagef(GTK_WIDGET(appdata->window), _("NIY"), |
385 |
_("Track export is not yet supported.")); |
_("Track export is not yet supported.")); |
386 |
} |
} |
387 |
|
|
388 |
static void |
static void |
389 |
cb_menu_track_clear(GtkWidget *window, gpointer data) { |
cb_menu_track_clear(GtkMenuItem *item, gpointer data) { |
390 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
391 |
track_do(appdata, TRACK_NONE, NULL); |
track_do(appdata, TRACK_NONE, NULL); |
392 |
} |
} |
431 |
GtkWidget *menu_shell, |
GtkWidget *menu_shell, |
432 |
GtkSignalFunc activate_cb, |
GtkSignalFunc activate_cb, |
433 |
char *label, |
char *label, |
434 |
const gchar *stock_id, // overridden by label, accels |
const gchar *icon_name, // stock id or name for icon_load |
435 |
|
// overridden by label, accels, icon_name |
436 |
const gchar *accel_path, |
const gchar *accel_path, |
437 |
guint accel_key, // from gdk/gdkkeysyms.h |
guint accel_key, // from gdk/gdkkeysyms.h |
438 |
GdkModifierType accel_mods, // e.g. GDK_CONTROL_MASK |
GdkModifierType accel_mods, // e.g. GDK_CONTROL_MASK |
439 |
gboolean is_check, gboolean check_status) |
gboolean is_check, gboolean check_status) |
440 |
{ |
{ |
441 |
GtkWidget *item = NULL; |
GtkWidget *item = NULL; |
442 |
GtkStockItem stock_item; |
GtkWidget *image = NULL; |
443 |
|
|
444 |
gboolean stock_item_known = FALSE; |
gboolean stock_item_known = FALSE; |
445 |
if (stock_id != NULL) { |
GtkStockItem stock_item; |
446 |
stock_item_known = gtk_stock_lookup(stock_id, &stock_item); |
if (icon_name != NULL) { |
447 |
|
stock_item_known = gtk_stock_lookup(icon_name, &stock_item); |
448 |
} |
} |
449 |
|
|
450 |
// Icons |
// Icons |
452 |
item = is_check ? gtk_check_menu_item_new_with_mnemonic (label) |
item = is_check ? gtk_check_menu_item_new_with_mnemonic (label) |
453 |
: gtk_menu_item_new_with_mnemonic (label); |
: gtk_menu_item_new_with_mnemonic (label); |
454 |
#else |
#else |
455 |
if (is_check || !stock_item_known) { |
if (is_check) { |
456 |
item = is_check ? gtk_check_menu_item_new_with_mnemonic (label) |
item = gtk_check_menu_item_new_with_mnemonic (label); |
457 |
: gtk_menu_item_new_with_mnemonic (label); |
} |
458 |
|
else if (!stock_item_known) { |
459 |
|
GdkPixbuf *pbuf = icon_load(&appdata->icon, icon_name); |
460 |
|
if (pbuf) { |
461 |
|
image = gtk_image_new_from_pixbuf(pbuf); |
462 |
|
} |
463 |
|
if (image) { |
464 |
|
item = gtk_image_menu_item_new_with_mnemonic(label); |
465 |
|
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); |
466 |
|
} |
467 |
|
else { |
468 |
|
item = gtk_menu_item_new_with_mnemonic(label); |
469 |
|
} |
470 |
} |
} |
471 |
else { |
else { |
472 |
item = gtk_image_menu_item_new_with_mnemonic(label); |
item = gtk_image_menu_item_new_with_mnemonic(label); |
473 |
GtkWidget *stock_image = gtk_image_new_from_stock(stock_id, GTK_ICON_SIZE_MENU); |
image = gtk_image_new_from_stock(icon_name, GTK_ICON_SIZE_MENU); |
474 |
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), stock_image); |
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); |
475 |
} |
} |
476 |
#endif |
#endif |
477 |
|
|
537 |
|
|
538 |
/* --------------- view menu ------------------- */ |
/* --------------- view menu ------------------- */ |
539 |
|
|
540 |
#ifndef UISPECIFIC_MENU_IS_MENU_BAR |
#ifndef UISPECIFIC_MAIN_MENU_IS_MENU_BAR |
541 |
gtk_menu_shell_append(GTK_MENU_SHELL(menu), gtk_separator_menu_item_new()); |
gtk_menu_shell_append(GTK_MENU_SHELL(menu), gtk_separator_menu_item_new()); |
542 |
#endif |
#endif |
543 |
|
|
575 |
|
|
576 |
appdata->menu_item_osm_upload = menu_append_new_item( |
appdata->menu_item_osm_upload = menu_append_new_item( |
577 |
appdata, submenu, GTK_SIGNAL_FUNC(cb_menu_upload), _("_Upload..."), |
appdata, submenu, GTK_SIGNAL_FUNC(cb_menu_upload), _("_Upload..."), |
578 |
NULL, "<OSM2Go-Main>/OSM/Upload", |
"upload.16", "<OSM2Go-Main>/OSM/Upload", |
579 |
GDK_u, GDK_SHIFT_MASK|GDK_CONTROL_MASK, FALSE, FALSE |
GDK_u, GDK_SHIFT_MASK|GDK_CONTROL_MASK, FALSE, FALSE |
580 |
); |
); |
581 |
|
|
582 |
menu_append_new_item( |
menu_append_new_item( |
583 |
appdata, submenu, GTK_SIGNAL_FUNC(cb_menu_download), _("_Download..."), |
appdata, submenu, GTK_SIGNAL_FUNC(cb_menu_download), _("_Download..."), |
584 |
NULL, "<OSM2Go-Main>/OSM/Download", |
"download.16", "<OSM2Go-Main>/OSM/Download", |
585 |
GDK_d, GDK_SHIFT_MASK|GDK_CONTROL_MASK, FALSE, FALSE |
GDK_d, GDK_SHIFT_MASK|GDK_CONTROL_MASK, FALSE, FALSE |
586 |
); |
); |
587 |
|
|
608 |
0, 0, FALSE, FALSE |
0, 0, FALSE, FALSE |
609 |
); |
); |
610 |
|
|
611 |
|
gtk_menu_shell_append(GTK_MENU_SHELL(submenu), gtk_separator_menu_item_new()); |
612 |
|
appdata->menu_item_osm_relations = menu_append_new_item( |
613 |
|
appdata, submenu, GTK_SIGNAL_FUNC(cb_menu_osm_relations), _("_Relations..."), |
614 |
|
NULL, "<OSM2Go-Main>/OSM/Relations", |
615 |
|
GDK_r, GDK_SHIFT_MASK|GDK_CONTROL_MASK, FALSE, FALSE |
616 |
|
); |
617 |
|
|
618 |
/* -------------------- wms submenu -------------------- */ |
/* -------------------- wms submenu -------------------- */ |
619 |
|
|
620 |
appdata->menu_wms = item = gtk_menu_item_new_with_mnemonic( _("_WMS") ); |
appdata->menu_wms = item = gtk_menu_item_new_with_mnemonic( _("_WMS") ); |
840 |
|
|
841 |
project_free(appdata->project); |
project_free(appdata->project); |
842 |
|
|
843 |
undo_free(appdata->undo_state); |
if(appdata->menu_item_osm_undo) |
844 |
|
undo_free(appdata->undo.state); |
845 |
|
|
846 |
puts("everything is gone"); |
puts("everything is gone"); |
847 |
} |
} |
907 |
|
|
908 |
g_thread_init(NULL); |
g_thread_init(NULL); |
909 |
|
|
|
gps_init(&appdata); |
|
|
|
|
910 |
gtk_init (&argc, &argv); |
gtk_init (&argc, &argv); |
911 |
|
|
912 |
|
gps_init(&appdata); |
913 |
|
|
914 |
#ifdef USE_HILDON |
#ifdef USE_HILDON |
915 |
printf("Installing osso context for \"org.harbaum." PACKAGE "\"\n"); |
printf("Installing osso context for \"org.harbaum." PACKAGE "\"\n"); |
916 |
appdata.osso_context = osso_initialize("org.harbaum."PACKAGE, |
appdata.osso_context = osso_initialize("org.harbaum."PACKAGE, |
1008 |
puts("gtk_main() left"); |
puts("gtk_main() left"); |
1009 |
|
|
1010 |
track_save(appdata.project, appdata.track.track); |
track_save(appdata.project, appdata.track.track); |
1011 |
|
track_clear(&appdata, appdata.track.track); |
1012 |
|
|
1013 |
/* save a diff if there are dirty entries */ |
/* save a diff if there are dirty entries */ |
1014 |
diff_save(appdata.project, appdata.osm); |
diff_save(appdata.project, appdata.osm); |