ui/crumbs/hig: use HobInfoButton in place of gtk.Image with tooltip

Replace all instances of the stock info icon with an attached tooltip with
the new HobInfoButton with associated PersistentTooltip.

(Bitbake rev: cead9a2e32f0196536c51d3a0713c1f28a35bf3d)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Joshua Lock 2012-03-02 15:46:40 -08:00 committed by Richard Purdie
parent ee0c3023c4
commit fce8d37144
1 changed files with 15 additions and 31 deletions

View File

@ -28,7 +28,7 @@ import re
import subprocess import subprocess
import shlex import shlex
from bb.ui.crumbs.hobcolor import HobColors from bb.ui.crumbs.hobcolor import HobColors
from bb.ui.crumbs.hobwidget import hcc, HobViewTable from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton
from bb.ui.crumbs.progressbar import HobProgressBar from bb.ui.crumbs.progressbar import HobProgressBar
""" """
@ -130,10 +130,8 @@ class AdvancedSettingDialog (CrumbsDialog):
spinner.set_value(content) spinner.set_value(content)
hbox.pack_start(spinner, expand=False, fill=False) hbox.pack_start(spinner, expand=False, fill=False)
image = gtk.Image() info = HobInfoButton(tooltip, self)
image.set_from_stock(gtk.STOCK_INFO, gtk.ICON_SIZE_BUTTON) hbox.pack_start(info, expand=False, fill=False)
image.set_tooltip_text(tooltip)
hbox.pack_start(image, expand=False, fill=False)
hbox.show_all() hbox.show_all()
return hbox, spinner return hbox, spinner
@ -150,11 +148,8 @@ class AdvancedSettingDialog (CrumbsDialog):
combo.set_active(index) combo.set_active(index)
index += 1 index += 1
image = gtk.Image() info = HobInfoButton(tooltip, self)
image.show() hbox.pack_start(info, expand=False, fill=False)
image.set_from_stock(gtk.STOCK_INFO, gtk.ICON_SIZE_BUTTON)
image.set_tooltip_text(tooltip)
hbox.pack_start(image, expand=False, fill=False)
hbox.show_all() hbox.show_all()
return hbox, combo return hbox, combo
@ -189,10 +184,8 @@ class AdvancedSettingDialog (CrumbsDialog):
open_button.connect("clicked", self.entry_widget_select_path_cb, parent, entry) open_button.connect("clicked", self.entry_widget_select_path_cb, parent, entry)
table.attach(open_button, 9, 10, 0, 1) table.attach(open_button, 9, 10, 0, 1)
image = gtk.Image() info = HobInfoButton(tooltip, self)
image.set_from_stock(gtk.STOCK_INFO, gtk.ICON_SIZE_BUTTON) hbox.pack_start(info, expand=False, fill=False)
image.set_tooltip_text(tooltip)
hbox.pack_start(image, expand=False, fill=False)
hbox.show_all() hbox.show_all()
return hbox, entry return hbox, entry
@ -331,10 +324,8 @@ class AdvancedSettingDialog (CrumbsDialog):
vbox.pack_start(down, False, False, 5) vbox.pack_start(down, False, False, 5)
tree_selection.connect("changed", self.pkgfmt_widget_tree_selection_changed_cb, up, down) tree_selection.connect("changed", self.pkgfmt_widget_tree_selection_changed_cb, up, down)
image = gtk.Image() info = HobInfoButton(tooltip, self)
image.set_from_stock(gtk.STOCK_INFO, gtk.ICON_SIZE_BUTTON) pkgfmt_hbox.pack_start(info, expand=False, fill=False)
image.set_tooltip_text(tooltip)
pkgfmt_hbox.pack_start(image, expand=False, fill=False)
pkgfmt_hbox.show_all() pkgfmt_hbox.show_all()
@ -419,10 +410,8 @@ class AdvancedSettingDialog (CrumbsDialog):
button.connect("clicked", self.editable_settings_remove_item_clicked, setting_tree) button.connect("clicked", self.editable_settings_remove_item_clicked, setting_tree)
hbox.pack_start(button) hbox.pack_start(button)
image = gtk.Image() info = HobInfoButton(tooltip, self)
image.set_from_stock(gtk.STOCK_INFO, gtk.ICON_SIZE_BUTTON) setting_hbox.pack_start(info, expand=False, fill=False)
image.set_tooltip_text(tooltip)
setting_hbox.pack_start(image, expand=False, fill=False)
return setting_hbox, setting_store return setting_hbox, setting_store
@ -489,13 +478,10 @@ class AdvancedSettingDialog (CrumbsDialog):
advanced_vbox.pack_start(table, expand=False, fill=False) advanced_vbox.pack_start(table, expand=False, fill=False)
tooltip = "Select image file system types that will be used." tooltip = "Select image file system types that will be used."
image = gtk.Image() info = HobInfoButton(tooltip, self)
image.show()
image.set_from_stock(gtk.STOCK_INFO, gtk.ICON_SIZE_BUTTON)
image.set_tooltip_text(tooltip)
label = self.gen_label_widget("<span weight=\"bold\">Select image types:</span>") label = self.gen_label_widget("<span weight=\"bold\">Select image types:</span>")
table.attach(label, 0, 9, 0, 1) table.attach(label, 0, 9, 0, 1)
table.attach(image, 9, 10, 0, 1) table.attach(info, 9, 10, 0, 1)
i = 1 i = 1
j = 1 j = 1
@ -953,10 +939,8 @@ class LayerSelectionDialog (CrumbsDialog):
hbox_top.pack_start(label, expand=False, fill=False) hbox_top.pack_start(label, expand=False, fill=False)
tooltip = "Layer is a collection of bb files and conf files" tooltip = "Layer is a collection of bb files and conf files"
image = gtk.Image() info = HobInfoButton(tooltip, self)
image.set_from_stock(gtk.STOCK_INFO, gtk.ICON_SIZE_BUTTON) hbox_top.pack_end(info, expand=False, fill=False)
image.set_tooltip_text(tooltip)
hbox_top.pack_end(image, expand=False, fill=False)
layer_widget, self.layer_store = self.gen_layer_widget(self.split_model, self.layers, self.all_layers, self, None) layer_widget, self.layer_store = self.gen_layer_widget(self.split_model, self.layers, self.all_layers, self, None)
layer_widget.set_size_request(-1, 180) layer_widget.set_size_request(-1, 180)