[connections/fix-auth-when-it-fails: 2/3] notifications: Add method to display a plaintext error
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [connections/fix-auth-when-it-fails: 2/3] notifications: Add method to display a plaintext error
- Date: Tue, 18 May 2021 13:12:59 +0000 (UTC)
commit 45c186c75d03e700a615c502b9b8e81da6d91cc4
Author: Felipe Borges <felipeborges gnome org>
Date: Tue May 18 15:06:47 2021 +0200
notifications: Add method to display a plaintext error
This is for errors without an action.
src/notifications.vala | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/notifications.vala b/src/notifications.vala
index 1d13378..84d250e 100644
--- a/src/notifications.vala
+++ b/src/notifications.vala
@@ -48,6 +48,12 @@ namespace Connections {
get_style_context ().add_class ("transparent-bg");
}
+ public void display_for_error (string message) {
+ var notification = new Notification (message, null, null, null);
+
+ active_notification = notification;
+ }
+
public void display_for_action (string message,
string? ok_label,
owned Notification.OKFunc? ok_func,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]