# HG changeset patch # User Mark Doliner # Date 1169713790 0 # Node ID 24843d86c2a302cfa804dccbebd4daee01424410 # Parent 1657b86dc04ee4757f59fd1fe63d6cf28ea14de8 sf patch #1644019, from good ol' Ka-Hing Cheung "fix compiling on gtk 2.4. xmppconsole.c is the culprit. gtk_combo_box_get_active_text is defined in gtk 2.6 but not 2.4." diff -r 1657b86dc04e -r 24843d86c2a3 gtk/gaimcombobox.c --- a/gtk/gaimcombobox.c Thu Jan 25 08:27:41 2007 +0000 +++ b/gtk/gaimcombobox.c Thu Jan 25 08:29:50 2007 +0000 @@ -21,9 +21,10 @@ #include */ #include -#if !GTK_CHECK_VERSION(2,4,0) +#if !GTK_CHECK_VERSION(2,6,0) #include "gaimcombobox.h" +#if !GTK_CHECK_VERSION(2,4,0) #include #include #include "gtkcelllayout.h" @@ -3557,21 +3558,6 @@ gtk_list_store_remove (store, &iter); } -static gchar * -gtk_combo_box_get_active_text (GtkComboBox *combo_box) -{ - GtkTreeIter iter; - gchar *text = NULL; - - g_return_val_if_fail (GTK_IS_LIST_STORE (combo_box->priv->model), NULL); - - if (gtk_combo_box_get_active_iter (combo_box, &iter)) - gtk_tree_model_get (combo_box->priv->model, &iter, - 0, &text, -1); - return text; -} - - static gboolean gtk_combo_box_mnemonic_activate (GtkWidget *widget, gboolean group_cycling) @@ -3745,3 +3731,19 @@ } } #endif /* Gtk 2.4 */ + +gchar * +gtk_combo_box_get_active_text (GtkComboBox *combo_box) +{ + GtkTreeIter iter; + gchar *text = NULL; + + /* g_return_val_if_fail (GTK_IS_LIST_STORE (combo_box->priv->model), NULL); */ + + if (gtk_combo_box_get_active_iter (combo_box, &iter)) + gtk_tree_model_get (gtk_combo_box_get_model(combo_box), &iter, + 0, &text, -1); + return text; +} + +#endif diff -r 1657b86dc04e -r 24843d86c2a3 gtk/gaimcombobox.h --- a/gtk/gaimcombobox.h Thu Jan 25 08:27:41 2007 +0000 +++ b/gtk/gaimcombobox.h Thu Jan 25 08:29:50 2007 +0000 @@ -17,6 +17,9 @@ * Boston, MA 02111-1307, USA. */ +#ifndef __GAIM_COMBO_BOX_H__ +#define __GAIM_COMBO_BOX_H__ + #ifndef __GTK_COMBO_BOX_H__ #define __GTK_COMBO_BOX_H__ @@ -98,8 +101,6 @@ const gchar *text); void gtk_combo_box_remove_text (GtkComboBox *combo_box, gint position); -gchar *gtk_combo_box_get_active_text (GtkComboBox *combo_box); - /* programmatic control */ void gtk_combo_box_popup (GtkComboBox *combo_box); void gtk_combo_box_popdown (GtkComboBox *combo_box); @@ -107,3 +108,7 @@ G_END_DECLS #endif /* __GTK_COMBO_BOX_H__ */ + +gchar *gtk_combo_box_get_active_text (GtkComboBox *combo_box); + +#endif /* __GAIM_COMBOX_BOX_H__ */ diff -r 1657b86dc04e -r 24843d86c2a3 gtk/gtkgaim.h --- a/gtk/gtkgaim.h Thu Jan 25 08:27:41 2007 +0000 +++ b/gtk/gtkgaim.h Thu Jan 25 08:29:50 2007 +0000 @@ -55,24 +55,24 @@ */ /** @cond */ #if (!GTK_CHECK_VERSION(2,4,0)) -#define GTK_WRAP_WORD_CHAR GTK_WRAP_WORD -#include "gtkexpander.h" +# define GTK_WRAP_WORD_CHAR GTK_WRAP_WORD +# include "gtkexpander.h" #endif /** @endcond */ /* * We include the sources for GtkComboBox and GtkCellView because - * they don't exist in older version of Gtk+, and we use them + * they don't exist in older versions of GTK+, and we use them * in a few places. */ #if !GTK_CHECK_VERSION(2,6,0) # include "gtkcellview.h" # include "gtkcellviewmenuitem.h" +# include "gaimcombobox.h" # if !GTK_CHECK_VERSION(2,4,0) # include "gtkcelllayout.h" -# include "gaimcombobox.h" -# endif /* Gtk 2.4 */ -#endif /* Gtk 2.6 */ +# endif /* Less than GTK+ 2.4 */ +#endif /* Less than GTK+ 2.6 */ /* * Spacings between components, as defined by the