Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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;
}

Expand Down Expand Up @@ -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 ();
}
);
Expand Down
7 changes: 2 additions & 5 deletions src/DBus.vala
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,10 @@ public class Notifications.Server : Object {
private Gee.Map<uint32, Bubble?> 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<uint32, Bubble?> ();
action_group = new Fdo.ActionGroup (this);

Expand Down Expand Up @@ -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")) {
Expand Down