Skip to content

Commit

Permalink
Lokup notification schema recursive
Browse files Browse the repository at this point in the history
  • Loading branch information
worldofpeace committed Apr 6, 2020
1 parent 7ec29c6 commit 1554997
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Backend/App.vala
Expand Up @@ -31,7 +31,7 @@ public class Backend.App : Object {

string child_schema_id = "io.elementary.notifications.applications";
string child_path = "/io/elementary/notifications/applications/%s/";
if (GLib.SettingsSchemaSource.get_default ().lookup (child_schema_id, false) == null) {
if (GLib.SettingsSchemaSource.get_default ().lookup (child_schema_id, true) == null) {
child_schema_id = "org.pantheon.desktop.gala.notifications.application";
child_path = "/org/pantheon/desktop/gala/notifications/applications/%s/";
}
Expand Down
4 changes: 3 additions & 1 deletion src/Plug.vala
Expand Up @@ -49,9 +49,11 @@ public class NotificationsPlug : Switchboard.Plug {
}

static construct {
if (GLib.SettingsSchemaSource.get_default ().lookup ("io.elementary.notifications", false) != null) {
if (GLib.SettingsSchemaSource.get_default ().lookup ("io.elementary.notifications", true) != null) {
debug ("Using io.elementary.notifications server");
notify_settings = new GLib.Settings ("io.elementary.notifications");
} else {
debug ("Using notifications in gala");
notify_settings = new GLib.Settings ("org.pantheon.desktop.gala.notifications");
}
}
Expand Down

0 comments on commit 1554997

Please sign in to comment.