summaryrefslogtreecommitdiff
path: root/popovers__file-chooser-list.patch
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2021-08-18 15:24:42 -0400
committerB. Stack <bgstack15@gmail.com>2021-08-18 15:24:42 -0400
commit76447c4a5b6c31f9aec0834353e017eeae77f9c4 (patch)
treeec9b6ee857805269eae8a63ea89acf3e1bf3a21f /popovers__file-chooser-list.patch
parentUpdate to 3.24.29 (diff)
downloadgtk3-classic-build-gtk3-76447c4a5b6c31f9aec0834353e017eeae77f9c4.tar.gz
gtk3-classic-build-gtk3-76447c4a5b6c31f9aec0834353e017eeae77f9c4.tar.bz2
gtk3-classic-build-gtk3-76447c4a5b6c31f9aec0834353e017eeae77f9c4.zip
3.24.29 for fc33
Diffstat (limited to 'popovers__file-chooser-list.patch')
-rw-r--r--popovers__file-chooser-list.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/popovers__file-chooser-list.patch b/popovers__file-chooser-list.patch
new file mode 100644
index 0000000..96eafd3
--- /dev/null
+++ b/popovers__file-chooser-list.patch
@@ -0,0 +1,70 @@
+Index: b/gtk/gtkfilechooserwidget.c
+===================================================================
+--- a/gtk/gtkfilechooserwidget.c
++++ b/gtk/gtkfilechooserwidget.c
+@@ -29,6 +29,7 @@
+ #include "gtkcellrendererpixbuf.h"
+ #include "gtkcellrenderertext.h"
+ #include "gtkcheckmenuitem.h"
++#include "deprecated/gtkimagemenuitem.h"
+ #include "gtkclipboard.h"
+ #include "gtkcomboboxtext.h"
+ #include "gtkdragsource.h"
+@@ -2281,6 +2282,10 @@ append_separator (GtkWidget *box)
+ {
+ GtkWidget *separator;
+
++ separator = gtk_separator_menu_item_new ();
++ gtk_widget_set_visible (GTK_WIDGET (separator), TRUE);
++ gtk_menu_shell_append (GTK_MENU_SHELL (box), separator);
++ return separator;
+ separator = g_object_new (GTK_TYPE_SEPARATOR,
+ "orientation", GTK_ORIENTATION_HORIZONTAL,
+ "visible", TRUE,
+@@ -2302,6 +2307,14 @@ add_button (GtkWidget *box,
+ {
+ GtkWidget *item;
+
++ if (g_str_match_string ("toggle", action, TRUE))
++ item = gtk_check_menu_item_new_with_mnemonic (label);
++ else
++ item = gtk_image_menu_item_new_with_mnemonic (label);
++ g_object_set (G_OBJECT (item), "action-name", action, NULL);
++ gtk_widget_set_visible (GTK_WIDGET (item), TRUE);
++ gtk_menu_shell_append (GTK_MENU_SHELL (box), item);
++ return item;
+ item = g_object_new (GTK_TYPE_MODEL_BUTTON,
+ "visible", TRUE,
+ "action-name", action,
+@@ -2326,6 +2339,9 @@ file_list_build_popover (GtkFileChooserW
+ g_object_set (box, "margin", 10, NULL);
+ gtk_widget_show (box);
+ gtk_container_add (GTK_CONTAINER (priv->browse_files_popover), box);
++ priv->browse_files_popover = gtk_menu_new ();
++ gtk_menu_attach_to_widget (GTK_MENU (priv->browse_files_popover), GTK_WIDGET (priv->browse_files_tree_view), NULL);
++ box = priv->browse_files_popover;
+
+ priv->visit_file_item = add_button (box, _("_Visit File"), "item.visit");
+ priv->open_folder_item = add_button (box, _("_Open With File Manager"), "item.open");
+@@ -2342,6 +2358,12 @@ file_list_build_popover (GtkFileChooserW
+ priv->type_column_item = add_button (box, _("Show T_ype Column"), "item.toggle-show-type");
+ priv->show_time_item = add_button (box, _("Show _Time"), "item.toggle-show-time");
+ priv->sort_directories_item = add_button (box, _("Sort _Folders before Files"), "item.toggle-sort-dirs-first");
++ g_object_set (priv->visit_file_item, "image", gtk_image_new_from_icon_name ("gtk-jump-to", GTK_ICON_SIZE_MENU), NULL);
++ g_object_set (priv->open_folder_item, "image", gtk_image_new_from_icon_name ("gtk-open", GTK_ICON_SIZE_MENU), NULL);
++ g_object_set (priv->copy_file_location_item, "image", gtk_image_new_from_icon_name ("gtk-copy", GTK_ICON_SIZE_MENU), NULL);
++ g_object_set (priv->add_shortcut_item, "image", gtk_image_new_from_icon_name ("gtk-add", GTK_ICON_SIZE_MENU), NULL);
++ g_object_set (priv->delete_file_item, "image", gtk_image_new_from_icon_name ("gtk-delete", GTK_ICON_SIZE_MENU), NULL);
++ g_object_set (priv->trash_file_item, "image", gtk_image_new_from_icon_name ("user-trash-full",GTK_ICON_SIZE_MENU), NULL);
+ }
+
+ /* Updates the popover for the file list, creating it if necessary */
+@@ -2401,6 +2401,8 @@ file_list_show_popover (GtkFileChooserWi
+
+
+ file_list_update_popover (impl);
++ gtk_menu_popup_at_pointer (GTK_MENU (priv->browse_files_popover), NULL);
++ return;
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
+ list = gtk_tree_selection_get_selected_rows (selection, &model);
bgstack15