597 |
static void search_result_free(gpx_t *result); |
static void search_result_free(gpx_t *result); |
598 |
|
|
599 |
void on_cachelist_destroy(GtkWidget *widget, appdata_t *appdata) { |
void on_cachelist_destroy(GtkWidget *widget, appdata_t *appdata) { |
600 |
|
printf("cachelist destroy\n"); |
601 |
|
|
602 |
if(appdata->search_results) { |
if(appdata->search_results) { |
603 |
search_result_free(appdata->search_results); |
search_result_free(appdata->search_results); |
604 |
appdata->search_results = NULL; |
appdata->search_results = NULL; |
671 |
return icon_get(ICON_FILE, 0); |
return icon_get(ICON_FILE, 0); |
672 |
} |
} |
673 |
|
|
674 |
static void gpxlist_set(GtkListStore *store, GtkTreeIter *iter, gpx_t *gpx) { |
void gpxlist_set(GtkListStore *store, GtkTreeIter *iter, gpx_t *gpx) { |
675 |
char date_str[32], cnum[32]; |
char date_str[32], cnum[32]; |
676 |
|
|
677 |
if(gpx->year && gpx->month && gpx->day) { |
if(gpx->year && gpx->month && gpx->day) { |
914 |
} |
} |
915 |
} |
} |
916 |
|
|
917 |
|
/* search gpx file in gpx list */ |
918 |
|
gboolean gpxlist_find(appdata_t *appdata, GtkTreeIter *iter, gpx_t *gpx) { |
919 |
|
GtkTreeModel *model = |
920 |
|
gtk_tree_view_get_model(GTK_TREE_VIEW(appdata->gpxview)); |
921 |
|
|
922 |
|
gboolean found = |
923 |
|
gtk_tree_model_get_iter_first(model, iter); |
924 |
|
|
925 |
|
while(found) { |
926 |
|
gpx_t *this_gpx; |
927 |
|
gtk_tree_model_get(model, iter, GPXLIST_COL_DATA, &this_gpx, -1); |
928 |
|
|
929 |
|
if(gpx == this_gpx) |
930 |
|
return TRUE; |
931 |
|
|
932 |
|
found = gtk_tree_model_iter_next(model, iter); |
933 |
|
} |
934 |
|
|
935 |
|
return FALSE; |
936 |
|
} |
937 |
|
|
938 |
|
|
939 |
#ifndef USE_PANNABLE_AREA |
#ifndef USE_PANNABLE_AREA |
940 |
static gboolean |
static gboolean |
941 |
view_selection_func(GtkTreeSelection *selection, GtkTreeModel *model, |
view_selection_func(GtkTreeSelection *selection, GtkTreeModel *model, |