From ccfc49515acfe83e5cab9878d095de25024dab97 Mon Sep 17 00:00:00 2001 From: Harishankar Date: Wed, 8 Dec 2010 20:26:14 +0530 Subject: [PATCH] Changed input method for keyboard Changed the input method for keyboard such that even when the puzzle grid is out of focus, the grid will be responsive to input --- player_mainwindow.py | 8 +++----- playerwindow.glade | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/player_mainwindow.py b/player_mainwindow.py index 8ffdb16..e167f03 100644 --- a/player_mainwindow.py +++ b/player_mainwindow.py @@ -199,9 +199,6 @@ along with GetAClue. If not, see .""" # update the puzzle grid puzgrid = self.ui.get_object ("puzzlegrid") - # set focus to the puzzle grid - self.window.set_focus (puzgrid) - puzgrid.queue_draw () # callback for tree view "across" being activated @@ -324,9 +321,10 @@ along with GetAClue. If not, see .""" return False - # callback for puzzle grid key release event - def on_puzzlegrid_key_press_event (self, drawarea, event): + # callback for main window key release event + def on_mainwindow_key_press_event (self, window, event): if self.puzzle: + drawarea = self.ui.get_object ("puzzlegrid") key = gtk.gdk.keyval_name (event.keyval).lower () if event.state == gtk.gdk.SHIFT_MASK and key == "up": diff --git a/playerwindow.glade b/playerwindow.glade index 2727527..90e4750 100644 --- a/playerwindow.glade +++ b/playerwindow.glade @@ -27,6 +27,7 @@ 480 resources/getaclue.svg + @@ -197,7 +198,6 @@ GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK - -- 2.20.1