[Xfce4-commits] [apps/xfce4-taskmanager] 08/15: GtkComboBoxText appeared in gtk 2.24.1, use it if available

noreply at xfce.org noreply at xfce.org
Mon Dec 8 23:02:07 CET 2014


This is an automated email from the git hooks/post-receive script.

landry pushed a commit to branch landry/gtk3
in repository apps/xfce4-taskmanager.

commit 008bfd62a6cecd8a72884582b95a8719b73270cf
Author: Landry Breuil <landry at xfce.org>
Date:   Mon Dec 8 22:46:47 2014 +0100

    GtkComboBoxText appeared in gtk 2.24.1, use it if available
---
 src/settings-dialog.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/settings-dialog.c b/src/settings-dialog.c
index 800881d..213c014 100644
--- a/src/settings-dialog.c
+++ b/src/settings-dialog.c
@@ -119,13 +119,21 @@ xtm_settings_dialog_init (XtmSettingsDialog *dialog)
 		XtmToolbarStyle toolbar_style;
 
 		box = GTK_WIDGET (gtk_builder_get_object (builder, "hbox-toolbar-style"));
+#if HAVE_GTK3 ||  GTK_CHECK_VERSION(2, 24, 1)
+		combobox = gtk_combo_box_text_new ();
+#else
 		combobox = gtk_combo_box_new_text ();
+#endif
 		gtk_box_pack_start (GTK_BOX (box), combobox, FALSE, FALSE, 0);
 		gtk_widget_show (combobox);
 
 		klass = g_type_class_ref (XTM_TYPE_TOOLBAR_STYLE);
 		for (n = 0; n < klass->n_values; ++n)
+#if HAVE_GTK3 ||  GTK_CHECK_VERSION(2, 24, 1)
+			gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combobox), _(klass->values[n].value_nick));
+#else
 			gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _(klass->values[n].value_nick));
+#endif
 		g_type_class_unref (klass);
 
 		g_object_get (dialog->settings, "toolbar-style", &toolbar_style, NULL);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list