From c72b37433c92641875be1a244c9056e345a80151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erick=20P=C3=A9rez=20Castellanos?= Date: Mon, 26 Nov 2012 11:17:03 -0500 Subject: [PATCH] Added GcalView::create_event_on_current_unit. this method is to be called whenever someone click on the "New Event" button of the toolbar. It will instruct the active view to generate a GcalView::create-event signal with the parametes of the current unit (a month for GcalYearView, a day for GcalMonthView, etc) It will allow the view to mark the current unit cell for the event creation. --- src/gcal-view.c | 8 ++++++++ src/gcal-view.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src/gcal-view.c b/src/gcal-view.c index 32a70083..78f3ee7a 100644 --- a/src/gcal-view.c +++ b/src/gcal-view.c @@ -174,3 +174,11 @@ gcal_view_clear_selection (GcalView *view) GCAL_VIEW_GET_INTERFACE (view)->clear_selection (view); } + +void +gcal_view_create_event_on_current_unit (GcalView *view) +{ + g_return_if_fail (GCAL_IS_VIEW (view)); + + GCAL_VIEW_GET_INTERFACE (view)->create_event_on_current_unit (view); +} diff --git a/src/gcal-view.h b/src/gcal-view.h index 76b259a2..90a9d579 100644 --- a/src/gcal-view.h +++ b/src/gcal-view.h @@ -61,6 +61,8 @@ struct _GcalViewIface void (*reposition_child) (GcalView *view, const gchar *uuid); void (*clear_selection) (GcalView *view); + + void (*create_event_on_current_unit) (GcalView *view); }; GType gcal_view_get_type (void); @@ -89,6 +91,7 @@ void gcal_view_reposition_child (GcalView *view, void gcal_view_clear_selection (GcalView *view); +void gcal_view_create_event_on_current_unit (GcalView *view); G_END_DECLS