fix bookmark

This commit is contained in:
chrys 2016-09-24 03:25:46 +02:00
parent 4500ca76aa
commit f9ff3eeed3
3 changed files with 5 additions and 3 deletions

View File

@ -79,7 +79,7 @@ device=all
grabDevices=True grabDevices=True
ignoreShortcuts=False ignoreShortcuts=False
# the current shortcut layout located in /etc/fenrir/keyboard # the current shortcut layout located in /etc/fenrir/keyboard
keyboardLayout=desktop keyboardLayout=test
# echo chars while typing. # echo chars while typing.
charEcho=False charEcho=False
# echo deleted chars # echo deleted chars

View File

@ -17,7 +17,7 @@ class command():
return 'remove Bookmark ' + self.ID return 'remove Bookmark ' + self.ID
def run(self): def run(self):
currApp = self.environment['runtime']['applicationManager'].getCurrentApplication() currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
del self.env['commandBuffer']['bookMarks'][self.ID][currApp] del self.env['commandBuffer']['bookMarks'][self.ID][currApp]

View File

@ -21,12 +21,14 @@ class command():
if not self.env['commandBuffer']['Marks']['1']: if not self.env['commandBuffer']['Marks']['1']:
self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True) self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True)
return return
currApp = self.environment['runtime']['applicationManager'].getCurrentApplication() currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {} self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {}
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'] = self.env['commandBuffer']['Marks']['1'].copy() self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'] = self.env['commandBuffer']['Marks']['1'].copy()
if self.env['commandBuffer']['Marks']['2']: if self.env['commandBuffer']['Marks']['2']:
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy() self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy()
else:
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = None
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True) self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True)
self.env['commandBuffer']['Marks']['1'] = None self.env['commandBuffer']['Marks']['1'] = None
self.env['commandBuffer']['Marks']['2'] = None self.env['commandBuffer']['Marks']['2'] = None