[tasque] Quick fix to properly load icons from assembly resources



commit 71781b8efe21056cdec9f47a09b6b404d1d4c6e8
Author: Sandy Armstrong <sanfordarmstrong gmail com>
Date:   Mon Feb 15 08:33:49 2010 -0800

    Quick fix to properly load icons from assembly resources

 src/Utilities.cs |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/Utilities.cs b/src/Utilities.cs
index 61d4ac6..a5e26fe 100644
--- a/src/Utilities.cs
+++ b/src/Utilities.cs
@@ -94,6 +94,14 @@ namespace Tasque
 				return ret.ScaleSimple (size, size, Gdk.InterpType.Bilinear);
 			} catch (ArgumentException) {}
 
+			// TODO: This is a temporary fix to allow installing all icons as assembly
+			//       resources. The proper thing to do is to ship the actual icons,
+			//       and append to the default gtk+ icon theme path. See Tomboy.
+			try {
+				Gdk.Pixbuf ret = new Gdk.Pixbuf (null, String.Format ("{0}-{1}.png", iconName, size));
+				return ret.ScaleSimple (size, size, Gdk.InterpType.Bilinear);
+			} catch (ArgumentException) { }
+
 			Logger.Debug ("Unable to load icon '{0}'.", iconName);
 			return null;
 		}



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