Merge lp://qastaging/~didrocks/unity/fix-709179-709119 into lp://qastaging/unity

Proposed by Didier Roche-Tolomelli
Status: Merged
Merged at revision: 800
Proposed branch: lp://qastaging/~didrocks/unity/fix-709179-709119
Merge into: lp://qastaging/unity
Diff against target: 102 lines (+37/-1)
4 files modified
src/Launcher.cpp (+6/-1)
src/Launcher.h (+1/-0)
src/LauncherModel.cpp (+28/-0)
src/LauncherModel.h (+2/-0)
To merge this branch: bzr merge lp://qastaging/~didrocks/unity/fix-709179-709119
Reviewer Review Type Date Requested Status
Jason Smith (community) Approve
Review via email: mp+47802@code.qastaging.launchpad.net

Description of the change

this branch superseeds ~didrocks/unity/fix-709119 as it implements the
logic in the icon itself to know if it's draggable or not.

Due to a nux bug in the drag() state not being able to determine which button is
used (nux::GetEventButton (button_flags) returns 0, whatever button is used),
the logic has been implemented on LauncherIcon::RecvMouseDown and
LauncherIcon::RecvMouseUp. We ensure the signal is called as well as it wasn't
the case before.

To post a comment you must log in.
Revision history for this message
Jason Smith (jassmith) wrote :

Putting this into LauncherIcon is not the proper solution. Ideally the policy on dragging would be done in either Launcher or one of its sister classes.

Launcher is also aware of what button was pressed so thats an easy fix there. As for what icons can be dragged, I would suggest maybe in launcher model having a query for model->IconHasSisters (); which checks if there are other similar icons they can be dragged between. That might make more sense in the controller in the long run, or maybe the model needs to have the sorting algorithm in it, I am not sure yet.

review: Needs Fixing
Revision history for this message
Jason Smith (jassmith) wrote :

looking sexy +1

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.