Patchwork [bitbake-devel,4/5] Hob: use hob icon checker to check the gtk icon for make the icon constaintly

login
register
mail settings
Submitter An, LimingX L
Date March 26, 2012, 10:41 a.m.
Message ID <a80eb8c10157b696b26757355f7215156e47f48c.1332752084.git.limingx.l.an@intel.com>
Download mbox | patch
Permalink /patch/24529/
State New
Headers show

Comments

An, LimingX L - March 26, 2012, 10:41 a.m.
Because we have hob icon, so need to make some gtk icon to transfer to hob icon. so use hob icon checker to fixed the gtk icon

[YOCTO #2108]

Signed-off-by: Liming An <limingx.l.an@intel.com>
---
 bitbake/lib/bb/ui/crumbs/hig.py |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py
index 6ae682b..d151fc4 100644
--- a/bitbake/lib/bb/ui/crumbs/hig.py
+++ b/bitbake/lib/bb/ui/crumbs/hig.py
@@ -28,7 +28,7 @@  import re
 import subprocess
 import shlex
 from bb.ui.crumbs.hobcolor import HobColors
-from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton
+from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobAltButton, HobIconChecker
 from bb.ui.crumbs.progressbar import HobProgressBar
 
 """
@@ -75,10 +75,8 @@  class CrumbsMessageDialog(CrumbsDialog):
 
         self.icon = gtk.Image()
         # We have our own Info icon which should be used in preference of the stock icon
-        if icon == gtk.STOCK_INFO or icon == "gtk-dialog-info":
-            self.icon.set_from_file(hic.ICON_INFO_DISPLAY_FILE)
-        else:
-            self.icon.set_from_stock(icon, gtk.ICON_SIZE_DIALOG)
+        self.icon_chk = HobIconChecker()
+        self.icon.set_from_stock(self.icon_chk.check_stock_icon(icon), gtk.ICON_SIZE_DIALOG)
         self.icon.set_property("yalign", 0.00)
         self.icon.show()
         first_row.add(self.icon)