Merge lp:~robertcarr/unity/homelauncher-dnd into lp:unity

Proposed by Robert Carr
Status: Merged
Merged at revision: 1534
Proposed branch: lp:~robertcarr/unity/homelauncher-dnd
Merge into: lp:unity
Diff against target: 18 lines (+4/-2)
1 file modified
plugins/unityshell/src/BamfLauncherIcon.cpp (+4/-2)
To merge this branch: bzr merge lp:~robertcarr/unity/homelauncher-dnd
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+75012@code.launchpad.net

Description of the change

Let the home launcher accept all drag types.

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

Please use is_home_launcher instead of IsHomeLauncher.

Revision history for this message
Robert Carr (robertcarr) wrote :

Whooooops :) fixed

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/BamfLauncherIcon.cpp'
2--- plugins/unityshell/src/BamfLauncherIcon.cpp 2011-09-08 11:04:17 +0000
3+++ plugins/unityshell/src/BamfLauncherIcon.cpp 2011-09-12 15:01:26 +0000
4@@ -1064,10 +1064,12 @@
5 std::set<std::string> BamfLauncherIcon::ValidateUrisForLaunch(unity::DndData& uris)
6 {
7 std::set<std::string> result;
8-
9+ gboolean is_home_launcher = g_str_has_suffix(DesktopFile(), "nautilus-home.desktop");
10+
11 for (auto i : uris.Types())
12 for (auto j : GetSupportedTypes())
13- if (g_content_type_is_a(i.c_str(), j.c_str()))
14+ if (g_content_type_is_a(i.c_str(), j.c_str()) ||
15+ is_home_launcher)
16 {
17 for (auto k : uris.UrisByType(i))
18 result.insert(k);