-
-
Notifications
You must be signed in to change notification settings - Fork 632
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
Register .nvda-addon extension to be handled by installed copies of NVDA, to easily install new addons #2306
Comments
Comment 1 by mdcurran on 2012-05-08 23:21 Some implementation ideas:
I'm quite confident on how to handle the rpc stuff, but registering file handlers is not something I've done before. Originally it was just registry entries in h classesRoot in the registry, but now I think its a bit more secure... not sure. Probably not a 2012.2 thing as it is a bit of coding and we are fast approaching the beta. Changes: |
Comment 2 by jteh (in reply to comment 1) on 2012-05-09 00:05
I'd argue that aside from serious testers, most users who have NVDA installed will almost always use the installed copy on their system. Using both an installed copy and a portable copy is not really necessary for most users. Many will generate a portable from their installed, but that's fine. That said, installing into the currently running copy probably still makes sense.
I disagree; opening within a web browser is perhaps the most important use case once we have an add-ons repository. There's always Save target as, which we can explain for portables in the user guide/web site. |
Comment 3 by ragb (in reply to comment 2) on 2012-05-09 00:31
I agree that installing on the currently-running copy makes sence. If it is a portable copy we may warn the user before installation to avoid wrong assumptions.
If the behaviour for installing addons on running portable copies is explicit (with warning or explanation in the manual) I think that there is no problem. And it is surely an important usecase. |
Comment 4 by ragb on 2012-06-30 14:30 |
Comment 5 by ragb on 2012-07-01 14:28 I believe I need a hint or two about this. To instruct NVDA to install an add-on I must send a message to the running NVDA process to call the installation routines. My idea is to make nvda_slave call the current process, and have something like a If yes, how could I call the nvda helper method from nvda_slave? I do0t need code, just the process. Maybe it is obvious but my windows programming skills don't get it :). regards, Rui Batista |
Comment 6 by jteh (in reply to comment 5) on 2012-07-11 02:10
Yes.
In short, the function should be exposed by nvdaHelperRemote.dll, so you load that dll and call the function in that. For an example, see the way nvdaControllerInternal_logMessage is handled (start with 2827a34). |
Comment 7 by jteh on 2012-08-20 08:59 |
Comment 8 by ragb (in reply to comment 7) on 2012-08-21 16:11
Yes, I'll do it. Actually, today I was just revewing what I already did. Maybe this week I'll have something to show you. |
Comment 9 by ragb on 2012-08-22 11:24 For now only gui nvdaHelper and nvda_slave stuff are coded. It is already possible to request add-on installation be calling nvda_slave from the command line. |
Comment 10 by jteh on 2012-08-23 03:05 In NVDAHelper.py, you import wx at module level. Because NVDAHelper gets imported quite early, wx should be a late import (in the function requiring it), as it is a huge package. We've probably made this mistake elsewhere anyway, but best not to make it again. :) To make !AddonsDialog a singleton, you've implemented a getInstance() classmethod and raise an exception if someone tries to make a second instance. Because you truly want a singleton here, it's probably easier and more elegant to just return the instance from new if it already exists:
Did you try calling self.Close() here? I guess it mightn't work because the dialog isn't actually showing. In that case, I'd remove the hack comment, since this makes sense. In nvda_slave.pyw:
The dll will load even if NVDA is not running. You should instead check the return code from |
Comment 11 by jteh on 2012-08-23 04:07
You don't want to use a triple-quoted string here because the tabs from your second line will actually be included in the message. You could remove the tabs, but that looks pretty ugly. I'd write it like this:
|
Comment 12 by ragb (in reply to comment 10) on 2012-08-23 11:02
Agreed.
Yes, this is a real singletone, not the kind we have on settings dialogs.
There is a big problem with this call. It is only called if the installation succeeds. Either on error or user cancelation this code is not reached. My solution is to put it on a finaly block, even on exception it would be good to dispose of the dialog.
Ok thanks. I'm not that confident on this Windows rpc stuff. |
Comment 13 by mdcurran on 2012-09-12 00:37 The Open With problem is annoying, though I don't believe there is any way this could be fixed. all other programs also just show their app name. Like it or not its called NVDA slave. We could consider renaming the product name to just NVDA though I don't think this is all that important. |
Comment 14 by ragb (in reply to comment 13) on 2012-09-12 09:24
Makes sence, thanks.
I tried to use the !friendlyAppName key in the windows registry but it seems to have no effect at all. See http://msdn.microsoft.com/en-us/library/windows/desktop/ee872121%28v=vs.85%29.aspx#applications Maybe I'm doing something wrong though.
Except the application name issue (that as you said we can't probably change anyway) I've nothing to add to this. If you don't mind adding the catching code, please do. Sorry, I've been a bit buzy lately :). |
Comment 15 by jteh on 2012-09-14 04:07 |
Comment 16 by ragb (in reply to comment 15) on 2012-09-14 14:19
Thanks. Didn't know about that COM error status thing, sorry. Looks all good. |
Reported by ragb on 2012-05-08 15:37
The usecase for this is almost obvious: when we click on a .nvda-addon package the add-on installation dialog apears, as in the GUI. I supose this can only e done for installed copies.
Don't know the dificulty on implement such a feature but I think the it may easy the user interaction, although not crytical.
Don't think it is that prioritary to target fo 2012.2, unless it is trivial to implement (I don't think so, with my few knoledge of Windows and inter-process communication and shell extensions and such).
The text was updated successfully, but these errors were encountered: