tomboy r1814 - in trunk: . Tomboy Tomboy/Notebooks data/images



Author: btimothy
Date: Mon Jan 28 22:31:31 2008
New Revision: 1814
URL: http://svn.gnome.org/viewvc/tomboy?rev=1814&view=rev

Log:
2008-01-28  Boyd Timothy <btimothy gmail com> 

        * Tomboy/Notebooks/NotebookApplicationAddin.cs: Hijack the
          Notebook ImageMenuItem to use a proper notebook icon.

        * Tomboy/Makefile.am: Add tomboy-new-note.png as a built-in resource.

        * data/images/tomboy-new-note-22.png: New stubbed icon file to show
          creating a new note.

        * data/images/Makefile.am: Install/uninstall tomboy-new-note-22.png
          properly.



Added:
   trunk/data/images/tomboy-new-note-22.png   (contents, props changed)
Modified:
   trunk/ChangeLog
   trunk/Tomboy/Makefile.am
   trunk/Tomboy/Notebooks/NotebookApplicationAddin.cs
   trunk/data/images/Makefile.am

Modified: trunk/Tomboy/Makefile.am
==============================================================================
--- trunk/Tomboy/Makefile.am	(original)
+++ trunk/Tomboy/Makefile.am	Mon Jan 28 22:31:31 2008
@@ -89,6 +89,7 @@
 	-resource:$(top_srcdir)/data/UIManagerLayout.xml	\
 	-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/tomboy-new-note-22.png,tomboy-new-note.png		\
 	-resource:$(top_srcdir)/data/images/tomboy-all-notes-22.png,tomboy-all-notes.png		\
 	-resource:$(top_srcdir)/data/images/tomboy-unfiled-notes-22.png,tomboy-unfiled-notes.png		\
 	-resource:$(top_srcdir)/data/images/tomboy-notebook-22.png,tomboy-notebook.png		\

Modified: trunk/Tomboy/Notebooks/NotebookApplicationAddin.cs
==============================================================================
--- trunk/Tomboy/Notebooks/NotebookApplicationAddin.cs	(original)
+++ trunk/Tomboy/Notebooks/NotebookApplicationAddin.cs	Mon Jan 28 22:31:31 2008
@@ -9,6 +9,14 @@
 	{
 		static Gtk.ActionGroup actionGroup;
 		static uint notebookUi = 0;
+		static Gdk.Pixbuf notebookIcon;
+		static Gdk.Pixbuf newNotebookIcon;
+
+		static NotebookApplicationAddin ()
+		{
+			notebookIcon = GuiUtils.GetIcon ("tomboy-notebook", 22);
+			newNotebookIcon = GuiUtils.GetIcon ("tomboy-new-notebook", 22);
+		}
 
 		bool initialized;
 
@@ -85,6 +93,10 @@
 			Gtk.MenuItem item = Tomboy.ActionManager.GetWidget (
 				"/TrayIconMenu/TrayNewNotePlaceholder/TrayNewNotebookMenu") as Gtk.MenuItem;
 			if (item != null) {
+				if (item is Gtk.ImageMenuItem) {
+					Gtk.ImageMenuItem imageItem = item as Gtk.ImageMenuItem;
+					(imageItem.Image as Gtk.Image).Pixbuf = notebookIcon;
+				}
 				trayNotebookMenu = new Gtk.Menu ();
 				item.Submenu = trayNotebookMenu;
 				trayNotebookMenu.Shown += OnTrayNotebookMenuShown;
@@ -164,8 +176,7 @@
 			// Add in the "New Notebook..." menu item
 			Gtk.ImageMenuItem newNotebookMenuItem =
 				new Gtk.ImageMenuItem (Catalog.GetString ("New Note_book..."));
-			// TODO: Replace this new stock icon with a tomboy-new-notebook icon
-			newNotebookMenuItem.Image = new Gtk.Image(GuiUtils.GetIcon("tomboy-new-notebook",22));
+			newNotebookMenuItem.Image = new Gtk.Image (newNotebookIcon);
 			newNotebookMenuItem.Activated += OnNewNotebookMenuItem;
 			newNotebookMenuItem.ShowAll ();
 			menu.Append (newNotebookMenuItem);

Modified: trunk/data/images/Makefile.am
==============================================================================
--- trunk/data/images/Makefile.am	(original)
+++ trunk/data/images/Makefile.am	Mon Jan 28 22:31:31 2008
@@ -13,6 +13,7 @@
 	tomboy-note-16.png		\
 	tomboy-22.png			\
 	tomboy-note-22.png		\
+	tomboy-new-note-22.png		\
 	tomboy-all-notes-22.png		\
 	tomboy-unfiled-notes-22.png		\
 	tomboy-notebook-22.png		\
@@ -34,6 +35,7 @@
 	$(INSTALL_DATA) $(srcdir)/tag-22.png $(DESTDIR)$(hicolordir)/22x22/apps/tomboy-tag.png
 	$(INSTALL_DATA) $(srcdir)/tomboy-22.png $(DESTDIR)$(hicolordir)/22x22/apps/tomboy.png
 	$(INSTALL_DATA) $(srcdir)/tomboy-note-22.png $(DESTDIR)$(hicolordir)/22x22/apps/tomboy-note.png
+	$(INSTALL_DATA) $(srcdir)/tomboy-new-note-22.png $(DESTDIR)$(hicolordir)/22x22/apps/tomboy-new-note.png
 	$(INSTALL_DATA) $(srcdir)/tomboy-all-notes-22.png $(DESTDIR)$(hicolordir)/22x22/apps/tomboy-all-notes.png
 	$(INSTALL_DATA) $(srcdir)/tomboy-unfiled-notes-22.png $(DESTDIR)$(hicolordir)/22x22/apps/tomboy-unfiled-notes.png
 	$(INSTALL_DATA) $(srcdir)/tomboy-notebook-22.png $(DESTDIR)$(hicolordir)/22x22/apps/tomboy-notebook.png
@@ -66,6 +68,7 @@
 	rm -f $(DESTDIR)$(hicolordir)/16x16/apps/tomboy-note.png
 	rm -f $(DESTDIR)$(hicolordir)/22x22/apps/tomboy.png
 	rm -f $(DESTDIR)$(hicolordir)/22x22/apps/tomboy-note.png
+	rm -f $(DESTDIR)$(hicolordir)/22x22/apps/tomboy-new-note.png
 	rm -f $(DESTDIR)$(hicolordir)/22x22/apps/tomboy-all-notes.png
 	rm -f $(DESTDIR)$(hicolordir)/22x22/apps/tomboy-unfiled-notes.png
 	rm -f $(DESTDIR)$(hicolordir)/22x22/apps/tomboy-notebook.png

Added: trunk/data/images/tomboy-new-note-22.png
==============================================================================
Binary file. No diff available.



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