33#A part of NonVisual Desktop Access (NVDA)
44#This file is covered by the GNU General Public License.
55#See the file COPYING for more details.
6- #Copyright (C) 2006-2018 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee, Leonard de Ruijter, Derek Riemer, Babbage B.V., Davy Kager, Ethan Holliger, Łukasz Golonka
6+ #Copyright (C) 2006-2020 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee, Leonard de Ruijter, Derek Riemer, Babbage B.V., Davy Kager, Ethan Holliger, Łukasz Golonka, Accessolutions, Julien Cochuyt
77
88import time
99import itertools
@@ -1618,6 +1618,42 @@ def script_navigatorObject_devInfo(self,gesture):
16181618 script_navigatorObject_devInfo .__doc__ = _ ("Logs information about the current navigator object which is useful to developers and activates the log viewer so the information can be examined." )
16191619 script_navigatorObject_devInfo .category = SCRCAT_TOOLS
16201620
1621+ @script (
1622+ # Translators: Input help mode message for a command to delimit then
1623+ # copy a fragment of the log to clipboard
1624+ description = _ (
1625+ "Mark the current end of the log as the start of the fragment to be"
1626+ " copied to clipboard by pressing again."
1627+ ),
1628+ category = SCRCAT_TOOLS ,
1629+ gesture = "kb:NVDA+control+shift+f1"
1630+ )
1631+ def script_log_markStartThenCopy (self , gesture ):
1632+ if globalVars .appArgs .secure :
1633+ return
1634+ if log .fragmentStart is None :
1635+ if log .markFragmentStart ():
1636+ # Translators: Message when marking the start of a fragment of the log file for later copy
1637+ # to clipboard
1638+ ui .message (_ ("Log fragment start position marked, press again to copy to clipboard" ))
1639+ else :
1640+ # Translators: Message when failed to mark the start of a
1641+ # fragment of the log file for later copy to clipboard
1642+ ui .message (_ ("Unable to mark log position" ))
1643+ return
1644+ text = log .getFragment ()
1645+ if not text :
1646+ # Translators: Message when attempting to copy an empty fragment of the log file
1647+ ui .message (_ ("No new log entry to copy" ))
1648+ return
1649+ if api .copyToClip (text ):
1650+ # Translators: Message when a fragment of the log file has been
1651+ # copied to clipboard
1652+ ui .message (_ ("Log fragment copied to clipboard" ))
1653+ else :
1654+ # Translators: Presented when unable to copy to the clipboard because of an error.
1655+ ui .message (_ ("Unable to copy" ))
1656+
16211657 @script (
16221658 # Translators: Input help mode message for Open user configuration directory command.
16231659 description = _ ("Opens NVDA configuration directory for the current user." ),
@@ -1628,6 +1664,7 @@ def script_openUserConfigurationDirectory(self, gesture):
16281664 return
16291665 import systemUtils
16301666 systemUtils .openUserConfigurationDirectory ()
1667+ > >> >> >> master
16311668
16321669 def script_toggleProgressBarOutput (self ,gesture ):
16331670 outputMode = config .conf ["presentation" ]["progressBarUpdates" ]["progressBarOutputMode" ]
0 commit comments