209 |
CACHELIST_NUM_COLS |
CACHELIST_NUM_COLS |
210 |
} ; |
} ; |
211 |
|
|
212 |
void cachelist_view_onRowActivated(GtkTreeView *treeview, |
void cachelist_goto_cache(appdata_t *appdata, cache_t *cache) { |
213 |
|
#if !defined(USE_BREAD_CRUMB_TRAIL) && !defined(BCT) |
214 |
|
cache_dialog(appdata, cache); |
215 |
|
#else |
216 |
|
gtk_container_remove(GTK_CONTAINER(appdata->vbox), appdata->cur_view); |
217 |
|
appdata->cur_view = cache_view(appdata, cache); |
218 |
|
gtk_box_pack_start_defaults(GTK_BOX(appdata->vbox), appdata->cur_view); |
219 |
|
gtk_widget_show_all(appdata->vbox); |
220 |
|
|
221 |
|
crumb_add(appdata, cache->name, CRUMB_CACHE, cache); |
222 |
|
#endif |
223 |
|
} |
224 |
|
|
225 |
|
static void cachelist_view_onRowActivated(GtkTreeView *treeview, |
226 |
GtkTreePath *path, |
GtkTreePath *path, |
227 |
GtkTreeViewColumn *col, |
GtkTreeViewColumn *col, |
228 |
gpointer userdata) { |
gpointer userdata) { |
239 |
if(gtk_tree_model_get_iter(model, &iter, path)) { |
if(gtk_tree_model_get_iter(model, &iter, path)) { |
240 |
cache_t *cache; |
cache_t *cache; |
241 |
gtk_tree_model_get(model, &iter, CACHELIST_COL_DATA, &cache, -1); |
gtk_tree_model_get(model, &iter, CACHELIST_COL_DATA, &cache, -1); |
242 |
#if !defined(USE_BREAD_CRUMB_TRAIL) && !defined(BCT) |
cachelist_goto_cache(appdata, cache); |
|
cache_dialog(appdata, cache); |
|
|
#else |
|
|
gtk_container_remove(GTK_CONTAINER(appdata->vbox), appdata->cur_view); |
|
|
appdata->cur_view = cache_view(appdata, cache); |
|
|
gtk_box_pack_start_defaults(GTK_BOX(appdata->vbox), appdata->cur_view); |
|
|
gtk_widget_show_all(appdata->vbox); |
|
|
|
|
|
crumb_add(appdata, cache->name, CRUMB_CACHE, cache); |
|
|
#endif |
|
243 |
} |
} |
244 |
} |
} |
245 |
|
|
728 |
gconf_save_closed_name(appdata, gpx->filename, gpx->name); |
gconf_save_closed_name(appdata, gpx->filename, gpx->name); |
729 |
} |
} |
730 |
|
|
731 |
|
void gpxlist_goto_cachelist(appdata_t *appdata, gpx_t *gpx) { |
732 |
|
#if !defined(USE_BREAD_CRUMB_TRAIL) && !defined(BCT) |
733 |
|
#ifdef USE_STACKABLE_WINDOW |
734 |
|
if(!appdata->cur_gpx) |
735 |
|
#endif |
736 |
|
cachelist_dialog(appdata, gpx); |
737 |
|
#ifdef USE_STACKABLE_WINDOW |
738 |
|
else |
739 |
|
printf("selected gpx, but cachelist window already present\n"); |
740 |
|
#endif |
741 |
|
#else |
742 |
|
gtk_container_remove(GTK_CONTAINER(appdata->vbox), appdata->cur_view); |
743 |
|
appdata->cur_view = cachelist_create(appdata, gpx, NULL); |
744 |
|
gtk_box_pack_start_defaults(GTK_BOX(appdata->vbox), appdata->cur_view); |
745 |
|
gtk_widget_show_all(appdata->vbox); |
746 |
|
|
747 |
|
crumb_add(appdata, gpx->name, CRUMB_CACHELIST, gpx); |
748 |
|
#endif |
749 |
|
} |
750 |
|
|
751 |
static void gpxlist_view_onRowActivated(GtkTreeView *treeview, |
static void gpxlist_view_onRowActivated(GtkTreeView *treeview, |
752 |
GtkTreePath *path, |
GtkTreePath *path, |
753 |
GtkTreeViewColumn *col, |
GtkTreeViewColumn *col, |
865 |
|
|
866 |
gpx_busy_dialog_destroy(dialog); |
gpx_busy_dialog_destroy(dialog); |
867 |
} |
} |
868 |
#if !defined(USE_BREAD_CRUMB_TRAIL) && !defined(BCT) |
|
869 |
#ifdef USE_STACKABLE_WINDOW |
gpxlist_goto_cachelist(appdata, gpx); |
|
if(!appdata->cur_gpx) |
|
|
#endif |
|
|
cachelist_dialog(appdata, gpx); |
|
|
#ifdef USE_STACKABLE_WINDOW |
|
|
else |
|
|
printf("selected gpx, but cachelist window already present\n"); |
|
|
#endif |
|
|
#else |
|
|
gtk_container_remove(GTK_CONTAINER(appdata->vbox), appdata->cur_view); |
|
|
appdata->cur_view = cachelist_create(appdata, gpx, NULL); |
|
|
gtk_box_pack_start_defaults(GTK_BOX(appdata->vbox), appdata->cur_view); |
|
|
gtk_widget_show_all(appdata->vbox); |
|
|
|
|
|
crumb_add(appdata, gpx->name, CRUMB_CACHELIST, gpx); |
|
|
#endif |
|
870 |
} |
} |
871 |
} |
} |
872 |
} |
} |