context: initialize GcalSearchEngine later
After the next commit, GcalSearchEngine will require GcalContext to be ready to initialize itself.
This commit is contained in:
+11
-1
@@ -102,6 +102,16 @@ on_timezone_changed_cb (GcalTimeZoneMonitor *timezone_monitor,
|
|||||||
* GObject overrides
|
* 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
|
static void
|
||||||
gcal_context_finalize (GObject *object)
|
gcal_context_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
@@ -193,6 +203,7 @@ gcal_context_class_init (GcalContextClass *klass)
|
|||||||
{
|
{
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
|
object_class->constructed = gcal_context_constructed;
|
||||||
object_class->finalize = gcal_context_finalize;
|
object_class->finalize = gcal_context_finalize;
|
||||||
object_class->get_property = gcal_context_get_property;
|
object_class->get_property = gcal_context_get_property;
|
||||||
object_class->set_property = gcal_context_set_property;
|
object_class->set_property = gcal_context_set_property;
|
||||||
@@ -257,7 +268,6 @@ gcal_context_init (GcalContext *self)
|
|||||||
self->manager = gcal_manager_new ();
|
self->manager = gcal_manager_new ();
|
||||||
self->settings = g_settings_new ("org.gnome.calendar");
|
self->settings = g_settings_new ("org.gnome.calendar");
|
||||||
self->weather_service = gcal_weather_service_new ();
|
self->weather_service = gcal_weather_service_new ();
|
||||||
self->search_engine = gcal_search_engine_new (self);
|
|
||||||
|
|
||||||
self->timezone_monitor = gcal_time_zone_monitor_new ();
|
self->timezone_monitor = gcal_time_zone_monitor_new ();
|
||||||
g_signal_connect_object (self->timezone_monitor,
|
g_signal_connect_object (self->timezone_monitor,
|
||||||
|
|||||||
Reference in New Issue
Block a user