tomboy r1902 - in trunk: . Tomboy



Author: btimothy
Date: Tue Feb 26 00:15:52 2008
New Revision: 1902
URL: http://svn.gnome.org/viewvc/tomboy?rev=1902&view=rev

Log:
* Tomboy/Utils.cs: Allow the assembly calling GuiUtils.GetIcon () to
  specify themselves so icons can be loaded from the caller's
  assembly instead of Tomboy.exe.  Fixes bug #518740.

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

Modified: trunk/Tomboy/Utils.cs
==============================================================================
--- trunk/Tomboy/Utils.cs	(original)
+++ trunk/Tomboy/Utils.cs	Tue Feb 26 00:15:52 2008
@@ -74,12 +74,18 @@
 
 		public static Gdk.Pixbuf GetIcon (string resource_name, int size)
 		{
+			return GetIcon (null, resource_name, size);
+		}
+		
+		public static Gdk.Pixbuf GetIcon (System.Reflection.Assembly asm,
+										  string resource_name, int size)
+		{
 			try {
 				return Gtk.IconTheme.Default.LoadIcon (resource_name, size, 0);
 			} catch (GLib.GException) {}
 
 			try {
-				Gdk.Pixbuf ret = new Gdk.Pixbuf (null, resource_name + ".png");
+				Gdk.Pixbuf ret = new Gdk.Pixbuf (asm, resource_name + ".png");
 				return ret.ScaleSimple (size, size, Gdk.InterpType.Bilinear);
 			} catch (ArgumentException) {}
 



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