diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2011-06-07 17:23:39 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2011-06-07 17:23:39 +0000 |
commit | b9bdb198cb90fd378ac2a2fdb6cd4585d0a78084 (patch) | |
tree | b0fe676b34d38dea3fcb802563e30fb77158d07e /gtk/compat.c | |
parent | a5d1f01d19b9b805ef9d2f004184fb73b5ae5ccb (diff) | |
download | netsurf-b9bdb198cb90fd378ac2a2fdb6cd4585d0a78084.tar.gz netsurf-b9bdb198cb90fd378ac2a2fdb6cd4585d0a78084.tar.bz2 |
compatability fix for recent gtk API deprecation
svn path=/trunk/netsurf/; revision=12469
Diffstat (limited to 'gtk/compat.c')
-rw-r--r-- | gtk/compat.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gtk/compat.c b/gtk/compat.c index 2361dc201..86b87d4cb 100644 --- a/gtk/compat.c +++ b/gtk/compat.c @@ -97,3 +97,30 @@ void nsgtk_dialog_set_has_separator(GtkDialog *dialog, gboolean setting) #endif } +GtkWidget *nsgtk_combo_box_text_new(void) +{ + #if GTK_CHECK_VERSION(2,24,0) + return gtk_combo_box_text_new(); + #else + return gtk_combo_box_new_text(); + #endif +} + +void nsgtk_combo_box_text_append_text(GtkWidget *combo_box, const gchar *text) +{ + #if GTK_CHECK_VERSION(2,24,0) + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), text); + #else + gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), text); + #endif + +} + +gchar *nsgtk_combo_box_text_get_active_text(GtkWidget *combo_box) +{ + #if GTK_CHECK_VERSION(2,24,0) + return gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(combo_box)); + #else + return gtk_combo_box_get_active_text(GTK_COMBO_BOX(combo_box)); + #endif +} |