OSDN Git Service

Allow the NVDA desktop shortcut (and therefore ctrl+alt+n) to restart NVDA if its...
authorMichael Curran <mick@kulgan.net>
Fri, 10 Sep 2010 06:02:29 +0000 (16:02 +1000)
committerMichael Curran <mick@kulgan.net>
Fri, 10 Sep 2010 06:02:29 +0000 (16:02 +1000)
installer/nvda.nsi
source/nvda_slave.pyw

index a3d317d..a867182 100644 (file)
@@ -242,7 +242,7 @@ ExecWait "$INSTDIR\nvda_slave.exe installer_installService"
 SectionEnd\r
 \r
 section "$(section_desktopShortcut)"\r
-CreateShortCut "$DESKTOP\${PRODUCT}.lnk" "$INSTDIR\${PRODUCT}.exe" "-r" "$INSTDIR\${PRODUCT}.exe" 0 SW_SHOWNORMAL \\r
+CreateShortCut "$DESKTOP\${PRODUCT}.lnk" "$INSTDIR\nvda_slave.exe" "launchNVDA -r" "$INSTDIR\${PRODUCT}.exe" 0 SW_SHOWNORMAL \\r
  CONTROL|ALT|N "Shortcut Ctrl+Alt+N"\r
 SectionEnd\r
 \r
index c989511..682a9ca 100755 (executable)
@@ -19,6 +19,9 @@ def main():
                if action == "service_NVDALauncher":\r
                        import nvda_service\r
                        nvda_service.nvdaLauncher()\r
+               elif action=="launchNVDA":\r
+                       import subprocess\r
+                       subprocess.Popen([r"%s\nvda.exe"%sys.exec_prefix]+args)\r
                elif action=="setNvdaSystemConfig":\r
                        import config\r
                        config._setSystemConfig(args[0])\r