Index: Tomboy/Makefile.am
===================================================================
RCS file: /cvs/gnome/tomboy/Tomboy/Makefile.am,v
retrieving revision 1.47
diff -u -r1.47 Makefile.am
--- Tomboy/Makefile.am	21 Nov 2006 17:47:58 -0000	1.47
+++ Tomboy/Makefile.am	21 Nov 2006 21:52:04 -0000
@@ -63,7 +63,6 @@
 	-resource:$(top_builddir)/data/DefaultPlugins.desktop,DefaultPlugins.desktop	\
 	-resource:$(top_srcdir)/data/images/tomboy.png,tomboy.png			\
 	-resource:$(top_srcdir)/data/images/tomboy-note-16.png,tomboy-note.png			\
-	-resource:$(top_srcdir)/data/images/tintin.png,tintin.png			\
 	-resource:$(top_srcdir)/data/images/gnome-searchtool.png,gnome-searchtool.png	\
 	-resource:$(top_srcdir)/data/images/pinup.png,pinup.png				\
 	-resource:$(top_srcdir)/data/images/pinup-active.png,pinup-active.png		\
Index: Tomboy/Tray.cs
===================================================================
RCS file: /cvs/gnome/tomboy/Tomboy/Tray.cs,v
retrieving revision 1.53
diff -u -r1.53 Tray.cs
--- Tomboy/Tray.cs	20 Nov 2006 22:57:55 -0000	1.53
+++ Tomboy/Tray.cs	21 Nov 2006 21:52:04 -0000
@@ -123,13 +123,14 @@
 		Gtk.Tooltips tips;
 		Gtk.Image image;
 		PreferencesDialog prefs_dlg;
-		int icon_size_last = -1;
 
 		public TomboyTray (NoteManager manager) 
 			: base ()
 		{
 			this.manager = manager;
-			this.image = new Gtk.Image ("tomboy", Gtk.IconSize.Menu);
+			// Load a 24x24-sized icon to ensure we don't end up with a
+			// 1x1 pixel.
+			this.image = new Gtk.Image (GuiUtils.GetIcon ("tomboy", 24));
 
 			this.CanFocus = true;
 			this.ButtonPressEvent += ButtonPress;
@@ -152,8 +153,6 @@
 			tips.Sink ();
 
 			SetupDragAndDrop ();
-
-			InitSomeStuff ();
 		}
 
 		void ButtonPress (object sender, Gtk.ButtonPressEventArgs args) 
@@ -459,54 +458,27 @@
 
 		protected override void OnSizeAllocated (Gdk.Rectangle rect)
 		{
+			// When running TrayIcon inside the notification area, panel is
+			// incorrectly reporting the width and height.  Depending on
+			// whether you're using a vertical or horizontal panel, one of
+			// rect.Width/rect.Height doesn't change when OnSizeAllocated
+			// is called after the panel size grows/shrinks.
+			int icon_size = -1;
+			if (Allocation.Width != rect.Width)
+				icon_size = rect.Width;
+			else if (Allocation.Height != rect.Height)
+				icon_size = rect.Height;
+			
 			base.OnSizeAllocated (rect);
-
-			int icon_size = Math.Min (rect.Height, rect.Width);
-			if (icon_size_last != icon_size) {
-				icon_size_last = icon_size;
-				image.Pixbuf = GuiUtils.GetIcon (GetIconName (), icon_size);
+			
+			if (icon_size > 1) {
+				Gdk.Pixbuf new_icon = GuiUtils.GetIcon ("tomboy", icon_size);
+				if (image.Pixbuf.Width != new_icon.Width ||
+						image.Pixbuf.Height != new_icon.Height) {
+					image.Pixbuf = new_icon;
+				}
 			}
 		}
-
-		void ReloadIcon ()
-		{
-			icon_size_last = -1;
-			QueueResize ();
-		}
-
-		// NOTHING TO SEE HERE
-		void InitSomeStuff ()
-		{
-			manager.NoteDeleted += OnNoteDeletedUpdateIcon;
-			manager.NoteAdded += OnNoteAddedUpdateIcon;
-			manager.NoteRenamed += OnNoteRenamedUpdateIcon;
-		}
-
-		void OnNoteDeletedUpdateIcon (object sender, Note changed)
-		{
-			if (changed.Title == "Tintin")
-				ReloadIcon ();
-		}
-
-		void OnNoteAddedUpdateIcon (object sender, Note changed)
-		{
-			if (changed.Title == "Tintin")
-				ReloadIcon ();
-		}
-
-		void OnNoteRenamedUpdateIcon (Note note, string old_title)
-		{
-			if (note.Title == "Tintin" || old_title == "Tintin")
-				ReloadIcon ();
-		}
-
-		string GetIconName ()
-		{
-			if (manager.Find ("Tintin") != null)
-				return "tintin";
-			return "tomboy";
-		}
-		// GO ABOUT YOUR BUSINESS
 	}
 
 	// 
Index: data/images/Makefile.am
===================================================================
RCS file: /cvs/gnome/tomboy/data/images/Makefile.am,v
retrieving revision 1.9
diff -u -r1.9 Makefile.am
--- data/images/Makefile.am	15 Nov 2006 23:29:59 -0000	1.9
+++ data/images/Makefile.am	21 Nov 2006 21:52:04 -0000
@@ -52,7 +52,6 @@
 	gnome-searchtool.png	\
 	stock_bug.png		\
 	stock_mail.png		\
-	tintin.png		\
 	pinup.png		\
 	pinup-active.png	\
 	pindown.png
Index: data/images/tintin.png
===================================================================
RCS file: data/images/tintin.png
diff -N data/images/tintin.png
Binary files /tmp/cvssHZJRJ and /dev/null differ
