summaryrefslogtreecommitdiff
path: root/src/capplet/mate-notification-properties.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2025-08-20 22:49:42 -0400
committerVictor Kareh <[email protected]>2025-08-20 23:09:04 -0400
commit7d92991c7bc863bd675db403f83b094f93a7a3ff (patch)
tree05ee7fb0c0d456564939d523483d5f0e8c880535 /src/capplet/mate-notification-properties.c
parent3adfad8097615f179f7c96f27ccd8ed7f9ba5a15 (diff)
downloadmate-notification-daemon-notification-spec-v1.3.tar.bz2
mate-notification-daemon-notification-spec-v1.3.tar.xz
capplet: Add timeout and persistence controlsnotification-spec-v1.3
Add new UI elements to configure default timeout, allow persistent notifications, and to display countdown on all notification messages.
Diffstat (limited to 'src/capplet/mate-notification-properties.c')
-rw-r--r--src/capplet/mate-notification-properties.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/capplet/mate-notification-properties.c b/src/capplet/mate-notification-properties.c
index d8a5eab..adbbb6b 100644
--- a/src/capplet/mate-notification-properties.c
+++ b/src/capplet/mate-notification-properties.c
@@ -45,6 +45,9 @@ typedef struct {
GtkWidget* active_checkbox;
GtkWidget* dnd_checkbox;
GtkWidget* monitor_label;
+ GtkWidget* timeout_spin;
+ GtkWidget* persistence_checkbox;
+ GtkWidget* countdown_checkbox;
NotifyNotification* preview1;
NotifyNotification* preview2;
@@ -494,6 +497,9 @@ static gboolean notification_properties_dialog_init(NotificationAppletDialog* di
dialog->active_checkbox = GTK_WIDGET(gtk_builder_get_object(builder, "use_active_check"));
dialog->dnd_checkbox = GTK_WIDGET(gtk_builder_get_object(builder, "do_not_disturb_check"));
dialog->monitor_label = GTK_WIDGET(gtk_builder_get_object(builder, "monitor_label"));
+ dialog->timeout_spin = GTK_WIDGET(gtk_builder_get_object(builder, "timeout_spin"));
+ dialog->persistence_checkbox = GTK_WIDGET(gtk_builder_get_object(builder, "enable_persistence_check"));
+ dialog->countdown_checkbox = GTK_WIDGET(gtk_builder_get_object(builder, "show_countdown_check"));
g_object_unref (builder);
@@ -505,6 +511,11 @@ static gboolean notification_properties_dialog_init(NotificationAppletDialog* di
g_settings_bind (dialog->gsettings, GSETTINGS_KEY_USE_ACTIVE_MONITOR, dialog->active_checkbox, "active", G_SETTINGS_BIND_DEFAULT);
g_settings_bind (dialog->gsettings, GSETTINGS_KEY_DO_NOT_DISTURB, dialog->dnd_checkbox, "active", G_SETTINGS_BIND_DEFAULT);
+ GtkAdjustment *timeout_adjustment = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(dialog->timeout_spin));
+ g_settings_bind (dialog->gsettings, GSETTINGS_KEY_DEFAULT_TIMEOUT, timeout_adjustment, "value", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (dialog->gsettings, GSETTINGS_KEY_ENABLE_PERSISTENCE, dialog->persistence_checkbox, "active", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (dialog->gsettings, GSETTINGS_KEY_SHOW_COUNTDOWN, dialog->countdown_checkbox, "active", G_SETTINGS_BIND_DEFAULT);
+
notification_properties_dialog_setup_themes (dialog);
notification_properties_dialog_setup_positions (dialog);
notification_properties_dialog_setup_monitors (dialog);