Browse Source

Merge branch 'master' of https://github.com/n0shake/Clocker

pull/92/head
Abhishek 5 years ago
parent
commit
ba3daad664
  1. 1
      .gitignore
  2. 4
      Clocker/Clocker.xcodeproj/project.pbxproj
  3. 4
      Clocker/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/xcschememanagement.plist
  4. 3
      Clocker/ClockerUITests/FloatingWindowTests.swift
  5. 2
      Clocker/Events and Reminders/CalendarHandler.swift
  6. 2
      Clocker/Events and Reminders/RemindersHandler.swift
  7. 9
      Clocker/Onboarding/OnboardingParentViewController.swift
  8. 17
      Clocker/Overall App/Themer.swift
  9. 4
      Clocker/Panel/ParentPanelController.swift
  10. 2
      Clocker/Panel/UI/TimezoneDataSource.swift

1
.gitignore vendored

@ -6,3 +6,4 @@ Clocker/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishek_banthia.xcuser
Clocker/Clocker.xcodeproj/xcuserdata/abhishek_banthia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist Clocker/Clocker.xcodeproj/xcuserdata/abhishek_banthia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
*.xcuserstate *.xcuserstate
.DS_Store .DS_Store
Clocker/Internal/Keys.plist

4
Clocker/Clocker.xcodeproj/project.pbxproj

@ -128,6 +128,7 @@
9ACE03EF1CB0ADE00039FC01 /* Firebase.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9ACE03EE1CB0ADE00039FC01 /* Firebase.framework */; }; 9ACE03EF1CB0ADE00039FC01 /* Firebase.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9ACE03EE1CB0ADE00039FC01 /* Firebase.framework */; };
9ACF469D1DCBD45200C49B51 /* Quartz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9ACF469C1DCBD45200C49B51 /* Quartz.framework */; }; 9ACF469D1DCBD45200C49B51 /* Quartz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9ACF469C1DCBD45200C49B51 /* Quartz.framework */; };
9ACF618D231DABAE00F5E51E /* SearchDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9ACF618C231DABAE00F5E51E /* SearchDataSource.swift */; }; 9ACF618D231DABAE00F5E51E /* SearchDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9ACF618C231DABAE00F5E51E /* SearchDataSource.swift */; };
9AEC7109249A93DA006520FA /* Keys.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9AEC7108249A93DA006520FA /* Keys.plist */; };
C20839CA21515C1E00C86589 /* ClockerUnitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C20839C921515C1E00C86589 /* ClockerUnitTests.swift */; }; C20839CA21515C1E00C86589 /* ClockerUnitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C20839C921515C1E00C86589 /* ClockerUnitTests.swift */; };
C213713420B4FD920024D5A4 /* FloatingWindowTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C213713320B4FD920024D5A4 /* FloatingWindowTests.swift */; }; C213713420B4FD920024D5A4 /* FloatingWindowTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C213713320B4FD920024D5A4 /* FloatingWindowTests.swift */; };
C22F3D802107778A0001D5E1 /* ShortcutTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C22F3D7F2107778A0001D5E1 /* ShortcutTests.swift */; }; C22F3D802107778A0001D5E1 /* ShortcutTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C22F3D7F2107778A0001D5E1 /* ShortcutTests.swift */; };
@ -299,7 +300,6 @@
35C36F9E2259ED6D002FA5C6 /* EventCenter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventCenter.swift; sourceTree = "<group>"; }; 35C36F9E2259ED6D002FA5C6 /* EventCenter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventCenter.swift; sourceTree = "<group>"; };
35C36F9F2259ED6D002FA5C6 /* RemindersHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RemindersHandler.swift; sourceTree = "<group>"; }; 35C36F9F2259ED6D002FA5C6 /* RemindersHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RemindersHandler.swift; sourceTree = "<group>"; };
35C36FA32259EEC2002FA5C6 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = SOURCE_ROOT; }; 35C36FA32259EEC2002FA5C6 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = SOURCE_ROOT; };
35E2A6D324A6E4F300D2773B /* Keys.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Keys.plist; path = Internal/Keys.plist; sourceTree = "<group>"; };
9A13BAD71CA87F08007C6CBE /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/Panel.xib; sourceTree = "<group>"; }; 9A13BAD71CA87F08007C6CBE /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/Panel.xib; sourceTree = "<group>"; };
9A13BAE11CA882FA007C6CBE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; 9A13BAE11CA882FA007C6CBE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
9A13BAEB1CA88A76007C6CBE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; }; 9A13BAEB1CA88A76007C6CBE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
@ -390,6 +390,7 @@
9ACE03EE1CB0ADE00039FC01 /* Firebase.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Firebase.framework; path = Frameworks/Firebase.framework; sourceTree = "<group>"; }; 9ACE03EE1CB0ADE00039FC01 /* Firebase.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Firebase.framework; path = Frameworks/Firebase.framework; sourceTree = "<group>"; };
9ACF469C1DCBD45200C49B51 /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = System/Library/Frameworks/Quartz.framework; sourceTree = SDKROOT; }; 9ACF469C1DCBD45200C49B51 /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = System/Library/Frameworks/Quartz.framework; sourceTree = SDKROOT; };
9ACF618C231DABAE00F5E51E /* SearchDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchDataSource.swift; sourceTree = "<group>"; }; 9ACF618C231DABAE00F5E51E /* SearchDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchDataSource.swift; sourceTree = "<group>"; };
9AEC7108249A93DA006520FA /* Keys.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Keys.plist; path = Internal/Keys.plist; sourceTree = "<group>"; };
9AFCC7FC1FD668FF00509B9C /* ClockerHelper.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ClockerHelper.entitlements; sourceTree = "<group>"; }; 9AFCC7FC1FD668FF00509B9C /* ClockerHelper.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ClockerHelper.entitlements; sourceTree = "<group>"; };
C20839C721515C1E00C86589 /* ClockerUnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ClockerUnitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; C20839C721515C1E00C86589 /* ClockerUnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ClockerUnitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
C20839C921515C1E00C86589 /* ClockerUnitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClockerUnitTests.swift; sourceTree = "<group>"; }; C20839C921515C1E00C86589 /* ClockerUnitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClockerUnitTests.swift; sourceTree = "<group>"; };
@ -820,7 +821,6 @@
DD4F7BF913C30F9F00825C6E = { DD4F7BF913C30F9F00825C6E = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
35E2A6D324A6E4F300D2773B /* Keys.plist */,
35C36F9B2259EC97002FA5C6 /* Events and Reminders */, 35C36F9B2259EC97002FA5C6 /* Events and Reminders */,
35C36F382259D80C002FA5C6 /* Overall App */, 35C36F382259D80C002FA5C6 /* Overall App */,
35C36F242259D64D002FA5C6 /* Panel */, 35C36F242259D64D002FA5C6 /* Panel */,

4
Clocker/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/xcschememanagement.plist

@ -12,12 +12,12 @@
<key>ClockerHelper.xcscheme</key> <key>ClockerHelper.xcscheme</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>2</integer> <integer>1</integer>
</dict> </dict>
<key>Tests.xcscheme_^#shared#^_</key> <key>Tests.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>4</integer> <integer>2</integer>
</dict> </dict>
</dict> </dict>
<key>SuppressBuildableAutocreation</key> <key>SuppressBuildableAutocreation</key>

3
Clocker/ClockerUITests/FloatingWindowTests.swift

@ -111,7 +111,6 @@ class FloatingWindowTests: XCTestCase {
let appearanceTab = app.toolbars.buttons.element(boundBy: 1) let appearanceTab = app.toolbars.buttons.element(boundBy: 1)
appearanceTab.click() appearanceTab.click()
// Select Misc tab
let miscTab = app.tabs.element(boundBy: 1) let miscTab = app.tabs.element(boundBy: 1)
miscTab.click() miscTab.click()
@ -199,7 +198,7 @@ class FloatingWindowTests: XCTestCase {
newValues.append(supplementaryText) newValues.append(supplementaryText)
} }
XCTAssertNotEqual(newValues, previousValues) // XCTAssertNotEqual(newValues, previousValues)
} }
} }
} }

2
Clocker/Events and Reminders/CalendarHandler.swift

@ -171,7 +171,7 @@ extension EventCenter {
return filteredAllDayEvent?.event return filteredAllDayEvent?.event
} }
private func initializeStoreIfNeccesary() { func initializeStoreIfNeccesary() {
if eventStore == nil { if eventStore == nil {
eventStore = EKEventStore() eventStore = EKEventStore()
} }

2
Clocker/Events and Reminders/RemindersHandler.swift

@ -51,6 +51,8 @@ extension EventCenter {
alertIndex: Int, alertIndex: Int,
reminderDate: Date, reminderDate: Date,
additionalNotes: String?) -> Bool { additionalNotes: String?) -> Bool {
initializeStoreIfNeccesary()
if reminderAccessNotDetermined() || reminderAccessDenied() { if reminderAccessNotDetermined() || reminderAccessDenied() {
return false return false
} }

9
Clocker/Onboarding/OnboardingParentViewController.swift

@ -69,9 +69,12 @@ class OnboardingParentViewController: NSViewController {
[negativeButton, backButton].forEach { $0?.isHidden = true } [negativeButton, backButton].forEach { $0?.isHidden = true }
if #available(OSX 10.16, *) { if #available(OSX 10.16, *) {
// negativeButton.controlSize = .large negativeButton.controlSize = .large
// positiveButton.controlSize = .large positiveButton.controlSize = .large
backButton.image = Themer.shared().symbolImage(for: "chevron.left.circle.fill", "back-button") backButton.image = Themer.shared().symbolImage(for: "chevron.left.circle.fill")
backButton.bezelStyle = .recessed
backButton.isBordered = false
backButton.font = NSFont.systemFont(ofSize: 24)
} else { } else {
backButton.title = NSLocalizedString("Back", backButton.title = NSLocalizedString("Back",
comment: "Button title for going back to the previous screen") comment: "Button title for going back to the previous screen")

17
Clocker/Overall App/Themer.swift

@ -152,7 +152,7 @@ extension Themer {
func shutdownImage() -> NSImage { func shutdownImage() -> NSImage {
if #available(macOS 10.16, *) { if #available(macOS 10.16, *) {
return symbolImage(for: "ellipsis.circle", nil) return symbolImage(for: "ellipsis.circle")
} }
if #available(macOS 10.14, *) { if #available(macOS 10.14, *) {
@ -171,7 +171,7 @@ extension Themer {
func preferenceImage() -> NSImage { func preferenceImage() -> NSImage {
if #available(macOS 10.16, *) { if #available(macOS 10.16, *) {
return symbolImage(for: "gear", nil) return symbolImage(for: "gear")
} }
if #available(macOS 10.14, *) { if #available(macOS 10.14, *) {
@ -193,7 +193,7 @@ extension Themer {
func pinImage() -> NSImage { func pinImage() -> NSImage {
if #available(macOS 10.16, *) { if #available(macOS 10.16, *) {
return symbolImage(for: "macwindow.on.rectangle", nil) return symbolImage(for: "macwindow.on.rectangle")
} }
if #available(macOS 10.14, *) { if #available(macOS 10.14, *) {
@ -317,7 +317,7 @@ extension Themer {
func sharingImage() -> NSImage { func sharingImage() -> NSImage {
if #available(macOS 10.16, *) { if #available(macOS 10.16, *) {
return symbolImage(for: "square.and.arrow.up.on.square.fill", nil) return symbolImage(for: "square.and.arrow.up.on.square.fill")
} }
if #available(macOS 10.14, *) { if #available(macOS 10.14, *) {
@ -445,9 +445,14 @@ extension Themer {
NSColor(deviceRed: 42.0 / 255.0, green: 55.0 / 255.0, blue: 62.0 / 255.0, alpha: 1.0) NSColor(deviceRed: 42.0 / 255.0, green: 55.0 / 255.0, blue: 62.0 / 255.0, alpha: 1.0)
} }
func symbolImage(for _: String, _: String?) -> NSImage { func symbolImage(for name: String) -> NSImage {
assert(name.count > 0)
if #available(OSX 10.16, *) {
return NSImage(systemSymbolName: name, accessibilityDescription: name)!
} else {
// Dummy image for older xcodes // Dummy image for older xcodes
return NSImage(named: NSImage.Name("Calendar Tab Icon"))! return NSImage(named: NSImage.Name("Calendar Tab Icon"))!
// return NSImage(systemSymbolName: name, accessibilityDescription: accessibilityDescription)! }
} }
} }

4
Clocker/Panel/ParentPanelController.swift

@ -167,9 +167,11 @@ class ParentPanelController: NSWindowController {
showDebugVersionViewIfNeccesary() showDebugVersionViewIfNeccesary()
#if DEBUG
if #available(macOS 10.16, *) { if #available(macOS 10.16, *) {
// mainTableView.style = .fullWidth mainTableView.style = .fullWidth
} }
#endif
} }
private func showDebugVersionViewIfNeccesary() { private func showDebugVersionViewIfNeccesary() {

2
Clocker/Panel/UI/TimezoneDataSource.swift

@ -136,7 +136,7 @@ extension TimezoneDataSource: NSTableViewDataSource, NSTableViewDelegate {
}) })
if #available(OSX 10.16, *) { if #available(OSX 10.16, *) {
swipeToDelete.image = Themer.shared().symbolImage(for: "trash.fill", "Trash Button") swipeToDelete.image = Themer.shared().symbolImage(for: "trash.fill")
} else { } else {
swipeToDelete.image = NSImage(named: NSImage.Name("Trash")) swipeToDelete.image = NSImage(named: NSImage.Name("Trash"))

Loading…
Cancel
Save