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
=== modified file 'launcher/LauncherItem.qml'
--- launcher/LauncherItem.qml 2011-12-11 22:26:58 +0000
+++ launcher/LauncherItem.qml 2011-12-19 09:17:31 +0000
@@ -101,6 +101,7 @@
101 }101 }
102102
103 signal clicked(variant mouse)103 signal clicked(variant mouse)
104 signal pressed(variant mouse)
104 signal entered105 signal entered
105 signal exited106 signal exited
106107
@@ -179,6 +180,7 @@
179 onClicked: item.clicked(mouse)180 onClicked: item.clicked(mouse)
180 onEntered: item.entered()181 onEntered: item.entered()
181 onExited: item.exited()182 onExited: item.exited()
183 onPressed: item.pressed(mouse)
182 }184 }
183185
184 /* This is the for centering the actual tile in the launcher */186 /* This is the for centering the actual tile in the launcher */
185187
=== modified file 'launcher/LauncherList.qml'
--- launcher/LauncherList.qml 2011-12-15 14:00:48 +0000
+++ launcher/LauncherList.qml 2011-12-19 09:17:31 +0000
@@ -153,19 +153,22 @@
153 item.menu.hide()153 item.menu.hide()
154 item.activate()154 item.activate()
155 }155 }
156 else if (mouse.button == Qt.RightButton) {
157 /* Show the menu first, then unfold it. Doing things in this
158 order is required because at the moment the code path that
159 adjusts the position of the menu in case it goes offscreen
160 is traversed only when unfolding it.
161 See FIXME in LauncherContextualMenu::show(…). */
162 showMenu()
163 item.menu.folded = false
164 }
165 else if (mouse.button == Qt.MidButton) {156 else if (mouse.button == Qt.MidButton) {
166 item.launchNewInstance()157 item.launchNewInstance()
167 }158 }
168 }159 }
160
161 onPressed: {
162 if (mouse.button == Qt.RightButton) {
163 /* Show the menu first, then unfold it. Doing things in this
164 order is required because at the moment the code path that
165 adjusts the position of the menu in case it goes offscreen
166 is traversed only when unfolding it.
167 See FIXME in LauncherContextualMenu::show(…). */
168 showMenu()
169 item.menu.folded = false
170 }
171 }
169172
170 /* Display the tooltip when hovering the item only when the list173 /* Display the tooltip when hovering the item only when the list
171 is not moving */174 is not moving */

Subscribers

People subscribed via source and target branches