summaryrefslogtreecommitdiff
path: root/grc/gui/PropsDialog.py
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2015-04-02 15:28:55 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2015-04-02 15:28:55 -0700
commit14b57266df2381c9cb8b98c1d6ecd5d5d91697c4 (patch)
treec16343a5eb23e6a3e5e1e381a7050962a63a481b /grc/gui/PropsDialog.py
parent04faaba502eaa78e87463ca66c1a681bc17c5869 (diff)
Revert "grc: PropsDialog: apply button and hotkey (Ctrl+Enter)"
This reverts commit 9b57c33393dda48933fd5968070a4a7cac1290ca.
Diffstat (limited to 'grc/gui/PropsDialog.py')
-rw-r--r--grc/gui/PropsDialog.py19
1 files changed, 3 insertions, 16 deletions
diff --git a/grc/gui/PropsDialog.py b/grc/gui/PropsDialog.py
index d172175aba..d7ba8c51c9 100644
--- a/grc/gui/PropsDialog.py
+++ b/grc/gui/PropsDialog.py
@@ -65,9 +65,7 @@ class PropsDialog(gtk.Dialog):
gtk.Dialog.__init__(
self,
title='Properties: %s' % block.get_name(),
- buttons=(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT,
- gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,
- gtk.STOCK_APPLY, gtk.RESPONSE_APPLY)
+ buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, gtk.STOCK_OK, gtk.RESPONSE_ACCEPT),
)
self._block = block
self.set_size_request(MIN_DIALOG_WIDTH, MIN_DIALOG_HEIGHT)
@@ -111,7 +109,6 @@ class PropsDialog(gtk.Dialog):
# Connect events
self.connect('key-press-event', self._handle_key_press)
self.connect('show', self._update_gui)
- self.connect('response', self._handle_response)
self.show_all() # show all (performs initial gui update)
def _params_changed(self):
@@ -186,18 +183,11 @@ class PropsDialog(gtk.Dialog):
Returns:
false to forward the keypress
"""
- if event.keyval == gtk.keysyms.Return and event.state & gtk.gdk.CONTROL_MASK == 0:
+ if event.keyval == gtk.keysyms.Return:
self.response(gtk.RESPONSE_ACCEPT)
return True # handled here
return False # forward the keypress
- def _handle_response(self, widget, response):
- if response == gtk.RESPONSE_APPLY:
- for tab, label, vbox in self._params_boxes:
- vbox.forall(lambda c: c.apply_change())
- return True
- return False
-
def run(self):
"""
Run the dialog and get its response.
@@ -205,9 +195,6 @@ class PropsDialog(gtk.Dialog):
Returns:
true if the response was accept
"""
- response = gtk.RESPONSE_APPLY
- # don't close dialog on apply click
- while response == gtk.RESPONSE_APPLY:
- response = gtk.Dialog.run(self)
+ response = gtk.Dialog.run(self)
self.destroy()
return response == gtk.RESPONSE_ACCEPT