mirror of
https://git.yoctoproject.org/poky
synced 2026-06-03 01:40:07 +00:00
lib/bb/ui/crumbs: use a PersistentTooltip for the Brought in by information
(Bitbake rev: c57a45c64a17f1b9dd89743692c3da130ffd38f4) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
2206679669
commit
fb7eb75f33
@@ -33,9 +33,10 @@ from bb.ui.crumbs.packageselectionpage import PackageSelectionPage
|
|||||||
from bb.ui.crumbs.builddetailspage import BuildDetailsPage
|
from bb.ui.crumbs.builddetailspage import BuildDetailsPage
|
||||||
from bb.ui.crumbs.imagedetailspage import ImageDetailsPage
|
from bb.ui.crumbs.imagedetailspage import ImageDetailsPage
|
||||||
from bb.ui.crumbs.hobwidget import hwc
|
from bb.ui.crumbs.hobwidget import hwc
|
||||||
from bb.ui.crumbs.hig import CrumbsMessageDialog, BinbDialog, \
|
from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \
|
||||||
AdvancedSettingDialog, LayerSelectionDialog, \
|
AdvancedSettingDialog, LayerSelectionDialog, \
|
||||||
DeployImageDialog, ImageSelectionDialog
|
DeployImageDialog
|
||||||
|
from bb.ui.crumbs.persistenttooltip import PersistentTooltip
|
||||||
|
|
||||||
class Configuration:
|
class Configuration:
|
||||||
'''Represents the data structure of configuration.'''
|
'''Represents the data structure of configuration.'''
|
||||||
@@ -668,9 +669,10 @@ class Builder(gtk.Window):
|
|||||||
self.switch_page(self.FAST_IMAGE_GENERATING)
|
self.switch_page(self.FAST_IMAGE_GENERATING)
|
||||||
|
|
||||||
def show_binb_dialog(self, binb):
|
def show_binb_dialog(self, binb):
|
||||||
binb_dialog = BinbDialog("Brought in by:", binb, self)
|
markup = "<b>Brought in by:</b>\n%s" % binb
|
||||||
binb_dialog.run()
|
ptip = PersistentTooltip(markup)
|
||||||
binb_dialog.destroy()
|
|
||||||
|
ptip.show()
|
||||||
|
|
||||||
def show_layer_selection_dialog(self):
|
def show_layer_selection_dialog(self):
|
||||||
dialog = LayerSelectionDialog(title = "Layers",
|
dialog = LayerSelectionDialog(title = "Layers",
|
||||||
|
|||||||
@@ -91,29 +91,6 @@ class CrumbsMessageDialog(CrumbsDialog):
|
|||||||
self.label.show()
|
self.label.show()
|
||||||
first_row.add(self.label)
|
first_row.add(self.label)
|
||||||
|
|
||||||
#
|
|
||||||
# Brought-in-by Dialog
|
|
||||||
#
|
|
||||||
class BinbDialog(CrumbsDialog):
|
|
||||||
"""
|
|
||||||
A dialog widget to show "brought in by" info when a recipe/package is clicked.
|
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(self, title, content, parent=None):
|
|
||||||
super(BinbDialog, self).__init__(title, parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, ("Close", gtk.RESPONSE_CLOSE))
|
|
||||||
|
|
||||||
self.set_position(gtk.WIN_POS_MOUSE)
|
|
||||||
self.set_resizable(False)
|
|
||||||
self.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color(HobColors.DARK))
|
|
||||||
|
|
||||||
label = gtk.Label(content)
|
|
||||||
label.set_alignment(0, 0)
|
|
||||||
label.set_line_wrap(True)
|
|
||||||
label.modify_fg(gtk.STATE_NORMAL, gtk.gdk.Color(HobColors.WHITE))
|
|
||||||
|
|
||||||
self.vbox.pack_start(label, expand=True, fill=True, padding=10)
|
|
||||||
self.vbox.show_all()
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# AdvancedSettings Dialog
|
# AdvancedSettings Dialog
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user