# HG changeset patch
# User Stu Tomlinson <stu@nosnilmot.com>
# Date 1159584243 0
# Node ID 38d1052611bc77e49e53587fb4a047a7f5d6c4a2
# Parent  d1a76ccb93c4cbc5c651c0953d809e1f5c881c57
[gaim-migrate @ 17403]
I don't think this crashes any more than it did before and it does
now compile with older Gtk versions. Thanks to Sadrul for the patch.

committer: Tailor Script <tailor@pidgin.im>

diff -r d1a76ccb93c4 -r 38d1052611bc gtk/gtkcellrendererexpander.c
--- a/gtk/gtkcellrendererexpander.c	Sat Sep 30 00:14:00 2006 +0000
+++ b/gtk/gtkcellrendererexpander.c	Sat Sep 30 02:44:03 2006 +0000
@@ -28,6 +28,7 @@
  * Jonathon Blandford <jrb@redhat.com> for RedHat, Inc.
  */
 
+#include <gtk/gtk.h>
 #include <gtk/gtktreeview.h>
 #include "gtkcellrendererexpander.h"
 
@@ -245,8 +246,13 @@
 	width = cell_area->width;
 	height = cell_area->height;
 	
+#if GTK_CHECK_VERSION(2,6,0)
 	if (!cell->sensitive)
 		state = GTK_STATE_INSENSITIVE;
+#else
+	if (GTK_WIDGET_STATE(widget) == GTK_STATE_INSENSITIVE)
+		state = GTK_STATE_INSENSITIVE;
+#endif
 	else if (flags & GTK_CELL_RENDERER_PRELIT)
 		state = GTK_STATE_PRELIGHT;
 	else if (GTK_WIDGET_HAS_FOCUS (widget) && flags & GTK_CELL_RENDERER_SELECTED)