Browse Source

MOS-8 Rename menuitems properties.

MOS-8
David Alarcon 2 years ago
parent
commit
9be7483f4d
2 changed files with 13 additions and 14 deletions
  1. +8
    -8
      Submodules/pEpNotifications/pEpNotifications/AppDelegate.swift
  2. +5
    -6
      Submodules/pEpNotifications/pEpNotifications/Base.lproj/Main.storyboard

+ 8
- 8
Submodules/pEpNotifications/pEpNotifications/AppDelegate.swift View File

@ -27,9 +27,9 @@ class AppDelegate: NSObject {
@IBOutlet weak var pEpMenu: NSMenu!
@IBOutlet weak var statusText: NSMenuItem!
@IBOutlet weak var _updateNow: NSMenuItem!
@IBOutlet weak var _scheduleUpdates: NSMenuItem!
@IBOutlet weak var _alwaysShowThisMenu: NSMenuItem!
@IBOutlet weak var updateNowMenuItem: NSMenuItem!
@IBOutlet weak var scheduleUpdatesMenuItem: NSMenuItem!
@IBOutlet weak var alwaysShowThisMenuMenuItem: NSMenuItem!
// MARK: - Properties
@ -93,10 +93,10 @@ extension AppDelegate {
let appDefaults = ["ScheduleUpdates": true, "AlwaysShowThisMenu": false]
UserDefaults.standard.register(defaults: appDefaults)
if UserDefaults.standard.bool(forKey: "AlwaysShowThisMenu") {
_alwaysShowThisMenu.state = NSControl.StateValue.on
alwaysShowThisMenuMenuItem.state = NSControl.StateValue.on
installMenuExtra()
} else {
_alwaysShowThisMenu.state = NSControl.StateValue.off
alwaysShowThisMenuMenuItem.state = NSControl.StateValue.off
}
}
@ -115,11 +115,11 @@ extension AppDelegate {
service?.subscribeForUpdate(clientListener.endpoint)
if UserDefaults.standard.bool(forKey: "ScheduleUpdates") {
service?.scheduleUpdates()
_scheduleUpdates.state = NSControl.StateValue.on
scheduleUpdatesMenuItem.state = NSControl.StateValue.on
}
else {
service?.stopUpdates()
_scheduleUpdates.state = NSControl.StateValue.off
scheduleUpdatesMenuItem.state = NSControl.StateValue.off
}
}
@ -157,7 +157,7 @@ extension AppDelegate {
statusBarItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.squareLength)
statusBarItem?.button?.title = "p≡p"
statusBarItem?.menu = NSApp.menu?.item(at: 0)?.submenu
_updateNow.action = #selector(updateNow)
updateNowMenuItem.action = #selector(updateNow)
}
private func uninstallMenuExtra() {


+ 5
- 6
Submodules/pEpNotifications/pEpNotifications/Base.lproj/Main.storyboard View File

@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="16097" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16097"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17156"/>
</dependencies>
<scenes>
<!--Application-->
@ -54,11 +53,11 @@
</application>
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="pEp_updater" customModuleProvider="target">
<connections>
<outlet property="_alwaysShowThisMenu" destination="u5e-3R-3lT" id="cw9-oL-BVd"/>
<outlet property="_scheduleUpdates" destination="y9Y-ru-Qxs" id="JEY-Hx-pbv"/>
<outlet property="_updateNow" destination="aUJ-VR-2jH" id="34x-R2-L4V"/>
<outlet property="alwaysShowThisMenuMenuItem" destination="u5e-3R-3lT" id="cw9-oL-BVd"/>
<outlet property="pEpMenu" destination="uQy-DD-JDr" id="SSj-Qs-zAq"/>
<outlet property="scheduleUpdatesMenuItem" destination="y9Y-ru-Qxs" id="JEY-Hx-pbv"/>
<outlet property="statusText" destination="D45-AS-mhG" id="PNv-G8-o8P"/>
<outlet property="updateNowMenuItem" destination="aUJ-VR-2jH" id="34x-R2-L4V"/>
</connections>
</customObject>
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>


Loading…
Cancel
Save