[f-spot: 4/6] Faster key tagging by changing , and Enter semantics



commit 922c182ea280bf0b664298000dfd1d75d79ca21a
Author: Joachim Breitner <mail joachim-breitner de>
Date:   Thu Jun 11 21:34:30 2009 +0200

    Faster key tagging by changing , and Enter semantics
    
    This patch reduces the keypresses when tagging with auto-completion by
    one. Before, it worked like this:
    <T> Priv<TAB><ENTER> Fami<TAB><ENTER><ENTER>
    Now it is
    <T> Priv<TAB><,> Fami<TAB><ENTER>
    
    The behaviour of having the separator (here: comma) confirm the
    auto-completion can also be observed in other GNOME programs, e.g.
    gnucash.

 src/Widgets/TagEntry.cs |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/Widgets/TagEntry.cs b/src/Widgets/TagEntry.cs
index bb30669..5bc74d9 100644
--- a/src/Widgets/TagEntry.cs
+++ b/src/Widgets/TagEntry.cs
@@ -132,15 +132,21 @@ namespace FSpot.Widgets {
 			args.RetVal = false;
 			if (args.Event.Key == Gdk.Key.Escape) { 
 				args.RetVal = false;
-			} else if (args.Event.Key == Gdk.Key.Return) { 
+			} else if (args.Event.Key == Gdk.Key.comma) { 
 				if (tag_completion_index != -1) {
 					// If we are completing a tag, then finish that
 					FinishTagCompletion ();
 					args.RetVal = true;
-				} else
-					// Otherwise, pass the event to Gtk.Entry
-					// which will call OnActivated
+				} else 
+					// Otherwise do not handle this event here
 					args.RetVal = false;
+			} else if (args.Event.Key == Gdk.Key.Return) { 
+				// If we are completing a tag, then finish that
+				if (tag_completion_index != -1) 
+					FinishTagCompletion ();
+				// And pass the event to Gtk.Entry in any case,
+				// which will call OnActivated
+				args.RetVal = false;
 			} else if (args.Event.Key == Gdk.Key.Tab) {
 				DoTagCompletion (true);
 				args.RetVal = true;



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