Add menu item "Edit User Rules For PAC..."
This commit is contained in:
@ -169,6 +169,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
|
||||
UpdatePACFromGFWList()
|
||||
}
|
||||
|
||||
@IBAction func editUserRulesForPAC(sender: NSMenuItem) {
|
||||
let url = NSURL(fileURLWithPath: PACUserRuleFilePath)
|
||||
NSWorkspace.sharedWorkspace().openURL(url)
|
||||
}
|
||||
|
||||
@IBAction func showQRCodeForCurrentServer(sender: NSMenuItem) {
|
||||
var errMsg: String?
|
||||
let mgr = ServerProfileManager()
|
||||
|
@ -77,6 +77,12 @@
|
||||
<action selector="updateGFWList:" target="Voe-Tx-rLC" id="Ztt-PS-F3T"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Edit User Rules For PAC..." id="rms-p0-CvB">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="editUserRulesForPAC:" target="Voe-Tx-rLC" id="ZtK-2d-Pcl"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="6sL-A4-S7N"/>
|
||||
<menuItem title="Show QR Code For Current Server..." id="R6A-96-Zcb">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
|
@ -110,7 +110,7 @@ func GeneratePACFile() -> Bool {
|
||||
}
|
||||
|
||||
func UpdatePACFromGFWList() {
|
||||
// Maker the dir if rulesDirPath is not exesited.
|
||||
// Make the dir if rulesDirPath is not exesited.
|
||||
if !NSFileManager.defaultManager().fileExistsAtPath(PACRulesDirPath) {
|
||||
do {
|
||||
try NSFileManager.defaultManager().createDirectoryAtPath(PACRulesDirPath
|
||||
|
Reference in New Issue
Block a user