223 |
#if !defined(USE_BREAD_CRUMB_TRAIL) && !defined(BCT) |
#if !defined(USE_BREAD_CRUMB_TRAIL) && !defined(BCT) |
224 |
cache_dialog(appdata, cache); |
cache_dialog(appdata, cache); |
225 |
#else |
#else |
226 |
|
crumb_add(appdata, cache->name, CRUMB_CACHE, cache); |
227 |
|
|
228 |
gtk_container_remove(GTK_CONTAINER(appdata->vbox), appdata->cur_view); |
gtk_container_remove(GTK_CONTAINER(appdata->vbox), appdata->cur_view); |
229 |
appdata->cur_view = cache_view(appdata, cache); |
appdata->cur_view = cache_view(appdata, cache); |
230 |
gtk_box_pack_start_defaults(GTK_BOX(appdata->vbox), appdata->cur_view); |
gtk_box_pack_start_defaults(GTK_BOX(appdata->vbox), appdata->cur_view); |
231 |
gtk_widget_show_all(appdata->vbox); |
gtk_widget_show_all(appdata->vbox); |
|
|
|
|
crumb_add(appdata, cache->name, CRUMB_CACHE, cache); |
|
232 |
#endif |
#endif |
233 |
} |
} |
234 |
|
|
1110 |
} |
} |
1111 |
|
|
1112 |
/* add last entry in gpx list to visual representation */ |
/* add last entry in gpx list to visual representation */ |
1113 |
static void gpxlist_add(appdata_t *appdata, gpx_t *new) { |
void gpxlist_add(appdata_t *appdata, gpx_t *new) { |
1114 |
GtkTreeIter iter; |
GtkTreeIter iter; |
1115 |
|
|
1116 |
gtk_list_store_append(appdata->gpxstore, &iter); |
gtk_list_store_append(appdata->gpxstore, &iter); |
1120 |
gpx_t **gpx = &appdata->gpx; |
gpx_t **gpx = &appdata->gpx; |
1121 |
while(*gpx) gpx = &((*gpx)->next); |
while(*gpx) gpx = &((*gpx)->next); |
1122 |
*gpx = new; |
*gpx = new; |
1123 |
|
|
1124 |
|
/* select new iter */ |
1125 |
|
GtkTreeSelection *selection = |
1126 |
|
gtk_tree_view_get_selection(GTK_TREE_VIEW(appdata->gpxview)); |
1127 |
|
gtk_tree_selection_select_iter(selection, &iter); |
1128 |
|
GtkTreePath *path = |
1129 |
|
gtk_tree_model_get_path(GTK_TREE_MODEL(appdata->gpxstore), &iter); |
1130 |
|
gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(appdata->gpxview), |
1131 |
|
path, NULL, TRUE, 0.0, 0.0); |
1132 |
|
gtk_tree_path_free(path); |
1133 |
} |
} |
1134 |
|
|
1135 |
/******************** end of gpxlist ********************/ |
/******************** end of gpxlist ********************/ |
1489 |
|
|
1490 |
gtk_box_pack_start_defaults(GTK_BOX(GTK_DIALOG(dialog)->vbox), |
gtk_box_pack_start_defaults(GTK_BOX(GTK_DIALOG(dialog)->vbox), |
1491 |
gtk_label_new(_("Search for:"))); |
gtk_label_new(_("Search for:"))); |
1492 |
#if !defined(USE_MAEMO) || (MAEMO_VERSION_MAJOR < 5) |
context.entry = entry_new(); |
|
context.entry = gtk_entry_new(); |
|
|
#else |
|
|
context.entry = hildon_entry_new(HILDON_SIZE_AUTO); |
|
|
#endif |
|
|
|
|
1493 |
gtk_box_pack_start_defaults(GTK_BOX(GTK_DIALOG(dialog)->vbox), |
gtk_box_pack_start_defaults(GTK_BOX(GTK_DIALOG(dialog)->vbox), |
1494 |
context.entry); |
context.entry); |
1495 |
|
|
2075 |
/********************* end of menu **********************/ |
/********************* end of menu **********************/ |
2076 |
|
|
2077 |
void cleanup(appdata_t *appdata) { |
void cleanup(appdata_t *appdata) { |
2078 |
|
gconf_save_state(appdata); |
2079 |
|
|
2080 |
gpx_free_all(appdata->gpx); |
gpx_free_all(appdata->gpx); |
|
if(appdata->path) free(appdata->path); |
|
|
if(appdata->image_path) free(appdata->image_path); |
|
|
if(appdata->search_str) free(appdata->search_str); |
|
2081 |
|
|
2082 |
#ifdef USE_STACKABLE_WINDOW |
#ifdef USE_STACKABLE_WINDOW |
2083 |
if(appdata->export_menu) submenu_cleanup(appdata->export_menu); |
if(appdata->export_menu) submenu_cleanup(appdata->export_menu); |
2115 |
static void on_window_destroy (GtkWidget *widget, gpointer data) { |
static void on_window_destroy (GtkWidget *widget, gpointer data) { |
2116 |
appdata_t *appdata = (appdata_t*)data; |
appdata_t *appdata = (appdata_t*)data; |
2117 |
|
|
|
gconf_save_state(appdata); |
|
2118 |
gtk_main_quit(); |
gtk_main_quit(); |
2119 |
appdata->window = NULL; |
appdata->window = NULL; |
2120 |
} |
} |
2405 |
|
|
2406 |
gtk_init (&argc, &argv); |
gtk_init (&argc, &argv); |
2407 |
|
|
2408 |
|
misc_init(); |
2409 |
|
|
2410 |
curl_global_init(CURL_GLOBAL_ALL); |
curl_global_init(CURL_GLOBAL_ALL); |
2411 |
|
|
2412 |
#ifdef USE_MAEMO |
#ifdef USE_MAEMO |