From 91cdbe94ef64e38d7a75c2e7e64fac040cc37770 Mon Sep 17 00:00:00 2001 From: simeplejack-src Date: Tue, 7 Mar 2023 11:25:20 -0500 Subject: [PATCH 1/2] Add a patch to restore configurable 'gtk-dialogs-use-header'(default: false) setting on Wayland --- fixes__wayland_dialogs_header_setting.patch | 17 +++++++++++++++++ series | 1 + 2 files changed, 18 insertions(+) create mode 100644 fixes__wayland_dialogs_header_setting.patch diff --git a/fixes__wayland_dialogs_header_setting.patch b/fixes__wayland_dialogs_header_setting.patch new file mode 100644 index 0000000..e2aad7d --- /dev/null +++ b/fixes__wayland_dialogs_header_setting.patch @@ -0,0 +1,17 @@ +Index: gtk3/gdk/wayland/gdkscreen-wayland.c +=================================================================== +--- gtk3.orig/gdk/wayland/gdkscreen-wayland.c ++++ gtk3/gdk/wayland/gdkscreen-wayland.c +@@ -1087,12 +1087,6 @@ gdk_wayland_screen_get_setting (GdkScree + return set_capability_setting (screen, value, + GTK_SHELL1_CAPABILITY_DESKTOP_ICONS); + +- if (strcmp (name, "gtk-dialogs-use-header") == 0) +- { +- g_value_set_boolean (value, TRUE); +- return TRUE; +- } +- + if (strcmp (name, "gtk-fontconfig-timestamp") == 0) + { + g_value_set_uint (value, wayland_screen->dbus_settings.fontconfig_timestamp); diff --git a/series b/series index 54cd5a3..5e5fae7 100644 --- a/series +++ b/series @@ -22,3 +22,4 @@ popovers__places-sidebar.patch notebook_wheel_scroll.patch treeview__alternating_row_colours.patch window__rgba-visual.patch +fixes__wayland_dialogs_header_setting.patch From 7e394b47ac41099577e1bf5a9bab0706e37df256 Mon Sep 17 00:00:00 2001 From: simeplejack-src Date: Fri, 10 Mar 2023 17:02:47 -0500 Subject: [PATCH 2/2] XFCE style file-chooser --- appearance__file-chooser_xfce.patch | 146 ++++++++++++++++++++++++++++ series | 2 +- 2 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 appearance__file-chooser_xfce.patch diff --git a/appearance__file-chooser_xfce.patch b/appearance__file-chooser_xfce.patch new file mode 100644 index 0000000..73bab8a --- /dev/null +++ b/appearance__file-chooser_xfce.patch @@ -0,0 +1,146 @@ +Index: gtk3/gtk/gtkplacessidebar.c +=================================================================== +--- gtk3.orig/gtk/gtkplacessidebar.c ++++ gtk3/gtk/gtkplacessidebar.c +@@ -455,12 +455,34 @@ list_box_header_func (GtkListBoxRow *row + else + { + before_section_type = SECTION_INVALID; +- gtk_widget_set_margin_top (GTK_WIDGET (row), 4); + } + +- if (before && before_section_type != row_section_type) ++ if (before_section_type != row_section_type) + { +- separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL); ++ switch (row_section_type) ++ { ++ case SECTION_COMPUTER: ++ case SECTION_BOOKMARKS: ++ if (before_section_type == SECTION_COMPUTER) ++ { ++ return; ++ } ++ separator = gtk_label_new(NULL); ++ gtk_label_set_markup(GTK_LABEL(separator), "Places"); ++ break; ++ case SECTION_MOUNTS: ++ separator = gtk_label_new(NULL); ++ gtk_label_set_markup(GTK_LABEL(separator), "Devices"); ++ break; ++ case SECTION_OTHER_LOCATIONS: ++ separator = gtk_label_new(NULL); ++ gtk_label_set_markup(GTK_LABEL(separator), "Network"); ++ break; ++ default: ++ separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL); ++ } ++ gtk_widget_set_halign(separator, GTK_ALIGN_START); ++ gtk_widget_set_margin_left (separator, 14); + gtk_widget_set_margin_top (separator, 4); + gtk_widget_set_margin_bottom (separator, 4); + gtk_list_box_row_set_header (row, separator); +@@ -529,6 +551,7 @@ add_place (GtkPlacesSidebar * + g_signal_connect (event_box, "button-release-event", + G_CALLBACK (on_button_release_event), row); + ++ gtk_widget_set_margin_left(GTK_WIDGET (row), 10); + gtk_container_add (GTK_CONTAINER (sidebar->list_box), GTK_WIDGET (row)); + gtk_widget_show_all (row); + +@@ -1098,7 +1121,7 @@ update_places (GtkPlacesSidebar *sidebar + SECTION_COMPUTER, + _("Home"), start_icon, NULL, home_uri, + NULL, NULL, NULL, NULL, 0, +- _("Open your personal folder")); ++ _("Open the home folder")); + g_object_unref (start_icon); + g_free (home_uri); + +@@ -1373,7 +1396,7 @@ update_places (GtkPlacesSidebar *sidebar + SECTION_MOUNTS, + sidebar->hostname, start_icon, NULL, mount_uri, + NULL, NULL, NULL, NULL, 0, +- _("Open the contents of the file system")); ++ _("Browse the file system")); + g_object_unref (start_icon); + } + +@@ -1545,8 +1568,8 @@ update_places (GtkPlacesSidebar *sidebar + + add_place (sidebar, PLACES_BUILT_IN, + SECTION_OTHER_LOCATIONS, +- _("Networks"), start_icon, NULL, "network:///", +- NULL, NULL, NULL, NULL, 0, _("Show other locations")); ++ _("Browse Network"), start_icon, NULL, "network:///", ++ NULL, NULL, NULL, NULL, 0, _("Browse local network connections")); + + g_object_unref (start_icon); + } +@@ -3974,7 +3997,15 @@ list_box_sort_func (GtkListBoxRow *row1, + place_type_1 == PLACES_XDG_DIR) || + section_type_1 == SECTION_MOUNTS) + { +- retval = g_utf8_collate (label_1, label_2); ++ /* Local non-removable in first mounts position */ ++ if ((section_type_1 == SECTION_MOUNTS) && ++ (place_type_1 == PLACES_BUILT_IN)) ++ retval = -1; ++ else if ((section_type_1 == SECTION_MOUNTS) && ++ (place_type_2 == PLACES_BUILT_IN)) ++ retval = 1; ++ else ++ retval = g_utf8_collate (label_1, label_2); + } + else if ((place_type_1 == PLACES_BOOKMARK || place_type_2 == PLACES_DROP_FEEDBACK) && + (place_type_1 == PLACES_DROP_FEEDBACK || place_type_2 == PLACES_BOOKMARK)) +Index: gtk3/gtk/gtkplacessidebarprivate.h +=================================================================== +--- gtk3.orig/gtk/gtkplacessidebarprivate.h ++++ gtk3/gtk/gtkplacessidebarprivate.h +@@ -30,9 +30,9 @@ G_BEGIN_DECLS + typedef enum { + SECTION_INVALID, + SECTION_COMPUTER, ++ SECTION_BOOKMARKS, + SECTION_MOUNTS, + SECTION_CLOUD, +- SECTION_BOOKMARKS, + SECTION_OTHER_LOCATIONS, + N_SECTIONS + } GtkPlacesSidebarSectionType; +Index: gtk3/gtk/ui/gtkfilechooserwidget.ui +=================================================================== +--- gtk3.orig/gtk/ui/gtkfilechooserwidget.ui ++++ gtk3/gtk/ui/gtkfilechooserwidget.ui +@@ -17,7 +17,7 @@ + never + 1 + 0 +- 0 ++ 1 + + + Places +Index: gtk3/gtk/gtksidebarrow.c +=================================================================== +--- gtk3.orig/gtk/gtksidebarrow.c ++++ gtk3/gtk/gtksidebarrow.c +@@ -230,7 +230,7 @@ gtk_sidebar_row_set_property (GObject + self->start_icon = G_ICON (g_object_ref (object)); + gtk_image_set_from_gicon (GTK_IMAGE (self->start_icon_widget), + self->start_icon, +- GTK_ICON_SIZE_MENU); ++ GTK_ICON_SIZE_LARGE_TOOLBAR); + } + else + { +@@ -415,7 +415,7 @@ gtk_sidebar_row_set_start_icon (GtkSideb + g_set_object (&self->start_icon, icon); + if (self->start_icon != NULL) + gtk_image_set_from_gicon (GTK_IMAGE (self->start_icon_widget), self->start_icon, +- GTK_ICON_SIZE_MENU); ++ GTK_ICON_SIZE_LARGE_TOOLBAR); + else + gtk_image_clear (GTK_IMAGE (self->start_icon_widget)); + diff --git a/series b/series index 094c983..27a74fc 100644 --- a/series +++ b/series @@ -23,4 +23,4 @@ popovers__places-sidebar.patch notebook_wheel_scroll.patch treeview__alternating_row_colours.patch window__rgba-visual.patch -fixes__wayland_dialogs_header_setting.patch +appearance__file-chooser_xfce.patch