[tomboy] Port fix for 625679



commit 5672126ba5211993ed14261ea1bbc874b6edac05
Author: Aaron Borden <adborden live com>
Date:   Thu Feb 17 18:48:13 2011 -0800

    Port fix for 625679

 Tomboy/Notebooks/NotebookManager.cs |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/Tomboy/Notebooks/NotebookManager.cs b/Tomboy/Notebooks/NotebookManager.cs
index 9c0fb44..8027c8c 100644
--- a/Tomboy/Notebooks/NotebookManager.cs
+++ b/Tomboy/Notebooks/NotebookManager.cs
@@ -208,9 +208,15 @@ namespace Tomboy.Notebooks
 		/// </returns>
 		public static bool GetNotebookIter (Notebook notebook, out Gtk.TreeIter iter)
 		{
-			if (notebookMap.ContainsKey (notebook.NormalizedName) == true) {
-				iter = notebookMap [notebook.NormalizedName];
-				return true;
+			Gtk.TreeIter current_iter;
+			if (sortedNotebooks.GetIterFirst (out current_iter)) {
+				do {
+					Notebook current_notebook = (Notebook)sortedNotebooks.GetValue (current_iter, 0);
+					if (notebook == current_notebook) {
+						iter = current_iter;
+						return true;
+					}
+				} while (sortedNotebooks.IterNext (ref current_iter));
 			}
 			
 			iter = Gtk.TreeIter.Zero;



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