OSDN Git Service

If the Add-ons Manager is already open, activating it again (either from the Tools...
authorJames Teh <jamie@nvaccess.org>
Wed, 10 Jul 2013 01:15:29 +0000 (11:15 +1000)
committerMichael Curran <mick@nvaccess.org>
Thu, 25 Jul 2013 03:06:48 +0000 (13:06 +1000)
AddonsDialog was already a singleton, but the constructor was being called even when there was already an instance, which was causing all sorts of breakage.
Re #3351.

source/gui/addonGui.py
user_docs/en/changes.t2t

index b988442..9d65c16 100644 (file)
@@ -16,10 +16,13 @@ class AddonsDialog(wx.Dialog):
        _instance = None\r
        def __new__(cls, *args, **kwargs):\r
                if AddonsDialog._instance is None:\r
-                       AddonsDialog._instance = super(AddonsDialog, cls).__new__(cls, *args, **kwargs)\r
+                       return super(AddonsDialog, cls).__new__(cls, *args, **kwargs)\r
                return AddonsDialog._instance\r
 \r
        def __init__(self,parent):\r
+               if AddonsDialog._instance is not None:\r
+                       return\r
+               AddonsDialog._instance = self\r
                # Translators: The title of the Addons Dialog\r
                super(AddonsDialog,self).__init__(parent,title=_("Add-ons Manager"))\r
                self.needsRestart=False\r
index 94b135f..95f8f80 100644 (file)
@@ -54,6 +54,7 @@
 - Confirmation dialogs in Microsoft Office 2013 now have their content automatically read when they appear. \r
 - Performance improvements when navigating certain tables in Microsoft Word. (#3326)\r
 - NVDA's table navigation commands (control+alt+arrows) function better in certain Microsoft Word tables where a cell spans multiple rows.\r
+- If the Add-ons Manager is already open, activating it again (either from the Tools menu or by opening an add-on file) no longer fails or makes it impossible to close the Add-ons Manager. (#3351)\r
 \r
 \r
 == Changes for Developers ==\r