calendar-server: Move method
We'll need to call it from app_update_views(), so move it up to make it available to that function without a prior declaration. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1300
This commit is contained in:
parent
46547ae027
commit
e0a8cb565e
@ -695,6 +695,28 @@ app_stop_view (App *app,
|
||||
g_signal_handlers_disconnect_by_func (view, on_objects_removed, app);
|
||||
}
|
||||
|
||||
static void
|
||||
app_notify_has_calendars (App *app)
|
||||
{
|
||||
GVariantBuilder dict_builder;
|
||||
|
||||
g_variant_builder_init (&dict_builder, G_VARIANT_TYPE ("a{sv}"));
|
||||
g_variant_builder_add (&dict_builder, "{sv}", "HasCalendars",
|
||||
g_variant_new_boolean (app_has_calendars (app)));
|
||||
|
||||
g_dbus_connection_emit_signal (app->connection,
|
||||
NULL,
|
||||
"/org/gnome/Shell/CalendarServer",
|
||||
"org.freedesktop.DBus.Properties",
|
||||
"PropertiesChanged",
|
||||
g_variant_new ("(sa{sv}as)",
|
||||
"org.gnome.Shell.CalendarServer",
|
||||
&dict_builder,
|
||||
NULL),
|
||||
NULL);
|
||||
g_variant_builder_clear (&dict_builder);
|
||||
}
|
||||
|
||||
static void
|
||||
app_update_views (App *app)
|
||||
{
|
||||
@ -726,28 +748,6 @@ app_update_views (App *app)
|
||||
g_slist_free_full (clients, g_object_unref);
|
||||
}
|
||||
|
||||
static void
|
||||
app_notify_has_calendars (App *app)
|
||||
{
|
||||
GVariantBuilder dict_builder;
|
||||
|
||||
g_variant_builder_init (&dict_builder, G_VARIANT_TYPE ("a{sv}"));
|
||||
g_variant_builder_add (&dict_builder, "{sv}", "HasCalendars",
|
||||
g_variant_new_boolean (app_has_calendars (app)));
|
||||
|
||||
g_dbus_connection_emit_signal (g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL),
|
||||
NULL,
|
||||
"/org/gnome/Shell/CalendarServer",
|
||||
"org.freedesktop.DBus.Properties",
|
||||
"PropertiesChanged",
|
||||
g_variant_new ("(sa{sv}as)",
|
||||
"org.gnome.Shell.CalendarServer",
|
||||
&dict_builder,
|
||||
NULL),
|
||||
NULL);
|
||||
g_variant_builder_clear (&dict_builder);
|
||||
}
|
||||
|
||||
static void
|
||||
on_client_appeared_cb (CalendarSources *sources,
|
||||
ECalClient *client,
|
||||
|
Loading…
Reference in New Issue
Block a user