summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiming An <limingx.l.an@intel.com>2012-04-16 16:53:28 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-16 12:56:25 +0100
commite966ae128a1dc924e7260c5b9889c6dedbd26c73 (patch)
treecdc8fa88c396a7382d8da9186b70c850f257d230
parent6d7aae9e975b43131f5dec70e4ea232d25f0172f (diff)
downloadpoky-e966ae128a1dc924e7260c5b9889c6dedbd26c73.tar.gz
poky-e966ae128a1dc924e7260c5b9889c6dedbd26c73.tar.bz2
poky-e966ae128a1dc924e7260c5b9889c6dedbd26c73.zip
Hob: add the parent window to 'binb' popup window for managing it
The 'binb' popup window should be "set transient for" the main application window which they were spawned from. (Bitbake rev: a6f45b23851e22c7793d9a534fd197316bb5b9b8) Signed-off-by: Liming An <limingx.l.an@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py2
-rw-r--r--bitbake/lib/bb/ui/crumbs/persistenttooltip.py6
2 files changed, 6 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 6b172d0aa9..dd3ea95a8f 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -899,7 +899,7 @@ class Builder(gtk.Window):
def show_binb_dialog(self, binb):
markup = "<b>Brought in by:</b>\n%s" % binb
- ptip = PersistentTooltip(markup)
+ ptip = PersistentTooltip(markup, self)
ptip.show()
diff --git a/bitbake/lib/bb/ui/crumbs/persistenttooltip.py b/bitbake/lib/bb/ui/crumbs/persistenttooltip.py
index 4db3018cc7..b43d297bf7 100644
--- a/bitbake/lib/bb/ui/crumbs/persistenttooltip.py
+++ b/bitbake/lib/bb/ui/crumbs/persistenttooltip.py
@@ -35,7 +35,7 @@ class PersistentTooltip(gtk.Window):
markup: some Pango text markup to display in the tooltip
"""
- def __init__(self, markup):
+ def __init__(self, markup, parent_win=None):
gtk.Window.__init__(self, gtk.WINDOW_POPUP)
# Inherit the system theme for a tooltip
@@ -76,6 +76,10 @@ class PersistentTooltip(gtk.Window):
# Ensure a reasonable minimum size
self.set_geometry_hints(self, 100, 50)
+ # Set this window as a transient window for parent(main window)
+ if parent_win:
+ self.set_transient_for(parent_win)
+ self.set_destroy_with_parent(True)
# Draw our label and close buttons
hbox = gtk.HBox(False, 0)
hbox.show()