mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 17:19:20 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
6d7aae9e97
commit
e966ae128a
@@ -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()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user