[maemo-commits] [maemo-commits] r16318 - in projects/haf/trunk/sapwood: . engine

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Oct 2 16:53:05 EEST 2008
Author: csaavedra
Date: 2008-10-02 16:53:03 +0300 (Thu, 02 Oct 2008)
New Revision: 16318

Modified:
   projects/haf/trunk/sapwood/ChangeLog
   projects/haf/trunk/sapwood/engine/sapwood-style.c
Log:
2008-10-02  Daniel Borgmann  <danielb at openismus.com>

	* engine/sapwood-style.c: (draw_shadow), (draw_flat_box): Removed
	hack from draw_shadow, added focus state detection to
	draw_flat_box for entries.



Modified: projects/haf/trunk/sapwood/ChangeLog
===================================================================
--- projects/haf/trunk/sapwood/ChangeLog	2008-10-02 13:11:43 UTC (rev 16317)
+++ projects/haf/trunk/sapwood/ChangeLog	2008-10-02 13:53:03 UTC (rev 16318)
@@ -1,5 +1,11 @@
 2008-10-02  Daniel Borgmann  <danielb at openismus.com>
 
+	* engine/sapwood-style.c: (draw_shadow), (draw_flat_box): Removed
+	hack from draw_shadow, added focus state detection to
+	draw_flat_box for entries.
+
+2008-10-02  Daniel Borgmann  <danielb at openismus.com>
+
        * engine/sapwood-style.c: Hacks to enable themeing of 
        insensitive state for GtkEntry widgets.
 

Modified: projects/haf/trunk/sapwood/engine/sapwood-style.c
===================================================================
--- projects/haf/trunk/sapwood/engine/sapwood-style.c	2008-10-02 13:11:43 UTC (rev 16317)
+++ projects/haf/trunk/sapwood/engine/sapwood-style.c	2008-10-02 13:53:03 UTC (rev 16318)
@@ -554,10 +554,6 @@
   g_return_if_fail (style != NULL);
   g_return_if_fail (window != NULL);
 
-  /* Hack because Gtk doesn't give us the correct widget state */
-  if (widget && !GTK_WIDGET_IS_SENSITIVE(widget) && GTK_IS_ENTRY(widget))
-    state = GTK_STATE_INSENSITIVE;
-
   match_data.function = TOKEN_D_SHADOW;
   match_data.detail = (gchar *)detail;
   match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
@@ -920,8 +916,14 @@
   g_return_if_fail (window != NULL);
   
   /* Hack because Gtk doesn't give us the correct widget state */
-  if (widget && !GTK_WIDGET_IS_SENSITIVE(widget) && GTK_IS_ENTRY(widget))
-    state = GTK_STATE_INSENSITIVE;
+  if (widget && GTK_IS_ENTRY(widget))
+  {
+    if (!GTK_WIDGET_IS_SENSITIVE(widget))
+      state = GTK_STATE_INSENSITIVE;
+      
+    if (GTK_WIDGET_HAS_FOCUS(widget))
+      state = GTK_STATE_ACTIVE;
+  }
 
   match_data.function = TOKEN_D_FLAT_BOX;
   match_data.detail = (gchar *)detail;


More information about the maemo-commits mailing list