murrine r29 - in trunk: . src



Author: acimitan
Date: Thu Mar 13 11:04:36 2008
New Revision: 29
URL: http://svn.gnome.org/viewvc/murrine?rev=29&view=rev

Log:
2008-03-13  Andrea Cimitan  <andrea cimitan gmail com>

	* src/cairo-support.c: (murrine_get_parent_bg):
	Various fixes to murrine_get_parent_bg.
	Thanks to Benjamin Berg


Modified:
   trunk/ChangeLog
   trunk/src/cairo-support.c

Modified: trunk/src/cairo-support.c
==============================================================================
--- trunk/src/cairo-support.c	(original)
+++ trunk/src/cairo-support.c	Thu Mar 13 11:04:36 2008
@@ -242,14 +242,34 @@
 	GtkStateType state_type;
 	const GtkWidget *parent;
 	GdkColor *gcolor;
+	gboolean stop;
 
 	if (widget == NULL)
 		return;
 
 	parent = widget->parent;
+	stop = FALSE;
+	
+	while (parent && !stop)
+	{
+		stop = FALSE;
+
+		stop |= !GTK_WIDGET_NO_WINDOW (parent);
+		stop |= GTK_IS_NOTEBOOK (parent) &&
+		        !gtk_notebook_get_show_tabs (GTK_NOTEBOOK (parent)) &&
+		        gtk_notebook_get_show_border (GTK_NOTEBOOK (parent));
 
-	while (parent && GTK_WIDGET_NO_WINDOW (parent) && !((GTK_IS_NOTEBOOK (parent)) || (GTK_IS_TOOLBAR (parent))))
-		parent = parent->parent;
+		if (GTK_IS_TOOLBAR (parent))
+		{
+			GtkShadowType shadow = GTK_SHADOW_OUT;
+			gtk_widget_style_get (GTK_WIDGET (parent), "shadow-type", &shadow, NULL);
+			
+			stop |= (shadow != GTK_SHADOW_NONE);
+		}
+
+		if (!stop)
+			parent = parent->parent;
+	}
 
 	if (parent == NULL)
 		return;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]