hamster-applet r661 - trunk/hamster



Author: tbaugis
Date: Wed Dec 17 10:42:57 2008
New Revision: 661
URL: http://svn.gnome.org/viewvc/hamster-applet?rev=661&view=rev

Log:
Enter key bound to Save (Daniel Watkins), fixes bug 563132.

Modified:
   trunk/hamster/add_custom_fact.py

Modified: trunk/hamster/add_custom_fact.py
==============================================================================
--- trunk/hamster/add_custom_fact.py	(original)
+++ trunk/hamster/add_custom_fact.py	Wed Dec 17 10:42:57 2008
@@ -274,11 +274,15 @@
         self.window.destroy()
         
     def on_combo_changed(self, combo):
-      # do not allow empty tasks
-      activity = self.get_widget("activity-list").get_child().get_text()
-      self.get_widget("ok").set_sensitive(activity != '')
+        # do not allow empty tasks
+        activity = self.get_widget("activity-list").get_child().get_text()
+        self.get_widget("ok").set_sensitive(activity != '')
 
     def on_window_key_pressed(self, tree, event_key):
-      if (event_key.keyval == gtk.keysyms.Escape):
-        self.window.destroy()
+        if (event_key.keyval == gtk.keysyms.Escape):
+            self.window.destroy()
+        elif (event_key.keyval == gtk.keysyms.Return or
+              event_key.keyval == gtk.keysyms.KP_Enter):
+            self.on_ok_clicked(None)
+
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]