OSDN Git Service

nvdajp/nvdajp.git
12 years agoMerged addon-packaging branch.
Michael Curran [Tue, 8 May 2012 04:43:50 +0000 (14:43 +1000)]
Merged addon-packaging branch.
You can now install and uninstall special add-on packages (.nvda-addon files) for NVDA that provide custom app modules, global plugins, braille display drivers and synth drivers. The Manage Add-ons menu item can be found under Tools in the NVDA menu. The User guide provides more info about the Add-ons manager, and the developer guide provides info on how to create these packages for distribution.

12 years agoaddonGui: Change the term bundle to package, as it's more user friendly.
James Teh [Tue, 8 May 2012 03:42:40 +0000 (13:42 +1000)]
addonGui: Change the term bundle to package, as it's more user friendly.

12 years agoMinor documentation changes.
James Teh [Tue, 8 May 2012 01:47:05 +0000 (11:47 +1000)]
Minor documentation changes.

12 years agogui: Rename Tools -> Add-ons Manage to Manage add-ons.
James Teh [Tue, 8 May 2012 01:43:43 +0000 (11:43 +1000)]
gui: Rename Tools -> Add-ons Manage to Manage add-ons.

12 years agoaddonGui: Don't use title capitalisation for the "About Add-on" button.
James Teh [Tue, 8 May 2012 00:54:59 +0000 (10:54 +1000)]
addonGui: Don't use title capitalisation for the "About Add-on" button.

12 years agoaddonHandler: move state.pickle out of the addons directory and call it addonsState...
Michael Curran [Tue, 8 May 2012 00:13:59 +0000 (10:13 +1000)]
addonHandler:  move state.pickle out of the addons directory and call it addonsState.pickle. This allows quick checking of the addons directory for any content to work out if there are addons or not. General settings dialog's copy settings button:  also check the addons directory when working out if there are custom plugins that will be copied.

12 years agoRebrand addons as add-ons in the GUI and documentation.
Michael Curran [Tue, 8 May 2012 00:00:47 +0000 (10:00 +1000)]
Rebrand addons as add-ons in the GUI and documentation.

12 years agoFix two spelling mistakes in user guide
Michael Curran [Mon, 7 May 2012 22:00:11 +0000 (08:00 +1000)]
Fix two spelling mistakes in user guide

12 years agoCorrect serious bug in addonHandler.getCodeAddon that caused an infinit loop when...
rui Batista [Mon, 7 May 2012 13:59:51 +0000 (14:59 +0100)]
Correct serious bug in addonHandler.getCodeAddon that caused an infinit loop when addonHandler.initTranslation was called.

* the curdir variable _must_ be updated for the loop to take effect (I'm almost sure I did write that line...).

12 years agoInstaller GUI: Make sure to set create desktop shortut and run at window logon both...
Michael Curran [Mon, 7 May 2012 11:03:43 +0000 (21:03 +1000)]
Installer GUI: Make sure to set create desktop shortut and run at window logon both to true by default if no previous install of NVDA exists. also if a previous copy is being updated, and it was not previously installed to NVDA's new instal path in Program Files, then let the user know with an extra sentence in the installer dialog. Fixes #2302.

12 years agoEnglish user guide: added a section explaining the Addons manager, under the Extra...
Michael Curran [Mon, 7 May 2012 08:35:50 +0000 (18:35 +1000)]
English user guide: added a section explaining the Addons manager, under the Extra tools section.

12 years agoUpdated english Changes file to mention addons
Michael Curran [Mon, 7 May 2012 08:12:42 +0000 (18:12 +1000)]
Updated english Changes file to mention addons

12 years agodeveloper guide: add sections about how to create addons by hand.
Michael Curran [Mon, 7 May 2012 07:16:00 +0000 (17:16 +1000)]
developer guide: add sections about how to create addons by hand.

12 years agoHandle the situation where files are locked (probably due to loaded c extensions...
Michael Curran [Mon, 7 May 2012 07:11:39 +0000 (17:11 +1000)]
Handle the situation where files are locked (probably due to loaded c extensions or dlls in the addon's installTasks.py) when an addon tries to get completely removed (this includes if the installation failes). Now the directory will be renamed to a temp name with a '.delete' extension and removed on NVDA restart. Hopefully this should never happen, but its certainly possible.

12 years agoaddonHandler.Addon.isPendingRemove: don't check for this addon in removesSet if isPen...
Michael Curran [Mon, 7 May 2012 04:19:26 +0000 (14:19 +1000)]
addonHandler.Addon.isPendingRemove: don't check for this addon in removesSet if isPendingInstall is true. Allows r full removal of a pending installed package, even if another addon with the same name is still marked for removal.

12 years agoAdd the ability for addons to run code at install/uninstall time, and simplify addons...
Michael Curran [Mon, 7 May 2012 03:57:48 +0000 (13:57 +1000)]
Add the ability for addons to run code at install/uninstall time, and simplify addons in general by removing a few features, at least for 2012.2.
Specific changes:
* Add the concept of install tasks, which are functions  in an addon that will be run at install/uninstall time. onInstall and onUninstall can be defined in the addon's installTasks.py. onInstall will be run after the addon has been copied in to nvda as a pending install, but if the function raises an exception, then the installation will fail. onUninstall is called on NVDA restart after an addon has been marked for removal and just before its directory is deleted. Note that installTasks.py should not load any addon-specific python c extensions or load dlls etc as removal may then fail. This should only be used for copying/removing files or for validating licenses or other info.
* Remove the existing hook implementation for addons for now. There were a few problems such as it loading the hooksModule too early, and possibilities that unLoad may have been never called due to incorrect state. We may eventually have something similar, but probably not for 2012.2. For general initialization/termination code, this could be placed in a global plugin.
* Rename Addon.isLoaded to isRunning to match getRunningAddons and the GUI, and reimplement it simply as being true if isPendingInstall is false. Also remove Addon.load and Addon.unload. This now therefore means any addon that is not currently being installed must be running as its packages are available to the rest of NVDA.
* addonHandler._availableAddons is now an ordered dictionary, and installAddonBundle manually adds the new addon to it. this is so that the GUI can guarantee some kind of predictable order when refreshing or adding to its list of addons.
* addon GUI: don't call getAvailableAddons with refresh=True any more as its no longer needed.
* Addon GUI: rename the 'new' and 'removed' addon status translatable strings to 'install' and 'remove' respectivly to make it a little clearer that the action isn't actually complete yet.
* Addon GUI: Try to select the most appropriate addon in the list after an action completes.
* core: Initialize addonHandler before appModuleHandler.

12 years agoMake two more messages consistant.
Mesar Hameed [Fri, 4 May 2012 09:33:35 +0000 (10:33 +0100)]
Make two more messages consistant.

12 years agoinstaller.py: now consistant with gui/__init__.py, have the exact same naming/capitil...
Mesar Hameed [Fri, 4 May 2012 09:04:30 +0000 (10:04 +0100)]
installer.py: now consistant with gui/__init__.py, have the exact same naming/capitilization for 'Keyboard command quick reference'

12 years agosconstruct: Remove backwards compatibility aliases for the launcher target.
James Teh [Fri, 4 May 2012 02:59:56 +0000 (12:59 +1000)]
sconstruct: Remove backwards compatibility aliases for the launcher target.

12 years agoUpdate bzr ignores.
James Teh [Fri, 4 May 2012 02:55:13 +0000 (12:55 +1000)]
Update bzr ignores.

12 years agolauncher: Look for nvda_logo.wav in the launcher directory instead of installer/waves.
James Teh [Fri, 4 May 2012 02:54:59 +0000 (12:54 +1000)]
launcher: Look for nvda_logo.wav in the launcher directory instead of installer/waves.
This means the installer directory is no longer needed and has been removed.
People running from source will need to manually move this file. A new nvda-media archive has been created which includes the file in the right place.

12 years agoLauncher: extract the launcher wave file in to the plugin dir itself, rather than...
Michael Curran [Fri, 4 May 2012 00:20:52 +0000 (10:20 +1000)]
Launcher: extract the launcher wave file in to the plugin dir itself, rather than the app subdir where NVDA is extracted. Makes sure that the wave file is not accidentilly  copied when installing / creating a portable copy.

12 years agoAdd comment.
James Teh [Thu, 3 May 2012 07:49:57 +0000 (17:49 +1000)]
Add comment.

12 years agoupdateCheck.UpdateDownloader:
James Teh [Thu, 3 May 2012 07:42:36 +0000 (17:42 +1000)]
updateCheck.UpdateDownloader:
* Make the timer a one-shot timer as it was meant to be, rather than a repeating timer. This could cause exceptions on completion and probably other problems. Oops!
* Set the wx.PD_AUTO_HIDE style on the progress dialog. Otherwise, the ProgressDialog.Update call blocks at 100% until the user presses the Close button.

12 years agoIn browse mode in applications using Mozilla Gecko 14 and later (e.g. Firefox 14...
James Teh [Thu, 3 May 2012 01:06:02 +0000 (11:06 +1000)]
In browse mode in applications using Mozilla Gecko 14 and later (e.g. Firefox 14), quick navigation now works for block quotes and embedded objects.
The problem was that in Gecko < 14, the value of the tag object attribute is upper case, whereas it is lower case in Gecko >= 14. The latter is more consistent with the rest of Gecko (and Chrome does this too), so the code considers Gecko < 14 to be the abnormal case, even though 14 hasn't been released yet.
Fixes #2287.

12 years agoNVDAObjects.IAccessible.mozilla: Remove the _ prefix on _getGeckoVersion, as external...
James Teh [Thu, 3 May 2012 01:05:22 +0000 (11:05 +1000)]
NVDAObjects.IAccessible.mozilla: Remove the _ prefix on _getGeckoVersion, as external code may well use it in future. It now returns a namedtuple containing the full version string and the major version number as an int to make comparison easier.

12 years agoIn addon manifest convert all strings to unicode (translated and untranslated) using...
rui Batista [Wed, 2 May 2012 13:56:17 +0000 (14:56 +0100)]
In addon manifest convert all strings to unicode (translated and untranslated) using configobj default_encoding parameter.
Assumed encoding for all manifest data is utf-8, and the manifest file is decoded using this codec. No automatic encoding detection (as per configobj support) is atempted.

12 years agoReport graphics and alt text in Microsoft Word.
Michael Curran [Wed, 2 May 2012 10:23:51 +0000 (20:23 +1000)]
Report graphics and alt text in Microsoft Word.

12 years agoMinor addon manifest translation changes:
rui Batista [Tue, 1 May 2012 14:36:23 +0000 (15:36 +0100)]
Minor addon manifest translation changes:
* Removed translated configSpec since it is not used.
* When merging translated fields convert translated strings to unicode to avoid strange decode errors on the addons gui.

12 years agoMerged main
Michael Curran [Tue, 1 May 2012 10:42:07 +0000 (20:42 +1000)]
Merged main

12 years agoRemove the files for the old NSIS installer. The installer directory still exists...
James Teh [Tue, 1 May 2012 10:17:47 +0000 (20:17 +1000)]
Remove the files for the old NSIS installer. The installer directory still exists until we move the logo sound.

12 years agoJAB returns -1 for line offsets when querying the end insertion position instead...
James Teh [Tue, 1 May 2012 09:37:05 +0000 (19:37 +1000)]
JAB returns -1 for line offsets when querying the end insertion position instead of returning the offsets for the last line. Therefore, try one character back.
This means that the current line is reported correctly when at the end of the text.
Fixes #1892.

12 years agoJABHandler.JABContext.getAccessibleTextRange: Return an empty unicode string when...
James Teh [Tue, 1 May 2012 08:54:52 +0000 (18:54 +1000)]
JABHandler.JABContext.getAccessibleTextRange: Return an empty unicode string when the text length is 0 instead of a non-unicode line feed. Fixes weirdness in braille caret/selection reporting.
NVDAObjects.JAB.JABTextInfo._getLineOffsets: JAB can return -1, so normalise this to 0. JAB can return strange characters when passed -1, so this change prevents this from happening.
Fixes #2284.

12 years agoAddons dialog: Always make sure that an addon is selected when the list gets the...
Michael Curran [Tue, 1 May 2012 07:58:14 +0000 (17:58 +1000)]
Addons dialog: Always make sure that an addon is selected when the list gets the focus and there is content in it. Also enable/disable the buttons appropriately depending on what is selected in the list (e.g. can't remove a removed addon, can't view addon info on a removed addon, can't view addon info or remove if nothing is in the list).

12 years agoTurkish (tr):
Cagri Dogan [Tue, 1 May 2012 07:18:02 +0000 (08:18 +0100)]
Turkish (tr):
  userGuide.t2t matching 5126
  nvda.po matching 5128

12 years agoTamil (ta):
Dinakar T.D. [Tue, 1 May 2012 07:17:38 +0000 (08:17 +0100)]
Tamil (ta):
  userGuide.t2t matching 5126
  nvda.po matching 5128

12 years agoPortuguese (pt_PT):
Diogo Costa [Tue, 1 May 2012 07:15:08 +0000 (08:15 +0100)]
Portuguese (pt_PT):
  nvda.po matching 5113

12 years agoBrazilian Portuguese (pt_BR):
Mesar Hameed [Tue, 1 May 2012 07:13:45 +0000 (08:13 +0100)]
Brazilian Portuguese (pt_BR):
  userGuide.t2t matching 5126
  changes.t2t matching 5132
  nvda.po matching 5128

Authors: Cleverson Casarin Uliana <clever92000@yahoo.com.br>, Marlin Rodrigues <marlincgrodrigues@yahoo.com.br>

12 years agoPolish (pl):
Hubert Meyer [Tue, 1 May 2012 07:09:00 +0000 (08:09 +0100)]
Polish (pl):
  changes.t2t matching 5059
  nvda.po matching 5128

12 years agoNorwegian bokmål (nb_NO):
David Hole [Tue, 1 May 2012 07:00:47 +0000 (08:00 +0100)]
Norwegian bokmål (nb_NO):
  nvda.po matching 5128

12 years agocontributors.txt: Added new French and Japanese translators.
Mesar Hameed [Tue, 1 May 2012 06:59:05 +0000 (07:59 +0100)]
contributors.txt: Added new French and Japanese translators.

12 years agoJapanese (ja):
Takuya Nishimoto [Tue, 1 May 2012 06:57:33 +0000 (07:57 +0100)]
Japanese (ja):
  nvda.po matching 5128

12 years agoItalian (it):
Simone Dal Maso [Tue, 1 May 2012 06:51:48 +0000 (07:51 +0100)]
Italian (it):
  userGuide.t2t matching 5126
  changes.t2t matching 5128
  nvda.po matching 5128

12 years agoFrench (fr):
Mesar Hameed [Tue, 1 May 2012 06:48:33 +0000 (07:48 +0100)]
French (fr):
  changes.t2t matching 5132
  nvda.po matching 5114

Authors: Michel such <michel.such@free.fr>, Patrick ZAJDA <webmaster@gansta93.com>

12 years agoFinnish (fi):
Jani Kinnunen [Tue, 1 May 2012 06:11:43 +0000 (07:11 +0100)]
Finnish (fi):
  userGuide.t2t matching 5126
  changes.t2t matching 5132
  nvda.po matching 5128

12 years agoGalician (gl):
Juan C. buno [Tue, 1 May 2012 06:01:13 +0000 (07:01 +0100)]
Galician (gl):
  userGuide.t2t matching 5126
  changes.t2t matching 5132
  nvda.po matching 5128

12 years agoSpanish (es):
Juan C. buno [Tue, 1 May 2012 05:59:32 +0000 (06:59 +0100)]
Spanish (es):
  userGuide.t2t matching 5126
  changes.t2t matching 5132
  nvda.po matching 5128

12 years agoGreek (el):
Gerasimos Xydas on behalf of The Hellenic Technology for the Blind Development Association (e-rhetor STAT) [Tue, 1 May 2012 05:56:50 +0000 (06:56 +0100)]
Greek (el):
  nvda.po: 97% matching rev 5128
  characterDescriptions.dic

New localization,
Greek translation provided by Gerasimos Xydas (e-rhetor) on behalf of The Hellenic Technology for the Blind Development Association (STAT)
Many Thanks.

12 years agoCzech (cs):
Radek zalud [Tue, 1 May 2012 05:48:27 +0000 (06:48 +0100)]
Czech (cs):
  nvda.po matching 5113

12 years agoMore addon changes:
Michael Curran [Tue, 1 May 2012 05:44:31 +0000 (15:44 +1000)]
More addon changes:
* addonHandler.AddonManifest has been changed slightly so that description has been renamed to summary and long_description has been renamed to description. also for now categories have been removed as there is no support for it at the moment.
* addonHandler.AddonManifest no longer has a '_' method, instead summary and description are pulled from the translation if they exist at construction time. Certainly makes some GUI code much simpler.
* Addons dialog: add an About Addon button which will show a message box with all the addon info (summary, version, author, url, description).
* The list in the Addons Dialog now  no longer shows description, instead its author in its place.

12 years agoGerman (de):
Mesar Hameed [Tue, 1 May 2012 05:41:01 +0000 (06:41 +0100)]
German (de):
  developerGuide.t2t
  userGuide.t2t matching 5126
  changes.t2t matching 5132
  nvda.po matching 5128

Authors: Bernd Dorer <bernd_dorer@yahoo.de>, David Parduhn <xkill85@gmx.net>

12 years agoDanish (da):
Daniel K. Gartmann [Tue, 1 May 2012 05:24:25 +0000 (06:24 +0100)]
Danish (da):
  nvda.po

12 years agoMore addon changes:
Michael Curran [Tue, 1 May 2012 02:02:18 +0000 (12:02 +1000)]
More addon changes:
* If the user requests to remove an addon, it is now only marked for removal in a separate state file, and really only removed on NVDA restart. (its too dangerous to try to delete files or rename directories while the addon may still be in use).
* If the user installs an addon, its copied in to the addons directory, but has a special pendingInstall suffix and is marked as needing install completion on NVDA restart. (We need this delay as addons with the same name marked for removal have not yet moved out of the way).
* If the addon has just been installed (no restart yet) and the user removes it, the addon is fully removed there and then.
* The list in the Addons dialog now has a Status column which shows one of the following translatable strings: new, removed, or running.

12 years agoMerged Rui's addons-packaging branch on launcchpad
Michael Curran [Sun, 29 Apr 2012 04:14:12 +0000 (14:14 +1000)]
Merged Rui's addons-packaging branch on launcchpad

12 years agoBetter cleanup of removed addons:
Michael Curran [Sun, 29 Apr 2012 00:40:05 +0000 (10:40 +1000)]
Better cleanup of removed addons:
* addonHandler.Addon.removecontents: If not all of the addon could be deleted, rename the directory to a temp name with an extention of ADDON_REMOVED_EXTENSION (.removed). Also remove the ignore_errors argument as it really can't be changed anymore.
* addonHandler._getAvailableAddonsFromPath: do not include directories marked for removal.
* addonHandler: add a 'cleanRemovedAddons' function which  removes any addons marked for removal.
* addonHandler.initialize: before loading any addons, call cleanRemovedAddons (which gets rid of any addons that failed to be removed on last run of NVDA).

12 years agoMake manifest._ return an unicode string.
rui Batista [Fri, 27 Apr 2012 22:39:28 +0000 (23:39 +0100)]
Make manifest._ return an unicode string.

12 years agoMerged addon-packaging from nvaccess. Simple update did not work due to a not-pushed...
rui Batista [Fri, 27 Apr 2012 22:20:03 +0000 (23:20 +0100)]
Merged addon-packaging from nvaccess. Simple update did not work due to a not-pushed trivial commit.

12 years agoNo point in a late import when the module is imported earlier elsewhere anyway.
James Teh [Fri, 27 Apr 2012 11:49:39 +0000 (21:49 +1000)]
No point in a late import when the module is imported earlier elsewhere anyway.

12 years agoupdateCheck: Implement the cancel button in the update download dialog.
James Teh [Fri, 27 Apr 2012 11:04:22 +0000 (21:04 +1000)]
updateCheck: Implement the cancel button in the update download dialog.
As part of this, use a timer instead of wx.CallAfter, as it seems wx.ProgressDialog.Update pumps before returning, which means CallAfters can execute within it. Re-entrancy like this causes all sorts of pain here, which is prevented by the timer because timers aren't re-entrant.
This CallAfter problem is probably also what was causing the crash in #2228, as Destroy could be called on the ProgressDialog before Update returned. Nasty.
Fixes #2259.

12 years agoFix for #2276 (tree in Elements List was hard or impossible to see). Patch from NVDAJP
Michael Curran [Fri, 27 Apr 2012 07:30:00 +0000 (17:30 +1000)]
Fix for #2276 (tree in Elements List was hard or impossible to see). Patch from NVDAJP

12 years agoThe file extension for addons is now nvda-addon not nvda-adon. Also make the File...
Michael Curran [Fri, 27 Apr 2012 05:24:20 +0000 (15:24 +1000)]
The file extension for addons is now nvda-addon not nvda-adon. Also make  the File type label in the Choose addon dialog translatable.

12 years agoVirtualBuffer.getEnclosingContainerRange: allow the user to jump t the start or past...
Michael Curran [Fri, 27 Apr 2012 02:13:10 +0000 (12:13 +1000)]
VirtualBuffer.getEnclosingContainerRange: allow the user to jump t the start or past the end of container elements even though the user has configured  the particular element they're in to be not reported. #123

12 years agoAdded a basic GUI for managing Addons. Find it under Tools in the NVDA manu. It allow...
Michael Curran [Fri, 27 Apr 2012 02:04:46 +0000 (12:04 +1000)]
Added a basic GUI for managing Addons. Find it under Tools in the NVDA manu. It allows you to add and remove them. If adding or removals have happened and you close the dialog, you will be asked if you wish to restart NVDA. If trying to install an addon with the same name as an already installed one, for now you will be told to remove the xisting addon and try again.

12 years agogui: move IndeterminateProgressDialog out of installerGui.py and into __init__.py...
Michael Curran [Fri, 27 Apr 2012 02:00:30 +0000 (12:00 +1000)]
gui: move IndeterminateProgressDialog out of installerGui.py and into __init__.py so it can be used by more code.

12 years agoAdd translator comments.
James Teh [Fri, 27 Apr 2012 00:29:10 +0000 (10:29 +1000)]
Add translator comments.

12 years agogui: add an ExecAndPump class, which allows you to execute a given function, along...
Michael Curran [Fri, 27 Apr 2012 00:21:11 +0000 (10:21 +1000)]
gui: add an ExecAndPump class, which allows you to execute a given function, along with the given args and kwargs, in a background thread, while the current thread blocks and pumps.

12 years agoWhat's New: Add ticket number. Fix typo. Minor linguistic fixes.
James Teh [Thu, 26 Apr 2012 22:46:24 +0000 (08:46 +1000)]
What's New: Add ticket number. Fix typo. Minor linguistic fixes.
Fixes #2275.

12 years agoMerged main
Michael Curran [Wed, 25 Apr 2012 23:17:08 +0000 (09:17 +1000)]
Merged main

12 years agoAddressed review comments for #123 implementation - mostly translator comments.
Michael Curran [Wed, 25 Apr 2012 23:15:30 +0000 (09:15 +1000)]
Addressed review comments for #123 implementation - mostly translator comments.

12 years agocontributors: Fix capitalisation of a name. Remove unnecessary blank line at end...
James Teh [Wed, 25 Apr 2012 22:52:26 +0000 (08:52 +1000)]
contributors: Fix capitalisation of a name. Remove unnecessary blank line at end of file.

12 years agoaddonHandler: support falling back to base locales when looking for translated manife...
Michael Curran [Wed, 25 Apr 2012 11:09:45 +0000 (21:09 +1000)]
addonHandler: support falling back to base locales when looking for translated manifested (e.g. fr_CA becomes fr becomes en). Also fix a small typo.
specific changes:
* rename addonHandler._translatedManifestPath to _translatedManifestPaths and have it return a list of possible locale paths in the order they should be tested.
* addonHandler.Addon and addonHandler.AddonBundle: their constructors try each locale manifest path in turn until one succeeds.
* addonHandler.AddonBundle: z.open throws KeyError not IOError if a file can't be found, also 'R' should be 'r' (lower case).

12 years agoChange references to languageHandler.curLang to languageHandler.getLanguage()
rui Batista [Wed, 25 Apr 2012 10:16:49 +0000 (11:16 +0100)]
Change references to languageHandler.curLang to languageHandler.getLanguage()

12 years agoImplementation of #123 (quick nav scripts to jump to the start, or past the end,...
Michael Curran [Wed, 25 Apr 2012 07:01:11 +0000 (17:01 +1000)]
Implementation of #123 (quick nav scripts to jump to the start, or past the end, of the current containing element). Use "kb:shift+," and "kb:shift+." (< and >). Should be able to work within tables, lists, multiline edit, frames, blockquotes, editable documents (pretty much anything that would announce "out of xxx").

12 years agoImplement support for addon manifest translation.
rui Batista [Tue, 24 Apr 2012 16:49:16 +0000 (17:49 +0100)]
Implement support for addon manifest translation.

* Addon manifest translations must be kept on <addon>\locale\<lang>\manifest.ini
* Only description and long description are supported.
* AddonManifest can receive an optional argument with a file-like object for the translation data (Addon and AddonBundle must provide it since retrieval is diferent).
* AddonManifest has a new _ methodto retrieve translated data. For instance manifest._('description')
* Other minor code tweaks and cleanups.

12 years agoMerge main.
rui Batista [Tue, 24 Apr 2012 15:00:02 +0000 (16:00 +0100)]
Merge main.

12 years agoMinor change in initialize.
rui Batista [Tue, 24 Apr 2012 14:59:41 +0000 (15:59 +0100)]
Minor change in initialize.

12 years agoMake sure that creation of appModules always happens in the main thread, even when...
Michael Curran [Tue, 24 Apr 2012 10:29:37 +0000 (20:29 +1000)]
Make sure that creation of appModules always happens in the main thread, even when created because of nvdaControllerInternal_requestRegistration. A part from appModuleHandler.runningTable being mutated during removal of old appModules, it also meant that sometimes two appModule instances for the same process were being created, but only one of them ever received an rpc binding handle. This would cause displayModel or virtualBuffers not to work for the life time of an app or until NVDA was restarted.
Specifically:
* appModuleHandler.update: allow a helperLocalBindingHandle and an inprocRegistration handle to be passed in as optional keyword arguments. If given then they are set on the module gotten/created.
* nvdaHelper.nvdaControllerInternal_requestRegistration: rather than fetching an existing/new appModule directly, just queue a call to appModuleHandler.update giving a process ID and the binding and registration handles so that they get set on the existing/new appModule.
* Revert the recent change to appModuleHandler.update protecting against dictionary mutation (#2258) as this no longer can happen -- if so we want to know about it.

12 years agodisplayModelTextInfo._textAndRects and Window NVDAObject's displayText property:...
Michael Curran [Mon, 23 Apr 2012 16:37:52 +0000 (02:37 +1000)]
displayModelTextInfo._textAndRects and Window NVDAObject's displayText property: handle the case where there is no binding handle available and log a debugWarning and return an empty string. Should fix #2258

12 years agoappModuleHandler.update: its now possible for appModules to be created in other threa...
Michael Curran [Mon, 23 Apr 2012 16:23:29 +0000 (02:23 +1000)]
appModuleHandler.update: its now possible for appModules to be created in other threads (nvdaControllerInternal_requestRegistration) so therefore we must use values not itervalues when looping through runningTable looking for dead modules. This should stop  a runtimeError complaining that the dictiony had changed during iteration.

12 years agoGot ride of the _runningAddons global variable. We can get loaded addons by filtering...
rui Batista [Sun, 22 Apr 2012 14:06:56 +0000 (15:06 +0100)]
Got ride of the _runningAddons global variable. We can get loaded addons by filtering availableAddons by the isLoaded property.

Further than addons that could not be loaded for some reason (code errors, damaged files, etc) if we want to support activation and deactivation of specific addons without removal from the first system, this separation is needed.

12 years agoCorrected stuppid bug that prevented nvda to start: running addons, when addonHandler...
rui Batista [Sun, 22 Apr 2012 13:54:58 +0000 (14:54 +0100)]
Corrected stuppid bug that prevented nvda to start: running addons, when addonHandler is not initialized, should be [].

12 years agomerge main.
rui Batista [Sun, 22 Apr 2012 13:47:49 +0000 (14:47 +0100)]
merge main.

12 years agoAnother try at fixing #2254 (crashes on process exits in XP). As we are now loading...
Michael Curran [Sat, 21 Apr 2012 12:11:46 +0000 (22:11 +1000)]
Another try at fixing #2254 (crashes on process exits in XP). As we are now loading minHook after nvdaHelperRemote (its not a static dependency) Windows is unloading minHook before nvdaHelperRemote on process exit. Therefore handle this situation.
Specific changes:
* minhook.dll: add a dllmain function which, on process exit, disables any hooks, waits for 250 ms for hooks to complete and then  uninitializes.
* nvdaHelperRemote: Don't mark minhook.dll for delay loading, instead just rely on LoadLibrary and GetProcAddress all the way. Although its a bit more fiddly, at least I understand exactly what is going on.
* nvdaHelperRemote's apiHooks_terminate: If the process is exiting, don't do anything. Windows will automatically free libraries, and minhook having been loaded late will have been unloaded by Windows before nvdaHelperRemote and its dllmain function will have cleaned up its hooks.

12 years agoHopefully stop crashes in apps when they exit on XP (#2254).
Michael Curran [Fri, 20 Apr 2012 17:06:08 +0000 (03:06 +1000)]
Hopefully stop crashes in apps when they exit on XP (#2254).
Specific changes to nvdaHelperRemote:
* Declare isProcessExiting extern in dllmain.h and use it in apiHooks_terminate to return early to stop freeing libraries if the process is exiting -- its dangerous to call LoadLibrary or FreeLibrary when dllmain is being run.
* dllmain: If the process is exiting, also unregister any in-context winEvent hooks. Seems that winEvents kept being fired on process shutdown trying to install IA2 support over and over again -- until the whole thing fell over due to it trying to log an error via a freed rpc binding handle.
* dllmain: only free nvdaController and nvdaControllerInternal binding handles if the process isn't exiting. If it is the OS will clean it up anyway and we want logging to work for as long as possible.

12 years agomerge main
rui Batista [Fri, 20 Apr 2012 16:06:33 +0000 (17:06 +0100)]
merge main

12 years agoMajor refactoring to support addon specific translations.
rui Batista [Fri, 20 Apr 2012 15:52:50 +0000 (16:52 +0100)]
Major refactoring to support addon specific translations.

* Refactored getAvailableAddons and getRunningAddons. Internally addons can be queried by path to facilitate identification of currently calling addon.
* addonHanler.getCodeAddon() retrieves the addon instnace for the calling addon, using stack inspection.
* addonHandler.initTranslation() adds the ettext _ function to the calling module to support addon specific translation (it relies on addonHandler.getCodeAddon internally).
* Many more minor tweaks and corrections.

12 years agoMerged win8Injection branch. This means that installed releases of NVDA can now hook...
Michael Curran [Fri, 20 Apr 2012 07:49:08 +0000 (17:49 +1000)]
Merged win8Injection branch. This means that installed releases of NVDA can now hook into metro style apps, enabling features such as speaking typed characters, browse mode for web documents (including full support for metro version of Internet Explorer 10), and displayModel (if GDI is ever used). Please note that this will *only* work if NVDA runs with the uiAccess privilidge, which for now only is installed official releases (not snapshots or any portable copies).
A lot of NVDA's rpc and injection code needed to be rewritten to handle metro style apps. Therefore please watch out for and report any weirdness resulting from this revision (especially on Operating Systems before Windows 8).

12 years agoupdate changes file
Michael Curran [Fri, 20 Apr 2012 07:34:02 +0000 (17:34 +1000)]
update changes file

12 years agoupdateCheck: Why calculate when we don't need to? :)
James Teh [Fri, 20 Apr 2012 02:54:59 +0000 (12:54 +1000)]
updateCheck: Why calculate when we don't need to? :)

12 years agoinstallerGui:
James Teh [Fri, 20 Apr 2012 02:46:32 +0000 (12:46 +1000)]
installerGui:
* Remove the "Installation options" grouping, as it is redundant and creates extraneous verbosity.
* Place the options vertically instead of horizontally.
* Call mainSizer.Fit so that everything actually fits in the window properly.

12 years agogui: Move About below Check for update in the Help menu for consistency with most...
James Teh [Fri, 20 Apr 2012 02:28:49 +0000 (12:28 +1000)]
gui: Move About below Check for update in the Help menu for consistency with most other apps.
Fixes #2251.

12 years agoAdd translator comment for "no navigator object".
James Teh [Fri, 20 Apr 2012 02:10:04 +0000 (12:10 +1000)]
Add translator comment for "no navigator object".

12 years agoAdd translator comments for reporting of formatting.
James Teh [Fri, 20 Apr 2012 02:07:02 +0000 (12:07 +1000)]
Add translator comments for reporting of formatting.

12 years agonvdaHelperLocal's startServer: while we're fiddling with rpc and doing lots of testi...
Michael Curran [Thu, 19 Apr 2012 23:54:22 +0000 (09:54 +1000)]
nvdaHelperLocal's startServer:  while we're fiddling with rpc and doing lots of testing, convert this code to use auto-listen interfaces just like nvdaHelperRemote does, rather than having to create a thread to run a specific server.  !. dlls are supposed to do this, and 2. There has always been a chance that our rpc server thread had not yet fully initialized before  the first remote code was run.

12 years agonvdaHelperLocal's createRemoteBindingHandle: on versions less win8, the 'AC' sid...
Michael Curran [Thu, 19 Apr 2012 23:52:08 +0000 (09:52 +1000)]
nvdaHelperLocal's createRemoteBindingHandle: on versions less win8, the 'AC' sid is unknown therefore ConvertStringSecurityDescriptorToSecurityDescriptor fails. Only try making the security descriptor and calling RpcBindingSetAuthInfoEx if RpcServerRegisterIf3 exists in rpcrt4.dll (i.e. this is Win8 or higher) -- same check as in startServer. This allows correct running on Win7 and Xp (sp3 tested so far).

12 years agonvdaHelperRemote: Create the nvdaUnregisteredEvent initially as signaled rather than...
Michael Curran [Thu, 19 Apr 2012 23:48:49 +0000 (09:48 +1000)]
nvdaHelperRemote: Create the nvdaUnregisteredEvent initially as signaled rather than unsignaled. This means that if there is some kind of error and NVDA never gets to register, then the inproc code will appropriately terminate as soon as it can.

12 years agonvdaHelperRemote: Make sure that minhook.dll really gets unloaded properly when apiHo...
Michael Curran [Thu, 19 Apr 2012 23:00:51 +0000 (09:00 +1000)]
nvdaHelperRemote: Make sure that minhook.dll really gets unloaded properly when apiHooks_terminate is called. This means calling FreeLibrary to match our explicit LoadLibrary in apiHooks_initialize, telling the linker to support delayLoad unloading with /delay:unload, and also by calling __FUnloadDelayLoadedDLL2("minHook.dll") to cleanly unload the delay loaded minHook.dll. Also pass /delay:nobind to the linker as this can speed up loading a bit as we never need to supported pre-bounded dlls, in fact this would be bad for minhook anyway.

12 years agoFix a typo in a log call
Michael Curran [Thu, 19 Apr 2012 22:20:36 +0000 (08:20 +1000)]
Fix a typo in a log call

12 years agomerged main
Michael Curran [Thu, 19 Apr 2012 22:13:32 +0000 (08:13 +1000)]
merged main

12 years agoCreate a addonHandler.getRunningAddons() function to abstract internal tracking of...
rui Batista [Thu, 19 Apr 2012 14:15:33 +0000 (15:15 +0100)]
Create a addonHandler.getRunningAddons() function to abstract internal tracking of running addons.

Changed runningAddons to _runningAddons to make it "module-private" and a dictionary keyed by addon.path. This would be important for nvda to trac from what addon belongs a specific object (by inspection) so add-on localization for instance can be implemented. This is subject to change though.