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
=== modified file 'src/Indicator.vala'
--- src/Indicator.vala 2016-07-20 20:17:06 +0000
+++ src/Indicator.vala 2016-08-02 13:14:01 +0000
@@ -16,7 +16,7 @@
16 */16 */
1717
18public class Indicator : Wingpanel.Indicator {18public class Indicator : Wingpanel.Indicator {
19 private const string[] EXCEPTIONS = { "wingpanel-indicator-sound", "indicator-sound", "NetworkManager", "gnome-settings-daemon", "gnome-power-panel" };19 private const string[] EXCEPTIONS = { "NetworkManager", "gnome-settings-daemon", "gnome-power-panel" };
20 private const string CHILD_SCHEMA_ID = "org.pantheon.desktop.gala.notifications.application";20 private const string CHILD_SCHEMA_ID = "org.pantheon.desktop.gala.notifications.application";
21 private const string CHILD_PATH = "/org/pantheon/desktop/gala/notifications/applications/%s/";21 private const string CHILD_PATH = "/org/pantheon/desktop/gala/notifications/applications/%s/";
22 private const string REMEMBER_KEY = "remember";22 private const string REMEMBER_KEY = "remember";
2323
=== modified file 'src/Services/Notification.vala'
--- src/Services/Notification.vala 2016-07-20 20:11:51 +0000
+++ src/Services/Notification.vala 2016-08-02 13:14:01 +0000
@@ -52,6 +52,7 @@
52 }52 }
5353
54 private const string DEFAULT_ACTION = "default";54 private const string DEFAULT_ACTION = "default";
55 private const string X_CANONICAL_PRIVATE_KEY = "x-canonical-private-synchronous";
55 private const string DESKTOP_ENTRY_KEY = "desktop-entry";56 private const string DESKTOP_ENTRY_KEY = "desktop-entry";
56 private const string FALLBACK_DESKTOP_ID = "gala-other" + DESKTOP_ID_EXT;57 private const string FALLBACK_DESKTOP_ID = "gala-other" + DESKTOP_ID_EXT;
57 private bool pid_accuired;58 private bool pid_accuired;
@@ -125,7 +126,7 @@
125 }126 }
126127
127 public bool get_is_valid () {128 public bool get_is_valid () {
128 return app_info != null;129 return app_info != null && hints.lookup_value (X_CANONICAL_PRIVATE_KEY, null) == null;
129 }130 }
130131
131 public bool run_default_action () {132 public bool run_default_action () {

Subscribers

People subscribed via source and target branches

to all changes: