From f19ebb6269267d86b6251306eb8a1308c17915cf Mon Sep 17 00:00:00 2001 From: Ell Date: Wed, 27 Mar 2019 16:50:57 -0400 Subject: [PATCH] app: revert combo-box drop-down changes Revert the use of gtk_combo_box_set_wrap_width() to change the combo-box drop-down style, except for the status-bar unit combo. See https://gitlab.gnome.org/GNOME/gimp/issues/2828#note_421312 for the rationale. This reverts commits 1d984542e9a4673dc81baa3d60d389e3bb3c2d03, 68a33ab5bda1470453d5856afc5bc499631b6da7, and 6dfca83c2a5ee8d053150e85e2047702d67eb4e7. (cherry picked from commit 846d242f301b6ee8d62169d18bca61eaa3057a8b) --- app/display/gimpscalecombobox.c | 3 --- app/display/gimpstatusbar.c | 3 +++ app/widgets/gimpcontainercombobox.c | 3 --- app/widgets/gimplanguagecombobox.c | 3 --- libgimpwidgets/gimpcolorprofilecombobox.c | 3 --- libgimpwidgets/gimpintcombobox.c | 3 --- libgimpwidgets/gimpstringcombobox.c | 3 --- libgimpwidgets/gimpunitcombobox.c | 3 --- 8 files changed, 3 insertions(+), 21 deletions(-) diff --git a/app/display/gimpscalecombobox.c b/app/display/gimpscalecombobox.c index bbce45026f..3a5bba0ebe 100644 --- a/app/display/gimpscalecombobox.c +++ b/app/display/gimpscalecombobox.c @@ -186,9 +186,6 @@ gimp_scale_combo_box_constructed (GObject *object) g_signal_connect (entry, "key-press-event", G_CALLBACK (gimp_scale_combo_box_entry_key_press), combo_box); - - /* See issues #2828 and #2642. */ - gtk_combo_box_set_wrap_width (GTK_COMBO_BOX (object), 1); } static void diff --git a/app/display/gimpstatusbar.c b/app/display/gimpstatusbar.c index 8f51b5f63d..0c0ca14907 100644 --- a/app/display/gimpstatusbar.c +++ b/app/display/gimpstatusbar.c @@ -235,6 +235,9 @@ gimp_statusbar_init (GimpStatusbar *statusbar) statusbar->unit_combo = gimp_unit_combo_box_new_with_model (store); g_object_unref (store); + /* see issue #2642 */ + gtk_combo_box_set_wrap_width (GTK_COMBO_BOX (statusbar->unit_combo), 1); + gtk_widget_set_can_focus (statusbar->unit_combo, FALSE); g_object_set (statusbar->unit_combo, "focus-on-click", FALSE, NULL); gtk_box_pack_start (GTK_BOX (hbox), statusbar->unit_combo, FALSE, FALSE, 0); diff --git a/app/widgets/gimpcontainercombobox.c b/app/widgets/gimpcontainercombobox.c index 8c34384c06..87e2af8eac 100644 --- a/app/widgets/gimpcontainercombobox.c +++ b/app/widgets/gimpcontainercombobox.c @@ -177,9 +177,6 @@ gimp_container_combo_box_init (GimpContainerComboBox *combo) combo); gtk_widget_set_sensitive (GTK_WIDGET (combo), FALSE); - - /* See issues #2828 and #2642. */ - gtk_combo_box_set_wrap_width (GTK_COMBO_BOX (combo), 1); } static void diff --git a/app/widgets/gimplanguagecombobox.c b/app/widgets/gimplanguagecombobox.c index 5a2e13b457..428277408e 100644 --- a/app/widgets/gimplanguagecombobox.c +++ b/app/widgets/gimplanguagecombobox.c @@ -62,9 +62,6 @@ gimp_language_combo_box_init (GimpLanguageComboBox *combo) gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), renderer, "text", GIMP_LANGUAGE_STORE_LABEL, NULL); - - /* See issues #2828 and #2642. */ - gtk_combo_box_set_wrap_width (GTK_COMBO_BOX (combo), 1); } /** diff --git a/libgimpwidgets/gimpcolorprofilecombobox.c b/libgimpwidgets/gimpcolorprofilecombobox.c index c3f6dcc51e..348136530d 100644 --- a/libgimpwidgets/gimpcolorprofilecombobox.c +++ b/libgimpwidgets/gimpcolorprofilecombobox.c @@ -151,9 +151,6 @@ gimp_color_profile_combo_box_init (GimpColorProfileComboBox *combo_box) gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (combo_box), gimp_color_profile_row_separator_func, NULL, NULL); - - /* See issues #2828 and #2642. */ - gtk_combo_box_set_wrap_width (GTK_COMBO_BOX (combo_box), 1); } static void diff --git a/libgimpwidgets/gimpintcombobox.c b/libgimpwidgets/gimpintcombobox.c index e22c22b5fa..6cd890935b 100644 --- a/libgimpwidgets/gimpintcombobox.c +++ b/libgimpwidgets/gimpintcombobox.c @@ -930,9 +930,6 @@ gimp_int_combo_box_create_cells (GimpIntComboBox *combo_box) for (; attached_menus; attached_menus = g_list_next (attached_menus)) queue_resize_cell_view (attached_menus->data); } - - /* See issues #2828 and #2642. */ - gtk_combo_box_set_wrap_width (GTK_COMBO_BOX (combo_box), 1); } static void diff --git a/libgimpwidgets/gimpstringcombobox.c b/libgimpwidgets/gimpstringcombobox.c index 87fd3e36b3..56208a385b 100644 --- a/libgimpwidgets/gimpstringcombobox.c +++ b/libgimpwidgets/gimpstringcombobox.c @@ -159,9 +159,6 @@ gimp_string_combo_box_constructed (GObject *object) gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (object), cell, "text", priv->label_column, NULL); - - /* See issues #2828 and #2642. */ - gtk_combo_box_set_wrap_width (GTK_COMBO_BOX (object), 1); } static void diff --git a/libgimpwidgets/gimpunitcombobox.c b/libgimpwidgets/gimpunitcombobox.c index 3919461edf..fff5577482 100644 --- a/libgimpwidgets/gimpunitcombobox.c +++ b/libgimpwidgets/gimpunitcombobox.c @@ -83,9 +83,6 @@ gimp_unit_combo_box_init (GimpUnitComboBox *combo) g_signal_connect (combo, "notify::popup-shown", G_CALLBACK (gimp_unit_combo_box_popup_shown), NULL); - - /* See issues #2828 and #2642. */ - gtk_combo_box_set_wrap_width (GTK_COMBO_BOX (combo), 1); } static void