aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar
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 /modules/calendar
parentffe2f1e1ee96502cf1d3305e16f82d4063fffedc (diff)
downloadgsoc2013-evolution-260032a9ff49e78d4081b40e5f7102d2928fc572.tar
gsoc2013-evolution-260032a9ff49e78d4081b40e5f7102d2928fc572.tar.gz
gsoc2013-evolution-260032a9ff49e78d4081b40e5f7102d2928fc572.tar.bz2
gsoc2013-evolution-260032a9ff49e78d4081b40e5f7102d2928fc572.tar.lz
gsoc2013-evolution-260032a9ff49e78d4081b40e5f7102d2928fc572.tar.xz
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 'modules/calendar')
-rw-r--r--modules/calendar/Makefile.am12
-rw-r--r--modules/calendar/e-cal-config-calendar-item.c79
-rw-r--r--modules/calendar/e-cal-config-calendar-item.h30
-rw-r--r--modules/calendar/e-cal-config-date-edit.c79
-rw-r--r--modules/calendar/e-cal-config-date-edit.h30
-rw-r--r--modules/calendar/e-cal-config-meeting-store.c79
-rw-r--r--modules/calendar/e-cal-config-meeting-store.h30
-rw-r--r--modules/calendar/e-cal-config-meeting-time-selector.c83
-rw-r--r--modules/calendar/e-cal-config-meeting-time-selector.h30
-rw-r--r--modules/calendar/e-cal-config-model.c99
-rw-r--r--modules/calendar/e-cal-config-model.h30
-rw-r--r--modules/calendar/e-cal-config-view.c130
-rw-r--r--modules/calendar/e-cal-config-view.h31
-rw-r--r--modules/calendar/e-cal-shell-content.c5
-rw-r--r--modules/calendar/e-memo-shell-content.c2
-rw-r--r--modules/calendar/e-task-shell-content.c2
-rw-r--r--modules/calendar/evolution-module-calendar.c14
17 files changed, 760 insertions, 5 deletions
diff --git a/modules/calendar/Makefile.am b/modules/calendar/Makefile.am
index 0a22b2f568..bbabb6cfb2 100644
--- a/modules/calendar/Makefile.am
+++ b/modules/calendar/Makefile.am
@@ -14,8 +14,20 @@ libevolution_module_calendar_la_SOURCES = \
evolution-module-calendar.c \
e-cal-attachment-handler.c \
e-cal-attachment-handler.h \
+ e-cal-config-calendar-item.c \
+ e-cal-config-calendar-item.h \
+ e-cal-config-date-edit.c \
+ e-cal-config-date-edit.h \
e-cal-config-hook.c \
e-cal-config-hook.h \
+ e-cal-config-meeting-store.c \
+ e-cal-config-meeting-store.h \
+ e-cal-config-meeting-time-selector.c \
+ e-cal-config-meeting-time-selector.h \
+ e-cal-config-model.c \
+ e-cal-config-model.h \
+ e-cal-config-view.c \
+ e-cal-config-view.h \
e-cal-event-hook.c \
e-cal-event-hook.h \
e-cal-shell-backend.c \
diff --git a/modules/calendar/e-cal-config-calendar-item.c b/modules/calendar/e-cal-config-calendar-item.c
new file mode 100644
index 0000000000..5c585f94ca
--- /dev/null
+++ b/modules/calendar/e-cal-config-calendar-item.c
@@ -0,0 +1,79 @@
+/*
+ * e-cal-config-calendar-item.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#include "e-cal-config-calendar-item.h"
+
+#include <shell/e-shell.h>
+#include <e-util/e-binding.h>
+#include <e-util/e-extension.h>
+#include <misc/e-calendar-item.h>
+
+static void
+cal_config_calendar_item_constructed (GObject *object)
+{
+ EExtension *extension;
+ EExtensible *extensible;
+ EShellSettings *shell_settings;
+ EShell *shell;
+
+ extension = E_EXTENSION (object);
+ extensible = e_extension_get_extensible (extension);
+
+ shell = e_shell_get_default ();
+ shell_settings = e_shell_get_shell_settings (shell);
+
+ e_binding_new (
+ shell_settings, "cal-show-week-numbers",
+ extensible, "show-week-numbers");
+
+ e_binding_new (
+ shell_settings, "cal-week-start-day",
+ extensible, "week-start-day");
+}
+
+static void
+cal_config_calendar_item_class_init (EExtensionClass *class)
+{
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = cal_config_calendar_item_constructed;
+
+ class->extensible_type = E_TYPE_CALENDAR_ITEM;
+}
+
+void
+e_cal_config_calendar_item_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (EExtensionClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) cal_config_calendar_item_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EExtension),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) NULL,
+ NULL /* value_table */
+ };
+
+ g_type_module_register_type (
+ type_module, E_TYPE_EXTENSION,
+ "ECalConfigCalendarItem", &type_info, 0);
+}
diff --git a/modules/calendar/e-cal-config-calendar-item.h b/modules/calendar/e-cal-config-calendar-item.h
new file mode 100644
index 0000000000..af12eb244a
--- /dev/null
+++ b/modules/calendar/e-cal-config-calendar-item.h
@@ -0,0 +1,30 @@
+/*
+ * e-cal-config-calendar-item.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#ifndef E_CAL_CONFIG_CALENDAR_ITEM_H
+#define E_CAL_CONFIG_CALENDAR_ITEM_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+void e_cal_config_calendar_item_register_type (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_CAL_CONFIG_CALENDAR_ITEM_H */
diff --git a/modules/calendar/e-cal-config-date-edit.c b/modules/calendar/e-cal-config-date-edit.c
new file mode 100644
index 0000000000..667e749dff
--- /dev/null
+++ b/modules/calendar/e-cal-config-date-edit.c
@@ -0,0 +1,79 @@
+/*
+ * e-cal-config-date-edit.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#include "e-cal-config-date-edit.h"
+
+#include <shell/e-shell.h>
+#include <e-util/e-binding.h>
+#include <e-util/e-extension.h>
+#include <misc/e-dateedit.h>
+
+static void
+cal_config_date_edit_constructed (GObject *object)
+{
+ EExtension *extension;
+ EExtensible *extensible;
+ EShellSettings *shell_settings;
+ EShell *shell;
+
+ extension = E_EXTENSION (object);
+ extensible = e_extension_get_extensible (extension);
+
+ shell = e_shell_get_default ();
+ shell_settings = e_shell_get_shell_settings (shell);
+
+ e_binding_new (
+ shell_settings, "cal-show-week-numbers",
+ extensible, "show-week-numbers");
+
+ e_binding_new (
+ shell_settings, "cal-week-start-day",
+ extensible, "week-start-day");
+}
+
+static void
+cal_config_date_edit_class_init (EExtensionClass *class)
+{
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = cal_config_date_edit_constructed;
+
+ class->extensible_type = E_TYPE_DATE_EDIT;
+}
+
+void
+e_cal_config_date_edit_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (EExtensionClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) cal_config_date_edit_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EExtension),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) NULL,
+ NULL /* value_table */
+ };
+
+ g_type_module_register_type (
+ type_module, E_TYPE_EXTENSION,
+ "ECalConfigDateEdit", &type_info, 0);
+}
diff --git a/modules/calendar/e-cal-config-date-edit.h b/modules/calendar/e-cal-config-date-edit.h
new file mode 100644
index 0000000000..33291201dc
--- /dev/null
+++ b/modules/calendar/e-cal-config-date-edit.h
@@ -0,0 +1,30 @@
+/*
+ * e-cal-config-date-edit.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#ifndef E_CAL_CONFIG_DATE_EDIT_H
+#define E_CAL_CONFIG_DATE_EDIT_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+void e_cal_config_date_edit_register_type (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_CAL_CONFIG_DATE_EDIT_H */
diff --git a/modules/calendar/e-cal-config-meeting-store.c b/modules/calendar/e-cal-config-meeting-store.c
new file mode 100644
index 0000000000..7169ac4029
--- /dev/null
+++ b/modules/calendar/e-cal-config-meeting-store.c
@@ -0,0 +1,79 @@
+/*
+ * e-cal-config-meeting-store.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#include "e-cal-config-meeting-store.h"
+
+#include <shell/e-shell.h>
+#include <e-util/e-binding.h>
+#include <e-util/e-extension.h>
+#include <calendar/gui/e-meeting-store.h>
+
+static void
+cal_config_meeting_store_constructed (GObject *object)
+{
+ EExtension *extension;
+ EExtensible *extensible;
+ EShellSettings *shell_settings;
+ EShell *shell;
+
+ extension = E_EXTENSION (object);
+ extensible = e_extension_get_extensible (extension);
+
+ shell = e_shell_get_default ();
+ shell_settings = e_shell_get_shell_settings (shell);
+
+ e_binding_new (
+ shell_settings, "cal-free-busy-template",
+ extensible, "free-busy-template");
+
+ e_binding_new (
+ shell_settings, "cal-timezone",
+ extensible, "timezone");
+}
+
+static void
+cal_config_meeting_store_class_init (EExtensionClass *class)
+{
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = cal_config_meeting_store_constructed;
+
+ class->extensible_type = E_TYPE_MEETING_STORE;
+}
+
+void
+e_cal_config_meeting_store_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (EExtensionClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) cal_config_meeting_store_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EExtension),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) NULL,
+ NULL /* value_table */
+ };
+
+ g_type_module_register_type (
+ type_module, E_TYPE_EXTENSION,
+ "ECalConfigMeetingStore", &type_info, 0);
+}
diff --git a/modules/calendar/e-cal-config-meeting-store.h b/modules/calendar/e-cal-config-meeting-store.h
new file mode 100644
index 0000000000..9ad2835da8
--- /dev/null
+++ b/modules/calendar/e-cal-config-meeting-store.h
@@ -0,0 +1,30 @@
+/*
+ * e-cal-config-meeting-store.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#ifndef E_CAL_CONFIG_MEETING_STORE_H
+#define E_CAL_CONFIG_MEETING_STORE_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+void e_cal_config_meeting_store_register_type (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_CAL_CONFIG_MEETING_STORE_H */
diff --git a/modules/calendar/e-cal-config-meeting-time-selector.c b/modules/calendar/e-cal-config-meeting-time-selector.c
new file mode 100644
index 0000000000..1c45d3b9ef
--- /dev/null
+++ b/modules/calendar/e-cal-config-meeting-time-selector.c
@@ -0,0 +1,83 @@
+/*
+ * e-cal-config-meeting-time-selector.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#include "e-cal-config-meeting-time-selector.h"
+
+#include <shell/e-shell.h>
+#include <e-util/e-binding.h>
+#include <e-util/e-extension.h>
+#include <calendar/gui/e-meeting-time-sel.h>
+
+static void
+cal_config_meeting_time_selector_constructed (GObject *object)
+{
+ EExtension *extension;
+ EExtensible *extensible;
+ EShellSettings *shell_settings;
+ EShell *shell;
+
+ extension = E_EXTENSION (object);
+ extensible = e_extension_get_extensible (extension);
+
+ shell = e_shell_get_default ();
+ shell_settings = e_shell_get_shell_settings (shell);
+
+ e_binding_new (
+ shell_settings, "cal-show-week-numbers",
+ extensible, "show-week-numbers");
+
+ e_binding_new (
+ shell_settings, "cal-use-24-hour-format",
+ extensible, "use-24-hour-format");
+
+ e_binding_new (
+ shell_settings, "cal-week-start-day",
+ extensible, "week-start-day");
+}
+
+static void
+cal_config_meeting_time_selector_class_init (EExtensionClass *class)
+{
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = cal_config_meeting_time_selector_constructed;
+
+ class->extensible_type = E_TYPE_MEETING_TIME_SELECTOR;
+}
+
+void
+e_cal_config_meeting_time_selector_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (EExtensionClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) cal_config_meeting_time_selector_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EExtension),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) NULL,
+ NULL /* value_table */
+ };
+
+ g_type_module_register_type (
+ type_module, E_TYPE_EXTENSION,
+ "ECalConfigMeetingTimeSelector", &type_info, 0);
+}
diff --git a/modules/calendar/e-cal-config-meeting-time-selector.h b/modules/calendar/e-cal-config-meeting-time-selector.h
new file mode 100644
index 0000000000..b244263605
--- /dev/null
+++ b/modules/calendar/e-cal-config-meeting-time-selector.h
@@ -0,0 +1,30 @@
+/*
+ * e-cal-config-meeting-time-selector.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#ifndef E_CAL_CONFIG_MEETING_TIME_SELECTOR_H
+#define E_CAL_CONFIG_MEETING_TIME_SELECTOR_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+void e_cal_config_meeting_time_selector_register_type (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_CAL_CONFIG_MEETING_TIME_SELECTOR_H */
diff --git a/modules/calendar/e-cal-config-model.c b/modules/calendar/e-cal-config-model.c
new file mode 100644
index 0000000000..d176d509e9
--- /dev/null
+++ b/modules/calendar/e-cal-config-model.c
@@ -0,0 +1,99 @@
+/*
+ * e-cal-config-model.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#include "e-cal-config-model.h"
+
+#include <shell/e-shell.h>
+#include <e-util/e-binding.h>
+#include <e-util/e-extension.h>
+#include <calendar/gui/e-cal-model.h>
+#include <calendar/gui/e-cal-model-tasks.h>
+
+static void
+cal_config_model_constructed (GObject *object)
+{
+ EExtension *extension;
+ EExtensible *extensible;
+ EShellSettings *shell_settings;
+ EShell *shell;
+
+ extension = E_EXTENSION (object);
+ extensible = e_extension_get_extensible (extension);
+
+ shell = e_shell_get_default ();
+ shell_settings = e_shell_get_shell_settings (shell);
+
+ /*** ECalModel ***/
+
+ e_binding_new (
+ shell_settings, "cal-timezone",
+ extensible, "timezone");
+
+ e_binding_new (
+ shell_settings, "cal-use-24-hour-format",
+ extensible, "use-24-hour-format");
+
+ e_binding_new (
+ shell_settings, "cal-week-start-day",
+ extensible, "week-start-day");
+
+ /*** ECalModelTasks ***/
+
+ if (E_IS_CAL_MODEL_TASKS (extensible)) {
+
+ e_binding_new (
+ shell_settings, "cal-tasks-color-due-today",
+ extensible, "color-due-today");
+
+ e_binding_new (
+ shell_settings, "cal-tasks-color-overdue",
+ extensible, "color-overdue");
+ }
+}
+
+static void
+cal_config_model_class_init (EExtensionClass *class)
+{
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = cal_config_model_constructed;
+
+ class->extensible_type = E_TYPE_CAL_MODEL;
+}
+
+void
+e_cal_config_model_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (EExtensionClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) cal_config_model_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EExtension),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) NULL,
+ NULL /* value_table */
+ };
+
+ g_type_module_register_type (
+ type_module, E_TYPE_EXTENSION,
+ "ECalConfigModel", &type_info, 0);
+}
diff --git a/modules/calendar/e-cal-config-model.h b/modules/calendar/e-cal-config-model.h
new file mode 100644
index 0000000000..1c1045a906
--- /dev/null
+++ b/modules/calendar/e-cal-config-model.h
@@ -0,0 +1,30 @@
+/*
+ * e-cal-config-model.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#ifndef E_CAL_CONFIG_MODEL_H
+#define E_CAL_CONFIG_MODEL_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+void e_cal_config_model_register_type (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_CAL_CONFIG_MODEL_H */
diff --git a/modules/calendar/e-cal-config-view.c b/modules/calendar/e-cal-config-view.c
new file mode 100644
index 0000000000..9783723a4e
--- /dev/null
+++ b/modules/calendar/e-cal-config-view.c
@@ -0,0 +1,130 @@
+/*
+ * e-cal-config-view.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#include "e-cal-config-view.h"
+
+#include <shell/e-shell.h>
+#include <e-util/e-binding.h>
+#include <e-util/e-extension.h>
+#include <calendar/gui/e-day-view.h>
+#include <calendar/gui/e-week-view.h>
+
+static void
+cal_config_view_constructed (GObject *object)
+{
+ EExtension *extension;
+ EExtensible *extensible;
+ EShellSettings *shell_settings;
+ EShell *shell;
+
+ extension = E_EXTENSION (object);
+ extensible = e_extension_get_extensible (extension);
+
+ shell = e_shell_get_default ();
+ shell_settings = e_shell_get_shell_settings (shell);
+
+ /*** EDayView ***/
+
+ if (E_IS_DAY_VIEW (extensible)) {
+
+ e_binding_new (
+ shell_settings, "cal-day-view-show-week-numbers",
+ E_DAY_VIEW (extensible)->week_number_label, "visible");
+
+ e_binding_new (
+ shell_settings, "cal-marcus-bains-show-line",
+ extensible, "marcus-bains-show-line");
+
+ e_binding_new (
+ shell_settings, "cal-marcus-bains-day-view-color",
+ extensible, "marcus-bains-day-view-color");
+
+ e_binding_new (
+ shell_settings, "cal-marcus-bains-time-bar-color",
+ extensible, "marcus-bains-time-bar-color");
+
+ e_binding_new (
+ shell_settings, "cal-time-divisions",
+ extensible, "mins-per-row");
+
+ e_binding_new (
+ shell_settings, "cal-work-day-end-hour",
+ extensible, "work-day-end-hour");
+
+ e_binding_new (
+ shell_settings, "cal-work-day-end-minute",
+ extensible, "work-day-end-minute");
+
+ e_binding_new (
+ shell_settings, "cal-work-day-start-hour",
+ extensible, "work-day-start-hour");
+
+ e_binding_new (
+ shell_settings, "cal-work-day-start-minute",
+ extensible, "work-day-start-minute");
+
+ e_binding_new (
+ shell_settings, "cal-working-days-bitset",
+ extensible, "working-days");
+ }
+
+ /*** EWeekView ***/
+
+ if (E_IS_WEEK_VIEW (extensible)) {
+
+ e_binding_new (
+ shell_settings, "cal-compress-weekend",
+ extensible, "compress-weekend");
+
+ e_binding_new (
+ shell_settings, "cal-show-event-end-times",
+ extensible, "show-event-end-times");
+ }
+}
+
+static void
+cal_config_view_class_init (EExtensionClass *class)
+{
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = cal_config_view_constructed;
+
+ class->extensible_type = E_TYPE_CALENDAR_VIEW;
+}
+
+void
+e_cal_config_view_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (EExtensionClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) cal_config_view_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EExtension),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) NULL,
+ NULL /* value_table */
+ };
+
+ g_type_module_register_type (
+ type_module, E_TYPE_EXTENSION,
+ "ECalConfigView", &type_info, 0);
+}
diff --git a/modules/calendar/e-cal-config-view.h b/modules/calendar/e-cal-config-view.h
new file mode 100644
index 0000000000..e36acddf0c
--- /dev/null
+++ b/modules/calendar/e-cal-config-view.h
@@ -0,0 +1,31 @@
+/*
+ * e-cal-config-view.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#ifndef E_CAL_CONFIG_VIEW_H
+#define E_CAL_CONFIG_VIEW_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+void e_cal_config_view_register_type (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_CAL_CONFIG_VIEW_H */
+
diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c
index 6a3f8b6243..e9bba7a83b 100644
--- a/modules/calendar/e-cal-shell-content.c
+++ b/modules/calendar/e-cal-shell-content.c
@@ -318,7 +318,7 @@ cal_shell_content_constructed (GObject *object)
ECalModel *task_model=NULL;
EShell *shell;
EShellContent *shell_content;
- EShellSettings *shell_settings;
+ EShellBackend *shell_backend;
EShellView *shell_view;
EShellWindow *shell_window;
EShellContent *foreign_content;
@@ -342,7 +342,6 @@ cal_shell_content_constructed (GObject *object)
shell_window = e_shell_view_get_shell_window (shell_view);
shell = e_shell_window_get_shell (shell_window);
- shell_settings = e_shell_get_shell_settings (shell);
/* We borrow the memopad and taskpad models from the memo
* and task views, loading the views if necessary. */
@@ -393,7 +392,7 @@ cal_shell_content_constructed (GObject *object)
/* Add views in the order defined by GnomeCalendarViewType, such
* that the notebook page number corresponds to the view type. */
- priv->calendar = gnome_calendar_new (shell_settings);
+ priv->calendar = gnome_calendar_new ();
calendar = GNOME_CALENDAR (priv->calendar);
for (ii = 0; ii < GNOME_CAL_LAST_VIEW; ii++) {
diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c
index 34946b7bdd..fe952eda3f 100644
--- a/modules/calendar/e-memo-shell-content.c
+++ b/modules/calendar/e-memo-shell-content.c
@@ -418,7 +418,7 @@ memo_shell_content_constructed (GObject *object)
shell = e_shell_backend_get_shell (shell_backend);
shell_settings = e_shell_get_shell_settings (shell);
- priv->memo_model = e_cal_model_memos_new (shell_settings);
+ priv->memo_model = e_cal_model_memos_new ();
timezone = e_shell_settings_get_pointer (
shell_settings, "cal-timezone");
diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c
index 5fb39a9738..ab813d5b2c 100644
--- a/modules/calendar/e-task-shell-content.c
+++ b/modules/calendar/e-task-shell-content.c
@@ -415,7 +415,7 @@ task_shell_content_constructed (GObject *object)
shell = e_shell_window_get_shell (shell_window);
shell_settings = e_shell_get_shell_settings (shell);
- priv->task_model = e_cal_model_tasks_new (shell_settings);
+ priv->task_model = e_cal_model_tasks_new ();
timezone = e_shell_settings_get_pointer (
shell_settings, "cal-timezone");
diff --git a/modules/calendar/evolution-module-calendar.c b/modules/calendar/evolution-module-calendar.c
index f72e8a97e4..b54f6439a3 100644
--- a/modules/calendar/evolution-module-calendar.c
+++ b/modules/calendar/evolution-module-calendar.c
@@ -39,6 +39,13 @@
#include "e-task-shell-sidebar.h"
#include "e-task-shell-view.h"
+#include "e-cal-config-calendar-item.h"
+#include "e-cal-config-date-edit.h"
+#include "e-cal-config-meeting-store.h"
+#include "e-cal-config-meeting-time-selector.h"
+#include "e-cal-config-model.h"
+#include "e-cal-config-view.h"
+
/* Module Entry Points */
void e_module_load (GTypeModule *type_module);
void e_module_unload (GTypeModule *type_module);
@@ -67,6 +74,13 @@ e_module_load (GTypeModule *type_module)
e_task_shell_content_register_type (type_module);
e_task_shell_sidebar_register_type (type_module);
e_task_shell_view_register_type (type_module);
+
+ e_cal_config_calendar_item_register_type (type_module);
+ e_cal_config_date_edit_register_type (type_module);
+ e_cal_config_meeting_store_register_type (type_module);
+ e_cal_config_meeting_time_selector_register_type (type_module);
+ e_cal_config_model_register_type (type_module);
+ e_cal_config_view_register_type (type_module);
}
G_MODULE_EXPORT void