[gimp] libgimpwidgets: use GtkComboBoxText when building against GTK+ >= 2.24



commit ca1cc32e52a3d38439dc197cf43ef704a1d456c1
Author: Michael Natterer <mitch gimp org>
Date:   Sun Mar 6 11:51:24 2011 +0100

    libgimpwidgets: use GtkComboBoxText when building against GTK+ >= 2.24

 libgimpwidgets/gimppropwidgets.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/libgimpwidgets/gimppropwidgets.c b/libgimpwidgets/gimppropwidgets.c
index cfdff79..c7eb52c 100644
--- a/libgimpwidgets/gimppropwidgets.c
+++ b/libgimpwidgets/gimppropwidgets.c
@@ -556,10 +556,17 @@ gimp_prop_boolean_combo_box_new (GObject     *config,
                 property_name, &value,
                 NULL);
 
+#if GTK_CHECK_VERSION (2, 24, 0)
+  combo_box = gtk_combo_box_text_new ();
+
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), true_text);
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), false_text);
+#else
   combo_box = gtk_combo_box_new_text ();
 
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), true_text);
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), false_text);
+#endif
 
   gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), value ? 0 : 1);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]