202 |
GtkTreeIter iter; |
GtkTreeIter iter; |
203 |
GtkTreeModel *model = gtk_tree_view_get_model(treeview); |
GtkTreeModel *model = gtk_tree_view_get_model(treeview); |
204 |
|
|
205 |
|
#ifdef USE_MAEMO |
206 |
|
/* check if a cache is already selected and ignore click if yes */ |
207 |
|
/* (was probably a double click) */ |
208 |
|
if(appdata->cur_cache) return; |
209 |
|
#endif |
210 |
|
|
211 |
if(gtk_tree_model_get_iter(model, &iter, path)) { |
if(gtk_tree_model_get_iter(model, &iter, path)) { |
212 |
cache_t *cache; |
cache_t *cache; |
213 |
gtk_tree_model_get(model, &iter, CACHELIST_COL_DATA, &cache, -1); |
gtk_tree_model_get(model, &iter, CACHELIST_COL_DATA, &cache, -1); |
719 |
GtkTreeIter iter; |
GtkTreeIter iter; |
720 |
GtkTreeModel *model = gtk_tree_view_get_model(treeview); |
GtkTreeModel *model = gtk_tree_view_get_model(treeview); |
721 |
|
|
722 |
|
#ifdef USE_MAEMO |
723 |
|
/* check if a cache is already selected and ignore click if yes */ |
724 |
|
/* (was probably a double click) */ |
725 |
|
if(appdata->cur_gpx) return; |
726 |
|
#endif |
727 |
|
|
728 |
if (gtk_tree_model_get_iter(model, &iter, path)) { |
if (gtk_tree_model_get_iter(model, &iter, path)) { |
729 |
gpx_t *gpx; |
gpx_t *gpx; |
730 |
gtk_tree_model_get(model, &iter, GPXLIST_COL_DATA, &gpx, -1); |
gtk_tree_model_get(model, &iter, GPXLIST_COL_DATA, &gpx, -1); |
1445 |
gtk_widget_destroy(dialog); |
gtk_widget_destroy(dialog); |
1446 |
} |
} |
1447 |
|
|
1448 |
void on_window_destroy (GtkWidget *widget, gpointer data); |
static void on_window_destroy (GtkWidget *widget, gpointer data); |
1449 |
|
|
1450 |
#ifndef USE_MAEMO |
#ifndef USE_MAEMO |
1451 |
static void |
static void |
1649 |
} |
} |
1650 |
|
|
1651 |
static const menu_entry_t submenu_tools_entries[] = { |
static const menu_entry_t submenu_tools_entries[] = { |
|
#ifdef ENABLE_OSM_GPS_MAP |
|
|
{ "Map", "Display an interactive world map", |
|
|
G_CALLBACK(cb_menu_map) }, |
|
|
#endif |
|
1652 |
{ "Geomath", "Geocoordinate calculation", |
{ "Geomath", "Geocoordinate calculation", |
1653 |
G_CALLBACK(cb_menu_geomath) }, |
G_CALLBACK(cb_menu_geomath) }, |
1654 |
{ "Geotext", "Text analysis", |
{ "Geotext", "Text analysis", |
1696 |
g_signal_connect_after(button, "clicked", |
g_signal_connect_after(button, "clicked", |
1697 |
G_CALLBACK(cb_menu_adddir), appdata); |
G_CALLBACK(cb_menu_adddir), appdata); |
1698 |
hildon_app_menu_append(menu, GTK_BUTTON(button)); |
hildon_app_menu_append(menu, GTK_BUTTON(button)); |
|
} |
|
1699 |
|
|
|
if(mode == MENU_GPXLIST) { |
|
1700 |
button = gtk_button_new_with_label(_("Export")); |
button = gtk_button_new_with_label(_("Export")); |
1701 |
g_signal_connect_after(button, "clicked", |
g_signal_connect_after(button, "clicked", |
1702 |
G_CALLBACK(on_export_clicked), appdata); |
G_CALLBACK(on_export_clicked), appdata); |
1713 |
G_CALLBACK(on_tools_clicked), appdata); |
G_CALLBACK(on_tools_clicked), appdata); |
1714 |
hildon_app_menu_append(menu, GTK_BUTTON(button)); |
hildon_app_menu_append(menu, GTK_BUTTON(button)); |
1715 |
|
|
1716 |
|
#ifdef ENABLE_OSM_GPS_MAP |
1717 |
|
if((mode == MENU_GPXLIST) || (mode == MENU_CACHELIST)) { |
1718 |
|
button = gtk_button_new_with_label(_("Map")); |
1719 |
|
g_signal_connect_after(button, "clicked", |
1720 |
|
G_CALLBACK(cb_menu_map), appdata); |
1721 |
|
hildon_app_menu_append(menu, GTK_BUTTON(button)); |
1722 |
|
} |
1723 |
|
#endif |
1724 |
|
|
1725 |
#ifdef HILDON_HELP |
#ifdef HILDON_HELP |
1726 |
button = gtk_button_new_with_label(_("Help")); |
button = gtk_button_new_with_label(_("Help")); |
1727 |
g_signal_connect_after(button, "clicked", |
g_signal_connect_after(button, "clicked", |
1938 |
puts("everything is gone"); |
puts("everything is gone"); |
1939 |
} |
} |
1940 |
|
|
1941 |
void on_window_destroy (GtkWidget *widget, gpointer data) { |
static void on_window_destroy (GtkWidget *widget, gpointer data) { |
1942 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
1943 |
|
|
1944 |
gconf_save_state(appdata); |
gconf_save_state(appdata); |