aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gnome-cal.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-03-20 08:32:47 +0800
committerMichael Meeks <michael.meeks@novell.com>2010-04-07 19:12:47 +0800
commit260032a9ff49e78d4081b40e5f7102d2928fc572 (patch)
treebacfca6371a7d1642f817ce1dc7f6b6f5496dc06 /calendar/gui/gnome-cal.c
parentffe2f1e1ee96502cf1d3305e16f82d4063fffedc (diff)
downloadgsoc2013-evolution-260032a9ff49e78d4081b40e5f7102d2928fc572.tar.gz
gsoc2013-evolution-260032a9ff49e78d4081b40e5f7102d2928fc572.tar.zst
gsoc2013-evolution-260032a9ff49e78d4081b40e5f7102d2928fc572.zip
Add extensions to configure calender widgets.
Make ECalendarItem, ECalendarView, ECalModel, EDateEdit, EMeetingStore, and EMeetingTimeSelector extensible and register extensions to automatically bind every instance to the appropriate EShellSettings. Conflicts: calendar/gui/gnome-cal.c modules/calendar/e-cal-shell-content.c
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r--calendar/gui/gnome-cal.c61
1 files changed, 3 insertions, 58 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 670512bb43..aca3064531 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -76,8 +76,6 @@ static GHashTable *non_intrusive_error_table = NULL;
/* Private part of the GnomeCalendar structure */
struct _GnomeCalendarPrivate {
- EShellSettings *shell_settings;
-
ECalModel *model;
/*
@@ -329,16 +327,6 @@ gnome_calendar_update_time_range (GnomeCalendar *gcal)
}
static void
-gnome_calendar_set_shell_settings (GnomeCalendar *gcal,
- EShellSettings *shell_settings)
-{
- g_return_if_fail (E_IS_SHELL_SETTINGS (shell_settings));
- g_return_if_fail (gcal->priv->shell_settings == NULL);
-
- gcal->priv->shell_settings = g_object_ref (shell_settings);
-}
-
-static void
gnome_calendar_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -351,12 +339,6 @@ gnome_calendar_set_property (GObject *object,
g_value_get_object (value));
return;
- case PROP_SHELL_SETTINGS:
- gnome_calendar_set_shell_settings (
- GNOME_CALENDAR (object),
- g_value_get_object (value));
- return;
-
case PROP_VIEW:
gnome_calendar_set_view (
GNOME_CALENDAR (object),
@@ -392,12 +374,6 @@ gnome_calendar_get_property (GObject *object,
GNOME_CALENDAR (object)));
return;
- case PROP_SHELL_SETTINGS:
- g_value_set_object (
- value, gnome_calendar_get_shell_settings (
- GNOME_CALENDAR (object)));
- return;
-
case PROP_VIEW:
g_value_set_int (
value, gnome_calendar_get_view (
@@ -424,15 +400,12 @@ static void
gnome_calendar_constructed (GObject *object)
{
GnomeCalendar *gcal = GNOME_CALENDAR (object);
- EShellSettings *shell_settings;
ECalendarView *calendar_view;
ECalModel *model;
GtkAdjustment *adjustment;
- shell_settings = gnome_calendar_get_shell_settings (gcal);
-
/* Create the model for the views. */
- model = e_cal_model_calendar_new (shell_settings);
+ model = e_cal_model_calendar_new ();
e_cal_model_set_flags (model, E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES);
gcal->priv->model = model;
@@ -545,17 +518,6 @@ gnome_calendar_class_init (GnomeCalendarClass *class)
g_object_class_install_property (
object_class,
- PROP_SHELL_SETTINGS,
- g_param_spec_object (
- "shell-settings",
- _("Shell Settings"),
- _("Application-wide settings"),
- E_TYPE_SHELL_SETTINGS,
- G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
-
- g_object_class_install_property (
- object_class,
PROP_VIEW,
g_param_spec_int (
"view",
@@ -1492,11 +1454,6 @@ gnome_calendar_do_dispose (GObject *object)
priv = gcal->priv;
- if (priv->shell_settings != NULL) {
- g_object_unref (priv->shell_settings);
- priv->shell_settings = NULL;
- }
-
if (priv->model != NULL) {
g_signal_handlers_disconnect_by_func (
priv->model, view_progress_cb, gcal);
@@ -1906,21 +1863,9 @@ non_intrusive_error_remove(GtkWidget *w, gpointer data)
}
GtkWidget *
-gnome_calendar_new (EShellSettings *shell_settings)
+gnome_calendar_new (void)
{
- g_return_val_if_fail (E_IS_SHELL_SETTINGS (shell_settings), NULL);
-
- return g_object_new (
- GNOME_TYPE_CALENDAR,
- "shell-settings", shell_settings, NULL);
-}
-
-EShellSettings *
-gnome_calendar_get_shell_settings (GnomeCalendar *gcal)
-{
- g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
-
- return gcal->priv->shell_settings;
+ return g_object_new (GNOME_TYPE_CALENDAR, NULL);
}
ECalendar *