void-packages/srcpkgs/xfdesktop/patches/0001-Settings-Allow-directo...

31 lines
1.3 KiB
Diff

From 726b34c0b37e778a4983866602cc20cfa4172b99 Mon Sep 17 00:00:00 2001
From: Eric Koegel <eric.koegel@gmail.com>
Date: Mon, 13 Jun 2016 15:08:11 +0300
Subject: Settings: Allow directories to be selected (Bug #12832)
Gtk 2.24.31 imported some Gtk3 code that breaks directory
selection when using a file filter while in directory mode.
We need to add directories to the filter for the
GtkFileChooser, otherwise you can't select directories
while in directory mode...
Cherry-picked from:
https://git.xfce.org/users/eric/xfdesktop/commit/?h=the-long-road-to-gtk3&id=cc311b61b82b7510a3a6cb0952d3a331e3551e05
diff --git settings/main.c settings/main.c
index 2b17617..d44c6ef 100644
--- settings/main.c
+++ settings/main.c
@@ -1857,6 +1857,9 @@ xfdesktop_settings_dialog_setup_tabs(GtkBuilder *main_gxml,
filter = gtk_file_filter_new();
gtk_file_filter_set_name(filter, _("Image files"));
gtk_file_filter_add_pixbuf_formats(filter);
+ gtk_file_filter_add_mime_type(filter, "inode/directory");
+ gtk_file_filter_add_mime_type(filter, "application/x-directory");
+ gtk_file_filter_add_mime_type(filter, "text/directory");
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(panel->btn_folder), filter);
/* Change the title of the file chooser dialog */
--
cgit v0.10.1