mac: Fix build
This commit is contained in:
parent
0e2a31c2cd
commit
babf24e713
|
@ -82,7 +82,6 @@ namespace SparkleShare {
|
|||
Directory.CreateDirectory (SparkleConfig.DefaultConfig.FoldersPath);
|
||||
Syscall.chmod (SparkleConfig.DefaultConfig.FoldersPath, (FilePermissions) 448); // 448 -> 700
|
||||
|
||||
SparkleLogger.LogInfo ("Controller", "Created '" + SparkleConfig.DefaultConfig.FoldersPath + "'");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -128,18 +128,6 @@ namespace SparkleShare {
|
|||
{
|
||||
if (!Directory.Exists (Program.Controller.FoldersPath)) {
|
||||
Directory.CreateDirectory (Program.Controller.FoldersPath);
|
||||
|
||||
if (Environment.OSVersion.Version.Major >= 14) {
|
||||
NSWorkspace.SharedWorkspace.SetIconforFile (
|
||||
NSImage.ImageNamed ("sparkleshare-folder-yosemite.icns"),
|
||||
Program.Controller.FoldersPath, 0);
|
||||
|
||||
} else {
|
||||
NSWorkspace.SharedWorkspace.SetIconforFile (
|
||||
NSImage.ImageNamed ("sparkleshare-folder.icns"),
|
||||
Program.Controller.FoldersPath, 0);
|
||||
}
|
||||
|
||||
Syscall.chmod (Program.Controller.FoldersPath, (FilePermissions) 448); // 448 -> 700
|
||||
|
||||
return true;
|
||||
|
@ -149,6 +137,21 @@ namespace SparkleShare {
|
|||
}
|
||||
|
||||
|
||||
public override void SetFolderIcon ()
|
||||
{
|
||||
if (Environment.OSVersion.Version.Major >= 14) {
|
||||
NSWorkspace.SharedWorkspace.SetIconforFile (
|
||||
NSImage.ImageNamed ("sparkleshare-folder-yosemite.icns"),
|
||||
Program.Controller.FoldersPath, 0);
|
||||
|
||||
} else {
|
||||
NSWorkspace.SharedWorkspace.SetIconforFile (
|
||||
NSImage.ImageNamed ("sparkleshare-folder.icns"),
|
||||
Program.Controller.FoldersPath, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void OpenFolder (string path)
|
||||
{
|
||||
path = Uri.UnescapeDataString (path);
|
||||
|
|
Loading…
Reference in a new issue