Skip to content

Commit

Permalink
Get rid of error message in Console by calling proper editSettings me…
Browse files Browse the repository at this point in the history
…thod.
  • Loading branch information
raquelalegre committed Mar 9, 2016
1 parent 70eb778 commit fec8775
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions python/nammu/view/MenuView.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from java.awt.event import KeyEvent

class MenuView(JMenuBar):
def __init__(self, controller):

def __init__(self, controller):
#Save reference to controller to handle events
self.controller = controller

Expand Down Expand Up @@ -44,33 +44,33 @@ def __init__(self, controller):
menuItems["File"]["Save"] = [KeyEvent.VK_S, "saveFile"]
menuItems["File"]["Close"] = [KeyEvent.VK_W, "closeFile"]
menuItems["File"]["Print"] = [KeyEvent.VK_P, "printFile"]
menuItems["File"]["Quit"] = [KeyEvent.VK_Q, "quit"]
menuItems["File"]["Quit"] = [KeyEvent.VK_Q, "quit"]

menuItems["Edit"] = {}
menuItems["Edit"] = collections.OrderedDict()
menuItems["Edit"]["Undo"] = [KeyEvent.VK_Z, "undo"]
menuItems["Edit"]["Redo"] = [KeyEvent.VK_R, "redo"]
menuItems["Edit"]["Copy"] = [KeyEvent.VK_C, "copy"]
menuItems["Edit"]["Cut"] = [KeyEvent.VK_X, "cut"]
menuItems["Edit"]["Paste"] = [KeyEvent.VK_V, "paste"]
menuItems["Edit"]["Paste"] = [KeyEvent.VK_V, "paste"]

menuItems["ATF"] = {}
menuItems["ATF"] = collections.OrderedDict()
menuItems["ATF"]["Validate"] = [KeyEvent.VK_D, "validate"]
menuItems["ATF"]["Lemmatise"] = [KeyEvent.VK_L, "lemmatise"]
menuItems["ATF"]["Lemmatise"] = [KeyEvent.VK_L, "lemmatise"]

menuItems["Window"] = {}
menuItems["Window"] = collections.OrderedDict()
menuItems["Window"]["Display Model View"] = [KeyEvent.VK_M, "displayModelView"]
menuItems["Window"]["View/Hide Console"] = [KeyEvent.VK_B, "console"]
menuItems["Window"]["View/Hide Toolbar"] = [KeyEvent.VK_T, "toolbar"]
menuItems["Window"]["Unicode Keyboard"] = [KeyEvent.VK_K, "unicode"]
menuItems["Window"]["Unicode Keyboard"] = [KeyEvent.VK_K, "unicode"]

menuItems["Help"] = {}
menuItems["Help"] = collections.OrderedDict()
menuItems["Help"]["Settings"] = [KeyEvent.VK_E, "settings"]
menuItems["Help"]["Settings"] = [KeyEvent.VK_E, "editSettings"]
menuItems["Help"]["Help"] = [KeyEvent.VK_H, "showHelp"]
menuItems["Help"]["About"] = [KeyEvent.VK_A, "showAbout"]
menuItems["Help"]["About"] = [KeyEvent.VK_A, "showAbout"]

#Menu Items after which there is a menu separator
separators = { "File": ["Close", "Print"],
Expand All @@ -88,5 +88,3 @@ def __init__(self, controller):
#Delegate methods not found here to view controller
def __getattr__(self, name):
return getattr(self.controller, name)


0 comments on commit fec8775

Please sign in to comment.