sync
This commit is contained in:
parent
1922a47cb5
commit
721bc4a3b7
@ -33,18 +33,14 @@ class helpManager():
|
|||||||
try:
|
try:
|
||||||
self.env['bindings'] = self.bindingsBackup.copy()
|
self.env['bindings'] = self.bindingsBackup.copy()
|
||||||
self.bindingsBackup = None
|
self.bindingsBackup = None
|
||||||
#del(self.env['bindings'][str([1, ['KEY_ESC']])])
|
|
||||||
#del(self.env['bindings'][str([1, ['KEY_UP']])])
|
|
||||||
#del(self.env['bindings'][str([1, ['KEY_DOWN']])])
|
|
||||||
#del(self.env['bindings'][str([1, ['KEY_SPACE']])])
|
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
def isTutorialMode(self):
|
def isTutorialMode(self):
|
||||||
return self.env['general']['tutorialMode']
|
return self.env['general']['tutorialMode']
|
||||||
def getCommandHelpText(self, command, section = 'commands'):
|
def getCommandHelpText(self, command, section = 'commands'):
|
||||||
commandName = command.lower()
|
commandName = command.lower()
|
||||||
commandName = commandName.split('__-__')[0]
|
commandName = commandName.split('__-__')[0]
|
||||||
commandName = commandName.replace('_',' ')
|
commandName = commandName.replace('_',' ')
|
||||||
commandName = commandName.replace('_',' ')
|
commandName = commandName.replace('_',' ')
|
||||||
if command == 'TOGGLE_TUTORIAL_MODE':
|
if command == 'TOGGLE_TUTORIAL_MODE':
|
||||||
commandDescription = _('toggles the tutorial mode')
|
commandDescription = _('toggles the tutorial mode')
|
||||||
@ -54,22 +50,22 @@ class helpManager():
|
|||||||
commandDescription = 'no Description available'
|
commandDescription = 'no Description available'
|
||||||
commandShortcut = self.env['runtime']['commandManager'].getShortcutForCommand( command)
|
commandShortcut = self.env['runtime']['commandManager'].getShortcutForCommand( command)
|
||||||
commandShortcut = commandShortcut.replace('KEY_',' ')
|
commandShortcut = commandShortcut.replace('KEY_',' ')
|
||||||
commandShortcut = commandShortcut.replace('[','')
|
commandShortcut = commandShortcut.replace('[','')
|
||||||
commandShortcut = commandShortcut.replace(']','')
|
commandShortcut = commandShortcut.replace(']','')
|
||||||
commandShortcut = commandShortcut.replace("'",'')
|
commandShortcut = commandShortcut.replace("'",'')
|
||||||
if commandShortcut == '':
|
if commandShortcut == '':
|
||||||
commandShortcut = 'unbound'
|
commandShortcut = 'unbound'
|
||||||
helptext = commandName + ', Shortcut ' + commandShortcut + ', Description ' + commandDescription
|
helptext = commandName + ', Shortcut ' + commandShortcut + ', Description ' + commandDescription
|
||||||
return helptext
|
return helptext
|
||||||
def createHelpDict(self, section = 'commands'):
|
def createHelpDict(self, section = 'commands'):
|
||||||
self.helpDict = {}
|
self.helpDict = {}
|
||||||
for command in sorted(self.env['commands'][section].keys()):
|
for command in sorted(self.env['commands'][section].keys()):
|
||||||
self.helpDict[len(self.helpDict)] = self.getCommandHelpText(command, section)
|
self.helpDict[len(self.helpDict)] = self.getCommandHelpText(command, section)
|
||||||
if len(self.helpDict) > 0:
|
if len(self.helpDict) > 0:
|
||||||
self.tutorialListIndex = 0
|
self.tutorialListIndex = 0
|
||||||
else:
|
else:
|
||||||
self.tutorialListIndex = None
|
self.tutorialListIndex = None
|
||||||
def getHelpForCurrentIndex(self):
|
def getHelpForCurrentIndex(self):
|
||||||
if self.tutorialListIndex == None:
|
if self.tutorialListIndex == None:
|
||||||
return ''
|
return ''
|
||||||
return self.helpDict[self.tutorialListIndex]
|
return self.helpDict[self.tutorialListIndex]
|
||||||
|
@ -147,13 +147,6 @@ class vmenuManager():
|
|||||||
self.currIndex = None
|
self.currIndex = None
|
||||||
self.env['bindings'] = self.bindingsBackup.copy()
|
self.env['bindings'] = self.bindingsBackup.copy()
|
||||||
self.bindingsBackup = None
|
self.bindingsBackup = None
|
||||||
#del(self.env['bindings'][str([1, ['KEY_ESC']])])
|
|
||||||
#del(self.env['bindings'][str([1, ['KEY_UP']])])
|
|
||||||
#del(self.env['bindings'][str([1, ['KEY_DOWN']])])
|
|
||||||
#del(self.env['bindings'][str([1, ['KEY_SPACE']])])
|
|
||||||
#del(self.env['bindings'][str([1, ['KEY_LEFT']])])
|
|
||||||
#del(self.env['bindings'][str([1, ['KEY_RIGHT']])])
|
|
||||||
#del(self.env['bindings'][str([1, ['KEY_ENTER']])])
|
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
def createMenuTree(self):
|
def createMenuTree(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user