aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-calendar-view.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2003-07-18 18:37:44 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2003-07-18 18:37:44 +0800
commit9480887536f318abc6f8540ca2a8d9114becc6e3 (patch)
tree05c8412a6191402351b5034462504c850dd6829d /calendar/gui/e-calendar-view.c
parent451cc1a07a7010fba205ffebfb7778b284f524cf (diff)
downloadgsoc2013-evolution-9480887536f318abc6f8540ca2a8d9114becc6e3.tar.gz
gsoc2013-evolution-9480887536f318abc6f8540ca2a8d9114becc6e3.tar.zst
gsoc2013-evolution-9480887536f318abc6f8540ca2a8d9114becc6e3.zip
moved duplicated code to...
2003-07-18 Rodrigo Moya <rodrigo@ximian.com> * gui/e-day-view.[ch]: * gui/e-week-view.[ch]: moved duplicated code to... * gui/e-cal-view.[ch]: ...here. (e_cal_view_get_calendar, e_cal_view_set_calendar): new functions. * gui/e-week-view-event-item.c (e_week_event_item_double_click): * gui/gnome-cal.c (setup_widgets): adapted to changes in views. svn path=/trunk/; revision=21865
Diffstat (limited to 'calendar/gui/e-calendar-view.c')
-rw-r--r--calendar/gui/e-calendar-view.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index af2223bbff..3c35995a60 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -26,6 +26,8 @@
#include "e-cal-view.h"
struct _ECalViewPrivate {
+ /* The GnomeCalendar we are associated to */
+ GnomeCalendar *calendar;
};
static void e_cal_view_class_init (ECalViewClass *klass);
@@ -34,6 +36,14 @@ static void e_cal_view_destroy (GtkObject *object);
static GObjectClass *parent_class = NULL;
+/* Signal IDs */
+enum {
+ SELECTION_CHANGED,
+ LAST_SIGNAL
+};
+
+static guint e_cal_view_signals[LAST_SIGNAL] = { 0 };
+
static void
e_cal_view_class_init (ECalViewClass *klass)
{
@@ -41,7 +51,20 @@ e_cal_view_class_init (ECalViewClass *klass)
parent_class = g_type_class_peek_parent (klass);
+ /* Create class' signals */
+ e_cal_view_signals[SELECTION_CHANGED] =
+ g_signal_new ("selection_changed",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ECalViewClass, selection_changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ /* Method override */
object_class->destroy = e_cal_view_destroy;
+
+ klass->selection_changed = NULL;
}
static void
@@ -68,3 +91,19 @@ e_cal_view_destroy (GtkObject *object)
E_MAKE_TYPE (e_cal_view, "ECalView", ECalView, e_cal_view_class_init,
e_cal_view_init, GTK_TYPE_TABLE);
+
+GnomeCalendar *
+e_cal_view_get_calendar (ECalView *cal_view)
+{
+ g_return_val_if_fail (E_IS_CAL_VIEW (cal_view), NULL);
+
+ return cal_view->priv->calendar;
+}
+
+void
+e_cal_view_set_calendar (ECalView *cal_view, GnomeCalendar *calendar)
+{
+ g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+
+ cal_view->priv->calendar = calendar;
+}