tomboy r1771 - in trunk: . Tomboy



Author: sharm
Date: Sun Jan 13 15:05:32 2008
New Revision: 1771
URL: http://svn.gnome.org/viewvc/tomboy?rev=1771&view=rev

Log:
* Tomboy/RecentChanges.cs: Scroll back to the currently selected note
  after refreshing.  Part of fix for bug #508798.  Patch courtesy of
  Ivan N. Zlatev.

Modified:
   trunk/ChangeLog
   trunk/Tomboy/RecentChanges.cs

Modified: trunk/Tomboy/RecentChanges.cs
==============================================================================
--- trunk/Tomboy/RecentChanges.cs	(original)
+++ trunk/Tomboy/RecentChanges.cs	Sun Jan 13 15:05:32 2008
@@ -393,6 +393,7 @@
 
                 void SelectNote (Note note)
                 {
+			Logger.Debug ("SelectNote called");
                         Gtk.TreeIter iter;
 
                         if (store_sort.IterChildren (out iter) == false)
@@ -403,10 +404,19 @@
                                 if (iter_note == note) {
                                         // Found it!
                                         tree.Selection.SelectIter (iter);
+					ScrollToIter (tree, iter);
                                         break;
                                 }
                         } while (store_sort.IterNext (ref iter));
                 }
+		
+		private void ScrollToIter (Gtk.TreeView tree, Gtk.TreeIter iter)
+		{
+			Logger.Debug ("ScrollToIter called");
+			Gtk.TreePath path = tree.Model.GetPath (iter);
+			if (path != null)
+				tree.ScrollToCell (path, null, false, 0, 0);
+		}
 
 		void PerformSearch()
 		{



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