NVDA should prevent opening addons manager if it's already opened #3351

Closed
nvaccessAuto opened this Issue Jul 9, 2013 · 10 comments

2 participants

@nvaccessAuto

Reported by norrumar on 2013-07-09 15:51
NVDA allows to open addons manager when it's already opened. This produces an error when trying to close this dialog.
Step to reproduce:
1. Open the addons manager.
2. Open it again.
3. Try to close this dialog.
Actual result: It's not possible to close it due to a dead object error.
Expected result: Dialog shouldn't be reopened.

@nvaccessAuto

Attachment nvda.log added by norrumar on 2013-07-09 15:52
Description:
Log file for this ticket

@nvaccessAuto

Comment 1 by beqa on 2013-07-09 17:15
hi.

i can't understand for what is responsible this code.

#instance = None
#def __new_
(cls, args, *kwargs):
#if AddonsDialog.instance is None:
#AddonsDialog.instance = super(AddonsDialog, cls).__new
(cls, args, *kwargs)
#return AddonsDialog._instance

without this everything works well

@nvaccessAuto

Comment 2 by beqa on 2013-07-09 17:16
or maybe display a message that one instance is opened, please close first.

@nvaccessAuto

Comment 3 by norrumar on 2013-07-09 17:21
Hi Beqa: I have fixed this issue in a different way, by changing init.py contained in gui.
import AddonsDialog
if AddonsDialog._instance is not None:
return
This is done on branch t3351, available at
https://bitbucket.org/norrumar/nvda
Thanks.

@nvaccessAuto

Comment 4 by ondrosik on 2013-07-09 18:00
Not sure but other dialogs just get focus, see for example the log wiever. So I think that this should be done in the same way.

@nvaccessAuto

Comment 5 by jteh on 2013-07-10 00:16
Changes:
Milestone changed from None to next

@nvaccessAuto

Comment 6 by James Teh <jamie@... on 2013-07-10 01:15
In [9271e32]:
```CommitTicketReference repository="" revision="9271e32bf8dc0df19aa15d466625cdfb757d9f54"
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.

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.

@nvaccessAuto

Comment 7 by James Teh <jamie@... on 2013-07-10 01:24
In [36ac0c8]:
```CommitTicketReference repository="" revision="36ac0c8ec09074937c4a152851d6e5d2643f12f0"
Merge branch 't3351' into next

Incubates #3351.

Changes:
Added labels: incubating
@nvaccessAuto

Comment 8 by Michael Curran <mick@... on 2013-07-25 03:24
In [1100a05]:
```CommitTicketReference repository="" revision="1100a05def8a6a6f1123ef39db179697708e2806"
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. Fixes #3351.

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.

Changes:
Removed labels: incubating
State: closed
@nvaccessAuto

Comment 9 by mdcurran on 2013-07-25 03:27
Changes:
Milestone changed from next to 2013.2

@jcsteh jcsteh was assigned by nvaccessAuto Nov 10, 2015
@nvaccessAuto nvaccessAuto added this to the 2013.2 milestone Nov 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment