Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2009-07-31 10:55:58 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-07-31 10:55:58 (GMT)
commit3ee78747d4b3d2daf564a808189e88e4df70918f (patch)
tree86de698467a65057e0f65f0654830bf0152d1793
parent4d6a2cc9bdac24d126ea9a7514d396a7325a146a (diff)
Fix review issues
-rw-r--r--src/sugar/graphics/toolbarbox.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/sugar/graphics/toolbarbox.py b/src/sugar/graphics/toolbarbox.py
index 2e1d93b..e8c1b35 100644
--- a/src/sugar/graphics/toolbarbox.py
+++ b/src/sugar/graphics/toolbarbox.py
@@ -70,7 +70,8 @@ class ToolbarButton(ToolButton):
box = self.toolbar_box
- if not box or not self.page_widget or self.is_expanded() == expanded:
+ if box is None or self.page_widget is None or \
+ self.is_expanded() == expanded:
return
if not expanded:
@@ -80,11 +81,11 @@ class ToolbarButton(ToolButton):
if box.expanded_button is not None:
expanded_toolitem = box.expanded_button.page_widget.toolbar_button
- if expanded_toolitem.window:
+ if expanded_toolitem.window is not None:
expanded_toolitem.window.invalidate_rect(None, True)
box.expanded_button.set_expanded(False)
- if self.page_widget.parent:
+ if self.page_widget.parent is not None:
self.palette.remove(self.page_widget)
self.modify_bg(gtk.STATE_NORMAL, box.background)
@@ -93,7 +94,8 @@ class ToolbarButton(ToolButton):
box.expanded_button = self
def do_expose_event(self, event):
- if not self.is_expanded() or self.palette and self.palette.is_up():
+ if not self.is_expanded() or self.palette is not None and \
+ self.palette.is_up():
ToolButton.do_expose_event(self, event)
_paint_arrow(self, event, gtk.ARROW_DOWN)
return
@@ -247,7 +249,7 @@ class _Palette(gtk.Window):
def do_size_request(self, requisition):
gtk.Window.do_size_request(self, requisition)
- if self._toolitem.toolbar_box:
+ if self._toolitem.toolbar_box is not None:
requisition.width = self._toolitem.toolbar_box.allocation.width
def __realize_cb(self, widget):