[frogr] Don't reference GtkComboBoxText if GTK+ < 2.24



commit da70d0835ec691b7eb5a8816ede0ad4b571b328b
Author: Mario Sanchez Prada <msanchez igalia com>
Date:   Mon Apr 9 23:41:39 2012 +0200

    Don't reference GtkComboBoxText if GTK+ < 2.24

 src/frogr-details-dialog.c  |    2 +-
 src/frogr-gtk-compat.c      |    6 +++---
 src/frogr-gtk-compat.h      |    2 +-
 src/frogr-settings-dialog.c |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/frogr-details-dialog.c b/src/frogr-details-dialog.c
index e1ebe2a..97cbae7 100644
--- a/src/frogr-details-dialog.c
+++ b/src/frogr-details-dialog.c
@@ -307,7 +307,7 @@ _create_widgets (FrogrDetailsDialog *self)
 
   widget = frogr_gtk_compat_combo_box_text_new ();
   for (i = 0; license_descriptions[i]; i++)
-    frogr_gtk_compat_combo_box_text_insert (GTK_COMBO_BOX_TEXT (widget), i, _(license_descriptions[i]));
+    frogr_gtk_compat_combo_box_text_insert (GTK_COMBO_BOX (widget), i, _(license_descriptions[i]));
 
   priv->license_cb = widget;
   gtk_box_pack_start (GTK_BOX (section_vbox), widget, FALSE, FALSE, 0);
diff --git a/src/frogr-gtk-compat.c b/src/frogr-gtk-compat.c
index 8295965..a160898 100644
--- a/src/frogr-gtk-compat.c
+++ b/src/frogr-gtk-compat.c
@@ -70,14 +70,14 @@ frogr_gtk_compat_combo_box_text_new (void)
 }
 
 void
-frogr_gtk_compat_combo_box_text_insert (GtkComboBoxText *combo_box,
+frogr_gtk_compat_combo_box_text_insert (GtkComboBox *combo_box,
                                         gint position,
                                         const gchar *text)
 {
 #ifdef GTK_API_VERSION_3
-  gtk_combo_box_text_insert (combo_box, position, NULL, text);
+  gtk_combo_box_text_insert (GTK_COMBO_BOX_TEXT (combo_box), position, NULL, text);
 #elif GTK_CHECK_VERSION (2,24,0)
-  gtk_combo_box_text_insert_text (combo_box, position, text);
+  gtk_combo_box_text_insert_text (GTK_COMBO_BOX_TEXT (combo_box), position, text);
 #else
   gtk_combo_box_insert_text (combo_box, position, text);
 #endif
diff --git a/src/frogr-gtk-compat.h b/src/frogr-gtk-compat.h
index dc42ff1..c70669d 100644
--- a/src/frogr-gtk-compat.h
+++ b/src/frogr-gtk-compat.h
@@ -31,7 +31,7 @@ GtkWidget *frogr_gtk_compat_separator_new (GtkOrientation orientation);
 
 GtkWidget *frogr_gtk_compat_combo_box_text_new (void);
 
-void frogr_gtk_compat_combo_box_text_insert (GtkComboBoxText *combo_box,
+void frogr_gtk_compat_combo_box_text_insert (GtkComboBox *combo_box,
                                              gint position,
                                              const gchar *text);
 G_END_DECLS
diff --git a/src/frogr-settings-dialog.c b/src/frogr-settings-dialog.c
index ab4ebcd..bff3d76 100644
--- a/src/frogr-settings-dialog.c
+++ b/src/frogr-settings-dialog.c
@@ -284,7 +284,7 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
 
   combo = frogr_gtk_compat_combo_box_text_new ();
   for (i = 0; license_descriptions[i]; i++)
-    frogr_gtk_compat_combo_box_text_insert (GTK_COMBO_BOX_TEXT (combo), i, _(license_descriptions[i]));
+    frogr_gtk_compat_combo_box_text_insert (GTK_COMBO_BOX (combo), i, _(license_descriptions[i]));
 
   gtk_box_pack_start (GTK_BOX (vbox), combo, FALSE, FALSE, 0);
   priv->license_cb = combo;



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