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)) {
|
if (!Directory.Exists (Program.Controller.FoldersPath)) {
|
||||||
Directory.CreateDirectory (Program.Controller.FoldersPath);
|
Directory.CreateDirectory (Program.Controller.FoldersPath);
|
||||||
|
|
||||||
NSWorkspace.SharedWorkspace.SetIconforFile (
|
|
||||||
NSImage.ImageNamed ("sparkleshare-folder.icns"), FoldersPath,
|
|
||||||
NSWorkspaceIconCreationOptions.NSExclude10_4Elements);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -70,15 +70,8 @@ namespace SparkleShare {
|
||||||
{
|
{
|
||||||
using (var a = new NSAutoreleasePool ())
|
using (var a = new NSAutoreleasePool ())
|
||||||
{
|
{
|
||||||
string folder_icon_path = Path.Combine (
|
NSImage folder_icon = NSImage.ImageNamed ("sparkleshare-folder.icns");
|
||||||
NSBundle.MainBundle.ResourcePath,
|
NSWorkspace.SharedWorkspace.SetIconforFile (folder_icon, Program.Controller.FoldersPath, 0);
|
||||||
"sparkleshare-mac.icns"
|
|
||||||
);
|
|
||||||
|
|
||||||
NSImage folder_icon = new NSImage (folder_icon_path);
|
|
||||||
|
|
||||||
NSWorkspace.SharedWorkspace.SetIconforFile (folder_icon,
|
|
||||||
Program.Controller.FoldersPath, 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue