summaryrefslogtreecommitdiffstats
path: root/pyanaconda/ui/gui/spokes/keyboard.py
diff options
context:
space:
mode:
authorVratislav Podzimek <vpodzime@redhat.com>2012-09-24 20:13:20 +0200
committerVratislav Podzimek <vpodzime@redhat.com>2012-09-26 11:00:00 +0200
commit05a20f70a74ec71d80fc1c2ea163713b33897b2b (patch)
tree986b8eff93d99be9b5bb63e8d7418d69caaa6e45 /pyanaconda/ui/gui/spokes/keyboard.py
parent12376658ce63c00cc8f73c2f99d80eb3b3c32089 (diff)
downloadanaconda-05a20f70a74ec71d80fc1c2ea163713b33897b2b.tar.gz
anaconda-05a20f70a74ec71d80fc1c2ea163713b33897b2b.tar.xz
anaconda-05a20f70a74ec71d80fc1c2ea163713b33897b2b.zip
Close AddLayout dialog on double-click
Diffstat (limited to 'pyanaconda/ui/gui/spokes/keyboard.py')
-rw-r--r--pyanaconda/ui/gui/spokes/keyboard.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/pyanaconda/ui/gui/spokes/keyboard.py b/pyanaconda/ui/gui/spokes/keyboard.py
index 9e250408e..dc1271f5c 100644
--- a/pyanaconda/ui/gui/spokes/keyboard.py
+++ b/pyanaconda/ui/gui/spokes/keyboard.py
@@ -24,7 +24,8 @@ import gettext
_ = lambda x: gettext.ldgettext("anaconda", x)
N_ = lambda x: x
-from gi.repository import GLib, Gkbd, Gtk
+# pylint: disable-msg=E0611
+from gi.repository import GLib, Gkbd, Gtk, Gdk
from pyanaconda.ui.gui import GUIObject
from pyanaconda.ui.gui.spokes import NormalSpoke
@@ -140,6 +141,16 @@ class AddLayoutDialog(GUIObject):
def on_entry_icon_clicked(self, *args):
self._entry.set_text("")
+ def on_layout_view_button_press(self, widget, event, *args):
+ # BUG: Gdk.EventType.2BUTTON_PRESS results in syntax error
+ if event.type == getattr(Gdk.EventType, "2BUTTON_PRESS"):
+ # double-click should close the dialog
+ button = self.builder.get_object("confirmAddButton")
+ button.emit("clicked")
+
+ # let the other actions happen as well
+ return False
+
def _addLayout(self, store, name):
store.append([name])