diff --git a/src/Application.vala b/src/Application.vala index 393b648..b7e5214 100644 --- a/src/Application.vala +++ b/src/Application.vala @@ -19,6 +19,8 @@ */ public class Notifications.Application : Gtk.Application { + public static Settings settings = new Settings ("io.elementary.notifications"); + public Application () { Object ( application_id: "io.elementary.notifications", @@ -30,7 +32,7 @@ public class Notifications.Application : Gtk.Application { try { new Notifications.Server (connection); } catch (Error e) { - Error.prefix_literal (out e, "Registring notification server failed: "); + Error.prefix_literal (out e, "Registering notification server failed: "); throw e; } @@ -62,7 +64,7 @@ public class Notifications.Application : Gtk.Application { dbus_flags, () => hold (), (conn, name) => { - critical ("Could not aquire bus: %s", name); + critical ("Could not acquire bus: %s", name); name_lost (); } ); diff --git a/src/DBus.vala b/src/DBus.vala index e0d0a54..64b9976 100644 --- a/src/DBus.vala +++ b/src/DBus.vala @@ -25,13 +25,10 @@ public class Notifications.Server : Object { private Gee.Map bubbles; private Confirmation? confirmation; - private Settings settings; - private uint action_group_id; private uint server_id; public Server (DBusConnection connection) throws Error { - settings = new Settings ("io.elementary.notifications"); bubbles = new Gee.HashMap (); action_group = new Fdo.ActionGroup (this); @@ -144,10 +141,10 @@ public class Notifications.Server : Object { notification.buttons.add ({ label, action_name }); } - if (!settings.get_boolean ("do-not-disturb") || notification.priority == GLib.NotificationPriority.URGENT) { + if (!Application.settings.get_boolean ("do-not-disturb") || notification.priority == GLib.NotificationPriority.URGENT) { var app_settings = new Settings.with_path ( "io.elementary.notifications.applications", - settings.path.concat ("applications", "/", notification.app_id, "/") + Application.settings.path.concat ("applications", "/", notification.app_id, "/") ); if (app_settings.get_boolean ("bubbles")) {