From d0485cb515529550ed75b4071085628faeb1480f Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Thu, 6 Aug 2009 11:32:44 +0000 Subject: [PATCH] Set STATE_INSENSITIVE for toolbarbox pages --- src/sugar/activity/widgets.py | 3 +-- src/sugar/graphics/toolbarbox.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/sugar/activity/widgets.py b/src/sugar/activity/widgets.py index e14c1f3f..458a7e11 100644 --- a/src/sugar/activity/widgets.py +++ b/src/sugar/activity/widgets.py @@ -150,8 +150,7 @@ class TitleEntry(gtk.ToolItem): def modify_bg(self, state, color): gtk.ToolItem.modify_bg(self, state, color) - if state == gtk.STATE_NORMAL: - self.entry.modify_bg(gtk.STATE_INSENSITIVE, color) + self.entry.modify_bg(state, color) def __jobject_updated_cb(self, jobject): self.entry.set_text(jobject['title']) diff --git a/src/sugar/graphics/toolbarbox.py b/src/sugar/graphics/toolbarbox.py index 54de2bd4..f3d624d6 100644 --- a/src/sugar/graphics/toolbarbox.py +++ b/src/sugar/graphics/toolbarbox.py @@ -257,7 +257,7 @@ def _setup_page(page_widget, color, hpad): page.modify_bg(gtk.STATE_NORMAL, color) if isinstance(page, gtk.Container): for i in page.get_children(): - i.modify_bg(gtk.STATE_NORMAL, color) + i.modify_bg(gtk.STATE_INSENSITIVE, color) page_widget.modify_bg(gtk.STATE_NORMAL, color) page_widget.modify_bg(gtk.STATE_PRELIGHT, color)