summaryrefslogtreecommitdiff
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
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
-rw-r--r--.gitignore2
-rw-r--r--appearance__disable-backdrop.patch13
-rw-r--r--appearance__file-chooser.patch29
-rw-r--r--appearance__message-dialogs.patch149
-rw-r--r--appearance__print-dialog.patch51
-rw-r--r--csd__clean-headerbar.patch82
-rw-r--r--csd__disabled-by-default.patch19
-rw-r--r--csd__server-side-shadow.patch13
-rw-r--r--file-chooser__typeahead.patch59
-rw-r--r--fixes__atk-bridge-errors.patch15
-rw-r--r--fixes__labels-wrapping.patch19
-rw-r--r--gtk3.spec54
-rw-r--r--notebook_wheel_scroll.patch81
-rw-r--r--other__default-settings.patch39
-rw-r--r--other__hide-insert-emoji.patch28
-rw-r--r--other__mnemonics-delay.patch13
-rw-r--r--popovers__color-chooser.patch22
-rw-r--r--popovers__file-chooser-list.patch70
-rw-r--r--popovers__places-sidebar.patch146
19 files changed, 891 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore
index 9c36b46..5f0867d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -198,3 +198,5 @@ gtk+-2.90.5.tar.bz2
/gtk+-3.24.27.tar.xz
/gtk+-3.24.28.tar.xz
/gtk+-3.24.29.tar.xz
+*.spec.orig
+.*.swp
diff --git a/appearance__disable-backdrop.patch b/appearance__disable-backdrop.patch
new file mode 100644
index 0000000..7f83409
--- /dev/null
+++ b/appearance__disable-backdrop.patch
@@ -0,0 +1,13 @@
+Index: b/gtk/gtkwindow.c
+===================================================================
+--- a/gtk/gtkwindow.c
++++ b/gtk/gtkwindow.c
+@@ -8017,7 +8017,7 @@ gtk_window_state_event (GtkWidget
+ GtkWindow *window = GTK_WINDOW (widget);
+ GtkWindowPrivate *priv = window->priv;
+
+- if (event->changed_mask & GDK_WINDOW_STATE_FOCUSED)
++ if ((event->changed_mask & GDK_WINDOW_STATE_FOCUSED) && priv->client_decorated)
+ ensure_state_flag_backdrop (widget);
+
+ if (event->changed_mask & GDK_WINDOW_STATE_FULLSCREEN)
diff --git a/appearance__file-chooser.patch b/appearance__file-chooser.patch
new file mode 100644
index 0000000..5681fcf
--- /dev/null
+++ b/appearance__file-chooser.patch
@@ -0,0 +1,29 @@
+Index: b/gtk/gtkfilechooserwidget.c
+===================================================================
+--- a/gtk/gtkfilechooserwidget.c
++++ b/gtk/gtkfilechooserwidget.c
+@@ -79,6 +79,7 @@
+ #include "gtkseparator.h"
+ #include "gtkmodelbutton.h"
+ #include "gtkgesturelongpress.h"
++#include "gtkcssprovider.h"
+
+ #include <cairo-gobject.h>
+
+@@ -8826,6 +8827,16 @@ post_process_ui (GtkFileChooserWidget *i
+ gtk_popover_set_relative_to (GTK_POPOVER (impl->priv->rename_file_popover), impl->priv->browse_files_tree_view);
+
+ add_actions (impl);
++ static gboolean style_added = FALSE;
++ if (!style_added)
++ {
++ style_added = TRUE;
++ GtkCssProvider *provider = gtk_css_provider_new ();
++ gtk_css_provider_load_from_data (provider,
++ "filechooser .sidebar-icon, filechooser .path-bar, filechooser .path-bar + button { opacity: 1; -gtk-icon-style: regular; }", -1, NULL);
++ gtk_style_context_add_provider_for_screen (gtk_widget_get_screen (GTK_WIDGET (impl)),
++ GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
++ }
+ }
+
+ void
diff --git a/appearance__message-dialogs.patch b/appearance__message-dialogs.patch
new file mode 100644
index 0000000..1b993d8
--- /dev/null
+++ b/appearance__message-dialogs.patch
@@ -0,0 +1,149 @@
+Index: b/gtk/gtkdialog.c
+===================================================================
+--- a/gtk/gtkdialog.c
++++ b/gtk/gtkdialog.c
+@@ -700,12 +700,12 @@ update_spacings (GtkDialog *dialog)
+
+ /* don't set spacing when buttons are linked */
+ if (gtk_button_box_get_layout (GTK_BUTTON_BOX (priv->action_area)) != GTK_BUTTONBOX_EXPAND)
+- gtk_box_set_spacing (GTK_BOX (priv->action_area), button_spacing);
++ gtk_box_set_spacing (GTK_BOX (priv->action_area), (button_spacing == 0) ? 6 : button_spacing);
+
+ if (!_gtk_container_get_border_width_set (GTK_CONTAINER (priv->action_area)))
+ {
+ gtk_container_set_border_width (GTK_CONTAINER (priv->action_area),
+- action_area_border);
++ (action_area_border == 0) ? 5 : action_area_border);
+ _gtk_container_set_border_width_set (GTK_CONTAINER (priv->action_area), FALSE);
+ }
+ }
+Index: b/gtk/gtkmessagedialog.c
+===================================================================
+--- a/gtk/gtkmessagedialog.c
++++ b/gtk/gtkmessagedialog.c
+@@ -37,6 +37,7 @@
+ #include "gtkintl.h"
+ #include "gtkprivate.h"
+ #include "gtktypebuiltins.h"
++#include "gtkcssprovider.h"
+
+ /**
+ * SECTION:gtkmessagedialog
+@@ -327,7 +328,17 @@ gtk_message_dialog_init (GtkMessageDialo
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ action_area = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
+ G_GNUC_END_IGNORE_DEPRECATIONS
+- gtk_button_box_set_layout (GTK_BUTTON_BOX (action_area), GTK_BUTTONBOX_EXPAND);
++ static gboolean style_added = FALSE;
++ if (!style_added)
++ {
++ style_added = TRUE;
++ GtkCssProvider *provider = gtk_css_provider_new ();
++ gtk_css_provider_load_from_data (provider,
++ "messagedialog > *, messagedialog buttonbox.dialog-action-area, messagedialog box.dialog-action-box { margin: 0; margin-top: 0; padding: 0; }",
++ -1, NULL);
++ gtk_style_context_add_provider_for_screen (gtk_widget_get_screen (GTK_WIDGET (dialog)),
++ GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
++ }
+
+ settings = gtk_widget_get_settings (GTK_WIDGET (dialog));
+ g_object_get (settings, "gtk-keynav-use-caret", &use_caret, NULL);
+@@ -372,6 +383,7 @@ setup_type (GtkMessageDialog *dialog,
+ {
+ GtkMessageDialogPrivate *priv = dialog->priv;
+ const gchar *name = NULL;
++ const gchar *icon = NULL;
+ AtkObject *atk_obj;
+
+ if (priv->message_type == type)
+@@ -383,18 +395,22 @@ setup_type (GtkMessageDialog *dialog,
+ {
+ case GTK_MESSAGE_INFO:
+ name = _("Information");
++ icon = "gtk-dialog-info";
+ break;
+
+ case GTK_MESSAGE_QUESTION:
+ name = _("Question");
++ icon = "gtk-dialog-question";
+ break;
+
+ case GTK_MESSAGE_WARNING:
+ name = _("Warning");
++ icon = "gtk-dialog-warning";
+ break;
+
+ case GTK_MESSAGE_ERROR:
+ name = _("Error");
++ icon = "gtk-dialog-error";
+ break;
+
+ case GTK_MESSAGE_OTHER:
+@@ -405,6 +421,12 @@ setup_type (GtkMessageDialog *dialog,
+ break;
+ }
+
++ if (icon)
++ {
++ GtkWidget *image = gtk_image_new_from_icon_name (icon, GTK_ICON_SIZE_DIALOG);
++ g_object_set (image, "visible", TRUE, NULL);
++ g_object_set (dialog, "image", image, NULL);
++ }
+ atk_obj = gtk_widget_get_accessible (GTK_WIDGET (dialog));
+ if (GTK_IS_ACCESSIBLE (atk_obj))
+ {
+Index: b/gtk/ui/gtkmessagedialog.ui
+===================================================================
+--- a/gtk/ui/gtkmessagedialog.ui
++++ b/gtk/ui/gtkmessagedialog.ui
+@@ -6,6 +6,7 @@
+ <property name="resizable">0</property>
+ <property name="type-hint">dialog</property>
+ <property name="skip-taskbar-hint">1</property>
++ <property name="border-width">5</property>
+ <child internal-child="headerbar">
+ <object class="GtkHeaderBar" id="headerbar1">
+ <property name="visible">1</property>
+@@ -14,23 +15,25 @@
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="orientation">vertical</property>
+- <property name="spacing">20</property>
+- <property name="border-width">0</property>
++ <property name="spacing">8</property>
++ <property name="border-width">2</property>
+ <child>
+ <object class="GtkBox" id="box">
+ <property name="visible">1</property>
+- <property name="margin-start">30</property>
+- <property name="margin-end">30</property>
+- <property name="spacing">30</property>
++ <property name="margin-start">2</property>
++ <property name="margin-end">2</property>
++ <property name="spacing">12</property>
++ <property name="border-width">5</property>
+ <child>
+ <object class="GtkBox" id="message_area">
+ <property name="visible">1</property>
+ <property name="orientation">vertical</property>
+- <property name="spacing">10</property>
++ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label">
+ <property name="visible">1</property>
+- <property name="halign">center</property>
++ <property name="halign">start</property>
++ <property name="xalign">0</property>
+ <property name="valign">start</property>
+ <property name="wrap">1</property>
+ <property name="max-width-chars">60</property>
+@@ -43,7 +46,8 @@
+ <object class="GtkLabel" id="secondary_label">
+ <property name="no-show-all">1</property>
+ <property name="margin-bottom">2</property>
+- <property name="halign">center</property>
++ <property name="halign">start</property>
++ <property name="xalign">0</property>
+ <property name="valign">start</property>
+ <property name="wrap">1</property>
+ <property name="max-width-chars">60</property>
diff --git a/appearance__print-dialog.patch b/appearance__print-dialog.patch
new file mode 100644
index 0000000..cc5ad66
--- /dev/null
+++ b/appearance__print-dialog.patch
@@ -0,0 +1,51 @@
+Index: b/gtk/gtkprintunixdialog.c
+===================================================================
+--- a/gtk/gtkprintunixdialog.c
++++ b/gtk/gtkprintunixdialog.c
+@@ -750,6 +750,11 @@ gtk_print_unix_dialog_init (GtkPrintUnix
+ gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+ widget = gtk_dialog_get_widget_for_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+ gtk_widget_set_sensitive (widget, FALSE);
++ GtkCssProvider *provider = gtk_css_provider_new ();
++ gtk_css_provider_load_from_data (provider, ".dialog-action-box { margin: 0; }", -1, NULL);
++ GtkStyleContext *context = gtk_widget_get_style_context (gtk_widget_get_parent (gtk_dialog_get_action_area (GTK_DIALOG (dialog))));
++ gtk_style_context_add_provider (context, GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
++ gtk_style_context_save (context);
+
+ /* Treeview auxiliary functions need to be setup here */
+ gtk_tree_model_filter_set_visible_func (priv->printer_list_filter,
+Index: b/gtk/ui/gtkprintunixdialog.ui
+===================================================================
+--- a/gtk/ui/gtkprintunixdialog.ui
++++ b/gtk/ui/gtkprintunixdialog.ui
+@@ -48,6 +48,7 @@
+ <property name="step-increment">1</property>
+ </object>
+ <template class="GtkPrintUnixDialog" parent="GtkDialog">
++ <property name="border-width">5</property>
+ <property name="can-focus">False</property>
+ <property name="type-hint">dialog</property>
+ <signal name="notify::page-setup" handler="redraw_page_layout_preview" swapped="no"/>
+@@ -56,19 +57,19 @@
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="orientation">vertical</property>
+ <property name="spacing">2</property>
+- <property name="border-width">0</property>
++ <property name="border-width">2</property>
+ <style>
+- <class name="view"/>
+ </style>
+ <child>
+ <object class="GtkBox" id="box1">
++ <property name="border-width">5</property>
+ <property name="visible">1</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkNotebook" id="notebook">
+ <property name="visible">1</property>
+ <property name="can-focus">1</property>
+- <property name="show-border">0</property>
++ <property name="show-border">1</property>
+ <child>
+ <object class="GtkBox" id="general_main_box">
+ <property name="visible">1</property>
diff --git a/csd__clean-headerbar.patch b/csd__clean-headerbar.patch
new file mode 100644
index 0000000..09612d4
--- /dev/null
+++ b/csd__clean-headerbar.patch
@@ -0,0 +1,82 @@
+Index: b/gtk/gtkheaderbar.c
+===================================================================
+--- a/gtk/gtkheaderbar.c
++++ b/gtk/gtkheaderbar.c
+@@ -300,6 +300,27 @@ _gtk_header_bar_update_window_buttons (G
+
+ priv->titlebar_icon = NULL;
+
++ gboolean csd_cleaned_headerbar = (!gtk_style_context_has_class (gtk_widget_get_style_context (toplevel), "csd") &&
++ !gtk_style_context_has_class (gtk_widget_get_style_context (toplevel), "solid-csd"));
++ if (csd_cleaned_headerbar)
++ {
++ if (priv->label_box != NULL)
++ {
++ priv->label_box = NULL;
++ priv->title_label = NULL;
++ priv->subtitle_label = NULL;
++ }
++ static gboolean style_added = FALSE;
++ if (!style_added)
++ {
++ style_added = TRUE;
++ GtkCssProvider *provider = gtk_css_provider_new ();
++ gtk_css_provider_load_from_data (provider,
++ "headerbar, .titlebar { border-radius: 0; border-top: 0; box-shadow: none; }", -1, NULL);
++ gtk_style_context_add_provider_for_screen (gtk_widget_get_screen (widget),
++ GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
++ }
++ }
+ if (!priv->shows_wm_decorations)
+ return;
+
+@@ -327,6 +348,8 @@ _gtk_header_bar_update_window_buttons (G
+ gtk_window_get_transient_for (window) == NULL &&
+ gtk_window_get_type_hint (window) == GDK_WINDOW_TYPE_HINT_NORMAL);
+
++ if (csd_cleaned_headerbar)
++ layout_desc = strstr (layout_desc, "menu") ? g_strdup ("menu") : g_strdup ("");
+ tokens = g_strsplit (layout_desc, ":", 2);
+ if (tokens)
+ {
+@@ -391,9 +414,9 @@ _gtk_header_bar_update_window_buttons (G
+ atk_object_set_name (accessible, _("Application menu"));
+
+ priv->titlebar_icon = image;
+- if (!_gtk_header_bar_update_window_icon (bar, window))
++ if (csd_cleaned_headerbar || !_gtk_header_bar_update_window_icon (bar, window))
+ gtk_image_set_from_icon_name (GTK_IMAGE (priv->titlebar_icon),
+- "application-x-executable-symbolic", GTK_ICON_SIZE_MENU);
++ "pan-down-symbolic", GTK_ICON_SIZE_MENU);
+ }
+ else if (strcmp (t[j], "minimize") == 0 &&
+ is_sovereign_window)
+@@ -1361,6 +1384,7 @@ gtk_header_bar_set_subtitle (GtkHeaderBa
+ gtk_widget_set_visible (priv->subtitle_sizing_label, priv->has_subtitle || (priv->subtitle && priv->subtitle[0]));
+
+ g_object_notify_by_pspec (G_OBJECT (bar), header_bar_props[PROP_SUBTITLE]);
++ g_object_notify_by_pspec (G_OBJECT (bar), header_bar_props[PROP_TITLE]);
+ }
+
+ /**
+Index: b/gtk/gtkwindow.c
+===================================================================
+--- a/gtk/gtkwindow.c
++++ b/gtk/gtkwindow.c
+@@ -4174,6 +4174,8 @@ on_titlebar_title_notify (GtkHeaderBar *
+ const gchar *title;
+
+ title = gtk_header_bar_get_title (titlebar);
++ if (gtk_header_bar_get_subtitle (titlebar))
++ title = g_strconcat (title, " — ", gtk_header_bar_get_subtitle (titlebar), NULL);
+ gtk_window_set_title_internal (self, title, FALSE);
+ }
+
+@@ -9366,6 +9368,7 @@ static void
+ gtk_window_do_popup (GtkWindow *window,
+ GdkEventButton *event)
+ {
++ if (!window->priv->client_decorated) return;
+ if (!gdk_window_show_window_menu (_gtk_widget_get_window (GTK_WIDGET (window)),
+ (GdkEvent *) event))
+ gtk_window_do_popup_fallback (window, event);
diff --git a/csd__disabled-by-default.patch b/csd__disabled-by-default.patch
new file mode 100644
index 0000000..fc6b852
--- /dev/null
+++ b/csd__disabled-by-default.patch
@@ -0,0 +1,19 @@
+Index: b/gtk/gtkwindow.c
+===================================================================
+--- a/gtk/gtkwindow.c
++++ b/gtk/gtkwindow.c
+@@ -4164,6 +4164,14 @@ gtk_window_enable_csd (GtkWindow *window
+ }
+
+ priv->client_decorated = TRUE;
++#ifdef GDK_WINDOWING_X11
++ if (GDK_IS_X11_DISPLAY (gtk_widget_get_display (widget)) && g_getenv("GTK_CSD") == FALSE)
++ {
++ gtk_style_context_remove_class (gtk_widget_get_style_context (widget), GTK_STYLE_CLASS_CSD);
++ gtk_style_context_remove_class (gtk_widget_get_style_context (widget), "solid-csd");
++ priv->client_decorated = FALSE;
++ }
++#endif
+ }
+
+ static void
diff --git a/csd__server-side-shadow.patch b/csd__server-side-shadow.patch
new file mode 100644
index 0000000..602ae26
--- /dev/null
+++ b/csd__server-side-shadow.patch
@@ -0,0 +1,13 @@
+Index: b/gtk/gtkwindow.c
+===================================================================
+--- a/gtk/gtkwindow.c
++++ b/gtk/gtkwindow.c
+@@ -4113,6 +4113,8 @@ gtk_window_supports_client_shadow (GtkWi
+ #ifdef GDK_WINDOWING_X11
+ if (GDK_IS_X11_DISPLAY (display))
+ {
++ if (g_strcmp0 (g_getenv ("GTK_CSD"), "1") != 0)
++ return FALSE;
+ if (!gdk_screen_is_composited (screen))
+ return FALSE;
+
diff --git a/file-chooser__typeahead.patch b/file-chooser__typeahead.patch
new file mode 100644
index 0000000..fa0ac10
--- /dev/null
+++ b/file-chooser__typeahead.patch
@@ -0,0 +1,59 @@
+Index: b/gtk/gtkfilechooserwidget.c
+===================================================================
+--- a/gtk/gtkfilechooserwidget.c
++++ b/gtk/gtkfilechooserwidget.c
+@@ -1423,7 +1423,7 @@ gtk_file_chooser_widget_key_press_event
+ return TRUE;
+ }
+ }
+- else if (gtk_search_entry_handle_event (GTK_SEARCH_ENTRY (priv->search_entry), (GdkEvent *)event))
++ else if (FALSE && gtk_search_entry_handle_event (GTK_SEARCH_ENTRY (priv->search_entry), (GdkEvent *)event))
+ {
+ if (priv->operation_mode != OPERATION_MODE_SEARCH)
+ operation_mode_set (impl, OPERATION_MODE_SEARCH);
+@@ -2493,7 +2493,7 @@ file_list_set_sort_column_ids (GtkFileCh
+ {
+ GtkFileChooserWidgetPrivate *priv = impl->priv;
+
+- gtk_tree_view_set_search_column (GTK_TREE_VIEW (priv->browse_files_tree_view), -1);
++ gtk_tree_view_set_search_column (GTK_TREE_VIEW (priv->browse_files_tree_view), 0);
+
+ gtk_tree_view_column_set_sort_column_id (priv->list_name_column, MODEL_COL_NAME);
+ gtk_tree_view_column_set_sort_column_id (priv->list_time_column, MODEL_COL_TIME);
+@@ -7347,8 +7347,6 @@ search_engine_hits_added_cb (GtkSearchEn
+ GFile *file;
+ gboolean select = FALSE;
+
+- if (gtk_tree_model_iter_n_children (GTK_TREE_MODEL (impl->priv->search_model), NULL) == 0)
+- select = TRUE;
+
+ files = NULL;
+ files_with_info = NULL;
+@@ -7693,7 +7691,7 @@ recent_idle_cleanup (gpointer data)
+
+ gtk_tree_view_set_model (GTK_TREE_VIEW (priv->browse_files_tree_view),
+ GTK_TREE_MODEL (priv->recent_model));
+- gtk_tree_view_set_search_column (GTK_TREE_VIEW (priv->browse_files_tree_view), -1);
++ gtk_tree_view_set_search_column (GTK_TREE_VIEW (priv->browse_files_tree_view), 0);
+
+ gtk_tree_view_column_set_sort_column_id (priv->list_name_column, -1);
+ gtk_tree_view_column_set_sort_column_id (priv->list_time_column, -1);
+@@ -8646,10 +8644,6 @@ gtk_file_chooser_widget_class_init (GtkF
+ "search-shortcut",
+ 0);
+ gtk_binding_entry_add_signal (binding_set,
+- GDK_KEY_f, GDK_CONTROL_MASK,
+- "search-shortcut",
+- 0);
+- gtk_binding_entry_add_signal (binding_set,
+ GDK_KEY_r, GDK_MOD1_MASK,
+ "recent-shortcut",
+ 0);
+@@ -8770,6 +8764,7 @@ post_process_ui (GtkFileChooserWidget *i
+ g_object_set_data (G_OBJECT (impl->priv->browse_files_tree_view), I_("GtkFileChooserWidget"), impl);
+
+ /* Setup file list treeview */
++ gtk_tree_view_set_enable_search (GTK_TREE_VIEW (impl->priv->browse_files_tree_view), TRUE);
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->priv->browse_files_tree_view));
+ gtk_tree_selection_set_select_function (selection,
+ list_select_func,
diff --git a/fixes__atk-bridge-errors.patch b/fixes__atk-bridge-errors.patch
new file mode 100644
index 0000000..0b944a0
--- /dev/null
+++ b/fixes__atk-bridge-errors.patch
@@ -0,0 +1,15 @@
+Index: b/gtk/a11y/gtkaccessibility.c
+===================================================================
+--- a/gtk/a11y/gtkaccessibility.c
++++ b/gtk/a11y/gtkaccessibility.c
+@@ -989,7 +989,10 @@ _gtk_accessibility_init (void)
+ do_window_event_initialization ();
+
+ #ifdef GDK_WINDOWING_X11
++ GLogWriterOutput mushrooms_null_writer () { return G_LOG_WRITER_HANDLED; }
++ g_log_set_writer_func (mushrooms_null_writer, NULL, NULL);
+ atk_bridge_adaptor_init (NULL, NULL);
++ g_log_set_writer_func (g_log_writer_default, NULL, NULL);
+ #endif
+
+ atk_misc_instance = g_object_new (GTK_TYPE_MISC_IMPL, NULL);
diff --git a/fixes__labels-wrapping.patch b/fixes__labels-wrapping.patch
new file mode 100644
index 0000000..3f8d734
--- /dev/null
+++ b/fixes__labels-wrapping.patch
@@ -0,0 +1,19 @@
+Index: b/gtk/gtklabel.c
+===================================================================
+--- a/gtk/gtklabel.c
++++ b/gtk/gtklabel.c
+@@ -3685,6 +3685,14 @@ gtk_label_get_preferred_layout_size (Gtk
+ GtkLabelPrivate *priv = label->priv;
+ PangoLayout *layout;
+ gint char_pixels;
++ GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (label));
++ if (GTK_IS_WINDOW (toplevel))
++ {
++ gint default_window_width;
++ gtk_window_get_default_size (GTK_WINDOW (toplevel), &default_window_width, NULL);
++ if (default_window_width == -1 && priv->max_width_chars == -1 && priv->ellipsize == PANGO_ELLIPSIZE_NONE)
++ priv->max_width_chars = 56;
++ }
+
+ /* "width-chars" Hard-coded minimum width:
+ * - minimum size should be MAX (width-chars, strlen ("..."));
diff --git a/gtk3.spec b/gtk3.spec
index a136fd4..ba3e171 100644
--- a/gtk3.spec
+++ b/gtk3.spec
@@ -25,7 +25,7 @@
Name: gtk3
Version: 3.24.29
-Release: 1%{?dist}
+Release: 100%{?dist}
Summary: GTK+ graphical user interface library
License: LGPLv2+
@@ -104,6 +104,24 @@ Obsoletes: gtk3-engines <= 2.91.5-5.fc15
Obsoletes: gtk-solidity-engine < 0.4.1-9
Obsoletes: oxygen-gtk3 < 2:1.4.1
+BuildRequires: libjpeg-turbo-devel
+Patch800: appearance__disable-backdrop.patch
+Patch801: appearance__file-chooser.patch
+Patch802: appearance__message-dialogs.patch
+Patch803: appearance__print-dialog.patch
+Patch804: csd__clean-headerbar.patch
+Patch805: csd__disabled-by-default.patch
+Patch806: csd__server-side-shadow.patch
+Patch807: file-chooser__typeahead.patch
+Patch808: fixes__atk-bridge-errors.patch
+Patch809: fixes__labels-wrapping.patch
+Patch810: other__default-settings.patch
+Patch811: other__hide-insert-emoji.patch
+Patch812: other__mnemonics-delay.patch
+Patch813: popovers__color-chooser.patch
+Patch814: popovers__file-chooser-list.patch
+Patch815: popovers__places-sidebar.patch
+Patch816: notebook_wheel_scroll.patch
%description
GTK+ is a multi-platform toolkit for creating graphical user
interfaces. Offering a complete set of widgets, GTK+ is suitable for
@@ -159,17 +177,27 @@ Requires: gtk3 = %{version}-%{release}
This package contains developer documentation for version 3 of the GTK+
widget toolkit.
-%package tests
-Summary: Tests for the %{name} package
-Requires: %{name}%{?_isa} = %{version}-%{release}
-
-%description tests
-The %{name}-tests package contains tests that can be used to verify
-the functionality of the installed %{name} package.
%prep
%autosetup -n gtk+-%{version} -p1
+%patch800 -p1
+%patch801 -p1
+%patch802 -p1
+%patch803 -p1
+%patch804 -p1
+%patch805 -p1
+%patch806 -p1
+%patch807 -p1
+%patch808 -p1
+%patch809 -p1
+%patch810 -p1
+%patch811 -p1
+%patch812 -p1
+%patch813 -p1
+%patch814 -p1
+%patch815 -p1
+%patch816 -p1
%build
export CFLAGS='-fno-strict-aliasing %optflags'
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi;
@@ -186,7 +214,7 @@ export CFLAGS='-fno-strict-aliasing %optflags'
--enable-broadway-backend \
%endif
--enable-colord \
- --enable-installed-tests \
+ --disable-installed-tests \
--with-included-immodules=wayland
)
@@ -321,11 +349,11 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache &>/dev/null || :
%files devel-docs
%{_datadir}/gtk-doc
-%files tests
-%{_libexecdir}/installed-tests/
-%{_datadir}/installed-tests/
-
%changelog
+* Wed Aug 18 2021 B. Stack <bgstack15@gmail.com> - 3.24.29-100
+- Rebuild gtk3 with gtk3-classic patches
+- Remove tests
+
* Fri Apr 23 2021 Kalev Lember <klember@redhat.com> - 3.24.29-1
- Update to 3.24.29
diff --git a/notebook_wheel_scroll.patch b/notebook_wheel_scroll.patch
new file mode 100644
index 0000000..b7a86d8
--- /dev/null
+++ b/notebook_wheel_scroll.patch
@@ -0,0 +1,81 @@
+Index: gtk/gtknotebook.c
+===================================================================
+--- a/gtk/gtknotebook.c
++++ b/gtk/gtknotebook.c
+@@ -383,6 +383,8 @@ static gboolean gtk_notebook_draw
+ cairo_t *cr);
+ static gboolean gtk_notebook_button_press (GtkWidget *widget,
+ GdkEventButton *event);
++static gboolean gtk_notebook_scroll (GtkWidget *widget,
++ GdkEventScroll *event);
+ static gboolean gtk_notebook_button_release (GtkWidget *widget,
+ GdkEventButton *event);
+ static gboolean gtk_notebook_popup_menu (GtkWidget *widget);
+@@ -741,6 +743,7 @@ gtk_notebook_class_init (GtkNotebookClas
+ widget_class->drag_failed = gtk_notebook_drag_failed;
+ widget_class->compute_expand = gtk_notebook_compute_expand;
+ widget_class->direction_changed = gtk_notebook_direction_changed;
++ widget_class->scroll_event = gtk_notebook_scroll;
+
+ container_class->add = gtk_notebook_add;
+ container_class->remove = gtk_notebook_remove;
+@@ -1985,7 +1988,8 @@ gtk_notebook_realize (GtkWidget *widget)
+ attributes.event_mask = gtk_widget_get_events (widget);
+ attributes.event_mask |= (GDK_BUTTON_PRESS_MASK |
+ GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK |
+- GDK_POINTER_MOTION_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
++ GDK_POINTER_MOTION_MASK | GDK_ENTER_NOTIFY_MASK |
++ GDK_LEAVE_NOTIFY_MASK | GDK_SCROLL_MASK);
+ attributes_mask = GDK_WA_X | GDK_WA_Y;
+
+ priv->event_window = gdk_window_new (gtk_widget_get_parent_window (widget),
+@@ -2340,6 +2344,49 @@ gtk_notebook_get_preferred_tabs_size (Gt
+ }
+ }
+
++static gboolean
++gtk_notebook_scroll (GtkWidget *widget,
++ GdkEventScroll *event)
++{
++ GtkNotebook *notebook = GTK_NOTEBOOK (widget);
++ GtkNotebookPrivate *priv = notebook->priv;
++ GtkWidget *child, *event_widget;
++ gint i;
++
++ if (!priv->cur_page)
++ return FALSE;
++
++ child = priv->cur_page->child;
++ event_widget = gtk_get_event_widget ((GdkEvent *)event);
++
++ /* ignore scroll events from the content of the page */
++ if (!event_widget || gtk_widget_is_ancestor (event_widget, child) || event_widget == child)
++ return FALSE;
++
++ /* nor from the action area */
++ for (i = 0; i < 2; i++)
++ {
++ if (event_widget == priv->action_widget[i] ||
++ (priv->action_widget[i] &&
++ gtk_widget_is_ancestor (event_widget, priv->action_widget[i])))
++ return FALSE;
++ }
++
++ switch (event->direction)
++ {
++ case GDK_SCROLL_RIGHT:
++ case GDK_SCROLL_DOWN:
++ gtk_notebook_next_page (notebook);
++ break;
++ case GDK_SCROLL_LEFT:
++ case GDK_SCROLL_UP:
++ gtk_notebook_prev_page (notebook);
++ break;
++ }
++
++ return TRUE;
++}
++
+ static void
+ gtk_notebook_measure_tabs (GtkCssGadget *gadget,
+ GtkOrientation orientation,
diff --git a/other__default-settings.patch b/other__default-settings.patch
new file mode 100644
index 0000000..6e5c85e
--- /dev/null
+++ b/other__default-settings.patch
@@ -0,0 +1,39 @@
+Index: b/gtk/gtkscrolledwindow.c
+===================================================================
+--- a/gtk/gtkscrolledwindow.c
++++ b/gtk/gtkscrolledwindow.c
+@@ -4548,7 +4548,7 @@ gtk_scrolled_window_update_use_indicator
+
+ use_indicators = overlay_scrolling && priv->overlay_scrolling;
+
+- if (g_strcmp0 (g_getenv ("GTK_OVERLAY_SCROLLING"), "0") == 0)
++ if (g_strcmp0 (g_getenv ("GTK_OVERLAY_SCROLLING"), "1") != 0)
+ use_indicators = FALSE;
+
+ if (priv->use_indicators != use_indicators)
+Index: b/gtk/gtksettings.c
+===================================================================
+--- a/gtk/gtksettings.c
++++ b/gtk/gtksettings.c
+@@ -61,7 +61,7 @@
+ #ifdef GDK_WINDOWING_QUARTZ
+ #define PRINT_PREVIEW_COMMAND "open -b com.apple.Preview %f"
+ #else
+-#define PRINT_PREVIEW_COMMAND "evince --unlink-tempfile --preview --print-settings %s %f"
++#define PRINT_PREVIEW_COMMAND "atril --unlink-tempfile --preview --print-settings %s %f"
+ #endif
+
+ /**
+Index: b/gtk/org.gtk.Settings.FileChooser.gschema.xml
+===================================================================
+--- a/gtk/org.gtk.Settings.FileChooser.gschema.xml
++++ b/gtk/org.gtk.Settings.FileChooser.gschema.xml
+@@ -133,7 +133,7 @@
+ </description>
+ </key>
+ <key name='startup-mode' enum='org.gtk.Settings.FileChooser.StartupMode'>
+- <default>'recent'</default>
++ <default>'cwd'</default>
+ <summary>Startup mode</summary>
+ <description>
+ Either "recent" or "cwd"; controls whether the file chooser
diff --git a/other__hide-insert-emoji.patch b/other__hide-insert-emoji.patch
new file mode 100644
index 0000000..4d65906
--- /dev/null
+++ b/other__hide-insert-emoji.patch
@@ -0,0 +1,28 @@
+Index: b/gtk/gtkentry.c
+===================================================================
+--- a/gtk/gtkentry.c
++++ b/gtk/gtkentry.c
+@@ -9627,7 +9627,8 @@ popup_targets_received (GtkClipboard
+ g_signal_connect_swapped (menuitem, "activate",
+ G_CALLBACK (gtk_entry_insert_emoji), entry);
+ gtk_widget_show (menuitem);
+- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
++ if (g_getenv ("GTKM_INSERT_EMOJI") != FALSE)
++ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+ }
+
+ g_signal_emit (entry, signals[POPULATE_POPUP], 0, menu);
+Index: b/gtk/gtktextview.c
+===================================================================
+--- a/gtk/gtktextview.c
++++ b/gtk/gtktextview.c
+@@ -9555,7 +9555,8 @@ popup_targets_received (GtkClipboard
+ g_signal_connect_swapped (menuitem, "activate",
+ G_CALLBACK (gtk_text_view_insert_emoji), text_view);
+ gtk_widget_show (menuitem);
+- gtk_menu_shell_append (GTK_MENU_SHELL (priv->popup_menu), menuitem);
++ if (g_getenv ("GTKM_INSERT_EMOJI") != FALSE)
++ gtk_menu_shell_append (GTK_MENU_SHELL (priv->popup_menu), menuitem);
+ }
+
+ g_signal_emit (text_view, signals[POPULATE_POPUP],
diff --git a/other__mnemonics-delay.patch b/other__mnemonics-delay.patch
new file mode 100644
index 0000000..54fb510
--- /dev/null
+++ b/other__mnemonics-delay.patch
@@ -0,0 +1,13 @@
+Index: b/gtk/gtkwindow.c
+===================================================================
+--- a/gtk/gtkwindow.c
++++ b/gtk/gtkwindow.c
+@@ -147,7 +147,7 @@
+ * widget that is added as a titlebar child.
+ */
+
+-#define MNEMONICS_DELAY 300 /* ms */
++#define MNEMONICS_DELAY 0 /* ms */
+ #define NO_CONTENT_CHILD_NAT 200
+ /* In case the content (excluding header bar and shadows) of the window
+ * would be empty, either because there is no visible child widget or only an
diff --git a/popovers__color-chooser.patch b/popovers__color-chooser.patch
new file mode 100644
index 0000000..c26b2b4
--- /dev/null
+++ b/popovers__color-chooser.patch
@@ -0,0 +1,22 @@
+Index: b/gtk/gtkcolorswatch.c
+===================================================================
+--- a/gtk/gtkcolorswatch.c
++++ b/gtk/gtkcolorswatch.c
+@@ -349,6 +349,17 @@ do_popup (GtkColorSwatch *swatch)
+ {
+ if (swatch->priv->popover == NULL)
+ {
++ GtkWidget *item;
++ swatch->priv->popover = gtk_menu_new ();
++ item = gtk_menu_item_new_with_mnemonic (_ ("C_ustomize"));
++ g_signal_connect_swapped (item, "activate", G_CALLBACK (emit_customize), swatch);
++ gtk_widget_set_visible (GTK_WIDGET (item), TRUE);
++ gtk_menu_shell_append (GTK_MENU_SHELL (swatch->priv->popover), item);
++ }
++ gtk_menu_popup_at_pointer (GTK_MENU (swatch->priv->popover), NULL);
++ return;
++ if (swatch->priv->popover == NULL)
++ {
+ GtkWidget *box;
+ GtkWidget *item;
+
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);
diff --git a/popovers__places-sidebar.patch b/popovers__places-sidebar.patch
new file mode 100644
index 0000000..be8566d
--- /dev/null
+++ b/popovers__places-sidebar.patch
@@ -0,0 +1,146 @@
+Index: b/gtk/gtkplacessidebar.c
+===================================================================
+--- a/gtk/gtkplacessidebar.c
++++ b/gtk/gtkplacessidebar.c
+@@ -64,6 +64,7 @@
+ #include "gtkgesturelongpress.h"
+ #include "gtkbox.h"
+ #include "gtkmodelbutton.h"
++#include "deprecated/gtkimagemenuitem.h"
+
+ /**
+ * SECTION:gtkplacessidebar
+@@ -2341,32 +2342,32 @@ check_popover_sensitivity (GtkSidebarRow
+ gtk_widget_set_visible (data->stop_item, show_stop);
+
+ /* Adjust start/stop items to reflect the type of the drive */
+- g_object_set (data->start_item, "text", _("_Start"), NULL);
+- g_object_set (data->stop_item, "text", _("_Stop"), NULL);
++ g_object_set (data->start_item, "label", _("_Start"), "use_underline", TRUE, NULL);
++ g_object_set (data->stop_item, "label", _("_Stop"), "use_underline", TRUE, NULL);
+ if ((show_start || show_stop) && drive != NULL)
+ {
+ switch (g_drive_get_start_stop_type (drive))
+ {
+ case G_DRIVE_START_STOP_TYPE_SHUTDOWN:
+ /* start() for type G_DRIVE_START_STOP_TYPE_SHUTDOWN is normally not used */
+- g_object_set (data->start_item, "text", _("_Power On"), NULL);
+- g_object_set (data->stop_item, "text", _("_Safely Remove Drive"), NULL);
++ g_object_set (data->start_item, "label", _("_Power On"), "use_underline", TRUE, NULL);
++ g_object_set (data->stop_item, "label", _("_Safely Remove Drive"), "use_underline", TRUE, NULL);
+ break;
+
+ case G_DRIVE_START_STOP_TYPE_NETWORK:
+- g_object_set (data->start_item, "text", _("_Connect Drive"), NULL);
+- g_object_set (data->stop_item, "text", _("_Disconnect Drive"), NULL);
++ g_object_set (data->start_item, "label", _("_Connect Drive"), "use_underline", TRUE, NULL);
++ g_object_set (data->stop_item, "label", _("_Disconnect Drive"), "use_underline", TRUE, NULL);
+ break;
+
+ case G_DRIVE_START_STOP_TYPE_MULTIDISK:
+- g_object_set (data->start_item, "text", _("_Start Multi-disk Device"), NULL);
+- g_object_set (data->stop_item, "text", _("_Stop Multi-disk Device"), NULL);
++ g_object_set (data->start_item, "label", _("_Start Multi-disk Device"), "use_underline", TRUE, NULL);
++ g_object_set (data->stop_item, "label", _("_Stop Multi-disk Device"), "use_underline", TRUE, NULL);
+ break;
+
+ case G_DRIVE_START_STOP_TYPE_PASSWORD:
+ /* stop() for type G_DRIVE_START_STOP_TYPE_PASSWORD is normally not used */
+- g_object_set (data->start_item, "text", _("_Unlock Device"), NULL);
+- g_object_set (data->stop_item, "text", _("_Lock Device"), NULL);
++ g_object_set (data->start_item, "label", _("_Unlock Device"), "use_underline", TRUE, NULL);
++ g_object_set (data->stop_item, "label", _("_Lock Device"), "use_underline", TRUE, NULL);
+ break;
+
+ default:
+@@ -3559,6 +3560,13 @@ append_separator (GtkWidget *box)
+ {
+ GtkWidget *separator;
+
++ if (GTK_IS_MENU (box))
++ {
++ 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,
+@@ -3577,6 +3585,14 @@ add_button (GtkWidget *box,
+ {
+ GtkWidget *item;
+
++ if (GTK_IS_MENU (box))
++ {
++ 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,
+@@ -3594,6 +3610,17 @@ add_open_button (GtkWidget *box
+ {
+ GtkWidget *item;
+
++ if (GTK_IS_MENU (box))
++ {
++ item = gtk_image_menu_item_new_with_mnemonic (label);
++ g_object_set(G_OBJECT (item),
++ "action-name", flags == GTK_PLACES_OPEN_NORMAL ? "row.open" : "row.open-other",
++ "action-target", g_variant_new_int32 (flags),
++ 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", flags == GTK_PLACES_OPEN_NORMAL ? "row.open" : "row.open-other",
+@@ -3699,6 +3726,13 @@ create_row_popover (GtkPlacesSidebar *si
+ g_object_set (box, "margin", 10, NULL);
+ gtk_widget_show (box);
+ gtk_container_add (GTK_CONTAINER (sidebar->popover), box);
++ if (!sidebar->populate_all)
++ {
++ sidebar->popover = gtk_menu_new ();
++ g_signal_connect (sidebar->popover, "destroy", G_CALLBACK (on_row_popover_destroy), sidebar);
++ gtk_menu_attach_to_widget (GTK_MENU (sidebar->popover), GTK_WIDGET (sidebar), NULL);
++ box = sidebar->popover;
++ }
+
+ add_open_button (box, _("_Open"), GTK_PLACES_OPEN_NORMAL);
+
+@@ -3722,6 +3756,15 @@ create_row_popover (GtkPlacesSidebar *si
+ data.rescan_item = add_button (box, _("_Detect Media"), "row.rescan");
+ data.start_item = add_button (box, _("_Start"), "row.start");
+ data.stop_item = add_button (box, _("_Stop"), "row.stop");
++ if (!sidebar->populate_all)
++ {
++ g_object_set (
++ g_list_first (gtk_container_get_children (GTK_CONTAINER (box)))->data,
++ "image", gtk_image_new_from_icon_name ("gtk-open", GTK_ICON_SIZE_MENU), NULL
++ );
++ g_object_set (data.remove_item, "image", gtk_image_new_from_icon_name("gtk-remove",GTK_ICON_SIZE_MENU), NULL);
++ g_object_set (data.add_shortcut_item, "image", gtk_image_new_from_icon_name("gtk-add", GTK_ICON_SIZE_MENU), NULL);
++ }
+
+ /* Update everything! */
+ check_popover_sensitivity (row, &data);
+@@ -3765,6 +3808,13 @@ show_row_popover (GtkSidebarRow *row)
+ gtk_widget_destroy (sidebar->popover);
+
+ create_row_popover (sidebar, row);
++ if (GTK_IS_MENU (sidebar->popover))
++ {
++ sidebar->context_row = row;
++ gtk_menu_popup_at_pointer (GTK_MENU (sidebar->popover), NULL);
++ g_object_unref (sidebar);
++ return;
++ }
+
+ gtk_popover_set_relative_to (GTK_POPOVER (sidebar->popover), GTK_WIDGET (row));
+
bgstack15