@@ -18,13 +18,10 @@ public class Notifications.Server : Object {
1818 private Gee . Map<uint32, Bubble ?> bubbles;
1919 private Confirmation ? confirmation;
2020
21- private Settings settings;
22-
2321 private uint action_group_id;
2422 private uint server_id;
2523
2624 public Server (DBusConnection connection ) throws Error {
27- settings = new Settings (" io.elementary.notifications" );
2825 bubbles = new Gee .HashMap<uint32, Bubble ?> ();
2926 action_group = new Fdo .ActionGroup (this );
3027
@@ -137,10 +134,10 @@ public class Notifications.Server : Object {
137134 notification. buttons. add ({ label, action_name });
138135 }
139136
140- if (! settings. get_boolean (" do-not-disturb" ) || notification. priority == GLib . NotificationPriority . URGENT ) {
137+ if (! Application . settings. get_boolean (" do-not-disturb" ) || notification. priority == GLib . NotificationPriority . URGENT ) {
141138 var app_settings = new Settings .with_path (
142139 " io.elementary.notifications.applications" ,
143- settings. path. concat (" applications" , " /" , notification. app_id, " /" )
140+ Application . settings. path. concat (" applications" , " /" , notification. app_id, " /" )
144141 );
145142
146143 if (app_settings. get_boolean (" bubbles" )) {
@@ -171,7 +168,7 @@ public class Notifications.Server : Object {
171168 sound = category_to_sound_name (hints[" category" ]. get_string ());
172169 }
173170
174- send_sound (sound);
171+ Application . play_sound (sound);
175172 }
176173 }
177174 }
@@ -192,7 +189,7 @@ public class Notifications.Server : Object {
192189 // consistency it should. So we make it emit the default one.
193190 var confirmation_type = hints. lookup (X_CANONICAL_PRIVATE_SYNCHRONOUS ). get_string ();
194191 if (confirmation_type == " indicator-sound" ) {
195- send_sound (" audio-volume-change" );
192+ Application . play_sound (" audio-volume-change" );
196193 }
197194
198195 if (confirmation == null ) {
@@ -212,20 +209,6 @@ public class Notifications.Server : Object {
212209 confirmation. present ();
213210 }
214211
215- private void send_sound (string sound_name ) {
216- if (sound_name == " " ) {
217- return ;
218- }
219-
220- Canberra . Proplist props;
221- Canberra . Proplist . create (out props);
222-
223- props. sets (Canberra . PROP_CANBERRA_CACHE_CONTROL , " volatile" );
224- props. sets (Canberra . PROP_EVENT_ID , sound_name);
225-
226- CanberraGtk4 . context_get (). play_full (0 , props);
227- }
228-
229212 static unowned string category_to_sound_name (string category ) {
230213 unowned string sound;
231214
0 commit comments