Mercurial > geeqie
comparison src/ui_pathsel.c @ 1448:89dedc61b1bd
gint -> gboolean.
author | zas_ |
---|---|
date | Sun, 15 Mar 2009 20:16:20 +0000 |
parents | a3d3208b0c50 |
children | 956aab097ea7 |
comparison
equal
deleted
inserted
replaced
1447:a10d70ae85e9 | 1448:89dedc61b1bd |
---|---|
65 | 65 |
66 GList *filter_list; | 66 GList *filter_list; |
67 GList *filter_text_list; | 67 GList *filter_text_list; |
68 GtkWidget *filter_combo; | 68 GtkWidget *filter_combo; |
69 | 69 |
70 gint show_hidden; | 70 gboolean show_hidden; |
71 GtkWidget *hidden_button; | 71 GtkWidget *hidden_button; |
72 | 72 |
73 GtkWidget *bookmark_list; | 73 GtkWidget *bookmark_list; |
74 | 74 |
75 GtkTreePath *right_click_path; | 75 GtkTreePath *right_click_path; |
112 g_free(dd->filter); | 112 g_free(dd->filter); |
113 g_free(dd->path); | 113 g_free(dd->path); |
114 g_free(dd); | 114 g_free(dd); |
115 } | 115 } |
116 | 116 |
117 static gint dest_check_filter(const gchar *filter, const gchar *file) | 117 static gboolean dest_check_filter(const gchar *filter, const gchar *file) |
118 { | 118 { |
119 const gchar *f_ptr = filter; | 119 const gchar *f_ptr = filter; |
120 const gchar *strt_ptr; | 120 const gchar *strt_ptr; |
121 gint i; | 121 gint i; |
122 gint l; | 122 gint l; |
148 static gint dest_sort_cb(gpointer a, gpointer b) | 148 static gint dest_sort_cb(gpointer a, gpointer b) |
149 { | 149 { |
150 return CASE_SORT((gchar *)a, (gchar *)b); | 150 return CASE_SORT((gchar *)a, (gchar *)b); |
151 } | 151 } |
152 | 152 |
153 static gint is_hidden(const gchar *name) | 153 static gboolean is_hidden(const gchar *name) |
154 { | 154 { |
155 if (name[0] != '.') return FALSE; | 155 if (name[0] != '.') return FALSE; |
156 if (name[1] == '\0') return FALSE; | 156 if (name[1] == '\0') return FALSE; |
157 if (name[1] == '.' && name[2] == '\0') return FALSE; | 157 if (name[1] == '.' && name[2] == '\0') return FALSE; |
158 return TRUE; | 158 return TRUE; |
271 | 271 |
272 g_free(dd->path); | 272 g_free(dd->path); |
273 dd->path = g_strdup(path); | 273 dd->path = g_strdup(path); |
274 } | 274 } |
275 | 275 |
276 static void dest_change_dir(Dest_Data *dd, const gchar *path, gint retain_name) | 276 static void dest_change_dir(Dest_Data *dd, const gchar *path, gboolean retain_name) |
277 { | 277 { |
278 const gchar *old_name = NULL; | 278 const gchar *old_name = NULL; |
279 gchar *full_path; | 279 gchar *full_path; |
280 gchar *new_directory; | 280 gchar *new_directory; |
281 | 281 |
606 tree_view_get_cell_clamped(view, dd->right_click_path, 0, TRUE, x, y, &cw, &ch); | 606 tree_view_get_cell_clamped(view, dd->right_click_path, 0, TRUE, x, y, &cw, &ch); |
607 *y += ch; | 607 *y += ch; |
608 popup_menu_position_clamp(menu, x, y, 0); | 608 popup_menu_position_clamp(menu, x, y, 0); |
609 } | 609 } |
610 | 610 |
611 static gint dest_popup_menu(Dest_Data *dd, GtkTreeView *view, | 611 static gboolean dest_popup_menu(Dest_Data *dd, GtkTreeView *view, |
612 gint button, guint32 time, gint local) | 612 guint button, guint32 time, gboolean local) |
613 { | 613 { |
614 GtkWidget *menu; | 614 GtkWidget *menu; |
615 | 615 |
616 if (!dd->right_click_path) return FALSE; | 616 if (!dd->right_click_path) return FALSE; |
617 | 617 |
618 if (view == GTK_TREE_VIEW(dd->d_view)) | 618 if (view == GTK_TREE_VIEW(dd->d_view)) |
619 { | 619 { |
620 GtkTreeModel *model; | 620 GtkTreeModel *model; |
621 GtkTreeIter iter; | 621 GtkTreeIter iter; |
622 gchar *text; | 622 gchar *text; |
623 gint normal_dir; | 623 gboolean normal_dir; |
624 | 624 |
625 model = gtk_tree_view_get_model(view); | 625 model = gtk_tree_view_get_model(view); |
626 gtk_tree_model_get_iter(model, &iter, dd->right_click_path); | 626 gtk_tree_model_get_iter(model, &iter, dd->right_click_path); |
627 gtk_tree_model_get(model, &iter, 0, &text, -1); | 627 gtk_tree_model_get(model, &iter, 0, &text, -1); |
628 | 628 |
659 } | 659 } |
660 | 660 |
661 return TRUE; | 661 return TRUE; |
662 } | 662 } |
663 | 663 |
664 static gint dest_press_cb(GtkWidget *view, GdkEventButton *event, gpointer data) | 664 static gboolean dest_press_cb(GtkWidget *view, GdkEventButton *event, gpointer data) |
665 { | 665 { |
666 Dest_Data *dd = data; | 666 Dest_Data *dd = data; |
667 GtkTreePath *tpath; | 667 GtkTreePath *tpath; |
668 GtkTreeViewColumn *column; | 668 GtkTreeViewColumn *column; |
669 gint cell_x, cell_y; | 669 gint cell_x, cell_y; |
929 } | 929 } |
930 | 930 |
931 g_free(old_text); | 931 g_free(old_text); |
932 } | 932 } |
933 | 933 |
934 static void dest_filter_add(Dest_Data *dd, const gchar *filter, const gchar *description, gint set) | 934 static void dest_filter_add(Dest_Data *dd, const gchar *filter, const gchar *description, gboolean set) |
935 { | 935 { |
936 GList *work; | 936 GList *work; |
937 gchar *buf; | 937 gchar *buf; |
938 gint c = 0; | 938 gint c = 0; |
939 | 939 |
1277 | 1277 |
1278 dd->select_func = func; | 1278 dd->select_func = func; |
1279 dd->select_data = data; | 1279 dd->select_data = data; |
1280 } | 1280 } |
1281 | 1281 |
1282 void path_selection_add_filter(GtkWidget *entry, const gchar *filter, const gchar *description, gint set) | 1282 void path_selection_add_filter(GtkWidget *entry, const gchar *filter, const gchar *description, gboolean set) |
1283 { | 1283 { |
1284 Dest_Data *dd = g_object_get_data(G_OBJECT(entry), "destination_data"); | 1284 Dest_Data *dd = g_object_get_data(G_OBJECT(entry), "destination_data"); |
1285 | 1285 |
1286 if (!dd) return; | 1286 if (!dd) return; |
1287 if (!filter) return; | 1287 if (!filter) return; |