changeset 11753:59ae71ae0b7c

[gaim-migrate @ 14044] A couple more backwards compatibility things - include our local gtkexpander.h for Gtk < 2.4, and gtk_combo_box_set_row_separator_func is new with 2.6, I just #if'd it out for older Gtk's - is that all we need to do? committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sun, 23 Oct 2005 13:37:57 +0000
parents 0b4923aee31d
children 55052a685da6
files src/gtkgaim.h src/gtkstatusbox.c
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkgaim.h	Sun Oct 23 13:30:41 2005 +0000
+++ b/src/gtkgaim.h	Sun Oct 23 13:37:57 2005 +0000
@@ -46,10 +46,12 @@
  * This is backwards-compatibility code for older versions of GTK+ (< 2.4.x)
  * It defines the new wrap behavior (unknown in earlier versions)
  * as the old (slightly buggy) wrap behavior.
+ * It also includes our back-ported GtkExpander
  */
 /** @cond */
 #if (!GTK_CHECK_VERSION(2,4,0))
 #define GTK_WRAP_WORD_CHAR GTK_WRAP_WORD
+#include "gtkexpander.h"
 #endif
 /** @endcond */
 
--- a/src/gtkstatusbox.c	Sun Oct 23 13:30:41 2005 +0000
+++ b/src/gtkstatusbox.c	Sun Oct 23 13:37:57 2005 +0000
@@ -353,6 +353,7 @@
 
 }
 
+#if GTK_CHECK_VERSION(2,6,0)
 static gboolean
 dropdown_store_row_separator_func(GtkTreeModel *model,
 								  GtkTreeIter *iter, gpointer data)
@@ -374,6 +375,7 @@
 
 	return FALSE;
 }
+#endif
 
 static void
 gtk_gaim_status_box_init (GtkGaimStatusBox *status_box)
@@ -419,7 +421,9 @@
 
 	status_box->store = gtk_list_store_new(NUM_COLUMNS, G_TYPE_INT, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
 	status_box->dropdown_store = gtk_list_store_new(NUM_COLUMNS, G_TYPE_INT, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
+#if GTK_CHECK_VERSION(2,6,0)
 	gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(status_box), dropdown_store_row_separator_func, NULL, NULL);
+#endif
 	gtk_combo_box_set_model(GTK_COMBO_BOX(status_box), GTK_TREE_MODEL(status_box->dropdown_store));
 	gtk_cell_view_set_model(GTK_CELL_VIEW(status_box->cell_view), GTK_TREE_MODEL(status_box->store));
 	gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(status_box), 0);