view: add :will_add_event vfunc and stub methods

Note: this commit probably won't build, but this is the right order of
keeping history.
This commit is contained in:
Erick Pérez Castellanos
2014-12-04 17:10:38 -05:00
parent ef6d464071
commit 76582329ef
5 changed files with 65 additions and 4 deletions
+22
View File
@@ -289,3 +289,25 @@ gcal_view_clear (GcalView *view)
GCAL_VIEW_GET_INTERFACE (view)->clear (view);
}
/**
* gcal_view_will_add_event:
* @view: a #GcalView
* @event: a #GcalEventWidget
*
* Check the ranges of dates and the existence of the widget in
* in the view already
*
* Returns: %TRUE if the date of the widget fall inside the range and
* the widget isn't already on the view, %FALSE otherwise
**/
gboolean
gcal_view_will_add_event (GcalView *view,
GcalEventWidget *event)
{
g_return_val_if_fail (GCAL_IS_VIEW (view), FALSE);
g_return_if_fail (GCAL_VIEW_GET_INTERFACE (view)->will_add_event);
return GCAL_VIEW_GET_INTERFACE (view)->will_add_event (view,
event);
}