summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-04-07 21:02:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-04-07 21:02:43 +0100
commit70cc48f17a61296021c035f351c3db68bc5e08ad (patch)
treed7f9fc0e2dd6f5bc809835462f2ed07b2527836e /vcl/unx
parent42adbfea50385d5af68040bf67149d0007a1e7bf (diff)
gtk3: the list/combo box hack to get internal buttons no longer works
with gtk3-3.20.2 Change-Id: I608f3476a82233cb49e0b43c95f5a984d7c89c92
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx30
1 files changed, 2 insertions, 28 deletions
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index caaa767a5107..ef3e61cf4a47 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -284,9 +284,7 @@ static GtkWidget* gDumbContainer;
static GtkWidget* gSpinBox;
static GtkWidget* gEntryBox;
static GtkWidget* gComboBox;
-static GtkWidget* gComboBoxButtonWidget;
static GtkWidget* gListBox;
-static GtkWidget* gListBoxButtonWidget;
static GtkWidget* gMenuBarWidget;
static GtkWidget* gMenuItemMenuBarWidget;
static GtkWidget* gCheckMenuItemWidget;
@@ -2315,22 +2313,6 @@ void GtkData::deInitNWF()
gtk_widget_destroy(gCacheWindow);
}
-static void get_combo_box_entry_inner_widgets(GtkWidget *widget, gpointer)
-{
- if (GTK_IS_TOGGLE_BUTTON(widget))
- {
- gComboBoxButtonWidget = widget;
- }
-}
-
-void get_combo_box_inner_button(GtkWidget *widget, gpointer)
-{
- if (GTK_IS_TOGGLE_BUTTON(widget))
- {
- gListBoxButtonWidget = widget;
- }
-}
-
GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
: SvpSalGraphics(),
mpFrame( pFrame ),
@@ -2436,21 +2418,13 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
/* Combobox */
gComboBox = gtk_combo_box_text_new_with_entry();
getStyleContext(&mpComboboxStyle, gComboBox);
- /* Get ComboBox Entry and Button */
- gtk_container_forall(GTK_CONTAINER(gComboBox),
- get_combo_box_entry_inner_widgets,
- nullptr);
- mpComboboxButtonStyle = gtk_widget_get_style_context(gComboBoxButtonWidget);
+ mpComboboxButtonStyle = createStyleContext(GtkControlPart::Button, mpComboboxStyle);
/* Listbox */
gListBox = gtk_combo_box_text_new();
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(gListBox), "sample");
getStyleContext(&mpListboxStyle, gListBox);
- /* Get ComboBox Button */
- gtk_container_forall(GTK_CONTAINER(gListBox),
- get_combo_box_inner_button,
- nullptr);
- mpListboxButtonStyle = gtk_widget_get_style_context(gListBoxButtonWidget);
+ mpListboxButtonStyle = createStyleContext(GtkControlPart::Button, mpListboxStyle);
/* Frames */
mpFrameOutStyle = mpFrameInStyle = createStyleContext(GtkControlPart::FrameBorder);