Commit 17deb981 authored by Erik Reider's avatar Erik Reider

Merge branch 'main' of github.com:ErikReider/SwayNotificationCenter

parents e9603dce 07f6aac0
......@@ -186,8 +186,8 @@ namespace SwayNotificationCenter {
noti_window.add_notification (param, this);
}
}
// Only add notification to CC if it isn't IGNORED
if (state != NotificationStatusEnum.IGNORED) {
// Only add notification to CC if it isn't IGNORED and not transient
if (state != NotificationStatusEnum.IGNORED && !param.transient) {
control_center.add_notification (param, this);
}
......
......@@ -83,6 +83,7 @@ namespace SwayNotificationCenter {
public string desktop_entry { get; set; }
public string category { get; set; }
public bool resident { get; set; }
public bool transient { get; set; }
public UrgencyLevels urgency { get; set; }
/** Replaces the old notification with the same value of:
* - x-canonical-private-synchronous
......@@ -226,6 +227,13 @@ namespace SwayNotificationCenter {
resident = hint_value.get_boolean ();
}
break;
case "transient":
if (hint_value.is_of_type (GLib.VariantType.BOOLEAN)) {
transient = hint_value.get_boolean ();
} else if (hint_value.is_of_type (GLib.VariantType.INT32)) {
transient = hint_value.get_int32 () == 1;
}
break;
case "urgency":
if (hint_value.is_of_type (GLib.VariantType.BYTE)) {
urgency = UrgencyLevels.from_value (hint_value.get_byte ());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment