diff options
author | eerielili <lionel@les-miquelots.net> | 2024-08-25 13:32:38 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-25 13:32:38 +0000 |
commit | 45755727db79a2935376d24e7bde7eadb0f2f7ca (patch) | |
tree | 73715da99c9d980079df6f2d561822364655e04d /main/src/ui/notifier_freedesktop.vala | |
parent | 62cdea3a5e701c04f3a7fd9d6b5f48e28fef1f72 (diff) | |
parent | 51252f74c94c17d56aa75534652bdc5d43a504cb (diff) | |
download | dino-45755727db79a2935376d24e7bde7eadb0f2f7ca.tar.gz dino-45755727db79a2935376d24e7bde7eadb0f2f7ca.zip |
Merge branch 'master' into add-yourselfadd-yourself
Diffstat (limited to 'main/src/ui/notifier_freedesktop.vala')
-rw-r--r-- | main/src/ui/notifier_freedesktop.vala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/main/src/ui/notifier_freedesktop.vala b/main/src/ui/notifier_freedesktop.vala index a1df5990..0d263dba 100644 --- a/main/src/ui/notifier_freedesktop.vala +++ b/main/src/ui/notifier_freedesktop.vala @@ -201,8 +201,13 @@ public class Dino.Ui.FreeDesktopNotifier : NotificationProvider, Object { HashTable<string, Variant> hash_table = new HashTable<string, Variant>(null, null); hash_table["desktop-entry"] = new Variant.string(Dino.Application.get_default().get_application_id()); hash_table["category"] = new Variant.string("im.error"); + string[] actions = new string[] {"default", "Open preferences"}; try { - yield dbus_notifications.notify("Dino", 0, "im.dino.Dino", summary, body, new string[]{}, hash_table, -1); + uint32 notification_id = yield dbus_notifications.notify("Dino", 0, "im.dino.Dino", summary, body, actions, hash_table, -1); + + add_action_listener(notification_id, "default", () => { + GLib.Application.get_default().activate_action("preferences-account", new Variant.int32(account.id)); + }); } catch (Error e) { warning("Failed showing connection error notification: %s", e.message); } |