Skip to content

Commit

Permalink
removed sandbox for autoupdate to work
Browse files Browse the repository at this point in the history
added "Check for updates" item to Preferences submenu
  • Loading branch information
artginzburg committed Mar 20, 2020
1 parent d3dbc7f commit 0b314a6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
4 changes: 0 additions & 4 deletions 2FA to Tray/2FAtoTray.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)com.dafuqtor.2FAtoTray</string>
Expand Down
8 changes: 7 additions & 1 deletion 2FA to Tray/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<fragment content="Add new...">
<attributes>
<color key="NSColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" metaFont="message" size="11"/>
<font key="NSFont" metaFont="menu" size="11"/>
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
Expand All @@ -66,6 +66,12 @@
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="SqQ-gW-5db"/>
<menuItem title="Check for updates" id="qqd-XS-mkU">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="checkForUpdatesClicked:" target="dok-4Z-Dc3" id="0W5-zD-0W2"/>
</connections>
</menuItem>
<menuItem title="Show names" id="IJY-1K-iQW">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
Expand Down
5 changes: 5 additions & 0 deletions 2FA to Tray/StatusMenuController.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Cocoa
import Sparkle

extension NSView {
func addSubviews(_ subviews: [NSView]) {
Expand Down Expand Up @@ -492,6 +493,10 @@ class StatusMenuController: NSObject, NSMenuDelegate {
}
}

@IBAction func checkForUpdatesClicked(_ sender: NSMenuItem) {
SUUpdater.shared()?.checkForUpdates(self)
}

@IBOutlet weak var showNamesButton: NSMenuItem!
@IBAction func showNamesClicked(_ sender: NSMenuItem) {
defaults.boolToggle("showNames")
Expand Down
3 changes: 2 additions & 1 deletion appcast.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
<description>
<![CDATA[
<ul>
<li>Added support for app autoupdate.</li>
<li>Added support for app autoupdate.
(Plus, "Check for updates" in Preferences)</li>
<li>Dropdown to the status menu by force-clicking on status icon
(Handful when you already clicked the icon but realized that you have the wrong account selected, so you put a bit more force and select the right one)</li>
<li>Open the status menu with <kbd>OPTION (⌥)</kbd> + <kbd>Click</kbd> on status icon</li>
Expand Down

0 comments on commit 0b314a6

Please sign in to comment.