aboutsummaryrefslogtreecommitdiffstats
path: root/modules/settings
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-01-21 07:31:11 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-01-21 09:56:16 +0800
commit8a71509ee441e48215df9a9c3018214fe9a592ce (patch)
tree2c053d9d1c8a7d6bd61c81a6f609c48fb8428197 /modules/settings
parent8e2902eefc466c662bd7bef0533de05db0897c49 (diff)
downloadgsoc2013-evolution-8a71509ee441e48215df9a9c3018214fe9a592ce.tar
gsoc2013-evolution-8a71509ee441e48215df9a9c3018214fe9a592ce.tar.gz
gsoc2013-evolution-8a71509ee441e48215df9a9c3018214fe9a592ce.tar.bz2
gsoc2013-evolution-8a71509ee441e48215df9a9c3018214fe9a592ce.tar.lz
gsoc2013-evolution-8a71509ee441e48215df9a9c3018214fe9a592ce.tar.xz
gsoc2013-evolution-8a71509ee441e48215df9a9c3018214fe9a592ce.tar.zst
gsoc2013-evolution-8a71509ee441e48215df9a9c3018214fe9a592ce.zip
Add a "settings" module.
Collect all the "config" extensions from the "addressbook", "calendar", and "mail" modules into one place. These extensions typically just bind GObject properties of extensible classes to app-specific GSettings keys.
Diffstat (limited to 'modules/settings')
-rw-r--r--modules/settings/Makefile.am56
-rw-r--r--modules/settings/e-settings-cal-model.c182
-rw-r--r--modules/settings/e-settings-cal-model.h65
-rw-r--r--modules/settings/e-settings-calendar-item.c104
-rw-r--r--modules/settings/e-settings-calendar-item.h66
-rw-r--r--modules/settings/e-settings-calendar-view.c146
-rw-r--r--modules/settings/e-settings-calendar-view.h66
-rw-r--r--modules/settings/e-settings-comp-editor.c124
-rw-r--r--modules/settings/e-settings-comp-editor.h64
-rw-r--r--modules/settings/e-settings-date-edit.c103
-rw-r--r--modules/settings/e-settings-date-edit.h65
-rw-r--r--modules/settings/e-settings-mail-formatter.c211
-rw-r--r--modules/settings/e-settings-mail-formatter.h66
-rw-r--r--modules/settings/e-settings-mail-reader.c133
-rw-r--r--modules/settings/e-settings-mail-reader.h65
-rw-r--r--modules/settings/e-settings-meeting-store.c120
-rw-r--r--modules/settings/e-settings-meeting-store.h65
-rw-r--r--modules/settings/e-settings-meeting-time-selector.c111
-rw-r--r--modules/settings/e-settings-meeting-time-selector.h66
-rw-r--r--modules/settings/e-settings-name-selector-entry.c122
-rw-r--r--modules/settings/e-settings-name-selector-entry.h66
-rw-r--r--modules/settings/e-settings-web-view-gtkhtml.c307
-rw-r--r--modules/settings/e-settings-web-view-gtkhtml.h65
-rw-r--r--modules/settings/e-settings-web-view.c109
-rw-r--r--modules/settings/e-settings-web-view.h64
-rw-r--r--modules/settings/evolution-module-settings.c57
26 files changed, 2668 insertions, 0 deletions
diff --git a/modules/settings/Makefile.am b/modules/settings/Makefile.am
new file mode 100644
index 0000000000..178c408f9f
--- /dev/null
+++ b/modules/settings/Makefile.am
@@ -0,0 +1,56 @@
+NULL =
+
+module_LTLIBRARIES = module-settings.la
+
+module_settings_la_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ -I$(top_srcdir) \
+ -DG_LOG_DOMAIN=\"evolution-module-settings\" \
+ $(EVOLUTION_DATA_SERVER_CFLAGS) \
+ $(GNOME_PLATFORM_CFLAGS) \
+ $(GTKHTML_CFLAGS) \
+ $(NULL)
+
+module_settings_la_SOURCES = \
+ evolution-module-settings.c \
+ e-settings-cal-model.c \
+ e-settings-cal-model.h \
+ e-settings-calendar-item.c \
+ e-settings-calendar-item.h \
+ e-settings-calendar-view.c \
+ e-settings-calendar-view.h \
+ e-settings-comp-editor.c \
+ e-settings-comp-editor.h \
+ e-settings-date-edit.c \
+ e-settings-date-edit.h \
+ e-settings-mail-formatter.c \
+ e-settings-mail-formatter.h \
+ e-settings-mail-reader.c \
+ e-settings-mail-reader.h \
+ e-settings-meeting-store.c \
+ e-settings-meeting-store.h \
+ e-settings-meeting-time-selector.c \
+ e-settings-meeting-time-selector.h \
+ e-settings-name-selector-entry.c \
+ e-settings-name-selector-entry.h \
+ e-settings-web-view.c \
+ e-settings-web-view.h \
+ e-settings-web-view-gtkhtml.c \
+ e-settings-web-view-gtkhtml.h \
+ $(NULL)
+
+module_settings_la_LIBADD = \
+ $(top_builddir)/e-util/libeutil.la \
+ $(top_builddir)/em-format/libemformat.la \
+ $(top_builddir)/shell/libeshell.la \
+ $(top_builddir)/mail/libevolution-mail.la \
+ $(top_builddir)/calendar/gui/libevolution-calendar.la \
+ $(EVOLUTION_DATA_SERVER_LIBS) \
+ $(GNOME_PLATFORM_LIBS) \
+ $(GTKHTML_LIBS) \
+ $(NULL)
+
+module_settings_la_LDFLAGS = \
+ -avoid-version -module $(NO_UNDEFINED)
+
+-include $(top_srcdir)/git.mk
diff --git a/modules/settings/e-settings-cal-model.c b/modules/settings/e-settings-cal-model.c
new file mode 100644
index 0000000000..5dd55f560e
--- /dev/null
+++ b/modules/settings/e-settings-cal-model.c
@@ -0,0 +1,182 @@
+/*
+ * e-settings-cal-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/>
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "e-settings-cal-model.h"
+
+#include <shell/e-shell.h>
+#include <calendar/gui/e-cal-model.h>
+#include <calendar/gui/e-cal-model-tasks.h>
+
+#define E_SETTINGS_CAL_MODEL_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SETTINGS_CAL_MODEL, ESettingsCalModelPrivate))
+
+struct _ESettingsCalModelPrivate {
+ gint placeholder;
+};
+
+G_DEFINE_DYNAMIC_TYPE (
+ ESettingsCalModel,
+ e_settings_cal_model,
+ E_TYPE_EXTENSION)
+
+static void
+settings_cal_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 ***/
+
+ g_object_bind_property (
+ shell_settings, "cal-compress-weekend",
+ extensible, "compress-weekend",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-confirm-delete",
+ extensible, "confirm-delete",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-default-reminder-interval",
+ extensible, "default-reminder-interval",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-default-reminder-units",
+ extensible, "default-reminder-units",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-timezone",
+ extensible, "timezone",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-use-24-hour-format",
+ extensible, "use-24-hour-format",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-use-default-reminder",
+ extensible, "use-default-reminder",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-week-start-day",
+ extensible, "week-start-day",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-work-day-end-hour",
+ extensible, "work-day-end-hour",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-work-day-end-minute",
+ extensible, "work-day-end-minute",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-work-day-start-hour",
+ extensible, "work-day-start-hour",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-work-day-start-minute",
+ extensible, "work-day-start-minute",
+ G_BINDING_SYNC_CREATE);
+
+ /*** ECalModelTasks ***/
+
+ if (E_IS_CAL_MODEL_TASKS (extensible)) {
+
+ g_object_bind_property (
+ shell_settings, "cal-tasks-highlight-due-today",
+ extensible, "highlight-due-today",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-tasks-color-due-today",
+ extensible, "color-due-today",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-tasks-highlight-overdue",
+ extensible, "highlight-overdue",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-tasks-color-overdue",
+ extensible, "color-overdue",
+ G_BINDING_SYNC_CREATE);
+ }
+
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_settings_cal_model_parent_class)->
+ constructed (object);
+}
+
+static void
+e_settings_cal_model_class_init (ESettingsCalModelClass *class)
+{
+ GObjectClass *object_class;
+ EExtensionClass *extension_class;
+
+ g_type_class_add_private (class, sizeof (ESettingsCalModelPrivate));
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = settings_cal_model_constructed;
+
+ extension_class = E_EXTENSION_CLASS (class);
+ extension_class->extensible_type = E_TYPE_CAL_MODEL;
+}
+
+static void
+e_settings_cal_model_class_finalize (ESettingsCalModelClass *class)
+{
+}
+
+static void
+e_settings_cal_model_init (ESettingsCalModel *extension)
+{
+ extension->priv = E_SETTINGS_CAL_MODEL_GET_PRIVATE (extension);
+}
+
+void
+e_settings_cal_model_type_register (GTypeModule *type_module)
+{
+ /* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration
+ * function, so we have to wrap it with a public function in
+ * order to register types from a separate compilation unit. */
+ e_settings_cal_model_register_type (type_module);
+}
+
diff --git a/modules/settings/e-settings-cal-model.h b/modules/settings/e-settings-cal-model.h
new file mode 100644
index 0000000000..8fbfe4b843
--- /dev/null
+++ b/modules/settings/e-settings-cal-model.h
@@ -0,0 +1,65 @@
+/*
+ * e-settings-cal-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_SETTINGS_CAL_MODEL_H
+#define E_SETTINGS_CAL_MODEL_H
+
+#include <libebackend/libebackend.h>
+
+/* Standard GObject macros */
+#define E_TYPE_SETTINGS_CAL_MODEL \
+ (e_settings_cal_model_get_type ())
+#define E_SETTINGS_CAL_MODEL(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_SETTINGS_CAL_MODEL, ESettingsCalModel))
+#define E_SETTINGS_CAL_MODEL_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_SETTINGS_CAL_MODEL, ESettingsCalModelClass))
+#define E_IS_SETTINGS_CAL_MODEL(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_SETTINGS_CAL_MODEL))
+#define E_IS_SETTINGS_CAL_MODEL_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_SETTINGS_CAL_MODEL))
+#define E_SETTINGS_CAL_MODEL_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_SETTINGS_CAL_MODEL, ESettingsCalModelClass))
+
+G_BEGIN_DECLS
+
+typedef struct _ESettingsCalModel ESettingsCalModel;
+typedef struct _ESettingsCalModelClass ESettingsCalModelClass;
+typedef struct _ESettingsCalModelPrivate ESettingsCalModelPrivate;
+
+struct _ESettingsCalModel {
+ EExtension parent;
+ ESettingsCalModelPrivate *priv;
+};
+
+struct _ESettingsCalModelClass {
+ EExtensionClass parent_class;
+};
+
+GType e_settings_cal_model_get_type (void) G_GNUC_CONST;
+void e_settings_cal_model_type_register
+ (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_SETTINGS_CAL_MODEL_H */
+
diff --git a/modules/settings/e-settings-calendar-item.c b/modules/settings/e-settings-calendar-item.c
new file mode 100644
index 0000000000..ae3c37b4ae
--- /dev/null
+++ b/modules/settings/e-settings-calendar-item.c
@@ -0,0 +1,104 @@
+/*
+ * e-settings-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/>
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "e-settings-calendar-item.h"
+
+#include <shell/e-shell.h>
+
+#define E_SETTINGS_CALENDAR_ITEM_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SETTINGS_CALENDAR_ITEM, ESettingsCalendarItemPrivate))
+
+struct _ESettingsCalendarItemPrivate {
+ gint placeholder;
+};
+
+G_DEFINE_DYNAMIC_TYPE (
+ ESettingsCalendarItem,
+ e_settings_calendar_item,
+ E_TYPE_EXTENSION)
+
+static void
+settings_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);
+
+ g_object_bind_property (
+ shell_settings, "cal-show-week-numbers",
+ extensible, "show-week-numbers",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-week-start-day",
+ extensible, "week-start-day",
+ G_BINDING_SYNC_CREATE);
+
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_settings_calendar_item_parent_class)->
+ constructed (object);
+}
+
+static void
+e_settings_calendar_item_class_init (ESettingsCalendarItemClass *class)
+{
+ GObjectClass *object_class;
+ EExtensionClass *extension_class;
+
+ g_type_class_add_private (
+ class, sizeof (ESettingsCalendarItemPrivate));
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = settings_calendar_item_constructed;
+
+ extension_class = E_EXTENSION_CLASS (class);
+ extension_class->extensible_type = E_TYPE_CALENDAR_ITEM;
+}
+
+static void
+e_settings_calendar_item_class_finalize (ESettingsCalendarItemClass *class)
+{
+}
+
+static void
+e_settings_calendar_item_init (ESettingsCalendarItem *extension)
+{
+ extension->priv = E_SETTINGS_CALENDAR_ITEM_GET_PRIVATE (extension);
+}
+
+void
+e_settings_calendar_item_type_register (GTypeModule *type_module)
+{
+ /* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration
+ * function, so we have to wrap it with a public function in
+ * order to register types from a separate compilation unit. */
+ e_settings_calendar_item_register_type (type_module);
+}
+
diff --git a/modules/settings/e-settings-calendar-item.h b/modules/settings/e-settings-calendar-item.h
new file mode 100644
index 0000000000..e5d4576fb8
--- /dev/null
+++ b/modules/settings/e-settings-calendar-item.h
@@ -0,0 +1,66 @@
+/*
+ * e-settings-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_SETTINGS_CALENDAR_ITEM_H
+#define E_SETTINGS_CALENDAR_ITEM_H
+
+#include <libebackend/libebackend.h>
+
+/* Standard GObject macros */
+#define E_TYPE_SETTINGS_CALENDAR_ITEM \
+ (e_settings_calendar_item_get_type ())
+#define E_SETTINGS_CALENDAR_ITEM(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_SETTINGS_CALENDAR_ITEM, ESettingsCalendarItem))
+#define E_SETTINGS_CALENDAR_ITEM_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_SETTINGS_CALENDAR_ITEM, ESettingsCalendarItemClass))
+#define E_IS_SETTINGS_CALENDAR_ITEM(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_SETTINGS_CALENDAR_ITEM))
+#define E_IS_SETTINGS_CALENDAR_ITEM_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_SETTINGS_CALENDAR_ITEM))
+#define E_SETTINGS_CALENDAR_ITEM_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_SETTINGS_CALENDAR_ITEM, ESettingsCalendarItemClass))
+
+G_BEGIN_DECLS
+
+typedef struct _ESettingsCalendarItem ESettingsCalendarItem;
+typedef struct _ESettingsCalendarItemClass ESettingsCalendarItemClass;
+typedef struct _ESettingsCalendarItemPrivate ESettingsCalendarItemPrivate;
+
+struct _ESettingsCalendarItem {
+ EExtension parent;
+ ESettingsCalendarItemPrivate *priv;
+};
+
+struct _ESettingsCalendarItemClass {
+ EExtensionClass parent_class;
+};
+
+GType e_settings_calendar_item_get_type
+ (void) G_GNUC_CONST;
+void e_settings_calendar_item_type_register
+ (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_SETTINGS_CALENDAR_ITEM_H */
+
diff --git a/modules/settings/e-settings-calendar-view.c b/modules/settings/e-settings-calendar-view.c
new file mode 100644
index 0000000000..e1a0d47f2f
--- /dev/null
+++ b/modules/settings/e-settings-calendar-view.c
@@ -0,0 +1,146 @@
+/*
+ * e-settings-calendar-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/>
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "e-settings-calendar-view.h"
+
+#include <shell/e-shell.h>
+#include <calendar/gui/e-day-view.h>
+#include <calendar/gui/e-week-view.h>
+
+#define E_SETTINGS_CALENDAR_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SETTINGS_CALENDAR_VIEW, ESettingsCalendarViewPrivate))
+
+struct _ESettingsCalendarViewPrivate {
+ gint placeholder;
+};
+
+G_DEFINE_DYNAMIC_TYPE (
+ ESettingsCalendarView,
+ e_settings_calendar_view,
+ E_TYPE_EXTENSION)
+
+static void
+settings_calendar_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);
+
+ g_object_bind_property (
+ shell_settings, "cal-time-divisions",
+ extensible, "time-divisions",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
+
+ /*** EDayView ***/
+
+ if (E_IS_DAY_VIEW (extensible)) {
+
+ g_object_bind_property (
+ shell_settings, "cal-show-week-numbers",
+ E_DAY_VIEW (extensible)->week_number_label, "visible",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-marcus-bains-show-line",
+ extensible, "marcus-bains-show-line",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-marcus-bains-day-view-color",
+ extensible, "marcus-bains-day-view-color",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-marcus-bains-time-bar-color",
+ extensible, "marcus-bains-time-bar-color",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-working-days-bitset",
+ extensible, "working-days",
+ G_BINDING_SYNC_CREATE);
+ }
+
+ /*** EWeekView ***/
+
+ if (E_IS_WEEK_VIEW (extensible)) {
+
+ g_object_bind_property (
+ shell_settings, "cal-compress-weekend",
+ extensible, "compress-weekend",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-show-event-end-times",
+ extensible, "show-event-end-times",
+ G_BINDING_SYNC_CREATE);
+ }
+
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_settings_calendar_view_parent_class)->
+ constructed (object);
+}
+
+static void
+e_settings_calendar_view_class_init (ESettingsCalendarViewClass *class)
+{
+ GObjectClass *object_class;
+ EExtensionClass *extension_class;
+
+ g_type_class_add_private (class, sizeof (ESettingsCalendarViewPrivate));
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = settings_calendar_view_constructed;
+
+ extension_class = E_EXTENSION_CLASS (class);
+ extension_class->extensible_type = E_TYPE_CALENDAR_VIEW;
+}
+
+static void
+e_settings_calendar_view_class_finalize (ESettingsCalendarViewClass *class)
+{
+}
+
+static void
+e_settings_calendar_view_init (ESettingsCalendarView *extension)
+{
+ extension->priv = E_SETTINGS_CALENDAR_VIEW_GET_PRIVATE (extension);
+}
+
+void
+e_settings_calendar_view_type_register (GTypeModule *type_module)
+{
+ /* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration
+ * function, so we have to wrap it with a public function in
+ * order to register types from a separate compilation unit. */
+ e_settings_calendar_view_register_type (type_module);
+}
+
diff --git a/modules/settings/e-settings-calendar-view.h b/modules/settings/e-settings-calendar-view.h
new file mode 100644
index 0000000000..d2fd828350
--- /dev/null
+++ b/modules/settings/e-settings-calendar-view.h
@@ -0,0 +1,66 @@
+/*
+ * e-settings-calendar-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_SETTINGS_CALENDAR_VIEW_H
+#define E_SETTINGS_CALENDAR_VIEW_H
+
+#include <libebackend/libebackend.h>
+
+/* Standard GObject macros */
+#define E_TYPE_SETTINGS_CALENDAR_VIEW \
+ (e_settings_calendar_view_get_type ())
+#define E_SETTINGS_CALENDAR_VIEW(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_SETTINGS_CALENDAR_VIEW, ESettingsCalendarView))
+#define E_SETTINGS_CALENDAR_VIEW_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_SETTINGS_CALENDAR_VIEW, ESettingsCalendarViewClass))
+#define E_IS_SETTINGS_CALENDAR_VIEW(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_SETTINGS_CALENDAR_VIEW))
+#define E_IS_SETTINGS_CALENDAR_VIEW_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_SETTINGS_CALENDAR_VIEW))
+#define E_SETTINGS_CALENDAR_VIEW_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_SETTINGS_CALENDAR_VIEW, ESettingsCalendarViewClass))
+
+G_BEGIN_DECLS
+
+typedef struct _ESettingsCalendarView ESettingsCalendarView;
+typedef struct _ESettingsCalendarViewClass ESettingsCalendarViewClass;
+typedef struct _ESettingsCalendarViewPrivate ESettingsCalendarViewPrivate;
+
+struct _ESettingsCalendarView {
+ EExtension parent;
+ ESettingsCalendarViewPrivate *priv;
+};
+
+struct _ESettingsCalendarViewClass {
+ EExtensionClass parent_class;
+};
+
+GType e_settings_calendar_view_get_type
+ (void) G_GNUC_CONST;
+void e_settings_calendar_view_type_register
+ (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_SETTINGS_CALENDAR_VIEW_H */
+
diff --git a/modules/settings/e-settings-comp-editor.c b/modules/settings/e-settings-comp-editor.c
new file mode 100644
index 0000000000..a10983af88
--- /dev/null
+++ b/modules/settings/e-settings-comp-editor.c
@@ -0,0 +1,124 @@
+/*
+ * e-settings-comp-editor.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/>
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "e-settings-comp-editor.h"
+
+#include <shell/e-shell.h>
+#include <calendar/gui/dialogs/comp-editor.h>
+
+#define E_SETTINGS_COMP_EDITOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SETTINGS_COMP_EDITOR, ESettingsCompEditorPrivate))
+
+struct _ESettingsCompEditorPrivate {
+ gint placeholder;
+};
+
+G_DEFINE_DYNAMIC_TYPE (
+ ESettingsCompEditor,
+ e_settings_comp_editor,
+ E_TYPE_EXTENSION)
+
+static void
+settings_comp_editor_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);
+
+ g_object_bind_property (
+ shell_settings, "cal-timezone",
+ extensible, "timezone",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-use-24-hour-format",
+ extensible, "use-24-hour-format",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-work-day-end-hour",
+ extensible, "work-day-end-hour",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-work-day-end-minute",
+ extensible, "work-day-end-minute",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-work-day-start-hour",
+ extensible, "work-day-start-hour",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-work-day-start-minute",
+ extensible, "work-day-start-minute",
+ G_BINDING_SYNC_CREATE);
+
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_settings_comp_editor_parent_class)->
+ constructed (object);
+}
+
+static void
+e_settings_comp_editor_class_init (ESettingsCompEditorClass *class)
+{
+ GObjectClass *object_class;
+ EExtensionClass *extension_class;
+
+ g_type_class_add_private (class, sizeof (ESettingsCompEditorPrivate));
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = settings_comp_editor_constructed;
+
+ extension_class = E_EXTENSION_CLASS (class);
+ extension_class->extensible_type = TYPE_COMP_EDITOR;
+}
+
+static void
+e_settings_comp_editor_class_finalize (ESettingsCompEditorClass *class)
+{
+}
+
+static void
+e_settings_comp_editor_init (ESettingsCompEditor *extension)
+{
+ extension->priv = E_SETTINGS_COMP_EDITOR_GET_PRIVATE (extension);
+}
+
+void
+e_settings_comp_editor_type_register (GTypeModule *type_module)
+{
+ /* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration
+ * function, so we have to wrap it with a public function in
+ * order to register types from a separate compilation unit. */
+ e_settings_comp_editor_register_type (type_module);
+}
+
diff --git a/modules/settings/e-settings-comp-editor.h b/modules/settings/e-settings-comp-editor.h
new file mode 100644
index 0000000000..24b03f6e5d
--- /dev/null
+++ b/modules/settings/e-settings-comp-editor.h
@@ -0,0 +1,64 @@
+/*
+ * e-settings-comp-editor.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_SETTINGS_COMP_EDITOR_H
+#define E_SETTINGS_COMP_EDITOR_H
+
+#include <libebackend/libebackend.h>
+
+/* Standard GObject macros */
+#define E_TYPE_SETTINGS_COMP_EDITOR \
+ (e_settings_comp_editor_get_type ())
+#define E_SETTINGS_COMP_EDITOR(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_SETTINGS_COMP_EDITOR, ESettingsCompEditor))
+#define E_SETTINGS_COMP_EDITOR_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_SETTINGS_COMP_EDITOR, ESettingsCompEditorClass))
+#define E_IS_SETTINGS_COMP_EDITOR(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_SETTINGS_COMP_EDITOR))
+#define E_IS_SETTINGS_COMP_EDITOR_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_SETTINGS_COMP_EDITOR))
+#define E_SETTINGS_COMP_EDITOR_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_SETTINGS_COMP_EDITOR, ESettingsCompEditorClass))
+
+G_BEGIN_DECLS
+
+typedef struct _ESettingsCompEditor ESettingsCompEditor;
+typedef struct _ESettingsCompEditorClass ESettingsCompEditorClass;
+typedef struct _ESettingsCompEditorPrivate ESettingsCompEditorPrivate;
+
+struct _ESettingsCompEditor {
+ EExtension parent;
+ ESettingsCompEditorPrivate *priv;
+};
+
+struct _ESettingsCompEditorClass {
+ EExtensionClass parent_class;
+};
+
+GType e_settings_comp_editor_get_type (void) G_GNUC_CONST;
+void e_settings_comp_editor_type_register
+ (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_SETTINGS_COMP_EDITOR_H */
diff --git a/modules/settings/e-settings-date-edit.c b/modules/settings/e-settings-date-edit.c
new file mode 100644
index 0000000000..36e17660c0
--- /dev/null
+++ b/modules/settings/e-settings-date-edit.c
@@ -0,0 +1,103 @@
+/*
+ * e-settings-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/>
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "e-settings-date-edit.h"
+
+#include <shell/e-shell.h>
+
+#define E_SETTINGS_DATE_EDIT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SETTINGS_DATE_EDIT, ESettingsDateEditPrivate))
+
+struct _ESettingsDateEditPrivate {
+ gint placeholder;
+};
+
+G_DEFINE_DYNAMIC_TYPE (
+ ESettingsDateEdit,
+ e_settings_date_edit,
+ E_TYPE_EXTENSION)
+
+static void
+settings_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);
+
+ g_object_bind_property (
+ shell_settings, "cal-show-week-numbers",
+ extensible, "show-week-numbers",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-week-start-day",
+ extensible, "week-start-day",
+ G_BINDING_SYNC_CREATE);
+
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_settings_date_edit_parent_class)->
+ constructed (object);
+}
+
+static void
+e_settings_date_edit_class_init (ESettingsDateEditClass *class)
+{
+ GObjectClass *object_class;
+ EExtensionClass *extension_class;
+
+ g_type_class_add_private (class, sizeof (ESettingsDateEditPrivate));
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = settings_date_edit_constructed;
+
+ extension_class = E_EXTENSION_CLASS (class);
+ extension_class->extensible_type = E_TYPE_DATE_EDIT;
+}
+
+static void
+e_settings_date_edit_class_finalize (ESettingsDateEditClass *class)
+{
+}
+
+static void
+e_settings_date_edit_init (ESettingsDateEdit *extension)
+{
+ extension->priv = E_SETTINGS_DATE_EDIT_GET_PRIVATE (extension);
+}
+
+void
+e_settings_date_edit_type_register (GTypeModule *type_module)
+{
+ /* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration
+ * function, so we have to wrap it with a public function in
+ * order to register types from a separate compilation unit. */
+ e_settings_date_edit_register_type (type_module);
+}
+
diff --git a/modules/settings/e-settings-date-edit.h b/modules/settings/e-settings-date-edit.h
new file mode 100644
index 0000000000..63d0af17e3
--- /dev/null
+++ b/modules/settings/e-settings-date-edit.h
@@ -0,0 +1,65 @@
+/*
+ * e-settings-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_SETTINGS_DATE_EDIT_H
+#define E_SETTINGS_DATE_EDIT_H
+
+#include <libebackend/libebackend.h>
+
+/* Standard GObject macros */
+#define E_TYPE_SETTINGS_DATE_EDIT \
+ (e_settings_date_edit_get_type ())
+#define E_SETTINGS_DATE_EDIT(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_SETTINGS_DATE_EDIT, ESettingsDateEdit))
+#define E_SETTINGS_DATE_EDIT_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_SETTINGS_DATE_EDIT, ESettingsDateEditClass))
+#define E_IS_SETTINGS_DATE_EDIT(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_SETTINGS_DATE_EDIT))
+#define E_IS_SETTINGS_DATE_EDIT_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_SETTINGS_DATE_EDIT))
+#define E_SETTINGS_DATE_EDIT_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_SETTINGS_DATE_EDIT, ESettingsDateEditClass))
+
+G_BEGIN_DECLS
+
+typedef struct _ESettingsDateEdit ESettingsDateEdit;
+typedef struct _ESettingsDateEditClass ESettingsDateEditClass;
+typedef struct _ESettingsDateEditPrivate ESettingsDateEditPrivate;
+
+struct _ESettingsDateEdit {
+ EExtension parent;
+ ESettingsDateEditPrivate *priv;
+};
+
+struct _ESettingsDateEditClass {
+ EExtensionClass parent_class;
+};
+
+GType e_settings_date_edit_get_type (void) G_GNUC_CONST;
+void e_settings_date_edit_type_register
+ (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_SETTINGS_DATE_EDIT_H */
+
diff --git a/modules/settings/e-settings-mail-formatter.c b/modules/settings/e-settings-mail-formatter.c
new file mode 100644
index 0000000000..d81d4fb34e
--- /dev/null
+++ b/modules/settings/e-settings-mail-formatter.c
@@ -0,0 +1,211 @@
+/*
+ * e-settings-mail-formatter.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/>
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "e-settings-mail-formatter.h"
+
+#include <shell/e-shell.h>
+#include <e-util/e-util.h>
+#include <em-format/e-mail-formatter.h>
+#include <mail/e-mail-reader-utils.h>
+
+#define E_SETTINGS_MAIL_FORMATTER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SETTINGS_MAIL_FORMATTER, ESettingsMailFormatterPrivate))
+
+struct _ESettingsMailFormatterPrivate {
+ GSettings *settings;
+ gulong headers_changed_id;
+};
+
+G_DEFINE_DYNAMIC_TYPE (
+ ESettingsMailFormatter,
+ e_settings_mail_formatter,
+ E_TYPE_EXTENSION)
+
+static EMailFormatter *
+settings_mail_formatter_get_extensible (ESettingsMailFormatter *extension)
+{
+ EExtensible *extensible;
+
+ extensible = e_extension_get_extensible (E_EXTENSION (extension));
+
+ return E_MAIL_FORMATTER (extensible);
+}
+
+static void
+settings_mail_formatter_headers_changed_cb (GSettings *settings,
+ const gchar *key,
+ ESettingsMailFormatter *extension)
+{
+ EMailFormatter *formatter;
+ gchar **headers;
+ gint ii;
+
+ formatter = settings_mail_formatter_get_extensible (extension);
+
+ headers = g_settings_get_strv (settings, "headers");
+
+ e_mail_formatter_clear_headers (formatter);
+ for (ii = 0; headers && headers[ii]; ii++) {
+ EMailReaderHeader *h;
+ const gchar *xml = headers[ii];
+
+ h = e_mail_reader_header_from_xml (xml);
+ if (h && h->enabled)
+ e_mail_formatter_add_header (
+ formatter, h->name, NULL,
+ E_MAIL_FORMATTER_HEADER_FLAG_BOLD);
+
+ e_mail_reader_header_free (h);
+ }
+
+ if (!headers || !headers[0])
+ e_mail_formatter_set_default_headers (formatter);
+
+ g_strfreev (headers);
+}
+
+static void
+settings_mail_formatter_dispose (GObject *object)
+{
+ ESettingsMailFormatterPrivate *priv;
+
+ priv = E_SETTINGS_MAIL_FORMATTER_GET_PRIVATE (object);
+
+ if (priv->settings != NULL) {
+ g_signal_handler_disconnect (
+ priv->settings,
+ priv->headers_changed_id);
+ g_object_unref (priv->settings);
+ priv->settings = NULL;
+ }
+
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (e_settings_mail_formatter_parent_class)->
+ dispose (object);
+}
+
+static void
+settings_mail_formatter_constructed (GObject *object)
+{
+ ESettingsMailFormatter *extension;
+ EMailFormatter *formatter;
+ EShellSettings *shell_settings;
+ EShell *shell;
+
+ extension = E_SETTINGS_MAIL_FORMATTER (object);
+ formatter = settings_mail_formatter_get_extensible (extension);
+
+ shell = e_shell_get_default ();
+ shell_settings = e_shell_get_shell_settings (shell);
+
+ g_object_bind_property_full (
+ shell_settings, "mail-citation-color",
+ formatter, "citation-color",
+ G_BINDING_SYNC_CREATE,
+ e_binding_transform_string_to_color,
+ NULL, NULL, (GDestroyNotify) NULL);
+
+ g_object_bind_property (
+ shell_settings, "mail-mark-citations",
+ formatter, "mark-citations",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "mail-image-loading-policy",
+ formatter, "image-loading-policy",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "mail-only-local-photos",
+ formatter, "only-local-photos",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "mail-show-sender-photo",
+ formatter, "show-sender-photo",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "mail-show-real-date",
+ formatter, "show-real-date",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "mail-show-animated-images",
+ formatter, "animate-images",
+ G_BINDING_SYNC_CREATE);
+
+ extension->priv->headers_changed_id = g_signal_connect (
+ extension->priv->settings, "changed::headers",
+ G_CALLBACK (settings_mail_formatter_headers_changed_cb),
+ extension);
+
+ /* Initial synchronization */
+ settings_mail_formatter_headers_changed_cb (
+ extension->priv->settings, NULL, extension);
+
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_settings_mail_formatter_parent_class)->
+ constructed (object);
+}
+
+static void
+e_settings_mail_formatter_class_init (ESettingsMailFormatterClass *class)
+{
+ GObjectClass *object_class;
+ EExtensionClass *extension_class;
+
+ g_type_class_add_private (
+ class, sizeof (ESettingsMailFormatterPrivate));
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->dispose = settings_mail_formatter_dispose;
+ object_class->constructed = settings_mail_formatter_constructed;
+
+ extension_class = E_EXTENSION_CLASS (class);
+ extension_class->extensible_type = E_TYPE_MAIL_FORMATTER;
+}
+
+static void
+e_settings_mail_formatter_class_finalize (ESettingsMailFormatterClass *class)
+{
+}
+
+static void
+e_settings_mail_formatter_init (ESettingsMailFormatter *extension)
+{
+ extension->priv = E_SETTINGS_MAIL_FORMATTER_GET_PRIVATE (extension);
+
+ extension->priv->settings =
+ g_settings_new ("org.gnome.evolution.mail");
+}
+
+void
+e_settings_mail_formatter_type_register (GTypeModule *type_module)
+{
+ /* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration
+ * function, so we have to wrap it with a public function in
+ * order to register types from a separate compilation unit. */
+ e_settings_mail_formatter_register_type (type_module);
+}
+
diff --git a/modules/settings/e-settings-mail-formatter.h b/modules/settings/e-settings-mail-formatter.h
new file mode 100644
index 0000000000..3097d745d5
--- /dev/null
+++ b/modules/settings/e-settings-mail-formatter.h
@@ -0,0 +1,66 @@
+/*
+ * e-settings-mail-formatter.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_SETTINGS_MAIL_FORMATTER_H
+#define E_SETTINGS_MAIL_FORMATTER_H
+
+#include <libebackend/libebackend.h>
+
+/* Standard GObject macros */
+#define E_TYPE_SETTINGS_MAIL_FORMATTER \
+ (e_settings_mail_formatter_get_type ())
+#define E_SETTINGS_MAIL_FORMATTER(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_SETTINGS_MAIL_FORMATTER, ESettingsMailFormatter))
+#define E_SETTINGS_MAIL_FORMATTER_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_SETTINGS_MAIL_FORMATTER, ESettingsMailFormatterClass))
+#define E_IS_SETTINGS_MAIL_FORMATTER(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_SETTINGS_MAIL_FORMATTER))
+#define E_IS_SETTINGS_MAIL_FORMATTER_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_SETTINGS_MAIL_FORMATTER))
+#define E_SETTINGS_MAIL_FORMATTER_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_SETTINGS_MAIL_FORMATTER, ESettingsMailFormatterClass))
+
+G_BEGIN_DECLS
+
+typedef struct _ESettingsMailFormatter ESettingsMailFormatter;
+typedef struct _ESettingsMailFormatterClass ESettingsMailFormatterClass;
+typedef struct _ESettingsMailFormatterPrivate ESettingsMailFormatterPrivate;
+
+struct _ESettingsMailFormatter {
+ EExtension parent;
+ ESettingsMailFormatterPrivate *priv;
+};
+
+struct _ESettingsMailFormatterClass {
+ EExtensionClass parent_class;
+};
+
+GType e_settings_mail_formatter_get_type
+ (void) G_GNUC_CONST;
+void e_settings_mail_formatter_type_register
+ (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_SETTINGS_MAIL_FORMATTER_H */
+
diff --git a/modules/settings/e-settings-mail-reader.c b/modules/settings/e-settings-mail-reader.c
new file mode 100644
index 0000000000..9cf906fbef
--- /dev/null
+++ b/modules/settings/e-settings-mail-reader.c
@@ -0,0 +1,133 @@
+/*
+ * e-settings-mail-reader.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/>
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "e-settings-mail-reader.h"
+
+#include <shell/e-shell.h>
+#include <mail/e-mail-reader.h>
+
+#define E_SETTINGS_MAIL_READER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SETTINGS_MAIL_READER, ESettingsMailReaderPrivate))
+
+struct _ESettingsMailReaderPrivate {
+ gint placeholder;
+};
+
+G_DEFINE_DYNAMIC_TYPE (
+ ESettingsMailReader,
+ e_settings_mail_reader,
+ E_TYPE_EXTENSION)
+
+static gboolean
+settings_mail_reader_idle_cb (EExtension *extension)
+{
+ EExtensible *extensible;
+ GtkActionGroup *action_group;
+ EShellSettings *shell_settings;
+ ESourceRegistry *registry;
+ ESource *source;
+ EShell *shell;
+
+ extensible = e_extension_get_extensible (extension);
+
+ shell = e_shell_get_default ();
+ registry = e_shell_get_registry (shell);
+ shell_settings = e_shell_get_shell_settings (shell);
+
+ g_object_bind_property (
+ shell_settings, "mail-forward-style",
+ extensible, "forward-style",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "mail-reply-style",
+ extensible, "reply-style",
+ G_BINDING_SYNC_CREATE);
+
+ action_group = e_mail_reader_get_action_group (
+ E_MAIL_READER (extensible),
+ E_MAIL_READER_ACTION_GROUP_SEARCH_FOLDERS);
+
+ source = e_source_registry_ref_source (registry, "vfolder");
+
+ g_object_bind_property (
+ source, "enabled",
+ action_group, "visible",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_unref (source);
+
+ return FALSE;
+}
+
+static void
+settings_mail_reader_constructed (GObject *object)
+{
+ /* Bind properties to settings from an idle callback so the
+ * EMailReader interface has a chance to be initialized first. */
+ g_idle_add_full (
+ G_PRIORITY_DEFAULT_IDLE,
+ (GSourceFunc) settings_mail_reader_idle_cb,
+ g_object_ref (object),
+ (GDestroyNotify) g_object_unref);
+
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_settings_mail_reader_parent_class)->
+ constructed (object);
+}
+
+static void
+e_settings_mail_reader_class_init (ESettingsMailReaderClass *class)
+{
+ GObjectClass *object_class;
+ EExtensionClass *extension_class;
+
+ g_type_class_add_private (class, sizeof (ESettingsMailReaderPrivate));
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = settings_mail_reader_constructed;
+
+ extension_class = E_EXTENSION_CLASS (class);
+ extension_class->extensible_type = E_TYPE_MAIL_READER;
+}
+
+static void
+e_settings_mail_reader_class_finalize (ESettingsMailReaderClass *class)
+{
+}
+
+static void
+e_settings_mail_reader_init (ESettingsMailReader *extension)
+{
+ extension->priv = E_SETTINGS_MAIL_READER_GET_PRIVATE (extension);
+}
+
+void
+e_settings_mail_reader_type_register (GTypeModule *type_module)
+{
+ /* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration
+ * function, so we have to wrap it with a public function in
+ * order to register types from a separate compilation unit. */
+ e_settings_mail_reader_register_type (type_module);
+}
+
diff --git a/modules/settings/e-settings-mail-reader.h b/modules/settings/e-settings-mail-reader.h
new file mode 100644
index 0000000000..7967923556
--- /dev/null
+++ b/modules/settings/e-settings-mail-reader.h
@@ -0,0 +1,65 @@
+/*
+ * e-settings-mail-reader.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_SETTINGS_MAIL_READER_H
+#define E_SETTINGS_MAIL_READER_H
+
+#include <libebackend/libebackend.h>
+
+/* Standard GObject macros */
+#define E_TYPE_SETTINGS_MAIL_READER \
+ (e_settings_mail_reader_get_type ())
+#define E_SETTINGS_MAIL_READER(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_SETTINGS_MAIL_READER, ESettingsMailReader))
+#define E_SETTINGS_MAIL_READER_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_SETTINGS_MAIL_READER, ESettingsMailReaderClass))
+#define E_IS_SETTINGS_MAIL_READER(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_SETTINGS_MAIL_READER))
+#define E_IS_SETTINGS_MAIL_READER_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_SETTINGS_MAIL_READER))
+#define E_SETTINGS_MAIL_READER_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_SETTINGS_MAIL_READER, ESettingsMailReaderClass))
+
+G_BEGIN_DECLS
+
+typedef struct _ESettingsMailReader ESettingsMailReader;
+typedef struct _ESettingsMailReaderClass ESettingsMailReaderClass;
+typedef struct _ESettingsMailReaderPrivate ESettingsMailReaderPrivate;
+
+struct _ESettingsMailReader {
+ EExtension parent;
+ ESettingsMailReaderPrivate *priv;
+};
+
+struct _ESettingsMailReaderClass {
+ EExtensionClass parent_class;
+};
+
+GType e_settings_mail_reader_get_type (void) G_GNUC_CONST;
+void e_settings_mail_reader_type_register
+ (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_SETTINGS_MAIL_READER_H */
+
diff --git a/modules/settings/e-settings-meeting-store.c b/modules/settings/e-settings-meeting-store.c
new file mode 100644
index 0000000000..433addaf2c
--- /dev/null
+++ b/modules/settings/e-settings-meeting-store.c
@@ -0,0 +1,120 @@
+/*
+ * e-settings-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/>
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "e-settings-meeting-store.h"
+
+#include <shell/e-shell.h>
+#include <calendar/gui/e-meeting-store.h>
+
+#define E_SETTINGS_MEETING_STORE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SETTINGS_MEETING_STORE, ESettingsMeetingStorePrivate))
+
+struct _ESettingsMeetingStorePrivate {
+ gint placeholder;
+};
+
+G_DEFINE_DYNAMIC_TYPE (
+ ESettingsMeetingStore,
+ e_settings_meeting_store,
+ E_TYPE_EXTENSION)
+
+static void
+settings_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);
+
+ g_object_bind_property (
+ shell_settings, "cal-default-reminder-interval",
+ extensible, "default-reminder-interval",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-default-reminder-units",
+ extensible, "default-reminder-units",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-free-busy-template",
+ extensible, "free-busy-template",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-timezone",
+ extensible, "timezone",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-week-start-day",
+ extensible, "week-start-day",
+ G_BINDING_SYNC_CREATE);
+
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_settings_meeting_store_parent_class)->
+ constructed (object);
+}
+
+static void
+e_settings_meeting_store_class_init (ESettingsMeetingStoreClass *class)
+{
+ GObjectClass *object_class;
+ EExtensionClass *extension_class;
+
+ g_type_class_add_private (
+ class, sizeof (ESettingsMeetingStorePrivate));
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = settings_meeting_store_constructed;
+
+ extension_class = E_EXTENSION_CLASS (class);
+ extension_class->extensible_type = E_TYPE_MEETING_STORE;
+}
+
+static void
+e_settings_meeting_store_class_finalize (ESettingsMeetingStoreClass *class)
+{
+}
+
+static void
+e_settings_meeting_store_init (ESettingsMeetingStore *extension)
+{
+ extension->priv = E_SETTINGS_MEETING_STORE_GET_PRIVATE (extension);
+}
+
+void
+e_settings_meeting_store_type_register (GTypeModule *type_module)
+{
+ /* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration
+ * function, so we have to wrap it with a public function in
+ * order to register types from a separate compilation unit. */
+ e_settings_meeting_store_register_type (type_module);
+}
+
diff --git a/modules/settings/e-settings-meeting-store.h b/modules/settings/e-settings-meeting-store.h
new file mode 100644
index 0000000000..f942f5515b
--- /dev/null
+++ b/modules/settings/e-settings-meeting-store.h
@@ -0,0 +1,65 @@
+/*
+ * e-settings-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_SETTINGS_MEETING_STORE_H
+#define E_SETTINGS_MEETING_STORE_H
+
+#include <libebackend/libebackend.h>
+
+/* Standard GObject macros */
+#define E_TYPE_SETTINGS_MEETING_STORE \
+ (e_settings_meeting_store_get_type ())
+#define E_SETTINGS_MEETING_STORE(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_SETTINGS_MEETING_STORE, ESettingsMeetingStore))
+#define E_SETTINGS_MEETING_STORE_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_SETTINGS_MEETING_STORE, ESettingsMeetingStoreClass))
+#define E_IS_SETTINGS_MEETING_STORE(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_SETTINGS_MEETING_STORE))
+#define E_IS_SETTINGS_MEETING_STORE_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_SETTINGS_MEETING_STORE))
+#define E_SETTINGS_MEETING_STORE_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_CaL_CONFIG_MEETING_STORE, ESettingsMeetingStoreClass))
+
+G_BEGIN_DECLS
+
+typedef struct _ESettingsMeetingStore ESettingsMeetingStore;
+typedef struct _ESettingsMeetingStoreClass ESettingsMeetingStoreClass;
+typedef struct _ESettingsMeetingStorePrivate ESettingsMeetingStorePrivate;
+
+struct _ESettingsMeetingStore {
+ EExtension parent;
+ ESettingsMeetingStorePrivate *priv;
+};
+
+struct _ESettingsMeetingStoreClass {
+ EExtensionClass parent_class;
+};
+
+GType e_settings_meeting_store_get_type
+ (void) G_GNUC_CONST;
+void e_settings_meeting_store_type_register
+ (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_SETTINGS_MEETING_STORE_H */
diff --git a/modules/settings/e-settings-meeting-time-selector.c b/modules/settings/e-settings-meeting-time-selector.c
new file mode 100644
index 0000000000..50a56944ab
--- /dev/null
+++ b/modules/settings/e-settings-meeting-time-selector.c
@@ -0,0 +1,111 @@
+/*
+ * e-settings-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/>
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "e-settings-meeting-time-selector.h"
+
+#include <shell/e-shell.h>
+#include <calendar/gui/e-meeting-time-sel.h>
+
+#define E_SETTINGS_MEETING_TIME_SELECTOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SETTINGS_MEETING_TIME_SELECTOR, ESettingsMeetingTimeSelectorPrivate))
+
+struct _ESettingsMeetingTimeSelectorPrivate {
+ gint placeholder;
+};
+
+G_DEFINE_DYNAMIC_TYPE (
+ ESettingsMeetingTimeSelector,
+ e_settings_meeting_time_selector,
+ E_TYPE_EXTENSION)
+
+static void
+settings_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);
+
+ g_object_bind_property (
+ shell_settings, "cal-show-week-numbers",
+ extensible, "show-week-numbers",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-use-24-hour-format",
+ extensible, "use-24-hour-format",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "cal-week-start-day",
+ extensible, "week-start-day",
+ G_BINDING_SYNC_CREATE);
+
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_settings_meeting_time_selector_parent_class)->
+ constructed (object);
+}
+
+static void
+e_settings_meeting_time_selector_class_init (ESettingsMeetingTimeSelectorClass *class)
+{
+ GObjectClass *object_class;
+ EExtensionClass *extension_class;
+
+ g_type_class_add_private (
+ class, sizeof (ESettingsMeetingTimeSelectorPrivate));
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = settings_meeting_time_selector_constructed;
+
+ extension_class = E_EXTENSION_CLASS (class);
+ extension_class->extensible_type = E_TYPE_MEETING_TIME_SELECTOR;
+}
+
+static void
+e_settings_meeting_time_selector_class_finalize (ESettingsMeetingTimeSelectorClass *class)
+{
+}
+
+static void
+e_settings_meeting_time_selector_init (ESettingsMeetingTimeSelector *extension)
+{
+ extension->priv =
+ E_SETTINGS_MEETING_TIME_SELECTOR_GET_PRIVATE (extension);
+}
+
+void
+e_settings_meeting_time_selector_type_register (GTypeModule *type_module)
+{
+ /* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration
+ * function, so we have to wrap it with a public function in
+ * order to register types from a separate compilation unit. */
+ e_settings_meeting_time_selector_register_type (type_module);
+}
+
diff --git a/modules/settings/e-settings-meeting-time-selector.h b/modules/settings/e-settings-meeting-time-selector.h
new file mode 100644
index 0000000000..1317fcf4a7
--- /dev/null
+++ b/modules/settings/e-settings-meeting-time-selector.h
@@ -0,0 +1,66 @@
+/*
+ * e-settings-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_SETTINGS_MEETING_TIME_SELECTOR_H
+#define E_SETTINGS_MEETING_TIME_SELECTOR_H
+
+#include <libebackend/libebackend.h>
+
+/* Standard GObject macros */
+#define E_TYPE_SETTINGS_MEETING_TIME_SELECTOR \
+ (e_settings_meeting_time_selector_get_type ())
+#define E_SETTINGS_MEETING_TIME_SELECTOR(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_SETTINGS_MEETING_TIME_SELECTOR, ESettingsMeetingTimeSelector))
+#define E_SETTINGS_MEETING_TIME_SELECTOR_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_SETTINGS_MEETING_TIME_SELECTOR, ESettingsMeetingTimeSelectorClass))
+#define E_IS_SETTINGS_MEETING_TIME_SELECTOR(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_SETTINGS_MEETING_TIME_SELECTOR))
+#define E_IS_SETTINGS_MEETING_TIME_SELECTOR_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_SETTINGS_MEETING_TIME_SELECTOR))
+#define E_SETTINGS_MEETING_TIME_SELECTOR_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_SETTINGS_MEETING_TIME_SELECTOR, ESettingsMeetingTimeSelectorClass))
+
+G_BEGIN_DECLS
+
+typedef struct _ESettingsMeetingTimeSelector ESettingsMeetingTimeSelector;
+typedef struct _ESettingsMeetingTimeSelectorClass ESettingsMeetingTimeSelectorClass;
+typedef struct _ESettingsMeetingTimeSelectorPrivate ESettingsMeetingTimeSelectorPrivate;
+
+struct _ESettingsMeetingTimeSelector {
+ EExtension parent;
+ ESettingsMeetingTimeSelectorPrivate *priv;
+};
+
+struct _ESettingsMeetingTimeSelectorClass {
+ EExtensionClass parent_class;
+};
+
+GType e_settings_meeting_time_selector_get_type
+ (void) G_GNUC_CONST;
+void e_settings_meeting_time_selector_type_register
+ (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_SETTINGS_MEETING_TIME_SELECTOR_H */
+
diff --git a/modules/settings/e-settings-name-selector-entry.c b/modules/settings/e-settings-name-selector-entry.c
new file mode 100644
index 0000000000..799a796671
--- /dev/null
+++ b/modules/settings/e-settings-name-selector-entry.c
@@ -0,0 +1,122 @@
+/*
+ * e-settings-name-selector-entry.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/>
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "e-settings-name-selector-entry.h"
+
+#include <e-util/e-util.h>
+
+#define E_SETTINGS_NAME_SELECTOR_ENTRY_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SETTINGS_NAME_SELECTOR_ENTRY, ESettingsNameSelectorEntryPrivate))
+
+struct _ESettingsNameSelectorEntryPrivate {
+ GSettings *settings;
+};
+
+G_DEFINE_DYNAMIC_TYPE (
+ ESettingsNameSelectorEntry,
+ e_settings_name_selector_entry,
+ E_TYPE_EXTENSION)
+
+static void
+settings_name_selector_entry_dispose (GObject *object)
+{
+ ESettingsNameSelectorEntryPrivate *priv;
+
+ priv = E_SETTINGS_NAME_SELECTOR_ENTRY_GET_PRIVATE (object);
+
+ if (priv->settings != NULL) {
+ g_object_unref (priv->settings);
+ priv->settings = NULL;
+ }
+
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (e_settings_name_selector_entry_parent_class)->
+ dispose (object);
+}
+
+static void
+settings_name_selector_entry_constructed (GObject *object)
+{
+ ESettingsNameSelectorEntry *extension;
+ EExtensible *extensible;
+
+ extension = E_SETTINGS_NAME_SELECTOR_ENTRY (object);
+ extensible = e_extension_get_extensible (E_EXTENSION (extension));
+
+ /* Chain up to parent's consturcted() method. */
+ G_OBJECT_CLASS (e_settings_name_selector_entry_parent_class)->
+ constructed (object);
+
+ g_settings_bind (
+ extension->priv->settings, "completion-minimum-query-length",
+ extensible, "minimum-query-length",
+ G_SETTINGS_BIND_DEFAULT |
+ G_SETTINGS_BIND_NO_SENSITIVITY);
+
+ g_settings_bind (
+ extension->priv->settings, "completion-show-address",
+ extensible, "show-address",
+ G_SETTINGS_BIND_DEFAULT |
+ G_SETTINGS_BIND_NO_SENSITIVITY);
+}
+
+static void
+e_settings_name_selector_entry_class_init (ESettingsNameSelectorEntryClass *class)
+{
+ GObjectClass *object_class;
+ EExtensionClass *extension_class;
+
+ g_type_class_add_private (
+ class, sizeof (ESettingsNameSelectorEntryPrivate));
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->dispose = settings_name_selector_entry_dispose;
+ object_class->constructed = settings_name_selector_entry_constructed;
+
+ extension_class = E_EXTENSION_CLASS (class);
+ extension_class->extensible_type = E_TYPE_NAME_SELECTOR_ENTRY;
+}
+
+static void
+e_settings_name_selector_entry_class_finalize (ESettingsNameSelectorEntryClass *class)
+{
+}
+
+static void
+e_settings_name_selector_entry_init (ESettingsNameSelectorEntry *extension)
+{
+ extension->priv =
+ E_SETTINGS_NAME_SELECTOR_ENTRY_GET_PRIVATE (extension);
+ extension->priv->settings =
+ g_settings_new ("org.gnome.evolution.addressbook");
+}
+
+void
+e_settings_name_selector_entry_type_register (GTypeModule *type_module)
+{
+ /* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration
+ * function, so we have to wrap it with a public function in
+ * order to register types from a separate compilation unit. */
+ e_settings_name_selector_entry_register_type (type_module);
+}
+
diff --git a/modules/settings/e-settings-name-selector-entry.h b/modules/settings/e-settings-name-selector-entry.h
new file mode 100644
index 0000000000..d1d27bb5c4
--- /dev/null
+++ b/modules/settings/e-settings-name-selector-entry.h
@@ -0,0 +1,66 @@
+/*
+ * e-settings-name-selector-entry.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_SETTINGS_NAME_SELECTOR_ENTRY_H
+#define E_SETTINGS_NAME_SELECTOR_ENTRY_H
+
+#include <libebackend/libebackend.h>
+
+/* Standard GObject macros */
+#define E_TYPE_SETTINGS_NAME_SELECTOR_ENTRY \
+ (e_settings_name_selector_entry_get_type ())
+#define E_SETTINGS_NAME_SELECTOR_ENTRY(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_SETTINGS_NAME_SELECTOR_ENTRY, ESettingsNameSelectorEntry))
+#define E_SETTINGS_NAME_SELECTOR_ENTRY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_SETTINGS_NAME_SELECTOR_ENTRY, ESettingsNameSelectorEntryClass))
+#define E_IS_SETTINGS_NAME_SELECTOR_ENTRY(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_SETTINGS_NAME_SELECTOR_ENTRY))
+#define E_IS_SETTINGS_NAME_SELECTOR_ENTRY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_SETTINGS_NAME_SELECTOR_ENTRY))
+#define E_SETTINGS_NAME_SELECTOR_ENTRY_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_SETTINGS_NAME_SELECTOR_ENTRY, ESettingsNameSelectorEntryClass))
+
+G_BEGIN_DECLS
+
+typedef struct _ESettingsNameSelectorEntry ESettingsNameSelectorEntry;
+typedef struct _ESettingsNameSelectorEntryClass ESettingsNameSelectorEntryClass;
+typedef struct _ESettingsNameSelectorEntryPrivate ESettingsNameSelectorEntryPrivate;
+
+struct _ESettingsNameSelectorEntry {
+ EExtension parent;
+ ESettingsNameSelectorEntryPrivate *priv;
+};
+
+struct _ESettingsNameSelectorEntryClass {
+ EExtensionClass parent_class;
+};
+
+GType e_settings_name_selector_entry_get_type
+ (void) G_GNUC_CONST;
+void e_settings_name_selector_entry_type_register
+ (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_SETTINGS_NAME_SELECTOR_ENTRY_H */
+
diff --git a/modules/settings/e-settings-web-view-gtkhtml.c b/modules/settings/e-settings-web-view-gtkhtml.c
new file mode 100644
index 0000000000..49e8112601
--- /dev/null
+++ b/modules/settings/e-settings-web-view-gtkhtml.c
@@ -0,0 +1,307 @@
+/*
+ * e-settings-web-view-gtkhtml.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/>
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+
+#include "e-settings-web-view-gtkhtml.h"
+
+#include <shell/e-shell.h>
+
+#define E_SETTINGS_WEB_VIEW_GTKHTML_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SETTINGS_WEB_VIEW_GTKHTML, ESettingsWebViewGtkHTMLPrivate))
+
+struct _ESettingsWebViewGtkHTMLPrivate {
+ GtkCssProvider *css_provider;
+ EShellSettings *shell_settings;
+};
+
+G_DEFINE_DYNAMIC_TYPE (
+ ESettingsWebViewGtkHTML,
+ e_settings_web_view_gtkhtml,
+ E_TYPE_EXTENSION)
+
+/* replaces content of color string */
+static void
+settings_web_view_gtkhtml_fix_color_string (gchar *color_string)
+{
+ GdkColor color;
+
+ if (color_string == NULL)
+ return;
+
+ if (strlen (color_string) < 13)
+ return;
+
+ if (!gdk_color_parse (color_string, &color))
+ return;
+
+ sprintf (
+ color_string, "#%02x%02x%02x",
+ (gint) color.red * 256 / 65536,
+ (gint) color.green * 256 / 65536,
+ (gint) color.blue * 256 / 65536);
+}
+
+static void
+settings_web_view_gtkhtml_load_style (ESettingsWebViewGtkHTML *extension)
+{
+ GString *buffer;
+ gchar *citation_color;
+ gchar *monospace_font;
+ gchar *spell_color;
+ gchar *variable_font;
+ gboolean custom_fonts;
+ gboolean mark_citations;
+ EExtensible *extensible;
+ EShellSettings *shell_settings;
+ GtkStyleContext *style_context;
+ GError *error = NULL;
+
+ /* Some of our mail and composer preferences are passed down to
+ * GtkHtml through style properties, unfortunately. This builds
+ * a style sheet for the EWebView using values from GSettings. */
+
+ shell_settings = extension->priv->shell_settings;
+
+ custom_fonts = e_shell_settings_get_boolean (
+ shell_settings, "mail-use-custom-fonts");
+
+ monospace_font = e_shell_settings_get_string (
+ shell_settings, "mail-font-monospace");
+
+ variable_font = e_shell_settings_get_string (
+ shell_settings, "mail-font-variable");
+
+ mark_citations = e_shell_settings_get_boolean (
+ shell_settings, "mail-mark-citations");
+
+ citation_color = e_shell_settings_get_string (
+ shell_settings, "mail-citation-color");
+
+ spell_color = e_shell_settings_get_string (
+ shell_settings, "composer-spell-color");
+
+ buffer = g_string_new ("EWebViewGtkHTML {\n");
+
+ settings_web_view_gtkhtml_fix_color_string (citation_color);
+ settings_web_view_gtkhtml_fix_color_string (spell_color);
+
+ if (custom_fonts && variable_font != NULL)
+ g_string_append_printf (
+ buffer, " font: %s;\n", variable_font);
+
+ if (custom_fonts && monospace_font != NULL)
+ g_string_append_printf (
+ buffer, " -GtkHTML-fixed-font-name: '%s';\n",
+ monospace_font);
+
+ if (mark_citations && citation_color != NULL)
+ g_string_append_printf (
+ buffer, " -GtkHTML-cite-color: %s;\n",
+ citation_color);
+
+ if (spell_color != NULL)
+ g_string_append_printf (
+ buffer, " -GtkHTML-spell-error-color: %s;\n",
+ spell_color);
+
+ g_string_append (buffer, "}\n");
+
+ gtk_css_provider_load_from_data (
+ extension->priv->css_provider,
+ buffer->str, buffer->len, &error);
+
+ if (error != NULL) {
+ g_warning ("%s", error->message);
+ g_error_free (error);
+ }
+
+ g_string_free (buffer, TRUE);
+
+ g_free (monospace_font);
+ g_free (variable_font);
+ g_free (citation_color);
+ g_free (spell_color);
+
+ extensible = e_extension_get_extensible (E_EXTENSION (extension));
+ style_context = gtk_widget_get_style_context (GTK_WIDGET (extensible));
+ gtk_style_context_invalidate (style_context);
+}
+
+static void
+settings_web_view_gtkhtml_realize (GtkWidget *widget,
+ ESettingsWebViewGtkHTML *extension)
+{
+ EShellSettings *shell_settings;
+
+ shell_settings = extension->priv->shell_settings;
+
+ g_object_bind_property (
+ shell_settings, "composer-inline-spelling",
+ widget, "inline-spelling",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "composer-magic-links",
+ widget, "magic-links",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "composer-magic-smileys",
+ widget, "magic-smileys",
+ G_BINDING_SYNC_CREATE);
+
+ gtk_style_context_add_provider (
+ gtk_widget_get_style_context (widget),
+ GTK_STYLE_PROVIDER (extension->priv->css_provider),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+
+ settings_web_view_gtkhtml_load_style (extension);
+
+ /* Reload the style sheet when certain settings change. */
+
+ g_signal_connect_swapped (
+ shell_settings, "notify::mail-use-custom-fonts",
+ G_CALLBACK (settings_web_view_gtkhtml_load_style),
+ extension);
+
+ g_signal_connect_swapped (
+ shell_settings, "notify::mail-font-monospace",
+ G_CALLBACK (settings_web_view_gtkhtml_load_style),
+ extension);
+
+ g_signal_connect_swapped (
+ shell_settings, "notify::mail-font-variable",
+ G_CALLBACK (settings_web_view_gtkhtml_load_style),
+ extension);
+
+ g_signal_connect_swapped (
+ shell_settings, "notify::mail-mark-citations",
+ G_CALLBACK (settings_web_view_gtkhtml_load_style),
+ extension);
+
+ g_signal_connect_swapped (
+ shell_settings, "notify::mail-citation-color",
+ G_CALLBACK (settings_web_view_gtkhtml_load_style),
+ extension);
+
+ g_signal_connect_swapped (
+ shell_settings, "notify::composer-spell-color",
+ G_CALLBACK (settings_web_view_gtkhtml_load_style),
+ extension);
+}
+
+static void
+settings_web_view_gtkhtml_dispose (GObject *object)
+{
+ ESettingsWebViewGtkHTMLPrivate *priv;
+
+ priv = E_SETTINGS_WEB_VIEW_GTKHTML_GET_PRIVATE (object);
+
+ if (priv->css_provider != NULL) {
+ g_object_unref (priv->css_provider);
+ priv->css_provider = NULL;
+ }
+
+ if (priv->shell_settings != NULL) {
+ g_signal_handlers_disconnect_by_func (
+ priv->shell_settings,
+ settings_web_view_gtkhtml_load_style, object);
+ g_object_unref (priv->shell_settings);
+ priv->shell_settings = NULL;
+ }
+
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (e_settings_web_view_gtkhtml_parent_class)->
+ dispose (object);
+}
+
+static void
+settings_web_view_gtkhtml_constructed (GObject *object)
+{
+ EShell *shell;
+ EShellSettings *shell_settings;
+ ESettingsWebViewGtkHTML *extension;
+ EExtensible *extensible;
+
+ shell = e_shell_get_default ();
+ shell_settings = e_shell_get_shell_settings (shell);
+
+ extension = (ESettingsWebViewGtkHTML *) object;
+ extensible = e_extension_get_extensible (E_EXTENSION (extension));
+
+ extension->priv->css_provider = gtk_css_provider_new ();
+ extension->priv->shell_settings = g_object_ref (shell_settings);
+
+ /* Wait to bind shell settings until the EWebView is realized
+ * so GtkhtmlEditor has a chance to install a GtkHTMLEditorAPI.
+ * Otherwise our settings will have no effect. */
+
+ g_signal_connect (
+ extensible, "realize",
+ G_CALLBACK (settings_web_view_gtkhtml_realize), extension);
+
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_settings_web_view_gtkhtml_parent_class)->
+ constructed (object);
+}
+
+static void
+e_settings_web_view_gtkhtml_class_init (ESettingsWebViewGtkHTMLClass *class)
+{
+ GObjectClass *object_class;
+ EExtensionClass *extension_class;
+
+ g_type_class_add_private (
+ class, sizeof (ESettingsWebViewGtkHTMLPrivate));
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->dispose = settings_web_view_gtkhtml_dispose;
+ object_class->constructed = settings_web_view_gtkhtml_constructed;
+
+ extension_class = E_EXTENSION_CLASS (class);
+ extension_class->extensible_type = E_TYPE_WEB_VIEW_GTKHTML;
+}
+
+static void
+e_settings_web_view_gtkhtml_class_finalize (ESettingsWebViewGtkHTMLClass *class)
+{
+}
+
+static void
+e_settings_web_view_gtkhtml_init (ESettingsWebViewGtkHTML *extension)
+{
+ extension->priv =
+ E_SETTINGS_WEB_VIEW_GTKHTML_GET_PRIVATE (extension);
+}
+
+void
+e_settings_web_view_gtkhtml_type_register (GTypeModule *type_module)
+{
+ /* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration
+ * function, so we have to wrap it with a public function in
+ * order to register types from a separate compilation unit. */
+ e_settings_web_view_gtkhtml_register_type (type_module);
+}
+
diff --git a/modules/settings/e-settings-web-view-gtkhtml.h b/modules/settings/e-settings-web-view-gtkhtml.h
new file mode 100644
index 0000000000..d8075f85a5
--- /dev/null
+++ b/modules/settings/e-settings-web-view-gtkhtml.h
@@ -0,0 +1,65 @@
+/*
+ * e-settings-web-view-gtkhtml.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_SETTINGS_WEB_VIEW_GTKHTML_H
+#define E_SETTINGS_WEB_VIEW_GTKHTML_H
+
+#include <libebackend/libebackend.h>
+
+/* Standard GObject macros */
+#define E_TYPE_SETTINGS_WEB_VIEW_GTKHTML \
+ (e_settings_web_view_gtkhtml_get_type ())
+#define E_SETTINGS_WEB_VIEW_GTKHTML(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_SETTINGS_WEB_VIEW_GTKHTML, ESettingsWebViewGtkHTML))
+#define E_SETTINGS_WEB_VIEW_GTKHTML_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_SETTINGS_WEB_VIEW_GTKHTML, ESettingsWebViewGtkHTMLClass))
+#define E_IS_SETTINGS_WEB_VIEW_GTKHTML(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_SETTINGS_WEB_VIEW_GTKHTML))
+#define E_IS_SETTINGS_WEB_VIEW_GTKHTML_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_SETTINGS_WEB_VIEW_GTKHTML))
+#define E_SETTINGS_WEB_VIEW_GTKHTML_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_SETTINGS_WEB_VIEW_GTKHTML, ESettingsWebViewGtkHTMLClass))
+
+G_BEGIN_DECLS
+
+typedef struct _ESettingsWebViewGtkHTML ESettingsWebViewGtkHTML;
+typedef struct _ESettingsWebViewGtkHTMLClass ESettingsWebViewGtkHTMLClass;
+typedef struct _ESettingsWebViewGtkHTMLPrivate ESettingsWebViewGtkHTMLPrivate;
+
+struct _ESettingsWebViewGtkHTML {
+ EExtension parent;
+ ESettingsWebViewGtkHTMLPrivate *priv;
+};
+
+struct _ESettingsWebViewGtkHTMLClass {
+ EExtensionClass parent_class;
+};
+
+GType e_settings_web_view_gtkhtml_get_type
+ (void) G_GNUC_CONST;
+void e_settings_web_view_gtkhtml_type_register
+ (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_SETTINGS_WEB_VIEW_GTKHTML_H */
diff --git a/modules/settings/e-settings-web-view.c b/modules/settings/e-settings-web-view.c
new file mode 100644
index 0000000000..c8da19f377
--- /dev/null
+++ b/modules/settings/e-settings-web-view.c
@@ -0,0 +1,109 @@
+/*
+ * e-settings-web-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/>
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+
+#include "e-settings-web-view.h"
+
+#include <shell/e-shell.h>
+
+#define E_SETTINGS_WEB_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SETTINGS_WEB_VIEW, ESettingsWebViewPrivate))
+
+struct _ESettingsWebViewPrivate {
+ gint placeholder;
+};
+
+G_DEFINE_DYNAMIC_TYPE (
+ ESettingsWebView,
+ e_settings_web_view,
+ E_TYPE_EXTENSION)
+
+static void
+settings_web_view_constructed (GObject *object)
+{
+ EShell *shell;
+ EShellSettings *shell_settings;
+ EExtensible *extensible;
+
+ shell = e_shell_get_default ();
+ shell_settings = e_shell_get_shell_settings (shell);
+
+ extensible = e_extension_get_extensible (E_EXTENSION (object));
+
+ g_object_bind_property (
+ shell_settings, "composer-inline-spelling",
+ extensible, "inline-spelling",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "composer-magic-links",
+ extensible, "magic-links",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ shell_settings, "composer-magic-smileys",
+ extensible, "magic-smileys",
+ G_BINDING_SYNC_CREATE);
+
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_settings_web_view_parent_class)->
+ constructed (object);
+}
+
+static void
+e_settings_web_view_class_init (ESettingsWebViewClass *class)
+{
+ GObjectClass *object_class;
+ EExtensionClass *extension_class;
+
+ g_type_class_add_private (class, sizeof (ESettingsWebViewPrivate));
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = settings_web_view_constructed;
+
+ extension_class = E_EXTENSION_CLASS (class);
+ extension_class->extensible_type = E_TYPE_WEB_VIEW;
+}
+
+static void
+e_settings_web_view_class_finalize (ESettingsWebViewClass *class)
+{
+}
+
+static void
+e_settings_web_view_init (ESettingsWebView *extension)
+{
+ extension->priv = E_SETTINGS_WEB_VIEW_GET_PRIVATE (extension);
+}
+
+void
+e_settings_web_view_type_register (GTypeModule *type_module)
+{
+ /* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration
+ * function, so we have to wrap it with a public function in
+ * order to register types from a separate compilation unit. */
+ e_settings_web_view_register_type (type_module);
+}
+
diff --git a/modules/settings/e-settings-web-view.h b/modules/settings/e-settings-web-view.h
new file mode 100644
index 0000000000..bc56cef9c1
--- /dev/null
+++ b/modules/settings/e-settings-web-view.h
@@ -0,0 +1,64 @@
+/*
+ * e-settings-web-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_SETTINGS_WEB_VIEW_H
+#define E_SETTINGS_WEB_VIEW_H
+
+#include <libebackend/libebackend.h>
+
+/* Standard GObject macros */
+#define E_TYPE_SETTINGS_WEB_VIEW \
+ (e_settings_web_view_get_type ())
+#define E_SETTINGS_WEB_VIEW(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_SETTINGS_WEB_VIEW, ESettingsWebView))
+#define E_SETTINGS_WEB_VIEW_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_SETTINGS_WEB_VIEW, ESettingsWebViewClass))
+#define E_IS_SETTINGS_WEB_VIEW(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_SETTINGS_WEB_VIEW))
+#define E_IS_SETTINGS_WEB_VIEW_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_SETTINGS_WEB_VIEW))
+#define E_SETTINGS_WEB_VIEW_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_SETTINGS_WEB_VIEW, ESettingsWebViewClass))
+
+G_BEGIN_DECLS
+
+typedef struct _ESettingsWebView ESettingsWebView;
+typedef struct _ESettingsWebViewClass ESettingsWebViewClass;
+typedef struct _ESettingsWebViewPrivate ESettingsWebViewPrivate;
+
+struct _ESettingsWebView {
+ EExtension parent;
+ ESettingsWebViewPrivate *priv;
+};
+
+struct _ESettingsWebViewClass {
+ EExtensionClass parent_class;
+};
+
+GType e_settings_web_view_get_type (void) G_GNUC_CONST;
+void e_settings_web_view_type_register
+ (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_SETTINGS_WEB_VIEW_H */
diff --git a/modules/settings/evolution-module-settings.c b/modules/settings/evolution-module-settings.c
new file mode 100644
index 0000000000..f70055540e
--- /dev/null
+++ b/modules/settings/evolution-module-settings.c
@@ -0,0 +1,57 @@
+/*
+ * evolution-module-settings.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-settings-cal-model.h"
+#include "e-settings-calendar-item.h"
+#include "e-settings-calendar-view.h"
+#include "e-settings-comp-editor.h"
+#include "e-settings-date-edit.h"
+#include "e-settings-mail-formatter.h"
+#include "e-settings-mail-reader.h"
+#include "e-settings-meeting-store.h"
+#include "e-settings-meeting-time-selector.h"
+#include "e-settings-name-selector-entry.h"
+#include "e-settings-web-view.h"
+#include "e-settings-web-view-gtkhtml.h"
+
+/* Module Entry Points */
+void e_module_load (GTypeModule *type_module);
+void e_module_unload (GTypeModule *type_module);
+
+G_MODULE_EXPORT void
+e_module_load (GTypeModule *type_module)
+{
+ e_settings_cal_model_type_register (type_module);
+ e_settings_calendar_item_type_register (type_module);
+ e_settings_calendar_view_type_register (type_module);
+ e_settings_comp_editor_type_register (type_module);
+ e_settings_date_edit_type_register (type_module);
+ e_settings_mail_formatter_type_register (type_module);
+ e_settings_mail_reader_type_register (type_module);
+ e_settings_meeting_store_type_register (type_module);
+ e_settings_meeting_time_selector_type_register (type_module);
+ e_settings_name_selector_entry_type_register (type_module);
+ e_settings_web_view_type_register (type_module);
+ e_settings_web_view_gtkhtml_type_register (type_module);
+}
+
+G_MODULE_EXPORT void
+e_module_unload (GTypeModule *type_module)
+{
+}
+