Changeset 2466

Show
Ignore:
Timestamp:
11/04/08 00:54:24 (8 months ago)
Author:
bzr
Message:
  • Add a command (NVDA+c) to report the text on the Windows clipboard. Patch by Aleksey Sadovoy with modifications by me. Closes #193.
  • Updated Aleksey's entry in contributors.
Location:
trunk
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • trunk

    • Property bzr:revision-info
      •  

        old new  
        1 timestamp: 2008-11-04 10:27:27.819000006 +1000 
         1timestamp: 2008-11-04 10:51:45.128000021 +1000 
        22committer: James Teh <jamie@jantrid.net> 
        33properties:  
    • Property bzr:revision-id:v3-list-QlpoOTFBWSZTWbrL2vUAAB1VgAAQABCAQDrrnqAgAFCgaaGRkxBoTIJ6mmaNRwhndFAoNhZjh_YY4a01fOg1ulgNNC2UrzPdXXEnDpX8XckU4UJC6y9r1A..
      •  

        old new  
        2352352263 peter.v@datagate.sk-20081102173223-8wqvjgvcjz2kzrlw 
        2362362264 jamie@jantrid.net-20081104002727-f1ta1nr5a5p45ba0 
         2372265 jamie@jantrid.net-20081104005145-d5zkn1d8te4kvezj 
    • Property bzr:file-ids
      •  

        old new  
         1contributors.txt        198@dbe06fc7-9119-0410-a01d-9dbf589ecbba:trunk:contributers.txt 
         2source/api.py   46@dbe06fc7-9119-0410-a01d-9dbf589ecbba:trunk:source%2Fapi.py 
         3source/appModules/_default.py   92@dbe06fc7-9119-0410-a01d-9dbf589ecbba:trunk:source%2FappModules%2F_default.py 
         4source/appModules/_default_desktop.kbd  250@dbe06fc7-9119-0410-a01d-9dbf589ecbba:trunk:source%2FappModules%2F_default_desktop.kbd 
         5source/appModules/_default_laptop.kbd   1990@dbe06fc7-9119-0410-a01d-9dbf589ecbba:trunk:source%2FappModules%2F_default_laptop.kbd 
        16user_docs/whats%20new.txt       559@dbe06fc7-9119-0410-a01d-9dbf589ecbba:trunk:user_docs%2Fwhats%20new.txt 
  • trunk/contributors.txt

    r2437 r2466  
    3333DOROTA CZAJKA <do.ska@aster.pl> - Polish language file 
    3434Diogo Costa <diogojoca@gmail.com> - Portuguese translation 
    35 Aleksey Sadovoy <aleksey_s@voliacable.com> - ukrainian language files, spelling on double keypresses and other various patches 
     35Aleksey Sadovoy <lex@onm.su> - ukrainian language files, other various patches 
    3636Katsutoshi Tsuji <tsuji-katsutoshi@mitsue.co.jp> - Japanese language files 
    3737Amorn Kiattikhunrat <ezkudo@hotmail.com> - Thai language files 
  • trunk/source/api.py

    r2436 r2466  
    281281        return False 
    282282 
     283def getClipData(): 
     284        """Receives text from the windows clipboard. 
     285@returns: Clipboard text 
     286@rtype: string 
     287""" 
     288        text = "" 
     289        win32clipboard.OpenClipboard() 
     290        try: 
     291                text = win32clipboard.GetClipboardData(win32con.CF_UNICODETEXT) 
     292        finally: 
     293                win32clipboard.CloseClipboard() 
     294        return text 
     295 
    283296def getStatusBar(): 
    284297        """Obtain the status bar for the current foreground object. 
  • trunk/source/appModules/_default.py

    r2436 r2466  
    821821                ui.message(_("Braille tethered to %s") % tetherMsg) 
    822822        script_braille_toggleTether.__doc__ = _("Toggle tethering of braille between the focus and the review position") 
     823 
     824        def script_reportClipboardText(self,keyPress): 
     825                try: 
     826                        text = api.getClipData() 
     827                except: 
     828                        text = None 
     829                if not text or not isinstance(text,basestring) or text.isspace(): 
     830                        ui.message(_("There is no text on the clipboard")) 
     831                        return 
     832                if len(text) < 1024:  
     833                        ui.message(text) 
     834                else: 
     835                        ui.message(_("The clipboard contains a large portion of text. It is %s characters long") % len(text)) 
     836        script_reportClipboardText.__doc__ = _("Reports the text on the Windows clipboard") 
  • trunk/source/appModules/_default_desktop.kbd

    r2436 r2466  
    8181multiply=rightMouseClick 
    8282NVDA+control+t=braille_toggleTether 
     83NVDA+c=reportClipboardText 
  • trunk/source/appModules/_default_laptop.kbd

    r2151 r2466  
    120120Control+NVDA+r=revertToSavedConfiguration 
    121121Control+NVDA+z=activatePythonConsole 
     122NVDA+c=reportClipboardText 
  • trunk/user_docs/whats new.txt

    r2465 r2466  
    4242* new: Support for braille displays! 
    4343* new: In Microsoft Excel, pressing f2 to edit a cell now presents an NVDA dialog to edit the cell's content. Previously, there was no accessible way to edit a cell in Excel with NVDA. This is a temporary solution until NVDA has display hooks which can track the cursor and text in Excel's formula bar. 
     44* new: Added a command (NVDA+c) to report the text on the Windows clipboard. (#193) 
    4445 
    4546