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
=== modified file 'src/Widgets/AppItem.vala'
--- src/Widgets/AppItem.vala 2015-02-14 19:51:16 +0000
+++ src/Widgets/AppItem.vala 2015-08-30 20:35:22 +0000
@@ -35,7 +35,7 @@
35 private string[] cond_sounds = ({"on", "off"});35 private string[] cond_sounds = ({"on", "off"});
3636
37 // Please add more exceptions! TODO: app-name, title and icon all in one array.37 // Please add more exceptions! TODO: app-name, title and icon all in one array.
38 private string[] exceptions = ({"", "indicator-sound", "notify-send", "NetworkManager", "gnome-settings-daemon"});38 private string[] exceptions = ({"", "indicator-sound", "NetworkManager", "gnome-settings-daemon"});
3939
40 public AppItem (string app_name, string[] properties) {40 public AppItem (string app_name, string[] properties) {
41 if (search_appinfo_for_name (app_name) && load_icon ()) {41 if (search_appinfo_for_name (app_name) && load_icon ()) {
@@ -51,7 +51,7 @@
51 try {51 try {
52 AppInfo found_info = AppInfo.create_from_commandline ("", app_name, AppInfoCreateFlags.NONE);52 AppInfo found_info = AppInfo.create_from_commandline ("", app_name, AppInfoCreateFlags.NONE);
5353
54 if ((app_name in exceptions) == false) {54 if (!(app_name in exceptions)) {
55 var found = false;55 var found = false;
5656
57 AppInfo.get_all ().foreach ((info) => {57 AppInfo.get_all ().foreach ((info) => {
@@ -86,9 +86,6 @@
86 case "indicator-sound":86 case "indicator-sound":
87 appicon = Icon.new_for_string ("preferences-desktop-sound");87 appicon = Icon.new_for_string ("preferences-desktop-sound");
88 break;88 break;
89 case "notify-send":
90 appicon = Icon.new_for_string ("dialog-information");
91 break;
92 case "NetworkManager":89 case "NetworkManager":
93 appicon = Icon.new_for_string ("preferences-system-network");90 appicon = Icon.new_for_string ("preferences-system-network");
94 break;91 break;
9592
=== modified file 'src/Widgets/AppList.vala'
--- src/Widgets/AppList.vala 2014-11-14 19:07:17 +0000
+++ src/Widgets/AppList.vala 2015-08-30 20:35:22 +0000
@@ -59,7 +59,7 @@
59 if (parameters.length == 2) {59 if (parameters.length == 2) {
60 var properties = parameters[1].split (",");60 var properties = parameters[1].split (",");
6161
62 if (properties.length == 2) {62 if (properties.length == 2 && parameters[0] != "notify-send") {
63 var item = new AppItem (parameters[0], properties);63 var item = new AppItem (parameters[0], properties);
64 this.add (item);64 this.add (item);
65 }65 }

Subscribers

People subscribed via source and target branches

to all changes: