From 32a862fba0a3828523b3c52caca7305f33e68a29 Mon Sep 17 00:00:00 2001 From: Felipe Borges Date: Wed, 29 Oct 2025 15:31:51 +0100 Subject: [PATCH] subman: Improve reliability of startup registration notification It should not appear if the user subscribes before the notification appears (it appears with a 30 minute delay now). Resolves: RHEL-4094 --- gnome-settings-daemon.spec | 6 +++- ...-delay-startup-notification-by-30min.patch | 32 +++++++++++-------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index a88370b..249cdc9 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -11,7 +11,7 @@ Name: gnome-settings-daemon Version: 40.0.1 -Release: 23%{?dist} +Release: 24%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications License: GPLv2+ @@ -212,6 +212,10 @@ cp %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas %{_libdir}/pkgconfig/gnome-settings-daemon.pc %changelog +* Wed Oct 29 2025 Felipe Borges - 40.0.1-24 +- Improve reliability of the startup registration notification + Resolves: RHEL-4094 + * Mon Oct 20 2025 Felipe Borges - 40.0.1-23 - Delay startup registration notification by 30 minutes Resolves: RHEL-4094 diff --git a/subman-delay-startup-notification-by-30min.patch b/subman-delay-startup-notification-by-30min.patch index d7a14fd..fc042e8 100644 --- a/subman-delay-startup-notification-by-30min.patch +++ b/subman-delay-startup-notification-by-30min.patch @@ -1,4 +1,4 @@ -From a58e69201abfd59a23fdc06d05c821240dd1a227 Mon Sep 17 00:00:00 2001 +From b3cb5223cbc0d1c6bb71a841d467dea7e54a1bc3 Mon Sep 17 00:00:00 2001 From: Felipe Borges Date: Mon, 20 Oct 2025 12:32:43 +0200 Subject: [PATCH] subman: Delay startup notification by 30 minutes @@ -7,11 +7,11 @@ So that we don't disturb users during initial-setup/onboarding. Resolves: RHEL-4094 --- - plugins/subman/gsd-subscription-manager.c | 23 ++++++++++++++++++++++- - 1 file changed, 22 insertions(+), 1 deletion(-) + plugins/subman/gsd-subscription-manager.c | 29 ++++++++++++++++++++++- + 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/plugins/subman/gsd-subscription-manager.c b/plugins/subman/gsd-subscription-manager.c -index 09a96a3a..8034bfd6 100644 +index 09a96a3a..2a3f5504 100644 --- a/plugins/subman/gsd-subscription-manager.c +++ b/plugins/subman/gsd-subscription-manager.c @@ -39,6 +39,8 @@ @@ -32,14 +32,15 @@ index 09a96a3a..8034bfd6 100644 }; enum { -@@ -510,6 +514,14 @@ _show_notification (GsdSubscriptionManager *manager, _NotifyKind notify_kind) +@@ -510,6 +514,15 @@ _show_notification (GsdSubscriptionManager *manager, _NotifyKind notify_kind) g_timer_reset (priv->timer_last_notified); } ++static void _client_maybe__show_notification (GsdSubscriptionManager *manager); +static gboolean +_startup_registration_required_notification_cb (GsdSubscriptionManager *manager) +{ -+ _show_notification (manager, _NOTIFY_REGISTRATION_REQUIRED); ++ _client_maybe__show_notification (manager); + + return FALSE; +} @@ -47,18 +48,23 @@ index 09a96a3a..8034bfd6 100644 static void _client_maybe__show_notification (GsdSubscriptionManager *manager) { -@@ -603,7 +615,9 @@ _client_maybe__show_notification (GsdSubscriptionManager *manager) +@@ -603,7 +616,14 @@ _client_maybe__show_notification (GsdSubscriptionManager *manager) /* startup */ if (!was_read && is_read && priv->subscription_status == GSD_SUBMAN_SUBSCRIPTION_STATUS_UNKNOWN) { - _show_notification (manager, _NOTIFY_REGISTRATION_REQUIRED); -+ priv->startup_registration_required_notification_id = -+ g_timeout_add_seconds (STARTUP_NOTIFICATION_DELAY, -+ (GSourceFunc) _startup_registration_required_notification_cb, manager); ++ if (priv->startup_registration_required_notification_id == 0) { ++ priv->startup_registration_required_notification_id = ++ g_timeout_add_seconds (STARTUP_NOTIFICATION_DELAY, ++ (GSourceFunc) _startup_registration_required_notification_cb, manager); ++ } else { ++ _show_notification (manager, _NOTIFY_REGISTRATION_REQUIRED); ++ } ++ return; } -@@ -1161,11 +1175,13 @@ static void +@@ -1161,11 +1181,13 @@ static void gsd_subscription_manager_finalize (GObject *object) { GsdSubscriptionManager *manager; @@ -72,7 +78,7 @@ index 09a96a3a..8034bfd6 100644 gsd_subscription_manager_stop (manager); -@@ -1174,6 +1190,11 @@ gsd_subscription_manager_finalize (GObject *object) +@@ -1174,6 +1196,11 @@ gsd_subscription_manager_finalize (GObject *object) g_clear_object (&manager->priv->bus_cancellable); } @@ -85,5 +91,5 @@ index 09a96a3a..8034bfd6 100644 g_clear_pointer (&manager->priv->introspection_data, g_dbus_node_info_unref); g_clear_object (&manager->priv->connection); -- -2.51.0 +2.34.1