From 263a7c5051cce8765818263d6e903481a6e52405 Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Mon, 17 Nov 2014 05:53:33 +0100 Subject: [PATCH] Fix name conflict on setTheme --- AVRsack/ASApplication.swift | 2 +- AVRsack/ASProjDoc.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AVRsack/ASApplication.swift b/AVRsack/ASApplication.swift index 80ebeb5..5e7db02 100644 --- a/AVRsack/ASApplication.swift +++ b/AVRsack/ASApplication.swift @@ -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() diff --git a/AVRsack/ASProjDoc.swift b/AVRsack/ASProjDoc.swift index 7fb9b05..9838868 100644 --- a/AVRsack/ASProjDoc.swift +++ b/AVRsack/ASProjDoc.swift @@ -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:" {