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
Update the search object and the actions in a more user friendly way, fixes #856 #857
Conversation
* I've tidied up the code changes I made at 910accd (removed the tempNewObject and tempCurrentObject objects) * Added the changes I made in 910accd to the `setObjectValue` method (to reduce the number of 'searchObjectChanged' messages sent) * Added the previous and current objects to the QSSearchObjectChanged `userInfo` dictionary (so that methods receiving the notif can see the different) * Made the actions reload only if the previous and new object's types are different (if the types are the same then the actions will be the same) * Altered the `updateActions` and `updateActionsNow` methods so that the latter clears the action pane. This means that you won't get a 'blinking' effect for 0.1s (the time between `updateActions` and `updateActionsNow` being called) while the 2nd pane is empty
I love this. Seems like the kind of thing that should have been done long ago. Slight problem though (that I didn’t think of myself until just now)…
If that were true, I can confirm that this breaks some things. For instance, the SSH action doesn’t appear for Windows remote hosts. If I select a Windows host, then immediately call up a Linux host, the SSH action isn’t available. I’m not sure of the best way to handle this while still preserving the efficiency this change brings. I’ll look over your changes and give it some thought tonight. Thought of an easier-to-reproduce example: Bring up a regular URL in the first pane, then call up a Web Search URL. It should switch from “Open URL” to “Search For…”, but it doesn’t, and you can’t even get to “Search For…” manually because it’s not on the list. |
Hmm... you're right, as per usual - good catch.
The 'perceived' performance boost will still be there since I moved the
Or we just make a new type for web search URLs... ;-) On 30 April 2012 21:36, Rob McBroom <
|
… or not the dObject types have changed
…don't update the 2nd pane
OK I've removed the test. I've looked through it all a lot, and have even The next best thing I can come up with is to compare this new array with On 30 April 2012 21:45, Patrick Robertson robertson.patrick@gmail.comwrote:
|
Yeah, I’ve thought about it and the list of actions is really an object-specific thing, so if the object changes, the list should be reexamined. The latest changes seem reasonable. I’ll test them out. |
P.S. Rob don't forget this one for ß68 :) |
Update the search object and the actions in a more user friendly way, fixes #856
setObjectValue
method (to reduce the number of 'searchObjectChanged' messages sent)userInfo
dictionary (so that methods receiving the notif can see the different)updateActions
andupdateActionsNow
methods so that the latter clears the action pane. This means that you won't get a 'blinking' effect for 0.1s (the time betweenupdateActions
andupdateActionsNow
being called) while the 2nd pane is empty