202 |
GtkTreeIter iter; |
GtkTreeIter iter; |
203 |
GtkTreeModel *model = gtk_tree_view_get_model(treeview); |
GtkTreeModel *model = gtk_tree_view_get_model(treeview); |
204 |
|
|
205 |
|
/* check if a cache is already selected and ignore click if yes */ |
206 |
|
/* (was probably a double click) */ |
207 |
|
if(appdata->cur_cache) return; |
208 |
|
|
209 |
if(gtk_tree_model_get_iter(model, &iter, path)) { |
if(gtk_tree_model_get_iter(model, &iter, path)) { |
210 |
cache_t *cache; |
cache_t *cache; |
211 |
gtk_tree_model_get(model, &iter, CACHELIST_COL_DATA, &cache, -1); |
gtk_tree_model_get(model, &iter, CACHELIST_COL_DATA, &cache, -1); |
717 |
GtkTreeIter iter; |
GtkTreeIter iter; |
718 |
GtkTreeModel *model = gtk_tree_view_get_model(treeview); |
GtkTreeModel *model = gtk_tree_view_get_model(treeview); |
719 |
|
|
720 |
|
/* check if a cache is already selected and ignore click if yes */ |
721 |
|
/* (was probably a double click) */ |
722 |
|
if(appdata->cur_gpx) return; |
723 |
|
|
724 |
if (gtk_tree_model_get_iter(model, &iter, path)) { |
if (gtk_tree_model_get_iter(model, &iter, path)) { |
725 |
gpx_t *gpx; |
gpx_t *gpx; |
726 |
gtk_tree_model_get(model, &iter, GPXLIST_COL_DATA, &gpx, -1); |
gtk_tree_model_get(model, &iter, GPXLIST_COL_DATA, &gpx, -1); |
1441 |
gtk_widget_destroy(dialog); |
gtk_widget_destroy(dialog); |
1442 |
} |
} |
1443 |
|
|
1444 |
void on_window_destroy (GtkWidget *widget, gpointer data); |
static void on_window_destroy (GtkWidget *widget, gpointer data); |
1445 |
|
|
1446 |
#ifndef USE_MAEMO |
#ifndef USE_MAEMO |
1447 |
static void |
static void |
1645 |
} |
} |
1646 |
|
|
1647 |
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 |
|
1648 |
{ "Geomath", "Geocoordinate calculation", |
{ "Geomath", "Geocoordinate calculation", |
1649 |
G_CALLBACK(cb_menu_geomath) }, |
G_CALLBACK(cb_menu_geomath) }, |
1650 |
{ "Geotext", "Text analysis", |
{ "Geotext", "Text analysis", |
1692 |
g_signal_connect_after(button, "clicked", |
g_signal_connect_after(button, "clicked", |
1693 |
G_CALLBACK(cb_menu_adddir), appdata); |
G_CALLBACK(cb_menu_adddir), appdata); |
1694 |
hildon_app_menu_append(menu, GTK_BUTTON(button)); |
hildon_app_menu_append(menu, GTK_BUTTON(button)); |
|
} |
|
1695 |
|
|
|
if(mode == MENU_GPXLIST) { |
|
1696 |
button = gtk_button_new_with_label(_("Export")); |
button = gtk_button_new_with_label(_("Export")); |
1697 |
g_signal_connect_after(button, "clicked", |
g_signal_connect_after(button, "clicked", |
1698 |
G_CALLBACK(on_export_clicked), appdata); |
G_CALLBACK(on_export_clicked), appdata); |
1709 |
G_CALLBACK(on_tools_clicked), appdata); |
G_CALLBACK(on_tools_clicked), appdata); |
1710 |
hildon_app_menu_append(menu, GTK_BUTTON(button)); |
hildon_app_menu_append(menu, GTK_BUTTON(button)); |
1711 |
|
|
1712 |
|
#ifdef ENABLE_OSM_GPS_MAP |
1713 |
|
if((mode == MENU_GPXLIST) || (mode == MENU_CACHELIST)) { |
1714 |
|
button = gtk_button_new_with_label(_("Map")); |
1715 |
|
g_signal_connect_after(button, "clicked", |
1716 |
|
G_CALLBACK(cb_menu_map), appdata); |
1717 |
|
hildon_app_menu_append(menu, GTK_BUTTON(button)); |
1718 |
|
} |
1719 |
|
#endif |
1720 |
|
|
1721 |
#ifdef HILDON_HELP |
#ifdef HILDON_HELP |
1722 |
button = gtk_button_new_with_label(_("Help")); |
button = gtk_button_new_with_label(_("Help")); |
1723 |
g_signal_connect_after(button, "clicked", |
g_signal_connect_after(button, "clicked", |
1934 |
puts("everything is gone"); |
puts("everything is gone"); |
1935 |
} |
} |
1936 |
|
|
1937 |
void on_window_destroy (GtkWidget *widget, gpointer data) { |
static void on_window_destroy (GtkWidget *widget, gpointer data) { |
1938 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
1939 |
|
|
1940 |
gconf_save_state(appdata); |
gconf_save_state(appdata); |