All pastes #254497 Raw Edit

Someone

public text v1 · immutable
#254497 ·published 2006-11-21 22:38 UTC
rendered paste body
Index: Tomboy/NoteWindow.cs
===================================================================
RCS file: /cvs/gnome/tomboy/Tomboy/NoteWindow.cs,v
retrieving revision 1.52
diff -u -r1.52 NoteWindow.cs
--- Tomboy/NoteWindow.cs	20 Nov 2006 17:56:54 -0000	1.52
+++ Tomboy/NoteWindow.cs	21 Nov 2006 22:37:12 -0000
@@ -195,6 +195,7 @@
 			find_bar = new NoteFindBar (note);
 			find_bar.Visible = false;
 			find_bar.NoShowAll = true;
+			find_bar.Hidden += FindBarHidden;
 
 			Gtk.VBox box = new Gtk.VBox (false, 2);
 			box.PackStart (toolbar, false, false, 0);
@@ -675,6 +676,13 @@
 		{
 			FindButtonClicked ();
 		}
+		
+		void FindBarHidden (object sender, EventArgs args)
+		{
+			// Reposition the current focus back to the editor so the
+			// cursor will be ready for typing.
+			editor.GrabFocus ();
+		}
 
 		//
 		// Link menu item activate
@@ -969,8 +977,12 @@
 			
 			prev_search_text = SearchText;
 
-			if (current_matches != null)
+			if (current_matches != null) {
 				HighlightMatches (true);
+				
+				// Select/scroll to the first match
+				OnNextClicked (this, EventArgs.Empty);
+			}
 
 			UpdateSensitivity ();
 		}