Mercurial > geeqie
diff src/view_file.c @ 1598:c03a8e19a43a
expose the file grouping flag to the user
author | nadvornik |
---|---|
date | Sat, 09 May 2009 19:45:24 +0000 |
parents | 24a12aa0cb54 |
children | fe9ac4a5c969 |
line wrap: on
line diff
--- a/src/view_file.c Sat May 09 19:25:51 2009 +0000 +++ b/src/view_file.c Sat May 09 19:45:24 2009 +0000 @@ -374,6 +374,20 @@ file_util_copy_path_list_to_clipboard(vf_pop_menu_file_list(vf)); } +static void vf_pop_menu_enable_grouping_cb(GtkWidget *widget, gpointer data) +{ + ViewFile *vf = data; + + file_data_disable_grouping_list(vf_pop_menu_file_list(vf), FALSE); +} + +static void vf_pop_menu_disable_grouping_cb(GtkWidget *widget, gpointer data) +{ + ViewFile *vf = data; + + file_data_disable_grouping_list(vf_pop_menu_file_list(vf), TRUE); +} + static void vf_pop_menu_sort_cb(GtkWidget *widget, gpointer data) { ViewFile *vf; @@ -583,6 +597,11 @@ menu_item_add_sensitive(menu, _("_Copy path"), active, G_CALLBACK(vf_pop_menu_copy_path_cb), vf); + menu_item_add_sensitive(menu, _("Enable file _grouping"), active, + G_CALLBACK(vf_pop_menu_enable_grouping_cb), vf); + menu_item_add_sensitive(menu, _("Disable file groupi_ng"), active, + G_CALLBACK(vf_pop_menu_disable_grouping_cb), vf); + menu_item_add_divider(menu); submenu = submenu_add_sort(NULL, G_CALLBACK(vf_pop_menu_sort_cb), vf,