tomboy r2118 - branches/tomboy-portable2/Tomboy



Author: sharm
Date: Wed Sep  3 21:52:43 2008
New Revision: 2118
URL: http://svn.gnome.org/viewvc/tomboy?rev=2118&view=rev

Log:
* Tomboy/Tray.cs: Rearrange note menu item management code to prevent
  duplication (bug #531774). Combined work of Boyd Timothy and Samuel
  Vandamme.

Modified:
   branches/tomboy-portable2/Tomboy/Tray.cs

Modified: branches/tomboy-portable2/Tomboy/Tray.cs
==============================================================================
--- branches/tomboy-portable2/Tomboy/Tray.cs	(original)
+++ branches/tomboy-portable2/Tomboy/Tray.cs	Wed Sep  3 21:52:43 2008
@@ -315,7 +315,6 @@
 			this.manager = manager;
 			
 			tray_menu = MakeTrayNotesMenu ();
-			tray_menu.Hidden += MenuHidden;
 		}
 		
 		public TomboyTray (NoteManager manager, ITomboyTray tray)
@@ -363,12 +362,6 @@
 			return menu;
 		}
 		
-		void MenuHidden (object sender, EventArgs args)
-		{
-			// Remove the old dynamic items
-			RemoveRecentlyChangedNotes ();
-		}
-		
 		void RemoveRecentlyChangedNotes ()
 		{
 			foreach (Gtk.Widget item in recent_notes) {
@@ -386,6 +379,9 @@
 			bool menuOpensUpward = tray.MenuOpensUpward ();
 			NoteMenuItem item;
 
+			// Remove the old dynamic items
+			RemoveRecentlyChangedNotes ();
+
 			// Assume menu opens downward, move common items to top of menu
 			Gtk.MenuItem newNoteItem = Tomboy.ActionManager.GetWidget (
 			                                   "/TrayIconMenu/TrayNewNotePlaceholder/TrayNewNote") as Gtk.MenuItem;



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