Merge lp://qastaging/~didrocks/unity/fix-lens-shortcuts into lp://qastaging/unity

Proposed by Didier Roche-Tolomelli
Status: Merged
Approved by: Neil J. Patel
Approved revision: no longer in the source branch.
Merged at revision: 1520
Proposed branch: lp://qastaging/~didrocks/unity/fix-lens-shortcuts
Merge into: lp://qastaging/unity
Diff against target: 387 lines (+110/-33)
10 files modified
UnityCore/FilesystemLenses.cpp (+22/-6)
UnityCore/FilesystemLenses.h (+1/-0)
plugins/unityshell/src/DashController.cpp (+18/-0)
plugins/unityshell/src/DashController.h (+3/-0)
plugins/unityshell/src/DashView.cpp (+21/-0)
plugins/unityshell/src/DashView.h (+3/-0)
plugins/unityshell/src/Launcher.cpp (+15/-17)
plugins/unityshell/src/Launcher.h (+1/-1)
plugins/unityshell/src/unityshell.cpp (+23/-8)
plugins/unityshell/src/unityshell.h (+3/-1)
To merge this branch: bzr merge lp://qastaging/~didrocks/unity/fix-lens-shortcuts
Reviewer Review Type Date Requested Status
Neil J. Patel (community) Approve
Review via email: mp+74468@code.qastaging.launchpad.net

Description of the change

bring back lenses shortcut activation. Seems there is still an issue on
registering keybinding on first super invocation, but good enough for
main cases (LP: #834078).

No python code was written during this hacking period.

To post a comment you must log in.
Revision history for this message
Neil J. Patel (njpatel) wrote :

Awesome stuff! I found a couple of niggles, not sure if they are to do with your branch or not, so let me know:

- Pressing Super no longer shows the numbers on the icons :/
- If I press Super+f quickly, then the dash shows and hides, instead of just showing. I have to press super, wait around 100ms and then press f to make it show.

Any ideas?

review: Needs Fixing
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

The missing numbers and letters when holding down super is already in
Oneiric, so definitely not from this branch.

Revision history for this message
Tim Penhey (thumper) wrote :

On 08/09/11 04:10, Didier Roche wrote:

+Lens::Ptr FilesystemLenses::Impl::GetLensForShortcut(std::string const&
lens_shortcut) const
+{
+ Lens::Ptr p;
+
+ for (Lens::Ptr lens: lenses_)
+ {
+ if (lens->shortcut == lens_shortcut)
+ {
+ p = lens;
+ break;
+ }
+ }
+
+ return p;
+}

In a previous branch I found some weirdness with break nor exiting the
new range based for loop. What I found fixed it was to return. So
something like this:

Lens::Ptr FilesystemLenses::Impl::GetLensForShortcut(std::string const&
lens_shortcut) const
{
   for (auto lens : lenses_)
   {
     if (lens->shortcut == lens_shortcut)
       return lens
   }
   return Lens::Ptr();
}

You could use "auto" or "Lens::Ptr const&". Using just Lens::Ptr causes
an extra object to be constructed and destroyed for each time through
the loop.

Tim

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

I've made the change mentionned by Tim in UnityCore, I've also fixed another one in UnityCore which had a similar pattern.

The "quick typing shortcut" is now fixed as well. But that makes me thing that we should have a keybinding controller which has a reference to both models to trigger the actions in both the Launcher and Dash, being able to know about both part and so avoiding the "show/hide" in a short period of time like we had there.
I initially put everything in the Launcher as it's where we controlled all the Super keys, but it's not the case anymore with this branch, so we should think about it. I'll get to it, but maybe after this release.

Please tell me if it fixes this :)
There is still the issue in first launch (will need to check compiz registration process with Sam)
The numbers not showing and acting is an oneiric regression, indeed, not related to this branch. I'll try to have a look there as well later (some people will apparently break some libunity ABI, and that + patch piloting + zomg new Qt! needs some attention from now ;))

Revision history for this message
Neil J. Patel (njpatel) wrote :

Sweet, approved!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.