From 6211bc78a5ddeee09f096e5f0fabf343b5043e85 Mon Sep 17 00:00:00 2001 From: Abhishek Banthia <8280282+n0shake@users.noreply.github.com> Date: Fri, 1 Apr 2022 21:19:55 -0400 Subject: [PATCH] Toggle for Sync. --- Clocker/Clocker/Clocker.entitlements | 4 - Clocker/Clocker/ar.lproj/Localizable.strings | 3 + Clocker/Clocker/ca.lproj/Localizable.strings | 3 + Clocker/Clocker/de.lproj/Localizable.strings | 3 + Clocker/Clocker/en.lproj/Localizable.strings | 3 + Clocker/Clocker/es.lproj/Localizable.strings | 3 + Clocker/Clocker/fr.lproj/Localizable.strings | 3 + Clocker/Clocker/hi.lproj/Localizable.strings | 3 + Clocker/Clocker/hr.lproj/Localizable.strings | 3 + Clocker/Clocker/it.lproj/Localizable.strings | 3 + Clocker/Clocker/ja.lproj/Localizable.strings | 3 + Clocker/Clocker/ko.lproj/Localizable.strings | 3 + Clocker/Clocker/nl.lproj/Localizable.strings | 3 + Clocker/Clocker/pl.lproj/Localizable.strings | 3 + .../Clocker/pt-BR.lproj/Localizable.strings | 3 + Clocker/Clocker/ru.lproj/Localizable.strings | 3 + Clocker/Clocker/tr.lproj/Localizable.strings | 3 + .../Clocker/zh-Hans.lproj/Localizable.strings | 3 + .../Clocker/zh-Hant.lproj/Localizable.strings | 3 + Clocker/Overall App/Strings.swift | 1 + .../Appearance/AppearanceViewController.swift | 11 ++- Clocker/Preferences/Preferences.storyboard | 79 +++++++++++++------ 22 files changed, 119 insertions(+), 30 deletions(-) diff --git a/Clocker/Clocker/Clocker.entitlements b/Clocker/Clocker/Clocker.entitlements index 1754713..9f43c40 100644 --- a/Clocker/Clocker/Clocker.entitlements +++ b/Clocker/Clocker/Clocker.entitlements @@ -2,10 +2,6 @@ - com.apple.developer.icloud-container-identifiers - - com.apple.developer.ubiquity-kvstore-identifier - $(TeamIdentifierPrefix)$(CFBundleIdentifier) com.apple.security.app-sandbox com.apple.security.cs.disable-library-validation diff --git a/Clocker/Clocker/ar.lproj/Localizable.strings b/Clocker/Clocker/ar.lproj/Localizable.strings index 9652a9e..4a0d690 100644 --- a/Clocker/Clocker/ar.lproj/Localizable.strings +++ b/Clocker/Clocker/ar.lproj/Localizable.strings @@ -158,3 +158,6 @@ "New Zealand" = "New Zealand"; "Florida" = "Florida"; "San Francisco" = "San Francisco"; + +// iCloud +"Enable iCloud Sync" = "Enable iCloud Sync"; diff --git a/Clocker/Clocker/ca.lproj/Localizable.strings b/Clocker/Clocker/ca.lproj/Localizable.strings index d4d47b5..a7e6ad8 100644 --- a/Clocker/Clocker/ca.lproj/Localizable.strings +++ b/Clocker/Clocker/ca.lproj/Localizable.strings @@ -164,3 +164,6 @@ "No upcoming events for today!" = "No upcoming events for today!"; "Great going." = "Great going."; "Happy Weekend." = "Happy Weekend."; + +// iCloud +"Enable iCloud Sync" = "Enable iCloud Sync"; diff --git a/Clocker/Clocker/de.lproj/Localizable.strings b/Clocker/Clocker/de.lproj/Localizable.strings index 30cb9aa..27ce101 100644 --- a/Clocker/Clocker/de.lproj/Localizable.strings +++ b/Clocker/Clocker/de.lproj/Localizable.strings @@ -164,3 +164,6 @@ "No upcoming events for today!" = "No upcoming events for today!"; "Great going." = "Great going."; "Happy Weekend." = "Happy Weekend."; + +// iCloud +"Enable iCloud Sync" = "Enable iCloud Sync"; diff --git a/Clocker/Clocker/en.lproj/Localizable.strings b/Clocker/Clocker/en.lproj/Localizable.strings index 0840228..73ae1c9 100644 --- a/Clocker/Clocker/en.lproj/Localizable.strings +++ b/Clocker/Clocker/en.lproj/Localizable.strings @@ -168,3 +168,6 @@ "No upcoming events for today!" = "No upcoming events for today!"; "Great going." = "Great going."; "Happy Weekend." = "Happy Weekend."; + +// iCloud +"Enable iCloud Sync" = "Enable iCloud Sync"; diff --git a/Clocker/Clocker/es.lproj/Localizable.strings b/Clocker/Clocker/es.lproj/Localizable.strings index 7870ae7..77f94d7 100644 --- a/Clocker/Clocker/es.lproj/Localizable.strings +++ b/Clocker/Clocker/es.lproj/Localizable.strings @@ -166,3 +166,6 @@ "No upcoming events for today!" = "No upcoming events for today!"; "Great going." = "Great going."; "Happy Weekend." = "Happy Weekend."; + +// iCloud +"Enable iCloud Sync" = "Enable iCloud Sync"; diff --git a/Clocker/Clocker/fr.lproj/Localizable.strings b/Clocker/Clocker/fr.lproj/Localizable.strings index 5182cb7..5174df9 100644 --- a/Clocker/Clocker/fr.lproj/Localizable.strings +++ b/Clocker/Clocker/fr.lproj/Localizable.strings @@ -165,3 +165,6 @@ "No upcoming events for today!" = "No upcoming events for today!"; "Great going." = "Great going."; "Happy Weekend." = "Happy Weekend."; + +// iCloud +"Enable iCloud Sync" = "Enable iCloud Sync"; diff --git a/Clocker/Clocker/hi.lproj/Localizable.strings b/Clocker/Clocker/hi.lproj/Localizable.strings index 13353a5..0044df9 100644 --- a/Clocker/Clocker/hi.lproj/Localizable.strings +++ b/Clocker/Clocker/hi.lproj/Localizable.strings @@ -160,3 +160,6 @@ "No upcoming events for today!" = "No upcoming events for today!"; "Great going." = "Great going."; "Happy Weekend." = "Happy Weekend."; + +// iCloud +"Enable iCloud Sync" = "Enable iCloud Sync"; diff --git a/Clocker/Clocker/hr.lproj/Localizable.strings b/Clocker/Clocker/hr.lproj/Localizable.strings index e5d28ac..11e6925 100644 --- a/Clocker/Clocker/hr.lproj/Localizable.strings +++ b/Clocker/Clocker/hr.lproj/Localizable.strings @@ -166,3 +166,6 @@ "No upcoming events for today!" = "Za danas nema predstojećih događaja!"; "Great going." = "Super."; "Happy Weekend." = "Uživaj vikend."; + +// iCloud +"Enable iCloud Sync" = "Enable iCloud Sync"; diff --git a/Clocker/Clocker/it.lproj/Localizable.strings b/Clocker/Clocker/it.lproj/Localizable.strings index e1b4c00..3f0369f 100644 --- a/Clocker/Clocker/it.lproj/Localizable.strings +++ b/Clocker/Clocker/it.lproj/Localizable.strings @@ -165,3 +165,6 @@ "No upcoming events for today!" = "No upcoming events for today!"; "Great going." = "Great going."; "Happy Weekend." = "Happy Weekend."; + +// iCloud +"Enable iCloud Sync" = "Enable iCloud Sync"; diff --git a/Clocker/Clocker/ja.lproj/Localizable.strings b/Clocker/Clocker/ja.lproj/Localizable.strings index 9548555..8733095 100644 --- a/Clocker/Clocker/ja.lproj/Localizable.strings +++ b/Clocker/Clocker/ja.lproj/Localizable.strings @@ -355,3 +355,6 @@ "start-at-login" = "ログイン時に開始"; + +// iCloud +"Enable iCloud Sync" = "Enable iCloud Sync"; diff --git a/Clocker/Clocker/ko.lproj/Localizable.strings b/Clocker/Clocker/ko.lproj/Localizable.strings index d424b7d..e2dbb7c 100644 --- a/Clocker/Clocker/ko.lproj/Localizable.strings +++ b/Clocker/Clocker/ko.lproj/Localizable.strings @@ -167,3 +167,6 @@ "No upcoming events for today!" = "No upcoming events for today!"; "Great going." = "Great going."; "Happy Weekend." = "Happy Weekend."; + +// iCloud +"Enable iCloud Sync" = "Enable iCloud Sync"; diff --git a/Clocker/Clocker/nl.lproj/Localizable.strings b/Clocker/Clocker/nl.lproj/Localizable.strings index d4d47b5..a7e6ad8 100644 --- a/Clocker/Clocker/nl.lproj/Localizable.strings +++ b/Clocker/Clocker/nl.lproj/Localizable.strings @@ -164,3 +164,6 @@ "No upcoming events for today!" = "No upcoming events for today!"; "Great going." = "Great going."; "Happy Weekend." = "Happy Weekend."; + +// iCloud +"Enable iCloud Sync" = "Enable iCloud Sync"; diff --git a/Clocker/Clocker/pl.lproj/Localizable.strings b/Clocker/Clocker/pl.lproj/Localizable.strings index add8334..f3e319b 100644 --- a/Clocker/Clocker/pl.lproj/Localizable.strings +++ b/Clocker/Clocker/pl.lproj/Localizable.strings @@ -158,3 +158,6 @@ "New Zealand" = "Nowa Zelandia"; "Florida" = "Floryda"; "San Francisco" = "San Francisco"; + +// iCloud +"Enable iCloud Sync" = "Enable iCloud Sync"; diff --git a/Clocker/Clocker/pt-BR.lproj/Localizable.strings b/Clocker/Clocker/pt-BR.lproj/Localizable.strings index 6bb78f1..62fff41 100644 --- a/Clocker/Clocker/pt-BR.lproj/Localizable.strings +++ b/Clocker/Clocker/pt-BR.lproj/Localizable.strings @@ -165,3 +165,6 @@ "No upcoming events for today!" = "No upcoming events for today!"; "Great going." = "Great going."; "Happy Weekend." = "Happy Weekend."; + +// iCloud +"Enable iCloud Sync" = "Enable iCloud Sync"; diff --git a/Clocker/Clocker/ru.lproj/Localizable.strings b/Clocker/Clocker/ru.lproj/Localizable.strings index 864f2b6..15bf74d 100644 --- a/Clocker/Clocker/ru.lproj/Localizable.strings +++ b/Clocker/Clocker/ru.lproj/Localizable.strings @@ -157,3 +157,6 @@ "No upcoming events for today!" = "No upcoming events for today!"; "Great going." = "Great going."; "Happy Weekend." = "Happy Weekend."; + +// iCloud +"Enable iCloud Sync" = "Enable iCloud Sync"; diff --git a/Clocker/Clocker/tr.lproj/Localizable.strings b/Clocker/Clocker/tr.lproj/Localizable.strings index 3a1e01b..a8c05ff 100644 --- a/Clocker/Clocker/tr.lproj/Localizable.strings +++ b/Clocker/Clocker/tr.lproj/Localizable.strings @@ -159,3 +159,6 @@ Takvimleri Görüntüle"; "New Zealand" = "New Zealand"; "Florida" = "Florida"; "San Francisco" = "San Francisco"; + +// iCloud +"Enable iCloud Sync" = "Enable iCloud Sync"; diff --git a/Clocker/Clocker/zh-Hans.lproj/Localizable.strings b/Clocker/Clocker/zh-Hans.lproj/Localizable.strings index 1c4358f..c1bc99c 100644 --- a/Clocker/Clocker/zh-Hans.lproj/Localizable.strings +++ b/Clocker/Clocker/zh-Hans.lproj/Localizable.strings @@ -158,3 +158,6 @@ "No upcoming events for today!" = "No upcoming events for today!"; "Great going." = "Great going."; "Happy Weekend." = "Happy Weekend."; + +// iCloud +"Enable iCloud Sync" = "Enable iCloud Sync"; diff --git a/Clocker/Clocker/zh-Hant.lproj/Localizable.strings b/Clocker/Clocker/zh-Hant.lproj/Localizable.strings index 24b5603..7fb5639 100644 --- a/Clocker/Clocker/zh-Hant.lproj/Localizable.strings +++ b/Clocker/Clocker/zh-Hant.lproj/Localizable.strings @@ -355,3 +355,6 @@ "start-at-login" = "在登入時啟動"; + +// iCloud +"Enable iCloud Sync" = "Enable iCloud Sync"; diff --git a/Clocker/Overall App/Strings.swift b/Clocker/Overall App/Strings.swift index e9fa746..b28c608 100644 --- a/Clocker/Overall App/Strings.swift +++ b/Clocker/Overall App/Strings.swift @@ -37,3 +37,4 @@ let CLInstallHomeIndicatorObject = "installHomeIndicatorObject" let CLSwitchToCompactModeAlert = "com.abhishek.switchToCompactMode" let CLDisplayDSTTransitionInfo = "com.abhishek.showDSTTransitionInfo" let CLAppleInterfaceStyleKey = "AppleInterfaceStyle" +let CLEnableSyncKey = "com.abhishek.enableSync" diff --git a/Clocker/Preferences/Appearance/AppearanceViewController.swift b/Clocker/Preferences/Appearance/AppearanceViewController.swift index 79558af..bf0d79f 100644 --- a/Clocker/Preferences/Appearance/AppearanceViewController.swift +++ b/Clocker/Preferences/Appearance/AppearanceViewController.swift @@ -16,7 +16,8 @@ class AppearanceViewController: ParentViewController { @IBOutlet var includePlaceNameControl: NSSegmentedControl! @IBOutlet var appearanceTab: NSTabView! @IBOutlet var appDisplayControl: NSSegmentedControl! - + @IBOutlet weak var syncLabel: NSTextField! + private var themeDidChangeNotification: NSObjectProtocol? private var previewTimezones: [TimezoneData] = [] @@ -162,6 +163,7 @@ class AppearanceViewController: ParentViewController { showSliderLabel.stringValue = "Time Scroller".localized() showSunriseLabel.stringValue = "Show Sunrise/Sunset".localized() largerTextLabel.stringValue = "Larger Text".localized() + syncLabel.stringValue = "Enable iCloud Sync".localized() futureSliderRangeLabel.stringValue = "Future Slider Range".localized() includeDateLabel.stringValue = "Include Date".localized() includeDayLabel.stringValue = "Include Day".localized() @@ -172,7 +174,7 @@ class AppearanceViewController: ParentViewController { [timeFormatLabel, panelTheme, dayDisplayOptionsLabel, showSliderLabel, - showSunriseLabel, largerTextLabel, futureSliderRangeLabel, + showSunriseLabel, largerTextLabel, syncLabel, futureSliderRangeLabel, includeDayLabel, includeDateLabel, includePlaceLabel, appDisplayLabel, menubarModeLabel, previewLabel, miscelleaneousLabel, dstTransitionField].forEach { $0?.textColor = Themer.shared().mainTextColor() @@ -356,6 +358,11 @@ class AppearanceViewController: ParentViewController { @IBAction func toggleDSTTransitionOption(_: Any) { previewPanelTableView.reloadData() } + + @IBAction func toggleSync(_ sender: Any) { + print("Toggle Sync") + } + } extension AppearanceViewController: NSTableViewDataSource, NSTableViewDelegate { diff --git a/Clocker/Preferences/Preferences.storyboard b/Clocker/Preferences/Preferences.storyboard index f3fe745..99c81cd 100644 --- a/Clocker/Preferences/Preferences.storyboard +++ b/Clocker/Preferences/Preferences.storyboard @@ -768,20 +768,20 @@ - + - + - + - + @@ -793,6 +793,7 @@ + @@ -801,7 +802,7 @@ - + @@ -814,7 +815,7 @@ - + @@ -834,7 +835,7 @@ - + @@ -844,7 +845,7 @@ - + @@ -866,7 +867,7 @@ - + @@ -879,7 +880,7 @@ - + @@ -897,7 +898,7 @@ - + @@ -910,7 +911,7 @@ - + @@ -926,7 +927,7 @@ - + @@ -939,7 +940,7 @@ - + @@ -955,7 +956,7 @@ - + @@ -968,7 +969,7 @@ - + @@ -976,10 +977,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -1156,7 +1186,7 @@ - + @@ -1487,6 +1517,7 @@ + @@ -1513,7 +1544,7 @@ - + @@ -1570,13 +1601,13 @@ DQ - + - + - + @@ -1666,14 +1697,14 @@ DQ - + - +