mac: Fix setting of custom folder icon
This commit is contained in:
parent
8232877438
commit
cc12efe9fa
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue