From 1f17dab6b0d9c5413dea38dcc95e7a7bb5b4bd9b Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 2 Nov 2010 11:49:38 -0400 Subject: Move calendar preferences to the calendar module. Continue replacing the use of calendar-config functions with GObject property bindings to EShellSettings properties. --- modules/calendar/e-cal-config-model.c | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'modules/calendar/e-cal-config-model.c') diff --git a/modules/calendar/e-cal-config-model.c b/modules/calendar/e-cal-config-model.c index 62ff9b57b6..9dd5ee9b8d 100644 --- a/modules/calendar/e-cal-config-model.c +++ b/modules/calendar/e-cal-config-model.c @@ -39,6 +39,26 @@ cal_config_model_constructed (GObject *object) /*** 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", @@ -49,11 +69,36 @@ cal_config_model_constructed (GObject *object) 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)) { -- cgit v1.2.3 From 22b2d26d048476d4909bfcf348ce6567e0d006a0 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 6 Dec 2010 14:23:20 +0100 Subject: Free/busy meeting view doesn't work due to non-working extension --- modules/calendar/e-cal-config-model.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules/calendar/e-cal-config-model.c') diff --git a/modules/calendar/e-cal-config-model.c b/modules/calendar/e-cal-config-model.c index 9dd5ee9b8d..5455123c4c 100644 --- a/modules/calendar/e-cal-config-model.c +++ b/modules/calendar/e-cal-config-model.c @@ -23,6 +23,8 @@ #include #include +static gpointer parent_class; + static void cal_config_model_constructed (GObject *object) { @@ -113,6 +115,9 @@ cal_config_model_constructed (GObject *object) extensible, "color-overdue", G_BINDING_SYNC_CREATE); } + + if (G_OBJECT_CLASS (parent_class)->constructed) + G_OBJECT_CLASS (parent_class)->constructed (object); } static void @@ -120,6 +125,8 @@ cal_config_model_class_init (EExtensionClass *class) { GObjectClass *object_class; + parent_class = g_type_class_peek_parent (class); + object_class = G_OBJECT_CLASS (class); object_class->constructed = cal_config_model_constructed; -- cgit v1.2.3 From 7a1677520d439aee68c5ab0268a951d0b411e3a0 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 12 Feb 2011 11:37:05 -0500 Subject: Remove NULL checks for GObject methods. As of GLib 2.28 all GObject virtual methods, including constructed(), are safe to chain up to unconditionally. Remove unnecessary checks. --- modules/calendar/e-cal-config-model.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/calendar/e-cal-config-model.c') diff --git a/modules/calendar/e-cal-config-model.c b/modules/calendar/e-cal-config-model.c index 5455123c4c..47a3ff6463 100644 --- a/modules/calendar/e-cal-config-model.c +++ b/modules/calendar/e-cal-config-model.c @@ -116,8 +116,8 @@ cal_config_model_constructed (GObject *object) G_BINDING_SYNC_CREATE); } - if (G_OBJECT_CLASS (parent_class)->constructed) - G_OBJECT_CLASS (parent_class)->constructed (object); + /* Chain up to parent's constructed() method. */ + G_OBJECT_CLASS (parent_class)->constructed (object); } static void -- cgit v1.2.3 From 756c8abcb840b8da588031f4a0d7e1fc979fab70 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 27 May 2011 15:23:07 +0200 Subject: Bug #646109 - Fix use of include to make sure translations work --- modules/calendar/e-cal-config-model.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/calendar/e-cal-config-model.c') diff --git a/modules/calendar/e-cal-config-model.c b/modules/calendar/e-cal-config-model.c index 47a3ff6463..f42e4a9b66 100644 --- a/modules/calendar/e-cal-config-model.c +++ b/modules/calendar/e-cal-config-model.c @@ -16,6 +16,10 @@ * */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include "e-cal-config-model.h" #include -- cgit v1.2.3 From 53bc6ffc531d7a7188e15be245a31f301090ee15 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 10 Sep 2011 11:47:15 -0400 Subject: The EExtension framework is now in libebackend. The EModule, EExtensible and EExtension classes as well as the e_type_traverse() function have been moved to Evolution-Data-Server's libebackend library to replace e-data-server-module.c. Now Evolution-Data-Server modules use the same framework as Evolution. --- modules/calendar/e-cal-config-model.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/calendar/e-cal-config-model.c') diff --git a/modules/calendar/e-cal-config-model.c b/modules/calendar/e-cal-config-model.c index f42e4a9b66..9898942bf9 100644 --- a/modules/calendar/e-cal-config-model.c +++ b/modules/calendar/e-cal-config-model.c @@ -22,8 +22,9 @@ #include "e-cal-config-model.h" +#include + #include -#include #include #include -- cgit v1.2.3