Gaimlog backend icon patch



Just a short, quick patch to backends/backend-gaimlog.cs which removes
the hardcoded icon paths and uses Gnome.IconFactory to try and fetch a
(possibly SVG) icon for gaim that will (hopefully) match the user's
theme.

-- 
Justin Wake <jwake iinet net au>
Index: backends/backend-gaimlog.cs
===================================================================
RCS file: /cvs/gnome/dashboard/backends/backend-gaimlog.cs,v
retrieving revision 1.26
diff -u -r1.26 backend-gaimlog.cs
--- backends/backend-gaimlog.cs	15 Jan 2004 21:59:36 -0000	1.26
+++ backends/backend-gaimlog.cs	12 Feb 2004 17:41:57 -0000
@@ -447,15 +447,12 @@
 			Category = "Messaging";
 
 			// Attempt to find the gaim icon
-			// FIXME - must be a better way to do this
-			if (File.Exists("/usr/share/pixmaps/gaim.png"))
-			{
-				IconPath = "/usr/share/pixmaps/gaim.png";
-			}
-			else if (File.Exists("/usr/local/share/pixmaps/gaim.png"))
-			{
-				IconPath = "/usr/local/share/pixmaps/gaim.png";
-			}
+			Gnome.IconTheme theme = new Gnome.IconTheme();
+			Gnome.IconData icondata = new Gnome.IconData();
+			int basesize = 0;
+
+			theme.AllowSvg = true;
+			IconPath = theme.LookupIcon("gaim", 64, icondata, out basesize);
 
 			int convcount = LoadLogs ();
 


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