hamster-applet r893 - trunk/hamster
- From: tbaugis svn gnome org
- To: svn-commits-list gnome org
- Subject: hamster-applet r893 - trunk/hamster
- Date: Sun, 12 Apr 2009 20:20:43 +0000 (UTC)
Author: tbaugis
Date: Sun Apr 12 20:20:42 2009
New Revision: 893
URL: http://svn.gnome.org/viewvc/hamster-applet?rev=893&view=rev
Log:
in activity input box fake tab as key-down so we can cycle
through values in dropdown. works quite nicely, fixes bug 576567
Modified:
trunk/hamster/applet.py
trunk/hamster/edit_activity.py
Modified: trunk/hamster/applet.py
==============================================================================
--- trunk/hamster/applet.py (original)
+++ trunk/hamster/applet.py Sun Apr 12 20:20:42 2009
@@ -317,6 +317,7 @@
# set up drop down menu
self.activity_list = self._gui.get_object('activity-list')
self.activity_list.child.connect('activate', self.on_activity_entered)
+ self.activity_list.child.connect('key-press-event', self.on_activity_list_key_pressed)
self.activity_list.set_model(gtk.ListStore(gobject.TYPE_STRING,
gobject.TYPE_STRING,
@@ -633,6 +634,12 @@
def on_toggle(self, widget):
dispatcher.dispatch('panel_visible', self.button.get_active())
+ def on_activity_list_key_pressed(self, entry, event):
+ #treating tab as keydown to be able to cycle through available values
+ if event.keyval == gtk.keysyms.Tab:
+ event.keyval = gtk.keysyms.Down
+ return False
+
def on_activity_switched(self, component):
# do stuff only if user has selected something
# for other cases activity_edited will be triggered
Modified: trunk/hamster/edit_activity.py
==============================================================================
--- trunk/hamster/edit_activity.py (original)
+++ trunk/hamster/edit_activity.py Sun Apr 12 20:20:42 2009
@@ -490,6 +490,7 @@
self.activity_list.add_attribute(category_cell, 'text', 1)
self.activity_list.set_property("text-column", 2)
+ self.activity_list.child.connect('key-press-event', self.on_activity_list_key_pressed)
# set up autocompletition
@@ -641,6 +642,12 @@
return ""
else:
return date.strftime("%x")
+
+ def on_activity_list_key_pressed(self, entry, event):
+ #treating tab as keydown to be able to cycle through available values
+ if event.keyval == gtk.keysyms.Tab:
+ event.keyval = gtk.keysyms.Down
+ return False
def on_date_focus_in_event(self, entry, event):
window = entry.get_parent_window()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]