[PATCH] Emit activation notification upon selection of an item in the drop-down list



When an item is chosen in an historyfieentry's drop-down
list, we should send activation notification.

This is the functionality I would like to see from an
historyfileentry widget.

Anyone preferring the current behavior, which allows you
to modify the text, before activating with enter key press ?

The proposed patch does not prevent you from editing text
and activating your manually edited filename with an enter
key press. It just change the behavior upon drop-down list
item selection to automatically send the activate notification.

-- 
Vincent Legoll
Index: historyentry.py
===================================================================
--- historyentry.py	(revision 1282)
+++ historyentry.py	(working copy)
@@ -425,6 +425,10 @@
 
     def __entry_changed_signal(self, widget, *data):
         self.emit("changed")
+        # An element from the drop down list has been selected,
+        # notify without the need for pressing "enter"
+        if self.__gentry.get_active() != -1:
+            self.__entry_activate_signal(widget, *data)
 
     def __entry_activate_signal(self, widget, *data):
         self.emit("activate")


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