From 33d87c35115f80480775ae5ff5fc7eea526464e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ignacy=20Kuchci=C5=84ski?= Date: Sun, 8 Jun 2025 14:53:05 +0200 Subject: [PATCH] core/context: Delay reading time format Reading time format from the settings portal during context init results in interacting with xdg-desktop-portal before GtkApplication can register the host app id. This makes portals not aware of the application id, which could cause problems in the future. Fix that by calling read_time_format during gcal_context_startup, which is called after the GtkApplication startup chain-up. Part-of: --- src/core/gcal-context.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/core/gcal-context.c b/src/core/gcal-context.c index f882577e..e108286d 100644 --- a/src/core/gcal-context.c +++ b/src/core/gcal-context.c @@ -331,14 +331,6 @@ gcal_context_init (GcalContext *self) if (error) g_error ("Failed to load portals: %s. Aborting...", error->message); - - if (read_time_format (self)) - { - g_signal_connect (self->settings_portal, - "g-signal", - G_CALLBACK (on_portal_proxy_signal_cb), - self); - } } /** @@ -465,5 +457,13 @@ gcal_context_startup (GcalContext *self) { g_return_if_fail (GCAL_IS_CONTEXT (self)); + if (read_time_format (self)) + { + g_signal_connect (self->settings_portal, + "g-signal", + G_CALLBACK (on_portal_proxy_signal_cb), + self); + } + gcal_manager_startup (self->manager); }