mac: Fix setting of custom folder icon

This commit is contained in:
Hylke Bons 2012-07-15 12:04:59 +02:00
parent 8232877438
commit cc12efe9fa
2 changed files with 2 additions and 14 deletions

View file

@ -174,11 +174,6 @@ namespace SparkleShare {
if (!Directory.Exists (Program.Controller.FoldersPath)) {
Directory.CreateDirectory (Program.Controller.FoldersPath);
NSWorkspace.SharedWorkspace.SetIconforFile (
NSImage.ImageNamed ("sparkleshare-folder.icns"), FoldersPath,
NSWorkspaceIconCreationOptions.NSExclude10_4Elements);
return true;
} else {

View file

@ -70,15 +70,8 @@ namespace SparkleShare {
{
using (var a = new NSAutoreleasePool ())
{
string folder_icon_path = Path.Combine (
NSBundle.MainBundle.ResourcePath,
"sparkleshare-mac.icns"
);
NSImage folder_icon = new NSImage (folder_icon_path);
NSWorkspace.SharedWorkspace.SetIconforFile (folder_icon,
Program.Controller.FoldersPath, 0);
NSImage folder_icon = NSImage.ImageNamed ("sparkleshare-folder.icns");
NSWorkspace.SharedWorkspace.SetIconforFile (folder_icon, Program.Controller.FoldersPath, 0);
}
}