context: initialize GcalSearchEngine later

After the next commit, GcalSearchEngine will require GcalContext to be
ready to initialize itself.
This commit is contained in:
Michael Catanzaro
2019-09-19 15:37:45 -05:00
parent 5e4bbe446f
commit d0d4166d23
+11 -1
View File
@@ -102,6 +102,16 @@ on_timezone_changed_cb (GcalTimeZoneMonitor *timezone_monitor,
* GObject overrides
*/
static void
gcal_context_constructed (GObject *object)
{
GcalContext *self = (GcalContext *)object;
G_OBJECT_CLASS (gcal_context_parent_class)->constructed (object);
self->search_engine = gcal_search_engine_new (self);
}
static void
gcal_context_finalize (GObject *object)
{
@@ -193,6 +203,7 @@ gcal_context_class_init (GcalContextClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->constructed = gcal_context_constructed;
object_class->finalize = gcal_context_finalize;
object_class->get_property = gcal_context_get_property;
object_class->set_property = gcal_context_set_property;
@@ -257,7 +268,6 @@ gcal_context_init (GcalContext *self)
self->manager = gcal_manager_new ();
self->settings = g_settings_new ("org.gnome.calendar");
self->weather_service = gcal_weather_service_new ();
self->search_engine = gcal_search_engine_new (self);
self->timezone_monitor = gcal_time_zone_monitor_new ();
g_signal_connect_object (self->timezone_monitor,