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
=== modified file 'libunity-2d-private/src/applicationslist.cpp'
--- libunity-2d-private/src/applicationslist.cpp 2012-03-14 15:07:50 +0000
+++ libunity-2d-private/src/applicationslist.cpp 2012-04-30 14:00:29 +0000
@@ -201,6 +201,17 @@
201}201}
202202
203void203void
204ApplicationsList::removeApplication(const QString& desktop_file)
205{
206 Q_FOREACH(Application *app, m_applications) {
207 if (app->desktop_file() == desktop_file) {
208 removeApplication(app);
209 break;
210 }
211 }
212}
213
214void
204ApplicationsList::onApplicationUserVisibleChanged(bool user_visible)215ApplicationsList::onApplicationUserVisibleChanged(bool user_visible)
205{216{
206 BamfApplication* bamf_application = qobject_cast<BamfApplication*>(sender());217 BamfApplication* bamf_application = qobject_cast<BamfApplication*>(sender());
@@ -399,6 +410,11 @@
399410
400 if (!sticky && !application->running()) {411 if (!sticky && !application->running()) {
401 removeApplication(application);412 removeApplication(application);
413 Q_FOREACH(ApplicationsList *other, ApplicationsListManager::instance()->m_lists) {
414 if (other != this) {
415 other->removeApplication(application->desktop_file());
416 }
417 }
402 }418 }
403}419}
404420
405421
=== modified file 'libunity-2d-private/src/applicationslist.h'
--- libunity-2d-private/src/applicationslist.h 2012-04-26 08:14:26 +0000
+++ libunity-2d-private/src/applicationslist.h 2012-04-30 14:00:29 +0000
@@ -70,6 +70,7 @@
7070
71 void insertApplication(Application* application);71 void insertApplication(Application* application);
72 void removeApplication(Application* application);72 void removeApplication(Application* application);
73 void removeApplication(const QString& desktop_file);
7374
74 QString favoriteFromDesktopFilePath(const QString& desktop_file) const;75 QString favoriteFromDesktopFilePath(const QString& desktop_file) const;
7576
7677
=== modified file 'tests/manual-tests/launcher.txt'
--- tests/manual-tests/launcher.txt 2012-04-26 08:16:18 +0000
+++ tests/manual-tests/launcher.txt 2012-04-30 14:00:29 +0000
@@ -163,7 +163,13 @@
163----163----
164 * Have a multimonitor setup164 * Have a multimonitor setup
165 * On primary screen, open dash165 * On primary screen, open dash
166 * Drab an application icon and drop it onto the launcher beside it166 * Drag an application icon and drop it onto the launcher beside it
167167
168Verify Application tile created for that application in all launchers168Verify Application tile created for that application in all launchers
169----169----
170 * Have a multimonitor setup
171 * Have launchers in all monitors
172 * Make an application that is not running not sticky (i.e. remove it from the launcher)
173
174Verify Application tile is removed from all launchers
175----

Subscribers

People subscribed via source and target branches