diff options
Diffstat (limited to 'gdata/services/calendar/gdata-calendar-query.c')
-rw-r--r-- | gdata/services/calendar/gdata-calendar-query.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gdata/services/calendar/gdata-calendar-query.c b/gdata/services/calendar/gdata-calendar-query.c index a64960cd..dd019529 100644 --- a/gdata/services/calendar/gdata-calendar-query.c +++ b/gdata/services/calendar/gdata-calendar-query.c @@ -37,7 +37,7 @@ * GDataCalendarCalendar *calendar; * GDataCalendarQuery *query; * GDataFeed *feed; - * GTimeVal current_time; + * gint64 current_time; * GList *i; * GError *error = NULL; * @@ -47,8 +47,8 @@ * * /<!-- -->* Create the query to use. We're going to query for events within the next week which match the search term "party", * * ordered by last modification time (descending). *<!-- -->/ - * g_get_current_time (¤t_time); - * query = gdata_calendar_query_new_with_limits ("party", current_time.tv_sec, current_time.tv_sec + 7 * 24 * 60 * 60); + * current_time = g_get_real_time () / G_USEC_PER_SEC; + * query = gdata_calendar_query_new_with_limits ("party", current_time, current_time + 7 * 24 * 60 * 60); * gdata_calendar_query_set_order_by (query, "lastmodified"); * * /<!-- -->* Execute the query *<!-- -->/ @@ -119,7 +119,7 @@ enum { PROP_SHOW_DELETED, }; -G_DEFINE_TYPE (GDataCalendarQuery, gdata_calendar_query, GDATA_TYPE_QUERY) +G_DEFINE_TYPE_WITH_PRIVATE (GDataCalendarQuery, gdata_calendar_query, GDATA_TYPE_QUERY) static void gdata_calendar_query_class_init (GDataCalendarQueryClass *klass) @@ -127,8 +127,6 @@ gdata_calendar_query_class_init (GDataCalendarQueryClass *klass) GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GDataQueryClass *query_class = GDATA_QUERY_CLASS (klass); - g_type_class_add_private (klass, sizeof (GDataCalendarQueryPrivate)); - gobject_class->set_property = gdata_calendar_query_set_property; gobject_class->get_property = gdata_calendar_query_get_property; gobject_class->finalize = gdata_calendar_query_finalize; @@ -290,7 +288,7 @@ gdata_calendar_query_class_init (GDataCalendarQueryClass *klass) static void gdata_calendar_query_init (GDataCalendarQuery *self) { - self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_CALENDAR_QUERY, GDataCalendarQueryPrivate); + self->priv = gdata_calendar_query_get_instance_private (self); self->priv->recurrence_expansion_start = -1; self->priv->recurrence_expansion_end = -1; self->priv->start_min = -1; |