Update status bar icon when toggle running.
This commit is contained in:
@ -273,13 +273,14 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
|
|||||||
if isOn {
|
if isOn {
|
||||||
runningStatusMenuItem.title = "Shadowsocks: On".localized
|
runningStatusMenuItem.title = "Shadowsocks: On".localized
|
||||||
toggleRunningMenuItem.title = "Close Shadowsocks".localized
|
toggleRunningMenuItem.title = "Close Shadowsocks".localized
|
||||||
|
let image = NSImage(named: "menu_icon")
|
||||||
|
statusItem.image = image
|
||||||
} else {
|
} else {
|
||||||
runningStatusMenuItem.title = "Shadowsocks: Off".localized
|
runningStatusMenuItem.title = "Shadowsocks: Off".localized
|
||||||
toggleRunningMenuItem.title = "Open Shadowsocks".localized
|
toggleRunningMenuItem.title = "Open Shadowsocks".localized
|
||||||
|
let image = NSImage(named: "menu_icon_disabled")
|
||||||
|
statusItem.image = image
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateServersMenu() {
|
func updateServersMenu() {
|
||||||
|
Reference in New Issue
Block a user