From 45d7047cca4a9df99f0165805f64141346acfce3 Mon Sep 17 00:00:00 2001 From: Zach Dykstra Date: Tue, 28 Feb 2023 21:21:08 -0600 Subject: [PATCH] mail: open New E-mail query on notification click MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iaf3fd1c5e8bdc537c67a796fe9aecb1451c825b8 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6094 Reviewed-by: waddlesplash Reviewed-by: Jérôme Duval Tested-by: Automation --- src/servers/mail/MailDaemonApplication.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/servers/mail/MailDaemonApplication.cpp b/src/servers/mail/MailDaemonApplication.cpp index 5db9cf651c..76c516b141 100644 --- a/src/servers/mail/MailDaemonApplication.cpp +++ b/src/servers/mail/MailDaemonApplication.cpp @@ -201,6 +201,18 @@ MailDaemonApplication::ReadyToRun() fNotification = new BNotification(B_INFORMATION_NOTIFICATION); fNotification->SetGroup(B_TRANSLATE("Mail status")); fNotification->SetMessageID("daemon_status"); + + BPath path; + if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) == B_OK) { + path.Append("Mail/New E-mail"); + + entry_ref ref; + if (get_ref_for_path(path.Path(), &ref) == B_OK) { + fNotification->SetOnClickApp("application/x-vnd.Be-TRAK"); + fNotification->AddOnClickRef(&ref); + } + } + _UpdateNewMessagesNotification(); app_info info;