diff options
author | Ethan Trewhitt <ethan@trewhitt.org> | 2017-10-25 13:36:33 -0400 |
---|---|---|
committer | Ethan Trewhitt <ethan@trewhitt.org> | 2017-10-25 21:20:38 -0400 |
commit | a3d5c7fdcef630a902b62305c2b0c57121e24209 (patch) | |
tree | 9240972f1d320f4e8c78abd1397c618436f2f1ba /grc/gui/PropsDialog.py | |
parent | a0adcd3347c7ffd6ef3c42ce7705a23978774d3b (diff) |
Added parent (aka 'transient for') references to most (if not all) dialog boxes. First attempt at fixing #1494.
Diffstat (limited to 'grc/gui/PropsDialog.py')
-rw-r--r-- | grc/gui/PropsDialog.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/grc/gui/PropsDialog.py b/grc/gui/PropsDialog.py index cfea13e1a8..b299804b47 100644 --- a/grc/gui/PropsDialog.py +++ b/grc/gui/PropsDialog.py @@ -55,7 +55,7 @@ class PropsDialog(gtk.Dialog): A dialog to set block parameters, view errors, and view documentation. """ - def __init__(self, block): + def __init__(self, block, parent): """ Properties dialog constructor. @@ -67,6 +67,7 @@ class PropsDialog(gtk.Dialog): gtk.Dialog.__init__( self, title='Properties: %s' % block.get_name(), + parent=parent, buttons=(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT, gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, gtk.STOCK_APPLY, gtk.RESPONSE_APPLY) @@ -76,6 +77,7 @@ class PropsDialog(gtk.Dialog): (MIN_DIALOG_WIDTH, MIN_DIALOG_HEIGHT) )) self._block = block + self._parent = parent vpaned = gtk.VPaned() self.vbox.pack_start(vpaned) @@ -190,7 +192,7 @@ class PropsDialog(gtk.Dialog): if param.get_hide() == 'all': continue box_all_valid = box_all_valid and param.is_valid() - input_widget = param.get_input(self._handle_changed, self._activate_apply) + input_widget = param.get_input(self, self._handle_changed, self._activate_apply) vbox.pack_start(input_widget, input_widget.expand) label.set_markup(Utils.parse_template(TAB_LABEL_MARKUP_TMPL, valid=box_all_valid, tab=tab)) # show params box with new params |