Merge lp:~rsmithroberts/unity-2d/whitelist-all into lp:unity-2d

Proposed by Ryan Smith-Roberts
Status: Merged
Approved by: Alberto Mardegan
Approved revision: 760
Merged at revision: 758
Proposed branch: lp:~rsmithroberts/unity-2d/whitelist-all
Merge into: lp:unity-2d
Diff against target: 32 lines (+3/-1)
2 files modified
panel/applets/legacytray/legacytrayapplet.cpp (+2/-1)
panel/applets/legacytray/legacytrayapplet.h (+1/-0)
To merge this branch: bzr merge lp:~rsmithroberts/unity-2d/whitelist-all
Reviewer Review Type Date Requested Status
Alberto Mardegan (community) Approve
Review via email: mp+79445@code.launchpad.net

Description of the change

[panel] Honor "all" in legacyapplet whitelist

Additionally, make whitelist string comparisons case-insensitive (increases DWIW)

Fixes #847525

To post a comment you must log in.
Revision history for this message
Alberto Mardegan (mardy) wrote :

Hi Ryan! I see that you also changed the match to be case insensitive -- I think that that makes sense as well. Good job!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'panel/applets/legacytray/legacytrayapplet.cpp'
2--- panel/applets/legacytray/legacytrayapplet.cpp 2011-08-31 15:45:56 +0000
3+++ panel/applets/legacytray/legacytrayapplet.cpp 2011-10-14 22:08:24 +0000
4@@ -54,6 +54,7 @@
5 SLOT(slotTaskCreated(SystemTray::Task*)));
6
7 m_whitelist = m_dconfPanel->property("systrayWhitelist").toStringList();
8+ m_whitelistAll = m_whitelist.contains("all", Qt::CaseInsensitive);
9 }
10
11 LegacyTrayApplet::~LegacyTrayApplet()
12@@ -69,7 +70,7 @@
13 classes to allow in the Panel's systray implementation." but here we only
14 support matching on WM_CLASS.
15 */
16- if (!m_whitelist.contains(task->name())) {
17+ if (!m_whitelistAll && !m_whitelist.contains(task->name(), Qt::CaseInsensitive)) {
18 return;
19 }
20
21
22=== modified file 'panel/applets/legacytray/legacytrayapplet.h'
23--- panel/applets/legacytray/legacytrayapplet.h 2011-08-31 15:45:56 +0000
24+++ panel/applets/legacytray/legacytrayapplet.h 2011-10-14 22:08:24 +0000
25@@ -50,6 +50,7 @@
26 SystemTray::FdoSelectionManager* m_selectionManager;
27 QConf* m_dconfPanel;
28 QStringList m_whitelist;
29+ bool m_whitelistAll;
30 };
31
32 #endif /* LEGACYTRAYAPPLET_H */

Subscribers

People subscribed via source and target branches