Merge branch 'master' of github.com:chrys87/fenrir

This commit is contained in:
Chrys 2019-04-27 16:25:00 +02:00
commit 955ee74b47
2 changed files with 12 additions and 3 deletions

View File

@ -38,7 +38,7 @@ class fenrirManager():
parser.add_argument('-o', '--options', metavar='SECTION#SETTING=VALUE;..', default='', help='Overwrite options in given settings file. Sections, settings and Values are cases sensitive')
parser.add_argument('-d', '--debug', action='store_true', help='Turns on Debugmode')
parser.add_argument('-p', '--print', action='store_true', help='Print debug messages on screen')
parser.add_argument('-e', '--emulated-pty', action='store_true', help='Use PTY emulation and escape sequences for input')
parser.add_argument('-e', '--emulated-pty', action='store_true', help=' se PTY emulation and escape sequences for input. Allows to use fenrir on the desktop, in a terminal for X or Wayland')
parser.add_argument('-E', '--emulated-evdev', action='store_true', help='Use PTY emulation and evdev for input (single instance)')
try:
args = parser.parse_args()

View File

@ -146,11 +146,20 @@ class vmenuManager():
self.env['bindings'] = self.env['runtime']['settingsManager'].getBindingBackup()
except:
pass
def createMenuTree(self):
self.currIndex = None
def createMenuTree(self, resetIndex = True):
if resetIndex:
self.currIndex = None
menu = self.fs_tree_to_dict( self.defaultVMenuPath)
if menu:
self.menuDict = menu
# index still valid?
if self.currIndex != None:
try:
r = self.getValueByPath(self.menuDict, self.currIndex)
if r == {}:
self.currIndex = None
except:
self.currIndex = None
def executeMenu(self):
if self.currIndex == None:
return