diff options
| author | Joshua Lock <josh@linux.intel.com> | 2012-03-23 17:23:06 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-25 12:23:34 +0100 |
| commit | fb7eb75f33ba27917624ffe65d352247f0e71069 (patch) | |
| tree | 54c6762ffb37c9a950c0d5053fa451fe25436286 | |
| parent | 2206679669fb650a8668c810ac3eac52e34b9770 (diff) | |
| download | poky-fb7eb75f33ba27917624ffe65d352247f0e71069.tar.gz | |
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>
| -rwxr-xr-x | bitbake/lib/bb/ui/crumbs/builder.py | 12 | ||||
| -rw-r--r-- | bitbake/lib/bb/ui/crumbs/hig.py | 23 |
2 files changed, 7 insertions, 28 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index 4135d74865..53216850ef 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py | |||
| @@ -33,9 +33,10 @@ from bb.ui.crumbs.packageselectionpage import PackageSelectionPage | |||
| 33 | from bb.ui.crumbs.builddetailspage import BuildDetailsPage | 33 | from bb.ui.crumbs.builddetailspage import BuildDetailsPage |
| 34 | from bb.ui.crumbs.imagedetailspage import ImageDetailsPage | 34 | from bb.ui.crumbs.imagedetailspage import ImageDetailsPage |
| 35 | from bb.ui.crumbs.hobwidget import hwc | 35 | from bb.ui.crumbs.hobwidget import hwc |
| 36 | from bb.ui.crumbs.hig import CrumbsMessageDialog, BinbDialog, \ | 36 | from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \ |
| 37 | AdvancedSettingDialog, LayerSelectionDialog, \ | 37 | AdvancedSettingDialog, LayerSelectionDialog, \ |
| 38 | DeployImageDialog, ImageSelectionDialog | 38 | DeployImageDialog |
| 39 | from bb.ui.crumbs.persistenttooltip import PersistentTooltip | ||
| 39 | 40 | ||
| 40 | class Configuration: | 41 | class Configuration: |
| 41 | '''Represents the data structure of configuration.''' | 42 | '''Represents the data structure of configuration.''' |
| @@ -668,9 +669,10 @@ class Builder(gtk.Window): | |||
| 668 | self.switch_page(self.FAST_IMAGE_GENERATING) | 669 | self.switch_page(self.FAST_IMAGE_GENERATING) |
| 669 | 670 | ||
| 670 | def show_binb_dialog(self, binb): | 671 | def show_binb_dialog(self, binb): |
| 671 | binb_dialog = BinbDialog("Brought in by:", binb, self) | 672 | markup = "<b>Brought in by:</b>\n%s" % binb |
| 672 | binb_dialog.run() | 673 | ptip = PersistentTooltip(markup) |
| 673 | binb_dialog.destroy() | 674 | |
| 675 | ptip.show() | ||
| 674 | 676 | ||
| 675 | def show_layer_selection_dialog(self): | 677 | def show_layer_selection_dialog(self): |
| 676 | dialog = LayerSelectionDialog(title = "Layers", | 678 | dialog = LayerSelectionDialog(title = "Layers", |
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py index 3a66e7cc3a..6ae682bb76 100644 --- a/bitbake/lib/bb/ui/crumbs/hig.py +++ b/bitbake/lib/bb/ui/crumbs/hig.py | |||
| @@ -92,29 +92,6 @@ class CrumbsMessageDialog(CrumbsDialog): | |||
| 92 | first_row.add(self.label) | 92 | first_row.add(self.label) |
| 93 | 93 | ||
| 94 | # | 94 | # |
| 95 | # Brought-in-by Dialog | ||
| 96 | # | ||
| 97 | class BinbDialog(CrumbsDialog): | ||
| 98 | """ | ||
| 99 | A dialog widget to show "brought in by" info when a recipe/package is clicked. | ||
| 100 | """ | ||
| 101 | |||
| 102 | def __init__(self, title, content, parent=None): | ||
| 103 | super(BinbDialog, self).__init__(title, parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, ("Close", gtk.RESPONSE_CLOSE)) | ||
| 104 | |||
| 105 | self.set_position(gtk.WIN_POS_MOUSE) | ||
| 106 | self.set_resizable(False) | ||
| 107 | self.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color(HobColors.DARK)) | ||
| 108 | |||
| 109 | label = gtk.Label(content) | ||
| 110 | label.set_alignment(0, 0) | ||
| 111 | label.set_line_wrap(True) | ||
| 112 | label.modify_fg(gtk.STATE_NORMAL, gtk.gdk.Color(HobColors.WHITE)) | ||
| 113 | |||
| 114 | self.vbox.pack_start(label, expand=True, fill=True, padding=10) | ||
| 115 | self.vbox.show_all() | ||
| 116 | |||
| 117 | # | ||
| 118 | # AdvancedSettings Dialog | 95 | # AdvancedSettings Dialog |
| 119 | # | 96 | # |
| 120 | class AdvancedSettingDialog (CrumbsDialog): | 97 | class AdvancedSettingDialog (CrumbsDialog): |
