Merge lp://qastaging/~marcobiscaro2112/unity/fixes-724045 into lp://qastaging/unity

Proposed by Marco Biscaro
Status: Merged
Approved by: Alex Launi
Approved revision: no longer in the source branch.
Merge reported by: Alex Launi
Merged at revision: not available
Proposed branch: lp://qastaging/~marcobiscaro2112/unity/fixes-724045
Merge into: lp://qastaging/unity
Diff against target: 162 lines (+43/-35)
5 files modified
src/BamfLauncherIcon.cpp (+41/-20)
src/BamfLauncherIcon.h (+1/-0)
src/Launcher.cpp (+0/-8)
src/Launcher.h (+0/-6)
src/LauncherIcon.h (+1/-1)
To merge this branch: bzr merge lp://qastaging/~marcobiscaro2112/unity/fixes-724045
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+63461@code.qastaging.launchpad.net

Description of the change

The first problem was that BamfLauncherIcon::ActivateLauncherIcon was never receiving the scaleWasActive flag because the method that call it (LauncherIcon::Activate) was always terminating scale.

So, I turned LauncherIcon::Activate into virtual and overwrote it in BamfLauncherIcon.

The second problem was that method BamfLauncherIcon::ActivateLauncherIcon was not working as expected. I've rewrite the method following the desired behaviour in its comment. Below there is a pseudo-code of the method.

// Pseudo-code
When a BamfLauncherIcon is clicked:

If the application is not running
  Finish scale, if scale was active
  Launch it
If the application is running
  If the application is active
    If the scale was active
      Terminate scale
    If the scale was not active
      Spread application
  If the application is not active
    If the scale was active
      Change spread
    If the scale was not active
      Focus application
Send a UBUS_LAUNCHER_ACTION_DONE message
// End of pseudo-code

To post a comment you must log in.
Revision history for this message
Andrea Azzarone (azzar1) wrote :

As stated at UDS i will review my first merge proposal.

The code seems code, just two thing.

1) SetLastSpreadIcon (and GetLastSpreadIcon) is deprecated (there is a FIXME in Launcher.cpp). You should completely remove this function both in Launcher.cpp and BamfLauncherIcon.cpp.

2) The «ccsm->scale->bindings->click dekstop to show dekstop» option is unchecked by default, but if we activate this option the scale doesn't work well (it doesn't work either now).

Revision history for this message
Marco Biscaro (marcobiscaro2112) wrote :

The first problem is fixed now. I'll need some more time to look to the another one.

Revision history for this message
Andrea Azzarone (azzar1) wrote :

+1 for me!

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.