Merge lp:~donadigo/switchboard-plug-notifications/fix-1485317 into lp:~elementary-pantheon/switchboard-plug-notifications/trunk

Proposed by Adam Bieńkowski
Status: Merged
Approved by: Marcus Wichelmann
Approved revision: 119
Merged at revision: 117
Proposed branch: lp:~donadigo/switchboard-plug-notifications/fix-1485317
Merge into: lp:~elementary-pantheon/switchboard-plug-notifications/trunk
Diff against target: 44 lines (+3/-6)
2 files modified
src/Widgets/AppItem.vala (+2/-5)
src/Widgets/AppList.vala (+1/-1)
To merge this branch: bzr merge lp:~donadigo/switchboard-plug-notifications/fix-1485317
Reviewer Review Type Date Requested Status
Marcus Wichelmann (community) code & testing Approve
Review via email: mp+269582@code.launchpad.net

Commit message

* Completely hide notify-send item.
* Fix bug #1485317.

Description of the change

Fix bug #1485317 Change notify-send to something else.

To post a comment you must log in.
118. By Adam Bieńkowski

Completely hide notify-send entry

119. By Adam Bieńkowski

Remove exception

Revision history for this message
Marcus Wichelmann (l-admin-3) wrote :

Works and the code looks good.

review: Approve (code & testing)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Widgets/AppItem.vala'
2--- src/Widgets/AppItem.vala 2015-02-14 19:51:16 +0000
3+++ src/Widgets/AppItem.vala 2015-08-30 20:35:22 +0000
4@@ -35,7 +35,7 @@
5 private string[] cond_sounds = ({"on", "off"});
6
7 // Please add more exceptions! TODO: app-name, title and icon all in one array.
8- private string[] exceptions = ({"", "indicator-sound", "notify-send", "NetworkManager", "gnome-settings-daemon"});
9+ private string[] exceptions = ({"", "indicator-sound", "NetworkManager", "gnome-settings-daemon"});
10
11 public AppItem (string app_name, string[] properties) {
12 if (search_appinfo_for_name (app_name) && load_icon ()) {
13@@ -51,7 +51,7 @@
14 try {
15 AppInfo found_info = AppInfo.create_from_commandline ("", app_name, AppInfoCreateFlags.NONE);
16
17- if ((app_name in exceptions) == false) {
18+ if (!(app_name in exceptions)) {
19 var found = false;
20
21 AppInfo.get_all ().foreach ((info) => {
22@@ -86,9 +86,6 @@
23 case "indicator-sound":
24 appicon = Icon.new_for_string ("preferences-desktop-sound");
25 break;
26- case "notify-send":
27- appicon = Icon.new_for_string ("dialog-information");
28- break;
29 case "NetworkManager":
30 appicon = Icon.new_for_string ("preferences-system-network");
31 break;
32
33=== modified file 'src/Widgets/AppList.vala'
34--- src/Widgets/AppList.vala 2014-11-14 19:07:17 +0000
35+++ src/Widgets/AppList.vala 2015-08-30 20:35:22 +0000
36@@ -59,7 +59,7 @@
37 if (parameters.length == 2) {
38 var properties = parameters[1].split (",");
39
40- if (properties.length == 2) {
41+ if (properties.length == 2 && parameters[0] != "notify-send") {
42 var item = new AppItem (parameters[0], properties);
43 this.add (item);
44 }

Subscribers

People subscribed via source and target branches

to all changes: