From 223339fe923420537727749cd49cea140e9d674e Mon Sep 17 00:00:00 2001 From: Markus Stoll Date: Sat, 22 Nov 2014 18:09:02 +0100 Subject: [PATCH 1/5] Fix project settings, enable AfterBuild setting without expection a specific shell --- SparkleShare/Mac/SparkleShare.csproj | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/SparkleShare/Mac/SparkleShare.csproj b/SparkleShare/Mac/SparkleShare.csproj index ebdc7538..21801ced 100644 --- a/SparkleShare/Mac/SparkleShare.csproj +++ b/SparkleShare/Mac/SparkleShare.csproj @@ -17,19 +17,19 @@ none False - bin\Debug + bin\Release DEBUG prompt 4 - + False False False - True + false False Mac Developer 3rd Party Mac Developer Installer @@ -37,7 +37,6 @@ false - none False bin\Debug 4 @@ -46,6 +45,9 @@ False False false + true + false + DEBUG false From 34cd608d162c008ef0535a8dfd2717c26773f610 Mon Sep 17 00:00:00 2001 From: Markus Stoll Date: Sat, 22 Nov 2014 18:55:18 +0100 Subject: [PATCH 2/5] Fix Project settings for Release --- SparkleShare/Mac/SparkleShare.csproj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SparkleShare/Mac/SparkleShare.csproj b/SparkleShare/Mac/SparkleShare.csproj index 21801ced..f5d27738 100644 --- a/SparkleShare/Mac/SparkleShare.csproj +++ b/SparkleShare/Mac/SparkleShare.csproj @@ -18,7 +18,6 @@ none False bin\Release - DEBUG prompt 4 @@ -29,7 +28,7 @@ False False False - false + True False Mac Developer 3rd Party Mac Developer Installer From 6e855c8fe3a7ee1ab421ee94b4120913572bf28f Mon Sep 17 00:00:00 2001 From: Markus Stoll Date: Tue, 25 Nov 2014 00:31:02 +0100 Subject: [PATCH 3/5] Fix usage of NSImage - object cannot be reused after setting Size NSImage does the caching for us anyway --- SparkleShare/Mac/SparkleStatusIcon.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SparkleShare/Mac/SparkleStatusIcon.cs b/SparkleShare/Mac/SparkleStatusIcon.cs index ef4f3734..af67f588 100755 --- a/SparkleShare/Mac/SparkleStatusIcon.cs +++ b/SparkleShare/Mac/SparkleStatusIcon.cs @@ -47,7 +47,7 @@ namespace SparkleShare { private NSImage folder_image = NSImage.ImageNamed ("NSFolder"); private NSImage caution_image = NSImage.ImageNamed ("NSCaution"); - private NSImage sparkleshare_image = NSImage.ImageNamed ("sparkleshare-folder"); + private string sparkleshare_image_name = "sparkleshare-folder.icns"; public SparkleStatusIcon () @@ -57,7 +57,8 @@ namespace SparkleShare { this.status_item.Image.Template = true; if (Environment.OSVersion.Version.Major >= 14) - this.sparkleshare_image = NSImage.ImageNamed ("sparkleshare-folder-yosemite"); + this.sparkleshare_image_name = "sparkleshare-folder-yosemite.icns"; + CreateMenu (); @@ -113,7 +114,7 @@ namespace SparkleShare { Enabled = true }; - this.folder_item.Image = this.sparkleshare_image; + this.folder_item.Image = NSImage.ImageNamed(this.sparkleshare_image_name); this.folder_item.Image.Size = new SizeF (16, 16); this.add_item = new NSMenuItem () { From 4b9037d08bdce7830f349636344ed9290406e895 Mon Sep 17 00:00:00 2001 From: Markus Stoll Date: Tue, 25 Nov 2014 00:32:57 +0100 Subject: [PATCH 4/5] Fix project settings - proper definition of Release and Debug settings --- SparkleShare/Mac/SparkleShare.csproj | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/SparkleShare/Mac/SparkleShare.csproj b/SparkleShare/Mac/SparkleShare.csproj index 21801ced..c4aa6292 100644 --- a/SparkleShare/Mac/SparkleShare.csproj +++ b/SparkleShare/Mac/SparkleShare.csproj @@ -13,12 +13,12 @@ True + True none False bin\Release - DEBUG prompt 4 @@ -39,15 +39,23 @@ False bin\Debug + DEBUG + prompt 4 - False - False + + + + + False False - false + False + false + False + Mac Developer + 3rd Party Mac Developer Installer true false - DEBUG false From 068800ccdc2cafa0c04c3eb5b4efd31669a43175 Mon Sep 17 00:00:00 2001 From: Markus Stoll Date: Tue, 25 Nov 2014 08:30:09 +0100 Subject: [PATCH 5/5] copy NSImage as it will be changed using SetSize --- SparkleShare/Mac/SparkleStatusIcon.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SparkleShare/Mac/SparkleStatusIcon.cs b/SparkleShare/Mac/SparkleStatusIcon.cs index af67f588..a9253669 100755 --- a/SparkleShare/Mac/SparkleStatusIcon.cs +++ b/SparkleShare/Mac/SparkleStatusIcon.cs @@ -47,7 +47,7 @@ namespace SparkleShare { private NSImage folder_image = NSImage.ImageNamed ("NSFolder"); private NSImage caution_image = NSImage.ImageNamed ("NSCaution"); - private string sparkleshare_image_name = "sparkleshare-folder.icns"; + private NSImage sparkleshare_image; public SparkleStatusIcon () @@ -57,8 +57,9 @@ namespace SparkleShare { this.status_item.Image.Template = true; if (Environment.OSVersion.Version.Major >= 14) - this.sparkleshare_image_name = "sparkleshare-folder-yosemite.icns"; - + this.sparkleshare_image = (NSImage)NSImage.ImageNamed ("sparkleshare-folder-yosemite.icns").Copy(); + else + this.sparkleshare_image = (NSImage)NSImage.ImageNamed ("sparkleshare-folder.icns").Copy(); CreateMenu (); @@ -114,7 +115,7 @@ namespace SparkleShare { Enabled = true }; - this.folder_item.Image = NSImage.ImageNamed(this.sparkleshare_image_name); + this.folder_item.Image = this.sparkleshare_image; this.folder_item.Image.Size = new SizeF (16, 16); this.add_item = new NSMenuItem () {