|
From: <the...@us...> - 2007-01-25 08:27:34
|
Revision: 18174
http://svn.sourceforge.net/gaim/?rev=18174&view=rev
Author: thekingant
Date: 2007-01-25 00:27:28 -0800 (Thu, 25 Jan 2007)
Log Message:
-----------
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."
Modified Paths:
--------------
trunk/gtk/gaimcombobox.c
trunk/gtk/gaimcombobox.h
trunk/gtk/gtkgaim.h
Modified: trunk/gtk/gaimcombobox.c
===================================================================
--- trunk/gtk/gaimcombobox.c 2007-01-25 08:17:08 UTC (rev 18173)
+++ trunk/gtk/gaimcombobox.c 2007-01-25 08:27:28 UTC (rev 18174)
@@ -21,9 +21,10 @@
#include <config.h>
*/
#include <gtk/gtkversion.h>
-#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 <gtk/gtkarrow.h>
#include <gtk/gtkbindings.h>
#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
Modified: trunk/gtk/gaimcombobox.h
===================================================================
--- trunk/gtk/gaimcombobox.h 2007-01-25 08:17:08 UTC (rev 18173)
+++ trunk/gtk/gaimcombobox.h 2007-01-25 08:27:28 UTC (rev 18174)
@@ -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__ */
Modified: trunk/gtk/gtkgaim.h
===================================================================
--- trunk/gtk/gtkgaim.h 2007-01-25 08:17:08 UTC (rev 18173)
+++ trunk/gtk/gtkgaim.h 2007-01-25 08:27:28 UTC (rev 18174)
@@ -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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|