Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

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

Comments

Projects
None yet
2 participants

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.

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

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

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

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.

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.

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

Comment 6 by James Teh <jamie@... on 2013-07-10 01:15
In [9271e32]:

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.

Comment 7 by James Teh <jamie@... on 2013-07-10 01:24
In [36ac0c8]:

Merge branch 't3351' into next

Incubates #3351.

Changes:
Added labels: incubating

Comment 8 by Michael Curran <mick@... on 2013-07-25 03:24
In [1100a05]:

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

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

@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