New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

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
@nvaccessAuto

nvaccessAuto commented Jul 9, 2013

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

This comment has been minimized.

nvaccessAuto commented Jul 9, 2013

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

@nvaccessAuto

This comment has been minimized.

nvaccessAuto commented Jul 9, 2013

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

This comment has been minimized.

nvaccessAuto commented Jul 9, 2013

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

@nvaccessAuto

This comment has been minimized.

nvaccessAuto commented Jul 9, 2013

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

This comment has been minimized.

nvaccessAuto commented Jul 9, 2013

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

This comment has been minimized.

nvaccessAuto commented Jul 10, 2013

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

@nvaccessAuto

This comment has been minimized.

nvaccessAuto commented Jul 10, 2013

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.

@nvaccessAuto

This comment has been minimized.

nvaccessAuto commented Jul 10, 2013

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

@nvaccessAuto

This comment has been minimized.

nvaccessAuto commented Jul 25, 2013

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

@nvaccessAuto

This comment has been minimized.

nvaccessAuto commented Jul 25, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment