Merge lp:~aacid/unity-2d/ShowTileContextMenuOnPress_813036 into lp:unity-2d

Proposed by Albert Astals Cid
Status: Merged
Approved by: Lohith D Shivamurthy
Approved revision: 791
Merged at revision: 833
Proposed branch: lp:~aacid/unity-2d/ShowTileContextMenuOnPress_813036
Merge into: lp:unity-2d
Diff against target: 55 lines (+14/-9)
2 files modified
launcher/LauncherItem.qml (+2/-0)
launcher/LauncherList.qml (+12/-9)
To merge this branch: bzr merge lp:~aacid/unity-2d/ShowTileContextMenuOnPress_813036
Reviewer Review Type Date Requested Status
Lohith D Shivamurthy (community) Approve
Review via email: mp+83271@code.launchpad.net

Commit message

[launcher] Move the RMB menu from clicked to pressed

Fixes LP bug #813036

Description of the change

Move the RMB menu from clicked to pressed

Fixes LP bug #813036

To post a comment you must log in.
Revision history for this message
Gerry Boland (gerboland) wrote :

Until we get automated testing going, I need to ask you to write unit test to test this fix, and place them in https://wiki.ubuntu.com/Unity2DRegressionTests

Revision history for this message
Albert Astals Cid (aacid) wrote :

> Until we get automated testing going, I need to ask you to write unit test to
> test this fix, and place them in
> https://wiki.ubuntu.com/Unity2DRegressionTests

Text added to https://wiki.ubuntu.com/Unity2DRegressionTests

Revision history for this message
Lohith D Shivamurthy (dyams) wrote :

Now we have moved to unity-core-5.0. Could you please rebase with trunk and check if you can rebuild successfully?

791. By Albert Astals Cid

* debian/control:
  - bump libunitycore build-dep to 5.0.
    TODO: update to the real dep version when releasing

Revision history for this message
Albert Astals Cid (aacid) wrote :

This is a pure QML change, I don't see why changing to unity-core should make any difference

Revision history for this message
Florian Boucault (fboucault) wrote :

Agreed with Albert.
What is RMB that I see in the commit/description message? Can we be explicit?

Revision history for this message
Albert Astals Cid (aacid) wrote :

RMB = Right Mouse Button

Revision history for this message
Lohith D Shivamurthy (dyams) wrote :

> This is a pure QML change, I don't see why changing to unity-core should make
> any difference

Thank you Albert.
In order to avoid merge conflicts later, I asked you to re-base with trunk already.

Revision history for this message
Lohith D Shivamurthy (dyams) wrote :

It works good and code is neat and clean.
Approving.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/LauncherItem.qml'
2--- launcher/LauncherItem.qml 2011-12-11 22:26:58 +0000
3+++ launcher/LauncherItem.qml 2011-12-19 09:17:31 +0000
4@@ -101,6 +101,7 @@
5 }
6
7 signal clicked(variant mouse)
8+ signal pressed(variant mouse)
9 signal entered
10 signal exited
11
12@@ -179,6 +180,7 @@
13 onClicked: item.clicked(mouse)
14 onEntered: item.entered()
15 onExited: item.exited()
16+ onPressed: item.pressed(mouse)
17 }
18
19 /* This is the for centering the actual tile in the launcher */
20
21=== modified file 'launcher/LauncherList.qml'
22--- launcher/LauncherList.qml 2011-12-15 14:00:48 +0000
23+++ launcher/LauncherList.qml 2011-12-19 09:17:31 +0000
24@@ -153,19 +153,22 @@
25 item.menu.hide()
26 item.activate()
27 }
28- else if (mouse.button == Qt.RightButton) {
29- /* Show the menu first, then unfold it. Doing things in this
30- order is required because at the moment the code path that
31- adjusts the position of the menu in case it goes offscreen
32- is traversed only when unfolding it.
33- See FIXME in LauncherContextualMenu::show(…). */
34- showMenu()
35- item.menu.folded = false
36- }
37 else if (mouse.button == Qt.MidButton) {
38 item.launchNewInstance()
39 }
40 }
41+
42+ onPressed: {
43+ if (mouse.button == Qt.RightButton) {
44+ /* Show the menu first, then unfold it. Doing things in this
45+ order is required because at the moment the code path that
46+ adjusts the position of the menu in case it goes offscreen
47+ is traversed only when unfolding it.
48+ See FIXME in LauncherContextualMenu::show(…). */
49+ showMenu()
50+ item.menu.folded = false
51+ }
52+ }
53
54 /* Display the tooltip when hovering the item only when the list
55 is not moving */

Subscribers

People subscribed via source and target branches