From 85762c9512b36098f1f3a1bb07614befbb633a25 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Sun, 21 Jun 2020 02:27:37 -0500 Subject: [PATCH] quick additions! --- .../Sharing Dynamic.imageset/Contents.json | 54 ++++++++++++++++++ .../Sharing Dynamic.imageset/share1x.png | Bin 0 -> 1031 bytes .../share1x_light.png | Bin 0 -> 5582 bytes .../Sharing Dynamic.imageset/share2x.png | Bin 0 -> 1244 bytes .../share2x_light.png | Bin 0 -> 5846 bytes Clocker/Overall App/Themer.swift | 2 +- Clocker/Panel/ParentPanelController.swift | 28 +++++++-- 7 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/Contents.json create mode 100644 Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share1x.png create mode 100644 Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share1x_light.png create mode 100644 Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share2x.png create mode 100644 Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share2x_light.png diff --git a/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/Contents.json b/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/Contents.json new file mode 100644 index 0000000..0789cf6 --- /dev/null +++ b/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/Contents.json @@ -0,0 +1,54 @@ +{ + "images" : [ + { + "filename" : "share1x_light.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "share1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "share2x_light.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "share2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share1x.png b/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share1x.png new file mode 100644 index 0000000000000000000000000000000000000000..61224381883a7f268a9ef19546f63a533790ea00 GIT binary patch literal 1031 zcmeAS@N?(olHy`uVBq!ia0vp^!ayv>!3HFi<}R-XQjEnx?oJHr&dIz4aspB#JkxxA z8MJ_G4hAMhAqHlU5+Gz~&tzZ$vl$rFfHVUG^8!YM>;fjZtndP6I9m*)@K?~s6ATPY zOqn4OB@w}FfdWk9dNvV1jxdk8v3^o;3KxS@gNuokUZcbjYRfVk*ScMgk4HDK@ zQUEI{$+lIB@C{IK&M!(;Fx4~BGf=YQQczH^DN0GR3UYCSY6tRcl`=|73as??%gf94 z%8m8%i_-NCEiEne4UF`SjC6r2bc-wVN)jt{^NN)rhQQ2mNi9w;$}A|!%+FH*nVXoD zUs__Tqy(}E4j}GKt;j^!lvfP(7SMzGAQ^o_Jp+Ag+DbChaA*U`K(vAV1+mTsWSCVz zW<_dFgiB^_YF;tWX?BK|Heg#YBoOXI(in-*Xk>(}5lI3`Bgh?A{zaLoz#swzgq@*{ zK86@ny^TI7l#oIV5+z_!V4T=-+33UL*N*E-!C7GHVhs0maSX8#JUeBh7qg>4+xtG3 zN#-0;nX~m;7xgD7b2PQ~Zqq!XE>P{w{h6(6-$7HYm~`b8bC|oldz#Wuu6_|2DqJ}IpRS>5S?BdA?o%xyF+|?MlYFZOH@}J*7 zQ%v|XL=sqani*F_ANqY%R<511->!oF@QhjaRxVg%za&3plct2hGw+_5@bI@f%7zne zR|rN*tCfBDpPlx8=3LV`HZ7+cSM9mxurn~T&a~o-i)&2wlCl#S;Wz6_c1Q)Asps75 zNI&x8`t^&uSI+U$`*MTJ@Yb>oe6!>tZMfP_)iZ>DooOAK?q~2o=Q;#kepn^Rwc8&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C?kX$>$PlSv|z1Py1u5$lh?>NTYO%nZcCYukk64(Bn8f(ka*y9k_?Y~zJ! zLV~*#9$r#S=04u2lvi3O#ig#AxV-Xcyy0Ra3%ABCa38zNO(N&_)_#({`HQ5goMX!2 z&7T!?6;8N#%RAs)yZ^)PgWdk2dr$aBF!D=b!)L00ALqZ}HbKhzHmKIB@=SR-Eon)m zDQWk<*1^ZUMb5)LdRp$eSf@{!{?i<7w)LTId2e&&CX>cVDyGa?{9lfx6LA0l literal 0 HcmV?d00001 diff --git a/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share2x.png b/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share2x.png new file mode 100644 index 0000000000000000000000000000000000000000..14f83da9564acac7f86fc25378a7af76400c454c GIT binary patch literal 1244 zcmeAS@N?(olHy`uVBq!ia0vp^YCx>R!3HEbmz_ERq!^2X+?^QKos)S9%^tgpggp3}@>AbuiqSFZP6ifr%+I zB%&n3*T*V3KUXg?B|j-uuOhbqq=3Pu!V1XDO)W`OsL0L9E4HezRRXK90GK4GQ<#=IWDQi$wiq3C7Jno3LtY6lk!VT zY?YKi7Qq3;ov9U>2%GYXq22;|P#+|tZ>VRWk4;-iW*QD{AQ^}@u)iSI*?LONiMr_Q2c`xcPZ!6K2+p?=8~qMD@Z<`th?Njn z@t4ai?FZuz)_n_voE|Yp>@xhoyXMRW1;w%ihJ)$`2BKRzI60;6dB1((@m|k!wwh$p z$*t$V-F#njHuhH7Y6Y&t1=&V3drn;8_SzjG#l&deJat7lcOSz6wH2=p&Rnpeb$!=~ z3#Z@DVGZ$bbo{2pn9h7Oe15MNNI>~SlV=&=@fg8<^zUR zymd_NpO$=$IN{c#c(Z29!BjheGdIhQF1uwoll_JG57svL*whSd!e(?^itm=4 zuz>sBlC?~Rf~g&^6*kNk3!f2RV7cAMf8kV{gQ>^N4ty%x{W9WS-&!^G2PbbezU?sL zX!^QD{;~Ise%-S5oIjaZVw$&4Zv4l!?n+9!kePF4rO)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YEVC>yI zZv*!-Mc}8Z0Yft+f3vAS-~^UR55|3UXol7Lkw~g#WI6iODzj7+iut$!A=o0n0ZK;{ z<`m#MT1;>Va^?#Gg{`K=cqQ(FDGvZJ0 zUoW3*#Gm}h^2tFWk~hhpGzCmapNP*4&<9U5kVpbSDZFSC8B_+*t(AM9y*sP&b1FN4^6i9813wmN2$%*V(((Rz{6Q4?Y6nYNLw2c zDivo2c*rV2HxG|PHsl4h&I`wBCgkR(crTgZmywWusk)}RHHX`n)AjSc120dUXgU$^ zH74b0c5~(JrNixDNZmNK zE>QL03~Ae<*=yQ0%lqtIKkTBvs0;t9fS)UX8+S~~Iy-yOcFoY%Y}3Zj8=hl_`(#Sv zS2WKl>e}JnZ>P_)&8hzWP3|M^rSap6e%~>Eq~^4)u(n^}q1lZMs{Kx$M{I6wGULv2%mN%Ex-U@HpFbD+5o}?Dq+|bhV~Ed3*Ym jDtXK4(B>uiPj1kuAq%4iP1lv;Std!uVWRShGZy|AOvs)@ literal 0 HcmV?d00001 diff --git a/Clocker/Overall App/Themer.swift b/Clocker/Overall App/Themer.swift index cb36f4b..8a0d030 100644 --- a/Clocker/Overall App/Themer.swift +++ b/Clocker/Overall App/Themer.swift @@ -306,7 +306,7 @@ extension Themer { case .dark: return NSImage(named: NSImage.Name("SharingDarkIcon"))! case .system: - return NSImage(named: NSImage.shareTemplateName)! + return NSImage(named: NSImage.Name("Sharing Dynamic"))! } } diff --git a/Clocker/Panel/ParentPanelController.swift b/Clocker/Panel/ParentPanelController.swift index fe83fbb..3c646e1 100644 --- a/Clocker/Panel/ParentPanelController.swift +++ b/Clocker/Panel/ParentPanelController.swift @@ -955,20 +955,38 @@ class ParentPanelController: NSWindowController { Logger.log(object: custom, for: "Opened Localization Link") } + @objc func rate() { + guard let sourceURL = URL(string: AboutUsConstants.AppStoreLink) else { return } + + NSWorkspace.shared.open(sourceURL) + } + @IBAction func showMoreOptions(_ sender: NSButton) { let menuItem = NSMenu(title: "More Options") let terminateOption = NSMenuItem(title: "Quit Clocker", action: #selector(terminateClocker), keyEquivalent: "") - let rateClocker = NSMenuItem(title: "Support Clocker", - action: #selector(terminateClocker), keyEquivalent: "") - let sendFeedback = NSMenuItem(title: "Send Feedback", + let rateClocker = NSMenuItem(title: "Support Clocker...", + action: #selector(rate), keyEquivalent: "") + let sendFeedback = NSMenuItem(title: "Send Feedback...", action: #selector(reportIssue), keyEquivalent: "") - let localizeClocker = NSMenuItem(title: "Localize Clocker in your own language", + let localizeClocker = NSMenuItem(title: "Localize Clocker...", action: #selector(openCrowdin), keyEquivalent: "") - menuItem.addItem(terminateOption) + + let appDisplayName = Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") ?? "Clocker" + let shortVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") ?? "N/A" + let longVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") ?? "N/A" + + let versionInfo = "\(appDisplayName) \(shortVersion) (\(longVersion))" + let clockerVersionInfo = NSMenuItem(title: versionInfo, action: nil, keyEquivalent: "") + clockerVersionInfo.isEnabled = false menuItem.addItem(rateClocker) menuItem.addItem(sendFeedback) menuItem.addItem(localizeClocker) + menuItem.addItem(NSMenuItem.separator()) + menuItem.addItem(clockerVersionInfo) + + menuItem.addItem(NSMenuItem.separator()) + menuItem.addItem(terminateOption) NSMenu.popUpContextMenu(menuItem, with: NSApp.currentEvent!, for: sender)