Simplify calendar views
We don't need a split subscription update step in GcalView anymore, since subscribers communicate range directly to the timeline now.
This commit is contained in:
+8
-17
@@ -788,28 +788,19 @@ gcal_manager_set_default_calendar (GcalManager *self,
|
||||
}
|
||||
|
||||
/**
|
||||
* gcal_manager_set_subscriber:
|
||||
* gcal_manager_get_timeline:
|
||||
* @self: a #GcalManager
|
||||
* @subscriber: a #ECalDataModelSubscriber
|
||||
* @range_start: the start of the range
|
||||
* @range_end: the end of the range
|
||||
*
|
||||
* Sets the @subscriber to show events between @range_start
|
||||
* and @range_end.
|
||||
* Retrieves the default timeline of GNOME Calendar.
|
||||
*
|
||||
* Returns: (transfer none): a #GcalTimeline
|
||||
*/
|
||||
void
|
||||
gcal_manager_set_subscriber (GcalManager *self,
|
||||
ECalDataModelSubscriber *subscriber,
|
||||
time_t range_start,
|
||||
time_t range_end)
|
||||
GcalTimeline*
|
||||
gcal_manager_get_timeline (GcalManager *self)
|
||||
{
|
||||
GCAL_ENTRY;
|
||||
g_return_val_if_fail (GCAL_IS_MANAGER (self), NULL);
|
||||
|
||||
g_return_if_fail (GCAL_IS_MANAGER (self));
|
||||
|
||||
gcal_timeline_add_subscriber (self->timeline, GCAL_TIMELINE_SUBSCRIBER (subscriber));
|
||||
|
||||
GCAL_EXIT;
|
||||
return self->timeline;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -43,10 +43,7 @@ GcalCalendar* gcal_manager_get_default_calendar (GcalManager
|
||||
void gcal_manager_set_default_calendar (GcalManager *self,
|
||||
GcalCalendar *calendar);
|
||||
|
||||
void gcal_manager_set_subscriber (GcalManager *self,
|
||||
ECalDataModelSubscriber *subscriber,
|
||||
time_t range_start,
|
||||
time_t range_end);
|
||||
GcalTimeline* gcal_manager_get_timeline (GcalManager *self);
|
||||
|
||||
void gcal_manager_set_query (GcalManager *self,
|
||||
const gchar *query);
|
||||
|
||||
Reference in New Issue
Block a user