From 935bbd668638f4faaa69dd118993fdf98d6299c0 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sat, 19 Jun 2010 17:07:45 +0100 Subject: [PATCH] SparkleHelpers: don't add a path to the theme every time an icon is looked up --- SparkleShare/SparkleHelpers.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/SparkleShare/SparkleHelpers.cs b/SparkleShare/SparkleHelpers.cs index fd16adb9..c3b6e9e8 100644 --- a/SparkleShare/SparkleHelpers.cs +++ b/SparkleShare/SparkleHelpers.cs @@ -112,13 +112,12 @@ namespace SparkleShare { } - public static IconTheme SparkleTheme = new IconTheme (); - // Looks up an icon from the system's theme public static Gdk.Pixbuf GetIcon (string Name, int Size) { - SparkleTheme.AppendSearchPath (CombineMore (SparklePaths.SparkleInstallPath, "icons")); - return SparkleTheme.LoadIcon (Name, Size, IconLookupFlags.GenericFallback); + IconTheme IconTheme = new IconTheme (); + IconTheme.AppendSearchPath (CombineMore (SparklePaths.SparkleInstallPath, "icons")); + return IconTheme.LoadIcon (Name, Size, IconLookupFlags.GenericFallback); }