Hob: use hob icon checker to check the gtk icon for make the icon constaintly
authorLiming An <limingx.l.an@intel.com>
Fri, 23 Mar 2012 16:04:52 +0000 (00:04 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 28 Mar 2012 15:49:18 +0000 (16:49 +0100)
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]

(From Poky rev: d1d84e5529e0d0752fdcd8d3458ed7595d373115)

(Bitbake rev: 65bbc07a3557ac760c6b900880ea6ae2937afde3)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/ui/crumbs/hig.py

index a30e7d9..772f78e 100644 (file)
@@ -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, HobButton, HobAltButton
+from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobButton, 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)