Merge lp:~brandontschaefer/unity/drag-file-dash-to-launcher-close-SRU into lp:unity/5.0

Proposed by Brandon Schaefer
Status: Merged
Approved by: Brandon Schaefer
Approved revision: no longer in the source branch.
Merged at revision: 2368
Proposed branch: lp:~brandontschaefer/unity/drag-file-dash-to-launcher-close-SRU
Merge into: lp:unity/5.0
Diff against target: 60 lines (+19/-3)
2 files modified
manual-tests/Dash.txt (+14/-1)
plugins/unityshell/src/Launcher.cpp (+5/-2)
To merge this branch: bzr merge lp:~brandontschaefer/unity/drag-file-dash-to-launcher-close-SRU
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Review via email: mp+111460@code.launchpad.net

Commit message

Documents and files now dragged from the Dash to the Launcher into an application will close the dash.

Description of the change

=== Problem ===
When dragging files from the Dash to an application in the Launcher the Dash would remain open.

=== Fix ===
If a drag drop is being processed and getting sent to a _dnd_hovered_icon and the Dash is open close the dash.

=== Test ===
Manual test added.

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

LGTM

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

No commit message specified.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'manual-tests/Dash.txt'
2--- manual-tests/Dash.txt 2012-04-02 14:01:37 +0000
3+++ manual-tests/Dash.txt 2012-06-21 17:34:49 +0000
4@@ -190,6 +190,19 @@
5 this saturation-process should be smooth and without flicker.
6 The tinting of the non-drag-targets should not change.
7
8+Dash to Launcher document-file drag
9+-----------------------------------
10+
11+Setup:
12+#. Open the Dash (Super).
13+#. Go to the Music Lens.
14+
15+Action:
16+#. Drag any music file into the Firefox icon on the launcher.
17+
18+Outcome:
19+ The Dash should close and the music file should open up in Firefox.
20+
21 Lens Tests
22 ============
23
24@@ -242,4 +255,4 @@
25
26 Wrong Outcome:
27 #2 and #4 both produce non-empty result which means the lenses were not
28- lazy-loaded but they were running before the first dash use.
29\ No newline at end of file
30+ lazy-loaded but they were running before the first dash use.
31
32=== modified file 'plugins/unityshell/src/Launcher.cpp'
33--- plugins/unityshell/src/Launcher.cpp 2012-06-18 16:25:00 +0000
34+++ plugins/unityshell/src/Launcher.cpp 2012-06-21 17:34:49 +0000
35@@ -2286,14 +2286,14 @@
36 {
37 if (!(*it)->GetQuirk(AbstractLauncherIcon::QUIRK_VISIBLE) || !(*it)->IsVisibleOnMonitor(monitor))
38 continue;
39-
40+
41 if ((*it) == hovered_icon) {
42 if (prevIt != _model->end()) {
43 iconBeforeHover = *prevIt;
44 }
45 break;
46 }
47-
48+
49 prevIt = it;
50 }
51
52@@ -2975,6 +2975,9 @@
53 }
54 else if (_dnd_hovered_icon && _drag_action != nux::DNDACTION_NONE)
55 {
56+ if (IsOverlayOpen())
57+ ubus.SendMessage(UBUS_PLACE_VIEW_CLOSE_REQUEST);
58+
59 _dnd_hovered_icon->AcceptDrop(_dnd_data);
60 }
61

Subscribers

People subscribed via source and target branches

to all changes: