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) {
|
func applicationDidFinishLaunching(aNotification: NSNotification) {
|
||||||
themeMenu.removeAllItems()
|
themeMenu.removeAllItems()
|
||||||
for (index, theme) in enumerate(ACEThemeNames.humanThemeNames() as [NSString]) {
|
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
|
menuItem!.tag = index
|
||||||
}
|
}
|
||||||
keyboardMenu.removeAllItems()
|
keyboardMenu.removeAllItems()
|
||||||
|
|
|
@ -186,7 +186,7 @@ class ASProjDoc: NSDocument, NSOutlineViewDelegate {
|
||||||
|
|
||||||
// MARK: Editor configuration
|
// MARK: Editor configuration
|
||||||
|
|
||||||
@IBAction func setTheme(item: NSMenuItem) {
|
@IBAction func changeTheme(item: NSMenuItem) {
|
||||||
currentTheme = UInt(item.tag)
|
currentTheme = UInt(item.tag)
|
||||||
editor.setTheme(currentTheme)
|
editor.setTheme(currentTheme)
|
||||||
NSUserDefaults.standardUserDefaults().setObject(
|
NSUserDefaults.standardUserDefaults().setObject(
|
||||||
|
@ -202,7 +202,7 @@ class ASProjDoc: NSDocument, NSOutlineViewDelegate {
|
||||||
|
|
||||||
override func validateUserInterfaceItem(anItem: NSValidatedUserInterfaceItem) -> Bool {
|
override func validateUserInterfaceItem(anItem: NSValidatedUserInterfaceItem) -> Bool {
|
||||||
if let menuItem = anItem as? NSMenuItem {
|
if let menuItem = anItem as? NSMenuItem {
|
||||||
if menuItem.action == "setTheme:" {
|
if menuItem.action == "changeTheme:" {
|
||||||
menuItem.state = (menuItem.tag == Int(currentTheme) ? NSOnState : NSOffState)
|
menuItem.state = (menuItem.tag == Int(currentTheme) ? NSOnState : NSOffState)
|
||||||
return true
|
return true
|
||||||
} else if menuItem.action == "changeKeyboardHandler:" {
|
} else if menuItem.action == "changeKeyboardHandler:" {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user