diff options
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hobwidget.py')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobwidget.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobwidget.py b/bitbake/lib/bb/ui/crumbs/hobwidget.py index 22898fb273..89ff23e072 100644 --- a/bitbake/lib/bb/ui/crumbs/hobwidget.py +++ b/bitbake/lib/bb/ui/crumbs/hobwidget.py | |||
@@ -824,6 +824,7 @@ class HobIconChecker(hic): | |||
824 | ('hic-ok', 'gtk-ok', 'ok') : self.ICON_INDI_TICK_FILE, | 824 | ('hic-ok', 'gtk-ok', 'ok') : self.ICON_INDI_TICK_FILE, |
825 | ('hic-dialog-error', 'gtk-dialog-error', 'dialog-error') : self.ICON_INDI_ERROR_FILE, | 825 | ('hic-dialog-error', 'gtk-dialog-error', 'dialog-error') : self.ICON_INDI_ERROR_FILE, |
826 | ('hic-dialog-warning', 'gtk-dialog-warning', 'dialog-warning') : self.ICON_INDI_ALERT_FILE, | 826 | ('hic-dialog-warning', 'gtk-dialog-warning', 'dialog-warning') : self.ICON_INDI_ALERT_FILE, |
827 | ('hic-task-refresh', 'gtk-execute', 'execute') : self.ICON_INDI_REFRESH_FILE, | ||
827 | } | 828 | } |
828 | valid_stock_id = stock_name | 829 | valid_stock_id = stock_name |
829 | if stock_name: | 830 | if stock_name: |
@@ -924,9 +925,8 @@ class HobCellRendererPixbuf(gtk.CellRendererPixbuf): | |||
924 | def __init__(self): | 925 | def __init__(self): |
925 | gtk.CellRendererPixbuf.__init__(self) | 926 | gtk.CellRendererPixbuf.__init__(self) |
926 | self.control = RefreshRuningController() | 927 | self.control = RefreshRuningController() |
927 | # create default refrensh stock icon | 928 | # add icon checker for make the gtk-icon transfer to hob-icon |
928 | self.checker = HobIconChecker() | 929 | self.checker = HobIconChecker() |
929 | self.checker.set_hob_icon_to_stock_icon(hic.ICON_INDI_REFRESH_FILE, "task-refresh") | ||
930 | 930 | ||
931 | def get_pixbuf_from_stock_icon(self, widget, stock_id="", size=gtk.ICON_SIZE_DIALOG): | 931 | def get_pixbuf_from_stock_icon(self, widget, stock_id="", size=gtk.ICON_SIZE_DIALOG): |
932 | if widget and stock_id and gtk.icon_factory_lookup_default(stock_id): | 932 | if widget and stock_id and gtk.icon_factory_lookup_default(stock_id): |
@@ -938,7 +938,7 @@ class HobCellRendererPixbuf(gtk.CellRendererPixbuf): | |||
938 | if new_name and type(new_name) == str: | 938 | if new_name and type(new_name) == str: |
939 | # check the name is need to transfer to hob icon or not | 939 | # check the name is need to transfer to hob icon or not |
940 | name = self.checker.check_stock_icon(new_name) | 940 | name = self.checker.check_stock_icon(new_name) |
941 | if name.startswith("hic") or name.startswith("gtk") or name == "task-refresh": | 941 | if name.startswith("hic") or name.startswith("gtk"): |
942 | stock_id = name | 942 | stock_id = name |
943 | else: | 943 | else: |
944 | stock_id = 'gtk-' + name | 944 | stock_id = 'gtk-' + name |
@@ -946,7 +946,7 @@ class HobCellRendererPixbuf(gtk.CellRendererPixbuf): | |||
946 | return stock_id | 946 | return stock_id |
947 | 947 | ||
948 | ''' render cell exactly, "icon-name" is priority | 948 | ''' render cell exactly, "icon-name" is priority |
949 | if use the 'task-refresh' will make the pix animation | 949 | if use the 'hic-task-refresh' will make the pix animation |
950 | if 'pix' will change the pixbuf for it from the pixbuf or image. | 950 | if 'pix' will change the pixbuf for it from the pixbuf or image. |
951 | ''' | 951 | ''' |
952 | def do_render(self, window, tree, background_area,cell_area, expose_area, flags): | 952 | def do_render(self, window, tree, background_area,cell_area, expose_area, flags): |
@@ -971,7 +971,7 @@ class HobCellRendererPixbuf(gtk.CellRendererPixbuf): | |||
971 | 971 | ||
972 | if stock_id: | 972 | if stock_id: |
973 | pix = self.get_pixbuf_from_stock_icon(tree, stock_id, self.props.stock_size) | 973 | pix = self.get_pixbuf_from_stock_icon(tree, stock_id, self.props.stock_size) |
974 | if stock_id == 'task-refresh': | 974 | if stock_id == 'hic-task-refresh': |
975 | self.control.append_running_cell_area(cell_area) | 975 | self.control.append_running_cell_area(cell_area) |
976 | if self.control.is_active(): | 976 | if self.control.is_active(): |
977 | self.control.on_draw_cb(pix, window.cairo_create(), x, y, w, h, True) | 977 | self.control.on_draw_cb(pix, window.cairo_create(), x, y, w, h, True) |