summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/hobwidget.py
diff options
context:
space:
mode:
authorShane Wang <shane.wang@intel.com>2012-03-16 15:17:37 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-20 15:21:33 +0000
commit491c87d1674b0447aa2e37d67bcba3aa55eec677 (patch)
tree6ce2f3f00f6e0f3e8fb4ba1c6a3c86542226e7bf /bitbake/lib/bb/ui/crumbs/hobwidget.py
parent9ecdbc377c6ab6848afb0a378c5804918951f6b7 (diff)
downloadpoky-491c87d1674b0447aa2e37d67bcba3aa55eec677.tar.gz
Hob: fix '!= None' and '== None' in the code
This patch is to fix the following: if foo != None -----> if foo if foo == None -----> if not foo (From Poky rev: d771343b1726f166ed8d75543ba68bd2a20aee7b) (Bitbake rev: 23c140a4d00293d922cbd34b6b837493cac2e93a) Signed-off-by: Shane Wang <shane.wang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hobwidget.py')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobwidget.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobwidget.py b/bitbake/lib/bb/ui/crumbs/hobwidget.py
index 247bbd1de4..f0d9cbcc98 100644
--- a/bitbake/lib/bb/ui/crumbs/hobwidget.py
+++ b/bitbake/lib/bb/ui/crumbs/hobwidget.py
@@ -366,7 +366,7 @@ class HobTabBar(gtk.DrawingArea):
366 child["x"] = self.tab_x + i * self.tab_width 366 child["x"] = self.tab_x + i * self.tab_width
367 child["y"] = self.tab_y 367 child["y"] = self.tab_y
368 368
369 if self.blank_rectangle != None: 369 if self.blank_rectangle:
370 self.resize_blank_rectangle() 370 self.resize_blank_rectangle()
371 371
372 def resize_blank_rectangle(self): 372 def resize_blank_rectangle(self):
@@ -553,7 +553,7 @@ class HobTabBar(gtk.DrawingArea):
553 self.queue_draw() 553 self.queue_draw()
554 554
555 def set_blank_size(self, x, y, w, h): 555 def set_blank_size(self, x, y, w, h):
556 if self.blank_rectangle == None or self.blank_rectangle.x != x or self.blank_rectangle.width != w: 556 if not self.blank_rectangle or self.blank_rectangle.x != x or self.blank_rectangle.width != w:
557 self.emit("blank-area-changed", x, y, w, h) 557 self.emit("blank-area-changed", x, y, w, h)
558 558
559 return gtk.gdk.Rectangle(x, y, w, h) 559 return gtk.gdk.Rectangle(x, y, w, h)
@@ -640,7 +640,7 @@ class HobNotebook(gtk.VBox):
640 if not notebook: 640 if not notebook:
641 return 641 return
642 title = notebook.get_tab_label_text(notebook_child) 642 title = notebook.get_tab_label_text(notebook_child)
643 if title == None: 643 if not title:
644 return 644 return
645 for child in self.tabbar.children: 645 for child in self.tabbar.children:
646 if child["title"] == title: 646 if child["title"] == title: