Merge lp:~donadigo/wingpanel-indicator-notifications/ignore-canonical-private-key into lp:~wingpanel-devs/wingpanel-indicator-notifications/wingpanel-indicator-notifications

Proposed by Adam Bieńkowski
Status: Merged
Approved by: Cody Garver
Approved revision: 109
Merged at revision: 112
Proposed branch: lp:~donadigo/wingpanel-indicator-notifications/ignore-canonical-private-key
Merge into: lp:~wingpanel-devs/wingpanel-indicator-notifications/wingpanel-indicator-notifications
Diff against target: 33 lines (+3/-2)
2 files modified
src/Indicator.vala (+1/-1)
src/Services/Notification.vala (+2/-1)
To merge this branch: bzr merge lp:~donadigo/wingpanel-indicator-notifications/ignore-canonical-private-key
Reviewer Review Type Date Requested Status
WingPanel Devs Pending
Review via email: mp+301773@code.launchpad.net

Commit message

Ignore notifications with "x-canonical-private-synchronous" key: do not show sound & brightness changes.
Use on_switch_stack instead of only changing the icon.

Description of the change

This branch prevents notifications with a key of "x-canonical-private-synchronous" to show in the indicator (ie: sound, brightness changes). This is also allowing us to remove the hardcoded senders since they also use this key.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Indicator.vala'
2--- src/Indicator.vala 2016-07-20 20:17:06 +0000
3+++ src/Indicator.vala 2016-08-02 13:14:01 +0000
4@@ -16,7 +16,7 @@
5 */
6
7 public class Indicator : Wingpanel.Indicator {
8- private const string[] EXCEPTIONS = { "wingpanel-indicator-sound", "indicator-sound", "NetworkManager", "gnome-settings-daemon", "gnome-power-panel" };
9+ private const string[] EXCEPTIONS = { "NetworkManager", "gnome-settings-daemon", "gnome-power-panel" };
10 private const string CHILD_SCHEMA_ID = "org.pantheon.desktop.gala.notifications.application";
11 private const string CHILD_PATH = "/org/pantheon/desktop/gala/notifications/applications/%s/";
12 private const string REMEMBER_KEY = "remember";
13
14=== modified file 'src/Services/Notification.vala'
15--- src/Services/Notification.vala 2016-07-20 20:11:51 +0000
16+++ src/Services/Notification.vala 2016-08-02 13:14:01 +0000
17@@ -52,6 +52,7 @@
18 }
19
20 private const string DEFAULT_ACTION = "default";
21+ private const string X_CANONICAL_PRIVATE_KEY = "x-canonical-private-synchronous";
22 private const string DESKTOP_ENTRY_KEY = "desktop-entry";
23 private const string FALLBACK_DESKTOP_ID = "gala-other" + DESKTOP_ID_EXT;
24 private bool pid_accuired;
25@@ -125,7 +126,7 @@
26 }
27
28 public bool get_is_valid () {
29- return app_info != null;
30+ return app_info != null && hints.lookup_value (X_CANONICAL_PRIVATE_KEY, null) == null;
31 }
32
33 public bool run_default_action () {

Subscribers

People subscribed via source and target branches

to all changes: