[Tails-dev] FIx Bug #7344 Double-clicking on an entry in the…

Delete this message

Reply to this message
Autor: Andres Gomez Ramirez
Data:  
A: tails-dev@boum.org
Assumpte: [Tails-dev] FIx Bug #7344 Double-clicking on an entry in the language or keyboard layout lists is not enough
Hello,

I attached a patch for https://labs.riseup.net/code/issues/7344,
"Bug #7344 Double-clicking on an entry in the language or keyboard layout lists is not enough".

I also could try with this:
https://labs.riseup.net/code/issues/5387

cheers,

KuronoFrom 02444dae1b626c03d435551176f0baea18ada43a Mon Sep 17 00:00:00 2001
From: kurono <andres.gomez@???>
Date: Mon, 2 Jun 2014 22:00:17 +0200
Subject: [PATCH] Fix to Bug #7344: Double-clicking on an entry in the language
or keyboard layout lists is not enough

---
tailsgreeter/langpanel.py | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/tailsgreeter/langpanel.py b/tailsgreeter/langpanel.py
index df0eea7..b1cbfc9 100644
--- a/tailsgreeter/langpanel.py
+++ b/tailsgreeter/langpanel.py
@@ -38,7 +38,7 @@ class LangDialog(TranslatableWindow):
         self.dialog = builder.get_object("languages_dialog")
         self.treeview = builder.get_object("languages_treeview")
         self.liststore = builder.get_object("languages_liststore")
-        builder.connect_signals(self.dialog)
+        builder.connect_signals(self)


         tvcolumn = Gtk.TreeViewColumn(_("Language"))
         self.treeview.append_column(tvcolumn)
@@ -51,15 +51,13 @@ class LangDialog(TranslatableWindow):
     def cb_langdialog_key_press(self, widget, event, data=None):
         """Handle key press in langdialog"""
         if event.keyval in [ Gdk.KEY_Return, Gdk.KEY_KP_Enter ]:
-            if isinstance(data, Gtk.Dialog):
-                data.response(True)
+            self.dialog.response(True)


     def cb_langdialog_button_press(self, widget, event, data=None):
         """Handle mouse click in langdialog"""
-        if (event.type == Gdk._2BUTTON_PRESS or
-                event.type == Gdk._3BUTTON_PRESS):
-            if isinstance(data, Gtk.Dialog):
-                data.response(True)
+        if (event.type == Gdk.EventType._2BUTTON_PRESS or
+                event.type == Gdk.EventType._3BUTTON_PRESS):
+            self.dialog.response(True)


 class LangPanel(TranslatableWindow):
     """Display language and layout selection panel"""
-- 
1.8.3.2