# 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
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":
<property name="default_height">480</property>
<property name="icon">resources/getaclue.svg</property>
<signal name="destroy" handler="on_mainwindow_destroy"/>
+ <signal name="key_press_event" handler="on_mainwindow_key_press_event"/>
<signal name="delete_event" handler="on_mainwindow_delete_event"/>
<child>
<object class="GtkVBox" id="vbox1">
<property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
<signal name="expose_event" handler="on_puzzlegrid_expose_event"/>
<signal name="button_press_event" handler="on_puzzlegrid_button_press_event"/>
- <signal name="key_press_event" handler="on_puzzlegrid_key_press_event"/>
<signal name="focus_in_event" handler="on_puzzlegrid_focus_in_event"/>
<signal name="focus_out_event" handler="on_puzzlegrid_focus_out_event"/>
</object>