mirror of
https://github.com/ErikReider/SwayNotificationCenter.git
synced 2024-11-25 06:27:08 +03:00
Merge branch 'main' of github.com:ErikReider/SwayNotificationCenter
This commit is contained in:
commit
17deb981cc
@ -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 ());
|
||||
|
Loading…
Reference in New Issue
Block a user