application: update event colors when agenda changes
When we change a source (aka agenda) color, we have to restart Calendar in order to see it in action. After the work on GcalEvent, events are now able to track the agenda's color changes, and the event widget updates itself in response to that. The last step was simple notifying GcalApplication when an agenda changes, so it knows when to recreate the color schemes.
This commit is contained in:
+2
-10
@@ -169,15 +169,6 @@ process_sources (GcalApplication *application)
|
||||
g_free (new_css_data);
|
||||
}
|
||||
|
||||
static void
|
||||
sources_added_cb (GcalApplication *application,
|
||||
ESource *source,
|
||||
gboolean enabled,
|
||||
GcalManager *manager)
|
||||
{
|
||||
process_sources (application);
|
||||
}
|
||||
|
||||
static void
|
||||
gcal_application_class_init (GcalApplicationClass *klass)
|
||||
{
|
||||
@@ -203,7 +194,8 @@ gcal_application_init (GcalApplication *self)
|
||||
self->colors_provider = gtk_css_provider_new ();
|
||||
|
||||
self->manager = gcal_manager_new_with_settings (self->settings);
|
||||
g_signal_connect_swapped (self->manager, "source-added", G_CALLBACK (sources_added_cb), self);
|
||||
g_signal_connect_swapped (self->manager, "source-added", G_CALLBACK (process_sources), self);
|
||||
g_signal_connect_swapped (self->manager, "source-changed", G_CALLBACK (process_sources), self);
|
||||
|
||||
self->search_provider = gcal_shell_search_provider_new ();
|
||||
gcal_shell_search_provider_connect (self->search_provider, self->manager);
|
||||
|
||||
Reference in New Issue
Block a user