Changeset 2339

Show
Ignore:
Timestamp:
08/06/08 12:59:12 (4 months ago)
Author:
bzr
Message:

Pop up the NVDA menu in the middle of the screen if activated other than by clicking on the system tray icon; e.g. by pressing NVDA+n. Previously, the menu always popped up at the current position of the mouse, which meant that it popped up in an unpredictable location. Ideally, we would pop up the menu at the position of the system tray icon, but this isn't currently possible. Note that the mouse is moved to the centre of the screen in order for this to occur. Closes #147.

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk

    • Property bzr:revision-id:v3-list-QlpoOTFBWSZTWbrL2vUAAB1VgAAQABCAQDrrnqAgAFCgaaGRkxBoTIJ6mmaNRwhndFAoNhZjh_YY4a01fOg1ulgNNC2UrzPdXXEnDpX8XckU4UJC6y9r1A..
      •  

        old new  
        1721722116 jamie@jantrid.net-20080728160225-9vhwmj9lt3413bk3 
        1731732129 jamie@jantrid.net-20080804030512-5uq6m5xmpay5hnjc 
         1742142 jamie@jantrid.net-20080806124925-tf7ysid43o0u8s32 
    • Property bzr:revision-info
      •  

        old new  
        1 timestamp: 2008-08-04 13:05:12.818000078 +1000 
         1timestamp: 2008-08-06 22:49:25.693000078 +1000 
        22committer: James Teh <jamie@jantrid.net> 
        33properties:  
        44        branch-nick: main 
         5        rebase-of: jamie@jantrid.net-20080806124925-1kn0a5on0w8u7za6 
  • trunk/source/gui/__init__.py

    r2319 r2339  
    2222import logViewer 
    2323import winUser 
     24import api 
    2425 
    2526### Constants 
     
    132133 
    133134        def onShowGuiCommand(self,evt): 
     135                # The menu pops up at the location of the mouse, which means it pops up at an unpredictable location. 
     136                # Therefore, move the mouse to the centre of the screen so that the menu will always pop up there. 
     137                left, top, width, height = api.getDesktopObject().location 
     138                x = width / 2 
     139                y = height / 2 
     140                winUser.setCursorPos(x, y) 
    134141                self.sysTrayIcon.onActivate(None) 
    135142