Fix name conflict on setTheme
This commit is contained in:
parent
cccc33c847
commit
263a7c5051
|
@ -16,7 +16,7 @@ class ASApplication: NSObject, NSApplicationDelegate {
|
|||
func applicationDidFinishLaunching(aNotification: NSNotification) {
|
||||
themeMenu.removeAllItems()
|
||||
for (index, theme) in enumerate(ACEThemeNames.humanThemeNames() as [NSString]) {
|
||||
let menuItem = themeMenu.addItemWithTitle(theme, action: "setTheme:", keyEquivalent: "")
|
||||
let menuItem = themeMenu.addItemWithTitle(theme, action: "changeTheme:", keyEquivalent: "")
|
||||
menuItem!.tag = index
|
||||
}
|
||||
keyboardMenu.removeAllItems()
|
||||
|
|
|
@ -186,7 +186,7 @@ class ASProjDoc: NSDocument, NSOutlineViewDelegate {
|
|||
|
||||
// MARK: Editor configuration
|
||||
|
||||
@IBAction func setTheme(item: NSMenuItem) {
|
||||
@IBAction func changeTheme(item: NSMenuItem) {
|
||||
currentTheme = UInt(item.tag)
|
||||
editor.setTheme(currentTheme)
|
||||
NSUserDefaults.standardUserDefaults().setObject(
|
||||
|
@ -202,7 +202,7 @@ class ASProjDoc: NSDocument, NSOutlineViewDelegate {
|
|||
|
||||
override func validateUserInterfaceItem(anItem: NSValidatedUserInterfaceItem) -> Bool {
|
||||
if let menuItem = anItem as? NSMenuItem {
|
||||
if menuItem.action == "setTheme:" {
|
||||
if menuItem.action == "changeTheme:" {
|
||||
menuItem.state = (menuItem.tag == Int(currentTheme) ? NSOnState : NSOffState)
|
||||
return true
|
||||
} else if menuItem.action == "changeKeyboardHandler:" {
|
||||
|
|
Loading…
Reference in New Issue
Block a user