From e10a83b49b9f910940e4e48eb2ad7350c2dd2aff Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sun, 10 Sep 2017 12:27:55 +0100 Subject: [PATCH 1/5] mac: Move .gitignore up --- .gitignore | 3 ++- SparkleShare/Mac/.gitignore | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 SparkleShare/Mac/.gitignore diff --git a/.gitignore b/.gitignore index 1f6497d8..7ab6699f 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ aclocal.m4 autom4te.cache/ bin/ obj/ +git-* install-sh libtool ltmain.sh @@ -56,4 +57,4 @@ SparkleShare/Windows/build/ # The packages folder can be ignored because of Package Restore **/packages/* # except build/, which is used as an MSBuild target. -!**/packages/build/ \ No newline at end of file +!**/packages/build/ diff --git a/SparkleShare/Mac/.gitignore b/SparkleShare/Mac/.gitignore deleted file mode 100644 index 67d31108..00000000 --- a/SparkleShare/Mac/.gitignore +++ /dev/null @@ -1 +0,0 @@ -git-* From 9243ce2df0372b4411e4768af7774ed9d8412f2c Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sun, 10 Sep 2017 12:46:45 +0100 Subject: [PATCH 2/5] build: Upgrade to Xamarin.Mac from MonoMac --- SparkleShare.sln | 123 +++------ SparkleShare/Common/SparkleShare.shproj | 3 +- .../Mac/Assets.xcassets/Contents.json | 6 + SparkleShare/Mac/SparkleShare.Mac.csproj | 241 +++++++++--------- 4 files changed, 172 insertions(+), 201 deletions(-) create mode 100644 SparkleShare/Mac/Assets.xcassets/Contents.json diff --git a/SparkleShare.sln b/SparkleShare.sln index c97fdb11..203f2813 100644 --- a/SparkleShare.sln +++ b/SparkleShare.sln @@ -1,10 +1,6 @@  -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26403.3 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleShare.Mac", "SparkleShare\Mac\SparkleShare.Mac.csproj", "{CF5BC8DB-A633-4FCC-8A3E-E3AC9B59FABC}" -EndProject +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sparkles", "Sparkles\Sparkles.csproj", "{2C914413-B31C-4362-93C7-1AE34F09112A}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sparkles.Git", "Sparkles\Git\Sparkles.Git.csproj", "{009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}" @@ -15,109 +11,63 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleShare.Linux", "Spark EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "SparkleShare", "SparkleShare\Common\SparkleShare.shproj", "{F16E3683-B622-4654-B799-99C8D68AA963}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{6CCE36AC-7129-40B0-B6E6-2A6A0EA190D0}" - ProjectSection(SolutionItems) = preProject - .gitignore = .gitignore - .travis.yml = .travis.yml - README.md = README.md - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleShareInviteOpener", "SparkleShare\Windows\SparkleShareInviteOpener\SparkleShareInviteOpener.csproj", "{1DB5492D-B897-4A5E-8DD7-175EC65F52F2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleShare.Mac", "SparkleShare\Mac\SparkleShare.Mac.csproj", "{8FCDF699-E2C3-4CB3-AF98-44198972AFC0}" EndProject Global - GlobalSection(SharedMSBuildProjectFiles) = preSolution - SparkleShare\Common\SparkleShare.projitems*{728483aa-e34b-4441-bf2c-c8bc2901e4e0}*SharedItemsImports = 4 - SparkleShare\Common\SparkleShare.projitems*{f16e3683-b622-4654-b799-99c8d68aa963}*SharedItemsImports = 13 - EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - DebugMac|Any CPU = DebugMac|Any CPU - DebugWindows|Any CPU = DebugWindows|Any CPU Release|Any CPU = Release|Any CPU + Debug|Any CPU = Debug|Any CPU ReleaseDist|Any CPU = ReleaseDist|Any CPU ReleaseMac|Any CPU = ReleaseMac|Any CPU - ReleaseWindows|Any CPU = ReleaseWindows|Any CPU + DebugMac|Any CPU = DebugMac|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CF5BC8DB-A633-4FCC-8A3E-E3AC9B59FABC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CF5BC8DB-A633-4FCC-8A3E-E3AC9B59FABC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CF5BC8DB-A633-4FCC-8A3E-E3AC9B59FABC}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU - {CF5BC8DB-A633-4FCC-8A3E-E3AC9B59FABC}.DebugMac|Any CPU.Build.0 = DebugMac|Any CPU - {CF5BC8DB-A633-4FCC-8A3E-E3AC9B59FABC}.DebugWindows|Any CPU.ActiveCfg = DebugMac|Any CPU - {CF5BC8DB-A633-4FCC-8A3E-E3AC9B59FABC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CF5BC8DB-A633-4FCC-8A3E-E3AC9B59FABC}.Release|Any CPU.Build.0 = Release|Any CPU - {CF5BC8DB-A633-4FCC-8A3E-E3AC9B59FABC}.ReleaseDist|Any CPU.ActiveCfg = ReleaseDist|Any CPU - {CF5BC8DB-A633-4FCC-8A3E-E3AC9B59FABC}.ReleaseDist|Any CPU.Build.0 = ReleaseDist|Any CPU - {CF5BC8DB-A633-4FCC-8A3E-E3AC9B59FABC}.ReleaseMac|Any CPU.ActiveCfg = ReleaseMac|Any CPU - {CF5BC8DB-A633-4FCC-8A3E-E3AC9B59FABC}.ReleaseMac|Any CPU.Build.0 = ReleaseMac|Any CPU - {CF5BC8DB-A633-4FCC-8A3E-E3AC9B59FABC}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseMac|Any CPU - {2C914413-B31C-4362-93C7-1AE34F09112A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2C914413-B31C-4362-93C7-1AE34F09112A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2C914413-B31C-4362-93C7-1AE34F09112A}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU - {2C914413-B31C-4362-93C7-1AE34F09112A}.DebugMac|Any CPU.Build.0 = DebugMac|Any CPU - {2C914413-B31C-4362-93C7-1AE34F09112A}.DebugWindows|Any CPU.ActiveCfg = DebugWindows|Any CPU - {2C914413-B31C-4362-93C7-1AE34F09112A}.DebugWindows|Any CPU.Build.0 = DebugWindows|Any CPU - {2C914413-B31C-4362-93C7-1AE34F09112A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2C914413-B31C-4362-93C7-1AE34F09112A}.Release|Any CPU.Build.0 = Release|Any CPU - {2C914413-B31C-4362-93C7-1AE34F09112A}.ReleaseDist|Any CPU.ActiveCfg = Release|Any CPU - {2C914413-B31C-4362-93C7-1AE34F09112A}.ReleaseDist|Any CPU.Build.0 = Release|Any CPU - {2C914413-B31C-4362-93C7-1AE34F09112A}.ReleaseMac|Any CPU.ActiveCfg = ReleaseMac|Any CPU - {2C914413-B31C-4362-93C7-1AE34F09112A}.ReleaseMac|Any CPU.Build.0 = ReleaseMac|Any CPU - {2C914413-B31C-4362-93C7-1AE34F09112A}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseWindows|Any CPU - {2C914413-B31C-4362-93C7-1AE34F09112A}.ReleaseWindows|Any CPU.Build.0 = ReleaseWindows|Any CPU {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU - {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.DebugMac|Any CPU.Build.0 = DebugMac|Any CPU - {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.DebugWindows|Any CPU.ActiveCfg = DebugWindows|Any CPU - {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.DebugWindows|Any CPU.Build.0 = DebugWindows|Any CPU {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.Release|Any CPU.ActiveCfg = Release|Any CPU {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.Release|Any CPU.Build.0 = Release|Any CPU {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.ReleaseDist|Any CPU.ActiveCfg = Release|Any CPU {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.ReleaseDist|Any CPU.Build.0 = Release|Any CPU {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.ReleaseMac|Any CPU.ActiveCfg = ReleaseMac|Any CPU {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.ReleaseMac|Any CPU.Build.0 = ReleaseMac|Any CPU - {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseWindows|Any CPU - {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.ReleaseWindows|Any CPU.Build.0 = ReleaseWindows|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.DebugWindows|Any CPU.ActiveCfg = DebugWindows|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.DebugWindows|Any CPU.Build.0 = DebugWindows|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Release|Any CPU.Build.0 = Release|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.ReleaseDist|Any CPU.ActiveCfg = Release|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.ReleaseDist|Any CPU.Build.0 = Release|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.ReleaseMac|Any CPU.ActiveCfg = ReleaseWindows|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.ReleaseMac|Any CPU.Build.0 = ReleaseWindows|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseWindows|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.ReleaseWindows|Any CPU.Build.0 = ReleaseWindows|Any CPU + {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU + {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.DebugMac|Any CPU.Build.0 = DebugMac|Any CPU + {2C914413-B31C-4362-93C7-1AE34F09112A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2C914413-B31C-4362-93C7-1AE34F09112A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2C914413-B31C-4362-93C7-1AE34F09112A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2C914413-B31C-4362-93C7-1AE34F09112A}.Release|Any CPU.Build.0 = Release|Any CPU + {2C914413-B31C-4362-93C7-1AE34F09112A}.ReleaseDist|Any CPU.ActiveCfg = Release|Any CPU + {2C914413-B31C-4362-93C7-1AE34F09112A}.ReleaseDist|Any CPU.Build.0 = Release|Any CPU + {2C914413-B31C-4362-93C7-1AE34F09112A}.ReleaseMac|Any CPU.ActiveCfg = ReleaseMac|Any CPU + {2C914413-B31C-4362-93C7-1AE34F09112A}.ReleaseMac|Any CPU.Build.0 = ReleaseMac|Any CPU + {2C914413-B31C-4362-93C7-1AE34F09112A}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU + {2C914413-B31C-4362-93C7-1AE34F09112A}.DebugMac|Any CPU.Build.0 = DebugMac|Any CPU {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU - {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.DebugWindows|Any CPU.ActiveCfg = DebugMac|Any CPU {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.Release|Any CPU.ActiveCfg = Release|Any CPU {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.Release|Any CPU.Build.0 = Release|Any CPU {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.ReleaseDist|Any CPU.ActiveCfg = Release|Any CPU {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.ReleaseDist|Any CPU.Build.0 = Release|Any CPU {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.ReleaseMac|Any CPU.ActiveCfg = ReleaseMac|Any CPU - {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseMac|Any CPU - {1DB5492D-B897-4A5E-8DD7-175EC65F52F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1DB5492D-B897-4A5E-8DD7-175EC65F52F2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1DB5492D-B897-4A5E-8DD7-175EC65F52F2}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU - {1DB5492D-B897-4A5E-8DD7-175EC65F52F2}.DebugWindows|Any CPU.ActiveCfg = DebugWindows|Any CPU - {1DB5492D-B897-4A5E-8DD7-175EC65F52F2}.DebugWindows|Any CPU.Build.0 = DebugWindows|Any CPU - {1DB5492D-B897-4A5E-8DD7-175EC65F52F2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1DB5492D-B897-4A5E-8DD7-175EC65F52F2}.Release|Any CPU.Build.0 = Release|Any CPU - {1DB5492D-B897-4A5E-8DD7-175EC65F52F2}.ReleaseDist|Any CPU.ActiveCfg = Release|Any CPU - {1DB5492D-B897-4A5E-8DD7-175EC65F52F2}.ReleaseDist|Any CPU.Build.0 = Release|Any CPU - {1DB5492D-B897-4A5E-8DD7-175EC65F52F2}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {1DB5492D-B897-4A5E-8DD7-175EC65F52F2}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {1DB5492D-B897-4A5E-8DD7-175EC65F52F2}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseWindows|Any CPU - {1DB5492D-B897-4A5E-8DD7-175EC65F52F2}.ReleaseWindows|Any CPU.Build.0 = ReleaseWindows|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE + {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU + {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Release|Any CPU.Build.0 = Release|Any CPU + {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.ReleaseDist|Any CPU.ActiveCfg = Release|Any CPU + {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.ReleaseDist|Any CPU.Build.0 = Release|Any CPU + {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.ReleaseMac|Any CPU.ActiveCfg = ReleaseMac|Any CPU + {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU + {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.Release|Any CPU.Build.0 = Release|Any CPU + {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.ReleaseDist|Any CPU.ActiveCfg = ReleaseDist|Any CPU + {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.ReleaseDist|Any CPU.Build.0 = ReleaseDist|Any CPU + {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.ReleaseMac|Any CPU.ActiveCfg = ReleaseMac|Any CPU + {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.ReleaseMac|Any CPU.Build.0 = ReleaseMac|Any CPU + {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU + {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.DebugMac|Any CPU.Build.0 = DebugMac|Any CPU EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution Policies = $0 @@ -136,3 +86,4 @@ Global version = EndGlobalSection EndGlobal + diff --git a/SparkleShare/Common/SparkleShare.shproj b/SparkleShare/Common/SparkleShare.shproj index aa36f2d3..0495fd24 100644 --- a/SparkleShare/Common/SparkleShare.shproj +++ b/SparkleShare/Common/SparkleShare.shproj @@ -4,10 +4,11 @@ 8.0.30703 2.0 {F16E3683-B622-4654-B799-99C8D68AA963} + - \ No newline at end of file + diff --git a/SparkleShare/Mac/Assets.xcassets/Contents.json b/SparkleShare/Mac/Assets.xcassets/Contents.json new file mode 100644 index 00000000..2d92bd53 --- /dev/null +++ b/SparkleShare/Mac/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/SparkleShare/Mac/SparkleShare.Mac.csproj b/SparkleShare/Mac/SparkleShare.Mac.csproj index b45f7271..ba5eaf34 100644 --- a/SparkleShare/Mac/SparkleShare.Mac.csproj +++ b/SparkleShare/Mac/SparkleShare.Mac.csproj @@ -5,16 +5,15 @@ AnyCPU 8.0.30703 2.0 - {CF5BC8DB-A633-4FCC-8A3E-E3AC9B59FABC} - {948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + {8FCDF699-E2C3-4CB3-AF98-44198972AFC0} + {A3F8F2AB-B479-4A4A-A458-A89E7DC349F1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} Exe SparkleShare SparkleShare - - - True - True v4.5 + Resources + + true none @@ -122,6 +121,8 @@ HttpClientHandler Default None + Mac Developer + 3rd Party Mac Developer Installer False @@ -152,20 +153,29 @@ - - + + - - + + + + + + + + + + + + + + + + + + - - MainMenu.xib - - - MainMenu.xib - - @@ -174,73 +184,74 @@ - - UserInterface\Avatars.cs + + MainMenu.xib + + MainMenu.xib + + - + + {2C914413-B31C-4362-93C7-1AE34F09112A} + Sparkles + + + {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE} + Sparkles.Git + - - - - - - - HTML\day-entry.html - - - HTML\event-entry.html - - - HTML\event-log.html - - - HTML\jquery.js - - - - - Resources\side-splash.png + + Resources\about.png + + + Resources\about%402x.png Resources\document-added-12.png - - Resources\document-edited-12.png - Resources\document-deleted-12.png + + Resources\document-edited-12.png + Resources\document-moved-12.png - - Resources\about.png - - - Resources\tutorial-slide-3.png - - - - - - - Resources\user-icon-default.png + + + + + + + + + + + Resources\side-splash.png Resources\side-splash%402x.png - - - - - - - Resources\about%402x.png + + Resources\sparkleshare-app.icns + + + Resources\sparkleshare-folder.icns + + + Resources\sparkleshare-folder-yosemite.icns + + + Resources\text-balloon.png + + + Resources\text-balloon%402x.png Resources\tutorial-slide-1.png @@ -254,57 +265,24 @@ Resources\tutorial-slide-2%402x.png - - Presets\bitbucket%402x.png + + Resources\tutorial-slide-3.png - - Presets\github%402x.png - - - Presets\own-server%402x.png - - - Presets\bitbucket.xml - - - Presets\github.xml - - - Presets\own-server.xml + + + Resources\user-icon-default.png Presets\bitbucket.png + + Presets\bitbucket%402x.png + Presets\github.png - - Presets\own-server.png - - - - Presets\planio.png - - - Presets\planio.xml - - - Presets\planio%402x.png - - - Resources\text-balloon.png - - - Resources\text-balloon%402x.png - - - Resources\sparkleshare-app.icns - - - Resources\sparkleshare-folder.icns - - - Resources\sparkleshare-folder-yosemite.icns + + Presets\github%402x.png Presets\gitlab.png @@ -312,18 +290,53 @@ Presets\gitlab%402x.png + + Presets\own-server.png + + + Presets\own-server%402x.png + + + Presets\planio.png + + + Presets\planio%402x.png + + + Presets\bitbucket.xml + + + Presets\github.xml + Presets\gitlab.xml + + Presets\own-server.xml + + + Presets\planio.xml + + + HTML\day-entry.html + + + HTML\event-entry.html + + + HTML\event-log.html + + + HTML\jquery.js + - - {2C914413-B31C-4362-93C7-1AE34F09112A} - Sparkles - - - {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE} - Sparkles.Git - + + + + + + + From 0cc28520dca53349fc88209e8312e1594e6f1de9 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sun, 10 Sep 2017 13:12:24 +0100 Subject: [PATCH 3/5] build: Replace all MonoMac references --- SparkleShare/Mac/AppDelegate.cs | 4 ++-- SparkleShare/Mac/Controller.cs | 17 +++++++---------- SparkleShare/Mac/MainMenu.xib.designer.cs | 4 ++-- SparkleShare/Mac/UserInterface/About.cs | 6 +++--- SparkleShare/Mac/UserInterface/Bubbles.cs | 4 ++-- SparkleShare/Mac/UserInterface/EventLog.cs | 8 ++++---- SparkleShare/Mac/UserInterface/Note.cs | 6 +++--- SparkleShare/Mac/UserInterface/Setup.cs | 8 ++++---- SparkleShare/Mac/UserInterface/SetupWindow.cs | 6 +++--- SparkleShare/Mac/UserInterface/StatusIcon.cs | 4 ++-- SparkleShare/Mac/UserInterface/UserInterface.cs | 6 +++--- SparkleShare/Mac/Watcher.cs | 6 +++--- SparkleShare/Mac/packReleaseDist.sh | 3 +-- 13 files changed, 39 insertions(+), 43 deletions(-) diff --git a/SparkleShare/Mac/AppDelegate.cs b/SparkleShare/Mac/AppDelegate.cs index 3c4512d3..f68c695d 100755 --- a/SparkleShare/Mac/AppDelegate.cs +++ b/SparkleShare/Mac/AppDelegate.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -15,7 +15,7 @@ // along with this program. If not, see . -using MonoMac.AppKit; +using AppKit; namespace SparkleShare { diff --git a/SparkleShare/Mac/Controller.cs b/SparkleShare/Mac/Controller.cs index 0bc168ae..c486cb76 100644 --- a/SparkleShare/Mac/Controller.cs +++ b/SparkleShare/Mac/Controller.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -20,13 +20,11 @@ using System.Collections.Generic; using System.IO; using System.Threading; -using Mono.Unix.Native; -using MonoMac.Foundation; -using MonoMac.AppKit; +using Foundation; +using AppKit; using Sparkles; using Sparkles.Git; -using System.Linq; namespace SparkleShare { @@ -91,11 +89,10 @@ namespace SparkleShare { } - public override void CreateStartupItem () - { - // There aren't any bindings in MonoMac to support this yet, so - // we call out to an applescript to do the job - + // There aren't any bindings in Xamarin.Mac to support this yet, so + // we call out to an applescript to do the job + public override void CreateStartupItem () + { string args = "-e 'tell application \"System Events\" to " + "make login item at end with properties " + "{path:\"" + NSBundle.MainBundle.BundlePath + "\", hidden:false}'"; diff --git a/SparkleShare/Mac/MainMenu.xib.designer.cs b/SparkleShare/Mac/MainMenu.xib.designer.cs index 1ce6227d..90e749cf 100755 --- a/SparkleShare/Mac/MainMenu.xib.designer.cs +++ b/SparkleShare/Mac/MainMenu.xib.designer.cs @@ -11,8 +11,8 @@ namespace SparkleShare { - // Should subclass MonoMac.AppKit.NSResponder - [MonoMac.Foundation.Register("AppDelegate")] + // Should subclass AppKit.NSResponder + [Foundation.Register("AppDelegate")] public partial class AppDelegate { } } diff --git a/SparkleShare/Mac/UserInterface/About.cs b/SparkleShare/Mac/UserInterface/About.cs index ba44355a..662a5f7d 100644 --- a/SparkleShare/Mac/UserInterface/About.cs +++ b/SparkleShare/Mac/UserInterface/About.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -18,8 +18,8 @@ using System; using System.Drawing; -using MonoMac.AppKit; -using MonoMac.Foundation; +using AppKit; +using Foundation; namespace SparkleShare { diff --git a/SparkleShare/Mac/UserInterface/Bubbles.cs b/SparkleShare/Mac/UserInterface/Bubbles.cs index 59701b66..369cda9c 100755 --- a/SparkleShare/Mac/UserInterface/Bubbles.cs +++ b/SparkleShare/Mac/UserInterface/Bubbles.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ using System; -using MonoMac.Foundation; +using Foundation; namespace SparkleShare { diff --git a/SparkleShare/Mac/UserInterface/EventLog.cs b/SparkleShare/Mac/UserInterface/EventLog.cs index 51cb5cc6..8a5b2b58 100644 --- a/SparkleShare/Mac/UserInterface/EventLog.cs +++ b/SparkleShare/Mac/UserInterface/EventLog.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -19,9 +19,9 @@ using System; using System.Drawing; using System.IO; -using MonoMac.AppKit; -using MonoMac.Foundation; -using MonoMac.WebKit; +using AppKit; +using Foundation; +using WebKit; namespace SparkleShare { diff --git a/SparkleShare/Mac/UserInterface/Note.cs b/SparkleShare/Mac/UserInterface/Note.cs index af3a1aa2..c1c063a5 100644 --- a/SparkleShare/Mac/UserInterface/Note.cs +++ b/SparkleShare/Mac/UserInterface/Note.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -18,8 +18,8 @@ using System; using System.Drawing; -using MonoMac.AppKit; -using MonoMac.Foundation; +using AppKit; +using Foundation; namespace SparkleShare { diff --git a/SparkleShare/Mac/UserInterface/Setup.cs b/SparkleShare/Mac/UserInterface/Setup.cs index 8387289a..011ba2c4 100644 --- a/SparkleShare/Mac/UserInterface/Setup.cs +++ b/SparkleShare/Mac/UserInterface/Setup.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -21,9 +21,9 @@ using System.Drawing; using System.IO; using Mono.Unix; -using MonoMac.Foundation; -using MonoMac.AppKit; -using MonoMac.WebKit; +using Foundation; +using AppKit; +using WebKit; using Sparkles; diff --git a/SparkleShare/Mac/UserInterface/SetupWindow.cs b/SparkleShare/Mac/UserInterface/SetupWindow.cs index ab0b9e50..e57fb6b7 100644 --- a/SparkleShare/Mac/UserInterface/SetupWindow.cs +++ b/SparkleShare/Mac/UserInterface/SetupWindow.cs @@ -1,4 +1,4 @@ -// SparkleShare, an instant update workflow to Git. +// SparkleShare, an instant update workflow to Git. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -18,8 +18,8 @@ using System.Collections.Generic; using System.Drawing; -using MonoMac.Foundation; -using MonoMac.AppKit; +using Foundation; +using AppKit; namespace SparkleShare { diff --git a/SparkleShare/Mac/UserInterface/StatusIcon.cs b/SparkleShare/Mac/UserInterface/StatusIcon.cs index 39469af5..9cae6905 100644 --- a/SparkleShare/Mac/UserInterface/StatusIcon.cs +++ b/SparkleShare/Mac/UserInterface/StatusIcon.cs @@ -1,4 +1,4 @@ -// SparkleShare, an instant update workflow to Git. +// SparkleShare, an instant update workflow to Git. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -19,7 +19,7 @@ using System; using System.Collections.Generic; using System.Drawing; -using MonoMac.AppKit; +using AppKit; namespace SparkleShare { diff --git a/SparkleShare/Mac/UserInterface/UserInterface.cs b/SparkleShare/Mac/UserInterface/UserInterface.cs index a3fd0d98..9590dac2 100755 --- a/SparkleShare/Mac/UserInterface/UserInterface.cs +++ b/SparkleShare/Mac/UserInterface/UserInterface.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -17,8 +17,8 @@ using System; -using MonoMac.AppKit; -using MonoMac.Foundation; +using AppKit; +using Foundation; namespace SparkleShare { diff --git a/SparkleShare/Mac/Watcher.cs b/SparkleShare/Mac/Watcher.cs index ff2d12af..e8de3ae5 100755 --- a/SparkleShare/Mac/Watcher.cs +++ b/SparkleShare/Mac/Watcher.cs @@ -1,6 +1,6 @@ -// Originally taken from: +// Originally taken from: // https://github.com/jesse99/Continuum/blob/master/source/shared/DirectoryWatcher.cs -// Modified to use MonoMac and integrate into SparkleShare +// Modified to use Xamarin.Mac and integrate into SparkleShare // // Copyright (C) 2008 Jesse Jones // Copyright (C) 2012 Hylke Bons @@ -30,7 +30,7 @@ using System.Collections.Generic; using System.Runtime.InteropServices; using System.IO; -using MonoMac.Foundation; +using Foundation; namespace SparkleShare { diff --git a/SparkleShare/Mac/packReleaseDist.sh b/SparkleShare/Mac/packReleaseDist.sh index 85f43efa..d5c52a6e 100755 --- a/SparkleShare/Mac/packReleaseDist.sh +++ b/SparkleShare/Mac/packReleaseDist.sh @@ -19,6 +19,5 @@ cp ${MONO_PATH}/lib/libMonoPosixHelper.dylib ../MacOS/ sed -i .bak 's/libMonoPosixHelper.dylib/@executable_path\/libMonoPosixHelper.dylib/' ./config # merge all Assemblies into one Mac binary -mkbundle --static --deps --config ./config -o ../MacOS/SparkleShare SparkleShare.exe Sparkles.dll MonoMac.dll Sparkles.Git.dll +mkbundle --static --deps --config ./config -o ../MacOS/SparkleShare SparkleShare.exe Sparkles.dll Xamarin.Mac.dll Sparkles.Git.dll rm *.dll *.exe - From 73856e4a0cacfa2ce392b2d5f6b7e602b1f6d4a4 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sun, 10 Sep 2017 13:37:45 +0100 Subject: [PATCH 4/5] mac: Use updated Xamarin.Mac APIs --- SparkleShare/Mac/Controller.cs | 51 ++++---- SparkleShare/Mac/UserInterface/About.cs | 36 +++--- SparkleShare/Mac/UserInterface/Bubbles.cs | 2 +- SparkleShare/Mac/UserInterface/EventLog.cs | 118 +++++++++--------- SparkleShare/Mac/UserInterface/Note.cs | 48 +++---- SparkleShare/Mac/UserInterface/Setup.cs | 95 +++++++------- SparkleShare/Mac/UserInterface/SetupWindow.cs | 22 ++-- SparkleShare/Mac/UserInterface/StatusIcon.cs | 8 +- 8 files changed, 191 insertions(+), 189 deletions(-) diff --git a/SparkleShare/Mac/Controller.cs b/SparkleShare/Mac/Controller.cs index c486cb76..67eae500 100644 --- a/SparkleShare/Mac/Controller.cs +++ b/SparkleShare/Mac/Controller.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -67,10 +67,14 @@ namespace SparkleShare { public override void CreateSparkleShareFolder () { - if (!Directory.Exists (SparkleShare.Controller.FoldersPath)) { - Directory.CreateDirectory (SparkleShare.Controller.FoldersPath); - Syscall.chmod (SparkleShare.Controller.FoldersPath, (FilePermissions) 448); // 448 -> 700 - } + if (Directory.Exists (SparkleShare.Controller.FoldersPath)) + return; + + Directory.CreateDirectory (SparkleShare.Controller.FoldersPath); + + // TODO: Use proper API + var chmod = new Command ("chmod", "700 " + SparkleShare.Controller.FoldersPath); + chmod.StartAndWaitForExit (); } @@ -89,31 +93,31 @@ namespace SparkleShare { } - // There aren't any bindings in Xamarin.Mac to support this yet, so - // we call out to an applescript to do the job + // There aren't any bindings in Xamarin.Mac to support this yet, so + // we call out to an applescript to do the job public override void CreateStartupItem () { - string args = "-e 'tell application \"System Events\" to " + - "make login item at end with properties " + - "{path:\"" + NSBundle.MainBundle.BundlePath + "\", hidden:false}'"; - - var process = new Command ("osascript", args); - process.StartAndWaitForExit (); - - Logger.LogInfo ("Controller", "Added " + NSBundle.MainBundle.BundlePath + " to login items"); - } - + string args = "-e 'tell application \"System Events\" to " + + "make login item at end with properties " + + "{path:\"" + NSBundle.MainBundle.BundlePath + "\", hidden:false}'"; + + var process = new Command ("osascript", args); + process.StartAndWaitForExit (); + + Logger.LogInfo ("Controller", "Added " + NSBundle.MainBundle.BundlePath + " to login items"); + } + public override void InstallProtocolHandler () { } - public override void CopyToClipboard (string text) - { - NSPasteboard.GeneralPasteboard.ClearContents (); - NSPasteboard.GeneralPasteboard.SetStringForType (text, "NSStringPboardType"); - } + public override void CopyToClipboard (string text) + { + NSPasteboard.GeneralPasteboard.ClearContents (); + NSPasteboard.GeneralPasteboard.SetStringForType (text, "NSStringPboardType"); + } public override void OpenFolder (string path) @@ -216,13 +220,12 @@ namespace SparkleShare { public delegate void Code (); - readonly NSObject obj = new NSObject (); public void Invoke (Code code) { using (var a = new NSAutoreleasePool ()) { - obj.InvokeOnMainThread (() => code ()); + new NSObject ().InvokeOnMainThread (() => code ()); } } } diff --git a/SparkleShare/Mac/UserInterface/About.cs b/SparkleShare/Mac/UserInterface/About.cs index 662a5f7d..6594b07f 100644 --- a/SparkleShare/Mac/UserInterface/About.cs +++ b/SparkleShare/Mac/UserInterface/About.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -16,9 +16,9 @@ using System; -using System.Drawing; using AppKit; +using CoreGraphics; using Foundation; namespace SparkleShare { @@ -38,21 +38,21 @@ namespace SparkleShare { public About () : base () { - SetFrame (new RectangleF (0, 0, 640, 281), true); + SetFrame (new CGRect (0, 0, 640, 281), true); Center (); Delegate = new SparkleAboutDelegate (); StyleMask = (NSWindowStyle.Closable | NSWindowStyle.Titled); Title = "About SparkleShare"; - MaxSize = new SizeF (640, 281); - MinSize = new SizeF (640, 281); + MaxSize = new CGSize (640, 281); + MinSize = new CGSize (640, 281); HasShadow = true; IsOpaque = false; BackingType = NSBackingStore.Buffered; Level = NSWindowLevel.Floating; this.hidden_close_button = new NSButton () { - Frame = new RectangleF (0, 0, 0, 0), + Frame = new CGRect (0, 0, 0, 0), KeyEquivalentModifierMask = NSEventModifierMask.CommandKeyMask, KeyEquivalent = "w" }; @@ -82,22 +82,22 @@ namespace SparkleShare { private void CreateAbout () { this.about_image = NSImage.ImageNamed ("about"); - this.about_image.Size = new SizeF (720, 260); + this.about_image.Size = new CGSize (720, 260); this.about_image_view = new NSImageView () { Image = this.about_image, - Frame = new RectangleF (0, 0, 720, 260) + Frame = new CGRect (0, 0, 720, 260) }; this.version_text_field = new SparkleLabel ("version " + Controller.RunningVersion, NSTextAlignment.Left) { DrawsBackground = false, - Frame = new RectangleF (295, 140, 318, 22), + Frame = new CGRect (295, 140, 318, 22), TextColor = NSColor.White }; this.updates_text_field = new SparkleLabel ("Checking for updates...", NSTextAlignment.Left) { DrawsBackground = false, - Frame = new RectangleF (295, Frame.Height - 232, 318, 98), + Frame = new CGRect (295, Frame.Height - 232, 318, 98), TextColor = NSColor.FromCalibratedRgba (1.0f, 1.0f, 1.0f, 0.5f) }; @@ -108,26 +108,26 @@ namespace SparkleShare { "under the GNU GPLv3", NSTextAlignment.Left) { DrawsBackground = false, - Frame = new RectangleF (295, Frame.Height - 260, 318, 98), + Frame = new CGRect (295, Frame.Height - 260, 318, 98), TextColor = NSColor.White }; this.website_link = new SparkleLink ("Website", Controller.WebsiteLinkAddress); - this.website_link.Frame = new RectangleF (new PointF (295, 25), this.website_link.Frame.Size); + this.website_link.Frame = new CGRect (new CGPoint (295, 25), this.website_link.Frame.Size); this.credits_link = new SparkleLink ("Credits", Controller.CreditsLinkAddress); - this.credits_link.Frame = new RectangleF ( - new PointF (this.website_link.Frame.X + this.website_link.Frame.Width + 10, 25), + this.credits_link.Frame = new CGRect ( + new CGPoint (this.website_link.Frame.X + this.website_link.Frame.Width + 10, 25), this.credits_link.Frame.Size); this.report_problem_link = new SparkleLink ("Report a problem", Controller.ReportProblemLinkAddress); - this.report_problem_link.Frame = new RectangleF ( - new PointF (this.credits_link.Frame.X + this.credits_link.Frame.Width + 10, 25), + this.report_problem_link.Frame = new CGRect ( + new CGPoint (this.credits_link.Frame.X + this.credits_link.Frame.Width + 10, 25), this.report_problem_link.Frame.Size); this.debug_log_link = new SparkleLink ("Debug log", Controller.DebugLogLinkAddress); - this.debug_log_link.Frame = new RectangleF ( - new PointF (this.report_problem_link.Frame.X + this.report_problem_link.Frame.Width + 10, 25), + this.debug_log_link.Frame = new CGRect ( + new CGPoint (this.report_problem_link.Frame.X + this.report_problem_link.Frame.Width + 10, 25), this.debug_log_link.Frame.Size); ContentView.AddSubview (this.about_image_view); diff --git a/SparkleShare/Mac/UserInterface/Bubbles.cs b/SparkleShare/Mac/UserInterface/Bubbles.cs index 369cda9c..d00fba7c 100755 --- a/SparkleShare/Mac/UserInterface/Bubbles.cs +++ b/SparkleShare/Mac/UserInterface/Bubbles.cs @@ -38,7 +38,7 @@ namespace SparkleShare { var notification = new NSUserNotification { Title = title, InformativeText = subtext, - DeliveryDate = DateTime.Now + DeliveryDate = (NSDate) DateTime.Now }; NSUserNotificationCenter center = NSUserNotificationCenter.DefaultUserNotificationCenter; diff --git a/SparkleShare/Mac/UserInterface/EventLog.cs b/SparkleShare/Mac/UserInterface/EventLog.cs index 8a5b2b58..2f7e7516 100644 --- a/SparkleShare/Mac/UserInterface/EventLog.cs +++ b/SparkleShare/Mac/UserInterface/EventLog.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -16,10 +16,10 @@ using System; -using System.Drawing; using System.IO; using AppKit; +using CoreGraphics; using Foundation; using WebKit; @@ -56,33 +56,33 @@ namespace SparkleShare { float y = (float) (NSScreen.MainScreen.Frame.Height * 0.5 - (height * 0.5)); SetFrame ( - new RectangleF ( - new PointF (x, y), - new SizeF (min_width, height)), + new CGRect ( + new CGPoint (x, y), + new CGSize (min_width, height)), true); StyleMask = (NSWindowStyle.Closable | NSWindowStyle.Miniaturizable | NSWindowStyle.Titled | NSWindowStyle.Resizable); - MinSize = new SizeF (min_width, min_height); + MinSize = new CGSize (min_width, min_height); HasShadow = true; IsOpaque = false; BackingType = NSBackingStore.Buffered; - TitlebarHeight = Frame.Height - ContentView.Frame.Height; + TitlebarHeight = (float) (Frame.Height - ContentView.Frame.Height); Level = NSWindowLevel.Floating; - this.web_view = new WebView (new RectangleF (0, 0, 481, 579), "", "") { - Frame = new RectangleF (new PointF (0, 0), - new SizeF (ContentView.Frame.Width, ContentView.Frame.Height - 39)) + this.web_view = new WebView (new CGRect (0, 0, 481, 579), "", "") { + Frame = new CGRect (new CGPoint (0, 0), + new CGSize (ContentView.Frame.Width, ContentView.Frame.Height - 39)) }; this.web_view.Preferences.PlugInsEnabled = false; this.cover = new NSBox () { - Frame = new RectangleF ( - new PointF (-1, -1), - new SizeF (Frame.Width + 2, this.web_view.Frame.Height + 1)), + Frame = new CGRect ( + new CGPoint (-1, -1), + new CGSize (Frame.Width + 2, this.web_view.Frame.Height + 1)), FillColor = NSColor.White, BorderType = NSBorderType.NoBorder, BoxType = NSBoxType.NSBoxCustom @@ -103,9 +103,9 @@ namespace SparkleShare { BackgroundColor = NSColor.WindowBackground, Bordered = false, Editable = false, - Frame = new RectangleF ( - new PointF (0, ContentView.Frame.Height - 31), - new SizeF (60, 20)), + Frame = new CGRect ( + new CGPoint (0, ContentView.Frame.Height - 31), + new CGSize (60, 20)), StringValue = "Size:" }; @@ -114,9 +114,9 @@ namespace SparkleShare { BackgroundColor = NSColor.WindowBackground, Bordered = false, Editable = false, - Frame = new RectangleF ( - new PointF (60, ContentView.Frame.Height - 27), - new SizeF (60, 20)), + Frame = new CGRect ( + new CGPoint (60, ContentView.Frame.Height - 27), + new CGSize (60, 20)), StringValue = "…", Font = NSFont.FromFontName (UserInterface.FontName + " Bold", NSFont.SystemFontSize) }; @@ -127,9 +127,9 @@ namespace SparkleShare { BackgroundColor = NSColor.WindowBackground, Bordered = false, Editable = false, - Frame = new RectangleF ( - new PointF (130, ContentView.Frame.Height - 31), - new SizeF (60, 20)), + Frame = new CGRect ( + new CGPoint (130, ContentView.Frame.Height - 31), + new CGSize (60, 20)), StringValue = "History:" }; @@ -138,34 +138,34 @@ namespace SparkleShare { BackgroundColor = NSColor.WindowBackground, Bordered = false, Editable = false, - Frame = new RectangleF ( - new PointF (190, ContentView.Frame.Height - 27), - new SizeF (60, 20) + Frame = new CGRect ( + new CGPoint (190, ContentView.Frame.Height - 27), + new CGSize (60, 20) ), StringValue = "…", Font = NSFont.FromFontName (UserInterface.FontName + " Bold", NSFont.SystemFontSize) }; this.popup_button = new NSPopUpButton () { - Frame = new RectangleF ( - new PointF (ContentView.Frame.Width - 156 - 12, ContentView.Frame.Height - 33), - new SizeF (156, 26)), + Frame = new CGRect ( + new CGPoint (ContentView.Frame.Width - 156 - 12, ContentView.Frame.Height - 33), + new CGSize (156, 26)), PullsDown = false }; this.background = new NSBox () { - Frame = new RectangleF ( - new PointF (-1, -1), - new SizeF (Frame.Width + 2, this.web_view.Frame.Height + 2)), + Frame = new CGRect ( + new CGPoint (-1, -1), + new CGSize (Frame.Width + 2, this.web_view.Frame.Height + 2)), FillColor = NSColor.White, BorderColor = NSColor.LightGray, BoxType = NSBoxType.NSBoxCustom }; this.progress_indicator = new NSProgressIndicator () { - Frame = new RectangleF ( - new PointF (Frame.Width / 2 - 10, this.web_view.Frame.Height / 2 + 10), - new SizeF (20, 20)), + Frame = new CGRect ( + new CGPoint (Frame.Width / 2 - 10, this.web_view.Frame.Height / 2 + 10), + new CGSize (20, 20)), Style = NSProgressIndicatorStyle.Spinning }; @@ -180,7 +180,7 @@ namespace SparkleShare { ContentView.AddSubview (this.background); ContentView.AddSubview (this.hidden_close_button); - (Delegate as SparkleEventsDelegate).WindowResized += delegate (SizeF new_window_size) { + (Delegate as SparkleEventsDelegate).WindowResized += delegate (CGSize new_window_size) { SparkleShare.Controller.Invoke (() => Relayout (new_window_size)); }; @@ -240,7 +240,7 @@ namespace SparkleShare { PreventsApplicationTerminationWhenModal = false }; - if ((NSPanelButtonType) panel.RunModal () == NSPanelButtonType.Ok) { + if ((NSPanelButtonType) (int) panel.RunModal () == NSPanelButtonType.Ok) { string target_file_path = Path.Combine (panel.DirectoryUrl.RelativePath, panel.NameFieldStringValue); Controller.SaveDialogCompleted (target_file_path); @@ -252,41 +252,41 @@ namespace SparkleShare { } - public void Relayout (SizeF new_window_size) + public void Relayout (CGSize new_window_size) { - this.web_view.Frame = new RectangleF (this.web_view.Frame.Location, - new SizeF (new_window_size.Width, new_window_size.Height - TitlebarHeight - 39)); + this.web_view.Frame = new CGRect (this.web_view.Frame.Location, + new CGSize (new_window_size.Width, new_window_size.Height - TitlebarHeight - 39)); - this.cover.Frame = new RectangleF (this.cover.Frame.Location, - new SizeF (new_window_size.Width, new_window_size.Height - TitlebarHeight - 39)); + this.cover.Frame = new CGRect (this.cover.Frame.Location, + new CGSize (new_window_size.Width, new_window_size.Height - TitlebarHeight - 39)); - this.background.Frame = new RectangleF (this.background.Frame.Location, - new SizeF (new_window_size.Width, new_window_size.Height - TitlebarHeight - 37)); + this.background.Frame = new CGRect (this.background.Frame.Location, + new CGSize (new_window_size.Width, new_window_size.Height - TitlebarHeight - 37)); - this.size_label.Frame = new RectangleF ( - new PointF (this.size_label.Frame.X, new_window_size.Height - TitlebarHeight - 30), + this.size_label.Frame = new CGRect ( + new CGPoint (this.size_label.Frame.X, new_window_size.Height - TitlebarHeight - 30), this.size_label.Frame.Size); - this.size_label_value.Frame = new RectangleF ( - new PointF (this.size_label_value.Frame.X, new_window_size.Height - TitlebarHeight - 27), + this.size_label_value.Frame = new CGRect ( + new CGPoint (this.size_label_value.Frame.X, new_window_size.Height - TitlebarHeight - 27), this.size_label_value.Frame.Size); - this.history_label.Frame = new RectangleF ( - new PointF (this.history_label.Frame.X, new_window_size.Height - TitlebarHeight - 30), + this.history_label.Frame = new CGRect ( + new CGPoint (this.history_label.Frame.X, new_window_size.Height - TitlebarHeight - 30), this.history_label.Frame.Size); - this.history_label_value.Frame = new RectangleF ( - new PointF (this.history_label_value.Frame.X, new_window_size.Height - TitlebarHeight - 27), + this.history_label_value.Frame = new CGRect ( + new CGPoint (this.history_label_value.Frame.X, new_window_size.Height - TitlebarHeight - 27), this.history_label_value.Frame.Size); - this.progress_indicator.Frame = new RectangleF ( - new PointF (new_window_size.Width / 2 - 10, this.web_view.Frame.Height / 2 + 10), + this.progress_indicator.Frame = new CGRect ( + new CGPoint (new_window_size.Width / 2 - 10, this.web_view.Frame.Height / 2 + 10), this.progress_indicator.Frame.Size); this.popup_button.RemoveFromSuperview (); // Needed to prevent redraw glitches - this.popup_button.Frame = new RectangleF ( - new PointF (new_window_size.Width - this.popup_button.Frame.Width - 12, new_window_size.Height - TitlebarHeight - 33), + this.popup_button.Frame = new CGRect ( + new CGPoint (new_window_size.Width - this.popup_button.Frame.Width - 12, new_window_size.Height - TitlebarHeight - 33), this.popup_button.Frame.Size); ContentView.AddSubview (this.popup_button); @@ -345,8 +345,8 @@ namespace SparkleShare { html = html.Replace ("", pixmaps_path + "/document-edited-12.png"); html = html.Replace ("", pixmaps_path + "/document-moved-12.png"); - this.web_view = new WebView (new RectangleF (0, 0, 481, 579), "", "") { - Frame = new RectangleF (new PointF (0, 0), new SizeF (ContentView.Frame.Width, ContentView.Frame.Height - 39)) + this.web_view = new WebView (new CGRect (0, 0, 481, 579), "", "") { + Frame = new CGRect (new CGPoint (0, 0), new CGSize (ContentView.Frame.Width, ContentView.Frame.Height - 39)) }; this.web_view.MainFrame.LoadHtmlString (html, new NSUrl ("")); @@ -379,9 +379,9 @@ namespace SparkleShare { public class SparkleEventsDelegate : NSWindowDelegate { public event WindowResizedHandler WindowResized = delegate { }; - public delegate void WindowResizedHandler (SizeF new_window_size); + public delegate void WindowResizedHandler (CGSize new_window_size); - public override SizeF WillResize (NSWindow sender, SizeF to_frame_size) + public override CGSize WillResize (NSWindow sender, CGSize to_frame_size) { WindowResized (to_frame_size); return to_frame_size; diff --git a/SparkleShare/Mac/UserInterface/Note.cs b/SparkleShare/Mac/UserInterface/Note.cs index c1c063a5..75d0a910 100644 --- a/SparkleShare/Mac/UserInterface/Note.cs +++ b/SparkleShare/Mac/UserInterface/Note.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -16,9 +16,9 @@ using System; -using System.Drawing; using AppKit; +using CoreGraphics; using Foundation; namespace SparkleShare { @@ -38,21 +38,21 @@ namespace SparkleShare { public Note () : base () { - SetFrame (new RectangleF (0, 0, 480, 240), true); + SetFrame (new CGRect (0, 0, 480, 240), true); Center (); Delegate = new SparkleNoteDelegate (); StyleMask = (NSWindowStyle.Closable | NSWindowStyle.Titled); Title = "Add Note"; - MaxSize = new SizeF (480, 240); - MinSize = new SizeF (480, 240); + MaxSize = new CGSize (480, 240); + MinSize = new CGSize (480, 240); HasShadow = true; IsOpaque = false; BackingType = NSBackingStore.Buffered; Level = NSWindowLevel.Floating; this.hidden_close_button = new NSButton () { - Frame = new RectangleF (0, 0, 0, 0), + Frame = new CGRect (0, 0, 0, 0), KeyEquivalentModifierMask = NSEventModifierMask.CommandKeyMask, KeyEquivalent = "w" }; @@ -83,9 +83,9 @@ namespace SparkleShare { private void CreateNote () { this.cover = new NSBox () { - Frame = new RectangleF ( - new PointF (-1, 58), - new SizeF (Frame.Width + 2, this.ContentView.Frame.Height + 1)), + Frame = new CGRect ( + new CGPoint (-1, 58), + new CGSize (Frame.Width + 2, this.ContentView.Frame.Height + 1)), FillColor = NSColor.FromCalibratedRgba (0.77f, 0.77f, 0.75f, 1.0f), BorderColor = NSColor.LightGray, BoxType = NSBoxType.NSBoxCustom @@ -97,9 +97,9 @@ namespace SparkleShare { BackgroundColor = NSColor.FromCalibratedRgba (0.77f, 0.77f, 0.75f, 1.0f), Bordered = false, Editable = false, - Frame = new RectangleF ( - new PointF (85, ContentView.Frame.Height - 41), - new SizeF (320, 22)), + Frame = new CGRect ( + new CGPoint (85, ContentView.Frame.Height - 41), + new CGSize (320, 22)), StringValue = SparkleShare.Controller.CurrentUser.Name, Font = NSFont.FromFontName (UserInterface.FontName + " Bold", NSFont.SystemFontSize) }; @@ -110,9 +110,9 @@ namespace SparkleShare { TextColor = NSColor.DisabledControlText, Bordered = false, Editable = false, - Frame = new RectangleF ( - new PointF (85, ContentView.Frame.Height - 60), - new SizeF (320, 20)), + Frame = new CGRect ( + new CGPoint (85, ContentView.Frame.Height - 60), + new CGSize (320, 20)), StringValue = SparkleShare.Controller.CurrentUser.Email, }; @@ -122,9 +122,9 @@ namespace SparkleShare { BackgroundColor = NSColor.White, Bordered = false, Editable = true, - Frame = new RectangleF ( - new PointF (30, ContentView.Frame.Height - 137), - new SizeF (418, 48)) + Frame = new CGRect ( + new CGPoint (30, ContentView.Frame.Height - 137), + new CGSize (418, 48)) }; (this.balloon_text_field.Cell as NSTextFieldCell).PlaceholderString = "Anything to add?"; @@ -137,13 +137,13 @@ namespace SparkleShare { this.cancel_button = new NSButton () { Title = "Cancel", BezelStyle = NSBezelStyle.Rounded, - Frame = new RectangleF (Frame.Width - 15 - 105 * 2, 12, 105, 32), + Frame = new CGRect (Frame.Width - 15 - 105 * 2, 12, 105, 32), }; this.sync_button = new NSButton () { Title = "Sync", BezelStyle = NSBezelStyle.Rounded, - Frame = new RectangleF (Frame.Width - 15 - 105, 12, 105, 32), + Frame = new CGRect (Frame.Width - 15 - 105, 12, 105, 32), }; this.cancel_button.Activated += delegate { Controller.CancelClicked (); }; @@ -157,10 +157,10 @@ namespace SparkleShare { else this.balloon_image = NSImage.ImageNamed ("text-balloon"); - this.balloon_image.Size = new SizeF (438, 72); + this.balloon_image.Size = new CGSize (438, 72); this.balloon_image_view = new NSImageView () { Image = this.balloon_image, - Frame = new RectangleF (21, ContentView.Frame.Height - 145, 438, 72) + Frame = new CGRect (21, ContentView.Frame.Height - 145, 438, 72) }; @@ -169,10 +169,10 @@ namespace SparkleShare { else this.user_image = NSImage.ImageNamed ("user-icon-default"); - this.user_image.Size = new SizeF (48, 48); + this.user_image.Size = new CGSize (48, 48); this.user_image_view = new NSImageView () { Image = this.user_image, - Frame = new RectangleF (21, ContentView.Frame.Height - 65, 48, 48) + Frame = new CGRect (21, ContentView.Frame.Height - 65, 48, 48) }; this.user_image_view.WantsLayer = true; diff --git a/SparkleShare/Mac/UserInterface/Setup.cs b/SparkleShare/Mac/UserInterface/Setup.cs index 011ba2c4..720658dd 100644 --- a/SparkleShare/Mac/UserInterface/Setup.cs +++ b/SparkleShare/Mac/UserInterface/Setup.cs @@ -1,4 +1,4 @@ -// SparkleShare, a collaboration and sharing tool. +// SparkleShare, a collaboration and sharing tool. // Copyright (C) 2010 Hylke Bons // // This program is free software: you can redistribute it and/or modify @@ -17,12 +17,11 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.IO; -using Mono.Unix; -using Foundation; using AppKit; +using CoreGraphics; +using Foundation; using WebKit; using Sparkles; @@ -85,19 +84,19 @@ namespace SparkleShare { Description = "First off, what’s your name and email?\n(visible only to team members)"; FullNameLabel = new SparkleLabel ("Full Name:", NSTextAlignment.Right); - FullNameLabel.Frame = new RectangleF (165, Frame.Height - 234, 160, 17); + FullNameLabel.Frame = new CGRect (165, Frame.Height - 234, 160, 17); FullNameTextField = new NSTextField () { - Frame = new RectangleF (330, Frame.Height - 238, 196, 22), - StringValue = UnixUserInfo.GetRealUser ().RealName, + Frame = new CGRect (330, Frame.Height - 238, 196, 22), + StringValue = new NSProcessInfo ().GetFullUserName (), Delegate = new SparkleTextFieldDelegate () }; EmailLabel = new SparkleLabel ("Email:", NSTextAlignment.Right); - EmailLabel.Frame = new RectangleF (165, Frame.Height - 264, 160, 17); + EmailLabel.Frame = new CGRect (165, Frame.Height - 264, 160, 17); EmailTextField = new NSTextField () { - Frame = new RectangleF (330, Frame.Height - 268, 196, 22), + Frame = new CGRect (330, Frame.Height - 268, 196, 22), Delegate = new SparkleTextFieldDelegate () }; @@ -154,20 +153,20 @@ namespace SparkleShare { Description = "Do you want to add this project to SparkleShare?"; AddressLabel = new SparkleLabel ("Address:", NSTextAlignment.Right); - AddressLabel.Frame = new RectangleF (165, Frame.Height - 238, 160, 17); + AddressLabel.Frame = new CGRect (165, Frame.Height - 238, 160, 17); AddressLabel.Font = NSFont.FromFontName (UserInterface.FontName + " Bold", NSFont.SystemFontSize); AddressTextField = new SparkleLabel (Controller.PendingInvite.Address, NSTextAlignment.Left) { - Frame = new RectangleF (330, Frame.Height - 240, 260, 17) + Frame = new CGRect (330, Frame.Height - 240, 260, 17) }; PathLabel = new SparkleLabel ("Remote Path:", NSTextAlignment.Right); - PathLabel.Frame = new RectangleF (165, Frame.Height - 262, 160, 17); + PathLabel.Frame = new CGRect (165, Frame.Height - 262, 160, 17); PathLabel.Font = NSFont.FromFontName (UserInterface.FontName + " Bold", NSFont.SystemFontSize); PathTextField = new SparkleLabel (Controller.PendingInvite.RemotePath, NSTextAlignment.Left) { - Frame = new RectangleF (330, Frame.Height - 264, 260, 17) + Frame = new CGRect (330, Frame.Height - 264, 260, 17) }; CancelButton = new NSButton () { Title = "Cancel" }; @@ -192,12 +191,12 @@ namespace SparkleShare { Description = ""; AddressLabel = new SparkleLabel ("Address:", NSTextAlignment.Left) { - Frame = new RectangleF (190, Frame.Height - 308, 160, 17), + Frame = new CGRect (190, Frame.Height - 308, 160, 17), Font = NSFont.FromFontName (UserInterface.FontName + " Bold", NSFont.SystemFontSize) }; AddressTextField = new NSTextField () { - Frame = new RectangleF (190, Frame.Height - 336, 196, 22), + Frame = new CGRect (190, Frame.Height - 336, 196, 22), Enabled = (Controller.SelectedPreset.Address == null), Delegate = new SparkleTextFieldDelegate (), StringValue = "" + Controller.PreviousAddress @@ -206,12 +205,12 @@ namespace SparkleShare { AddressTextField.Cell.LineBreakMode = NSLineBreakMode.TruncatingTail; PathLabel = new SparkleLabel ("Remote Path:", NSTextAlignment.Left) { - Frame = new RectangleF (190 + 196 + 16, Frame.Height - 308, 160, 17), + Frame = new CGRect (190 + 196 + 16, Frame.Height - 308, 160, 17), Font = NSFont.FromFontName (UserInterface.FontName + " Bold", NSFont.SystemFontSize) }; PathTextField = new NSTextField () { - Frame = new RectangleF (190 + 196 + 16, Frame.Height - 336, 196, 22), + Frame = new CGRect (190 + 196 + 16, Frame.Height - 336, 196, 22), Enabled = (Controller.SelectedPreset.Path == null), Delegate = new SparkleTextFieldDelegate (), StringValue = "" + Controller.PreviousPath @@ -221,25 +220,25 @@ namespace SparkleShare { PathHelpLabel = new SparkleLabel (Controller.SelectedPreset.PathExample, NSTextAlignment.Left) { TextColor = NSColor.DisabledControlText, - Frame = new RectangleF (190 + 196 + 16, Frame.Height - 358, 204, 19) + Frame = new CGRect (190 + 196 + 16, Frame.Height - 358, 204, 19) }; AddressHelpLabel = new SparkleLabel (Controller.SelectedPreset.AddressExample, NSTextAlignment.Left) { TextColor = NSColor.DisabledControlText, - Frame = new RectangleF (190, Frame.Height - 358, 204, 19) + Frame = new CGRect (190, Frame.Height - 358, 204, 19) }; if (TableView == null || TableView.RowCount != Controller.Presets.Count) { TableView = new NSTableView () { - Frame = new RectangleF (0, 0, 0, 0), + Frame = new CGRect (0, 0, 0, 0), RowHeight = 38, - IntercellSpacing = new SizeF (8, 12), + IntercellSpacing = new CGSize (8, 12), HeaderView = null, Delegate = new SparkleTableViewDelegate () }; ScrollView = new NSScrollView () { - Frame = new RectangleF (190, Frame.Height - 280, 408, 185), + Frame = new CGRect (190, Frame.Height - 280, 408, 185), DocumentView = TableView, HasVerticalScroller = true, BorderType = NSBorderType.BezelBorder @@ -267,14 +266,14 @@ namespace SparkleShare { if (Environment.OSVersion.Version.Major < 11) DataSource = new SparkleDataSource (1, Controller.Presets); else - DataSource = new SparkleDataSource (BackingScaleFactor, Controller.Presets); + DataSource = new SparkleDataSource ((float) BackingScaleFactor, Controller.Presets); TableView.DataSource = DataSource; TableView.ReloadData (); (TableView.Delegate as SparkleTableViewDelegate).SelectionChanged += delegate { - Controller.SelectedPresetChanged (TableView.SelectedRow); - Controller.CheckAddPage (AddressTextField.StringValue, PathTextField.StringValue, TableView.SelectedRow); + Controller.SelectedPresetChanged ((int) TableView.SelectedRow); + Controller.CheckAddPage (AddressTextField.StringValue, PathTextField.StringValue, (int) TableView.SelectedRow); }; } @@ -283,7 +282,7 @@ namespace SparkleShare { MakeFirstResponder ((NSResponder) TableView); HistoryCheckButton = new NSButton () { - Frame = new RectangleF (190, Frame.Height - 400, 300, 18), + Frame = new CGRect (190, Frame.Height - 400, 300, 18), Title = "Fetch prior revisions" }; @@ -318,11 +317,11 @@ namespace SparkleShare { (AddressTextField.Delegate as SparkleTextFieldDelegate).StringValueChanged += delegate { - Controller.CheckAddPage (AddressTextField.StringValue, PathTextField.StringValue, TableView.SelectedRow); + Controller.CheckAddPage (AddressTextField.StringValue, PathTextField.StringValue, (int) TableView.SelectedRow); }; (PathTextField.Delegate as SparkleTextFieldDelegate).StringValueChanged += delegate { - Controller.CheckAddPage (AddressTextField.StringValue, PathTextField.StringValue, TableView.SelectedRow); + Controller.CheckAddPage (AddressTextField.StringValue, PathTextField.StringValue, (int) TableView.SelectedRow); }; @@ -354,7 +353,7 @@ namespace SparkleShare { Buttons.Add (AddButton); Buttons.Add (CancelButton); - Controller.CheckAddPage (AddressTextField.StringValue, PathTextField.StringValue, TableView.SelectedRow); + Controller.CheckAddPage (AddressTextField.StringValue, PathTextField.StringValue, (int) TableView.SelectedRow); } if (type == PageType.Syncing) { @@ -362,7 +361,7 @@ namespace SparkleShare { Description = "This may take a while for large projects.\nIsn’t it coffee-o’clock?"; ProgressIndicator = new NSProgressIndicator () { - Frame = new RectangleF (190, Frame.Height - 200, 640 - 150 - 80, 20), + Frame = new CGRect (190, Frame.Height - 200, 640 - 150 - 80, 20), Style = NSProgressIndicatorStyle.Bar, MinValue = 0.0, MaxValue = 100.0, @@ -380,7 +379,7 @@ namespace SparkleShare { }; ProgressLabel = new SparkleLabel ("Preparing to fetch files…", NSTextAlignment.Right); - ProgressLabel.Frame = new RectangleF (Frame.Width - 40 - 250, 185, 250, 25); + ProgressLabel.Frame = new CGRect (Frame.Width - 40 - 250, 185, 250, 25); Controller.UpdateProgressBarEvent += delegate (double percentage, string speed) { @@ -408,7 +407,7 @@ namespace SparkleShare { // Displaying marked up text with Cocoa is // a pain, so we just use a webview instead WebView web_view = new WebView (); - web_view.Frame = new RectangleF (190, Frame.Height - 525, 375, 400); + web_view.Frame = new CGRect (190, Frame.Height - 525, 375, 400); string html = "