sync
This commit is contained in:
parent
5059013009
commit
9dc55f8897
@ -11,7 +11,6 @@ class command():
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
self.env['runtime']['memoryManager'].addIndexList('clipboardHistory', self.env['runtime']['settingsManager'].getSettingAsInt('general', 'numberOfClipboards'))
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
@ -19,9 +19,7 @@ class command():
|
||||
|
||||
def run(self):
|
||||
lastEcho = self.env['runtime']['outputManager'].getLastEcho()
|
||||
self.env['commandBuffer']['clipboard'] = [lastEcho] + self.env['commandBuffer']['clipboard'][:self.env['runtime']['settingsManager'].getSettingAsInt('general', 'numberOfClipboards') -1]
|
||||
self.env['commandBuffer']['currClipboard'] = 0
|
||||
|
||||
self.env['runtime']['memoryManager'].addValueToFirstIndex('clipboardHistory', lastEcho)
|
||||
self.env['runtime']['outputManager'].presentText(lastEcho, soundIcon='CopyToClipboard', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
@ -29,12 +29,10 @@ class command():
|
||||
endMark = self.env['commandBuffer']['Marks']['2'].copy()
|
||||
|
||||
marked = mark_utils.getTextBetweenMarks(startMark, endMark, self.env['screen']['newContentText'])
|
||||
|
||||
self.env['commandBuffer']['clipboard'] = [marked] + self.env['commandBuffer']['clipboard'][:self.env['runtime']['settingsManager'].getSettingAsInt('general', 'numberOfClipboards') -1]
|
||||
self.env['commandBuffer']['currClipboard'] = 0
|
||||
self.env['runtime']['memoryManager'].addValueToFirstIndex('clipboardHistory', marked)
|
||||
# reset marks
|
||||
self.env['runtime']['cursorManager'].clearMarks()
|
||||
|
||||
self.env['runtime']['cursorManager'].clearMarks()
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(marked, soundIcon='CopyToClipboard', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
@ -17,10 +17,11 @@ class command():
|
||||
return _('speaks the contents of the currently selected clipboard')
|
||||
|
||||
def run(self):
|
||||
if len(self.env['commandBuffer']['clipboard']) == 0:
|
||||
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
|
||||
return
|
||||
self.env['runtime']['outputManager'].presentText(self.env['commandBuffer']['clipboard'][self.env['commandBuffer']['currClipboard']], interrupt=True)
|
||||
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
|
||||
self.env['runtime']['outputManager'].presentText(clipboard , interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -12,6 +12,7 @@ class command():
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
self.env['runtime']['memoryManager'].addIndexList('clipboardHistory', self.env['runtime']['settingsManager'].getSettingAsInt('general', 'numberOfClipboards'))
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
|
Loading…
Reference in New Issue
Block a user