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

Proposed by Albert Astals Cid
Status: Merged
Approved by: Gerry Boland
Approved revision: 1088
Merged at revision: 1098
Proposed branch: lp:~aacid/unity-2d/remove_non_running_non_sticky_all_lists
Merge into: lp:unity-2d
Diff against target: 64 lines (+24/-1)
3 files modified
libunity-2d-private/src/applicationslist.cpp (+16/-0)
libunity-2d-private/src/applicationslist.h (+1/-0)
tests/manual-tests/launcher.txt (+7/-1)
To merge this branch: bzr merge lp:~aacid/unity-2d/remove_non_running_non_sticky_all_lists
Reviewer Review Type Date Requested Status
Gerry Boland Pending
Review via email: mp+103846@code.launchpad.net

Commit message

[Launcher] When the stickyness of an application instance changes and we decide to remove it from it's launcher applicationlist do the same for all the other launchers (monitors)

Description of the change

[Launcher] When the stickyness of an application instance changes and we decide to remove it from it's launcher applicationlist do the same for all the other launchers (monitors)

To post a comment you must log in.
1087. By Albert Astals Cid

test

1088. By Albert Astals Cid

Merge lp:unity-2d

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libunity-2d-private/src/applicationslist.cpp'
2--- libunity-2d-private/src/applicationslist.cpp 2012-03-14 15:07:50 +0000
3+++ libunity-2d-private/src/applicationslist.cpp 2012-04-30 14:00:29 +0000
4@@ -201,6 +201,17 @@
5 }
6
7 void
8+ApplicationsList::removeApplication(const QString& desktop_file)
9+{
10+ Q_FOREACH(Application *app, m_applications) {
11+ if (app->desktop_file() == desktop_file) {
12+ removeApplication(app);
13+ break;
14+ }
15+ }
16+}
17+
18+void
19 ApplicationsList::onApplicationUserVisibleChanged(bool user_visible)
20 {
21 BamfApplication* bamf_application = qobject_cast<BamfApplication*>(sender());
22@@ -399,6 +410,11 @@
23
24 if (!sticky && !application->running()) {
25 removeApplication(application);
26+ Q_FOREACH(ApplicationsList *other, ApplicationsListManager::instance()->m_lists) {
27+ if (other != this) {
28+ other->removeApplication(application->desktop_file());
29+ }
30+ }
31 }
32 }
33
34
35=== modified file 'libunity-2d-private/src/applicationslist.h'
36--- libunity-2d-private/src/applicationslist.h 2012-04-26 08:14:26 +0000
37+++ libunity-2d-private/src/applicationslist.h 2012-04-30 14:00:29 +0000
38@@ -70,6 +70,7 @@
39
40 void insertApplication(Application* application);
41 void removeApplication(Application* application);
42+ void removeApplication(const QString& desktop_file);
43
44 QString favoriteFromDesktopFilePath(const QString& desktop_file) const;
45
46
47=== modified file 'tests/manual-tests/launcher.txt'
48--- tests/manual-tests/launcher.txt 2012-04-26 08:16:18 +0000
49+++ tests/manual-tests/launcher.txt 2012-04-30 14:00:29 +0000
50@@ -163,7 +163,13 @@
51 ----
52 * Have a multimonitor setup
53 * On primary screen, open dash
54- * Drab an application icon and drop it onto the launcher beside it
55+ * Drag an application icon and drop it onto the launcher beside it
56
57 Verify Application tile created for that application in all launchers
58 ----
59+ * Have a multimonitor setup
60+ * Have launchers in all monitors
61+ * Make an application that is not running not sticky (i.e. remove it from the launcher)
62+
63+Verify Application tile is removed from all launchers
64+----

Subscribers

People subscribed via source and target branches