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: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/586>
This commit is contained in:
committed by
Marge Bot
parent
a509de8b1e
commit
33d87c3511
@@ -331,14 +331,6 @@ gcal_context_init (GcalContext *self)
|
|||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
g_error ("Failed to load portals: %s. Aborting...", error->message);
|
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));
|
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);
|
gcal_manager_startup (self->manager);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user