Mercurial > hg > forks > geeqie
changeset 2734:0d8300b608b4
Collections - goto menu option
In a Collections window, an additional right-click menu option to go to
the source image.
author | Colin Clark <colin.clark@cclark.uk> |
---|---|
date | Wed, 07 Mar 2018 10:33:53 +0000 |
parents | cff064279094 |
children | 63589debf388 |
files | src/collect-table.c |
diffstat | 1 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/collect-table.c Sun Mar 04 12:00:19 2018 +0000 +++ b/src/collect-table.c Wed Mar 07 10:33:53 2018 +0000 @@ -857,6 +857,26 @@ collection_dialog_append(NULL, ct->cd); } +static void collection_table_popup_goto_original_cb(GtkWidget *widget, gpointer data) +{ + CollectTable *ct = data; + GList *list; + LayoutWindow *lw = NULL; + FileData *fd; + + if (!layout_valid(&lw)) return; + list = collection_table_selection_get_list(ct); + if (list) + { + fd = list->data; + if (fd) + { + layout_set_fd(lw, fd); + } + } + g_list_free(list); +} + static void collection_table_popup_find_dupes_cb(GtkWidget *widget, gpointer data) { CollectTable *ct = data; @@ -914,6 +934,8 @@ G_CALLBACK(collection_table_popup_view_cb), ct); menu_item_add_stock_sensitive(menu, _("View in _new window"), GTK_STOCK_NEW, over_icon, G_CALLBACK(collection_table_popup_view_new_cb), ct); + menu_item_add_stock(menu, _("Go to original"), GTK_STOCK_FIND, + G_CALLBACK(collection_table_popup_goto_original_cb), ct); menu_item_add_divider(menu); menu_item_add_stock_sensitive(menu, _("Rem_ove"), GTK_STOCK_REMOVE, over_icon, G_CALLBACK(collection_table_popup_remove_cb), ct);