SparkleHelpers: don't add a path to the theme every time an icon is looked up

This commit is contained in:
Hylke Bons 2010-06-19 17:07:45 +01:00
parent e2860176b3
commit 935bbd6686

View file

@ -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);
}