Mercurial > geeqie.yaz
diff src/view_dir_list.c @ 397:a7be56e84870
Merge vd(list|tree)_release_cb() in vd_release_cb().
I made some assumptions here i hope correct.
author | zas_ |
---|---|
date | Thu, 17 Apr 2008 17:35:51 +0000 |
parents | a01535f52b56 |
children | 0a2e1b130a25 |
line wrap: on
line diff
--- a/src/view_dir_list.c Thu Apr 17 17:19:41 2008 +0000 +++ b/src/view_dir_list.c Thu Apr 17 17:35:51 2008 +0000 @@ -349,37 +349,6 @@ return TRUE; } -static gint vdlist_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data) -{ - ViewDir *vd = data; - GtkTreePath *tpath; - GtkTreeIter iter; - FileData *fd = NULL; - - vd_color_set(vd, vd->click_fd, FALSE); - - if (bevent->button != 1) return TRUE; - - if ((bevent->x != 0 || bevent->y != 0) && - gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(widget), bevent->x, bevent->y, - &tpath, NULL, NULL, NULL)) - { - GtkTreeModel *store; - - store = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); - gtk_tree_model_get_iter(store, &iter, tpath); - gtk_tree_model_get(store, &iter, DIR_COLUMN_POINTER, &fd, -1); - gtk_tree_path_free(tpath); - } - - if (fd && vd->click_fd == fd) - { - vdlist_select_row(vd, vd->click_fd); - } - - return TRUE; -} - static void vdlist_destroy_cb(GtkWidget *widget, gpointer data) { ViewDir *vd = data; @@ -441,7 +410,7 @@ g_signal_connect(G_OBJECT(vd->view), "button_press_event", G_CALLBACK(vdlist_press_cb), vd); g_signal_connect(G_OBJECT(vd->view), "button_release_event", - G_CALLBACK(vdlist_release_cb), vd); + G_CALLBACK(vd_release_cb), vd); if (path) vdlist_set_path(vd, path);