aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/notifier_freedesktop.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2024-06-20 12:05:20 +0200
committerfiaxh <git@lightrise.org>2024-06-20 12:14:46 +0200
commit21ae42762d8a57da5cb1ec40b46e7510fc3121ad (patch)
treede91ddf080c3e1e433136235265d0d3682a976b8 /main/src/ui/notifier_freedesktop.vala
parentc8b20d0f5f33fb8b9898d216c3b4c9280abf31da (diff)
downloaddino-21ae42762d8a57da5cb1ec40b46e7510fc3121ad.tar.gz
dino-21ae42762d8a57da5cb1ec40b46e7510fc3121ad.zip
Redesign and rewrite accounts and settings dialog into a combined one
Diffstat (limited to 'main/src/ui/notifier_freedesktop.vala')
-rw-r--r--main/src/ui/notifier_freedesktop.vala7
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);
}