Update status bar icon when toggle running.

This commit is contained in:
Charlie Qiu
2016-06-10 21:25:17 +08:00
parent bc12db75c9
commit 8d98e05a4d

View File

@ -273,13 +273,14 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
if isOn {
runningStatusMenuItem.title = "Shadowsocks: On".localized
toggleRunningMenuItem.title = "Close Shadowsocks".localized
let image = NSImage(named: "menu_icon")
statusItem.image = image
} else {
runningStatusMenuItem.title = "Shadowsocks: Off".localized
toggleRunningMenuItem.title = "Open Shadowsocks".localized
let image = NSImage(named: "menu_icon_disabled")
statusItem.image = image
}
}
func updateServersMenu() {