aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'modules/calendar')
-rw-r--r--modules/calendar/Makefile.am12
-rw-r--r--modules/calendar/e-cal-config-calendar-item.c79
-rw-r--r--modules/calendar/e-cal-config-calendar-item.h30
-rw-r--r--modules/calendar/e-cal-config-date-edit.c79
-rw-r--r--modules/calendar/e-cal-config-date-edit.h30
-rw-r--r--modules/calendar/e-cal-config-meeting-store.c79
-rw-r--r--modules/calendar/e-cal-config-meeting-store.h30
-rw-r--r--modules/calendar/e-cal-config-meeting-time-selector.c83
-rw-r--r--modules/calendar/e-cal-config-meeting-time-selector.h30
-rw-r--r--modules/calendar/e-cal-config-model.c99
-rw-r--r--modules/calendar/e-cal-config-model.h30
-rw-r--r--modules/calendar/e-cal-config-view.c130
-rw-r--r--modules/calendar/e-cal-config-view.h31
-rw-r--r--modules/calendar/e-cal-shell-backend.c2
-rw-r--r--modules/calendar/e-cal-shell-content.c98
-rw-r--r--modules/calendar/e-cal-shell-migrate.c4
-rw-r--r--modules/calendar/e-cal-shell-settings.c8
-rw-r--r--modules/calendar/e-cal-shell-sidebar.c37
-rw-r--r--modules/calendar/e-cal-shell-view-actions.c53
-rw-r--r--modules/calendar/e-cal-shell-view-private.c66
-rw-r--r--modules/calendar/e-cal-shell-view.c22
-rw-r--r--modules/calendar/e-memo-shell-backend.c2
-rw-r--r--modules/calendar/e-memo-shell-content.c6
-rw-r--r--modules/calendar/e-task-shell-backend.c2
-rw-r--r--modules/calendar/e-task-shell-content.c6
-rw-r--r--modules/calendar/e-task-shell-migrate.c2
-rw-r--r--modules/calendar/evolution-module-calendar.c14
27 files changed, 963 insertions, 101 deletions
diff --git a/modules/calendar/Makefile.am b/modules/calendar/Makefile.am
index 0a22b2f568..bbabb6cfb2 100644
--- a/modules/calendar/Makefile.am
+++ b/modules/calendar/Makefile.am
@@ -14,8 +14,20 @@ libevolution_module_calendar_la_SOURCES = \
evolution-module-calendar.c \
e-cal-attachment-handler.c \
e-cal-attachment-handler.h \
+ e-cal-config-calendar-item.c \
+ e-cal-config-calendar-item.h \
+ e-cal-config-date-edit.c \
+ e-cal-config-date-edit.h \
e-cal-config-hook.c \
e-cal-config-hook.h \
+ e-cal-config-meeting-store.c \
+ e-cal-config-meeting-store.h \
+ e-cal-config-meeting-time-selector.c \
+ e-cal-config-meeting-time-selector.h \
+ e-cal-config-model.c \
+ e-cal-config-model.h \
+ e-cal-config-view.c \
+ e-cal-config-view.h \
e-cal-event-hook.c \
e-cal-event-hook.h \
e-cal-shell-backend.c \
diff --git a/modules/calendar/e-cal-config-calendar-item.c b/modules/calendar/e-cal-config-calendar-item.c
new file mode 100644
index 0000000000..5c585f94ca
--- /dev/null
+++ b/modules/calendar/e-cal-config-calendar-item.c
@@ -0,0 +1,79 @@
+/*
+ * e-cal-config-calendar-item.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#include "e-cal-config-calendar-item.h"
+
+#include <shell/e-shell.h>
+#include <e-util/e-binding.h>
+#include <e-util/e-extension.h>
+#include <misc/e-calendar-item.h>
+
+static void
+cal_config_calendar_item_constructed (GObject *object)
+{
+ EExtension *extension;
+ EExtensible *extensible;
+ EShellSettings *shell_settings;
+ EShell *shell;
+
+ extension = E_EXTENSION (object);
+ extensible = e_extension_get_extensible (extension);
+
+ shell = e_shell_get_default ();
+ shell_settings = e_shell_get_shell_settings (shell);
+
+ e_binding_new (
+ shell_settings, "cal-show-week-numbers",
+ extensible, "show-week-numbers");
+
+ e_binding_new (
+ shell_settings, "cal-week-start-day",
+ extensible, "week-start-day");
+}
+
+static void
+cal_config_calendar_item_class_init (EExtensionClass *class)
+{
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = cal_config_calendar_item_constructed;
+
+ class->extensible_type = E_TYPE_CALENDAR_ITEM;
+}
+
+void
+e_cal_config_calendar_item_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (EExtensionClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) cal_config_calendar_item_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EExtension),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) NULL,
+ NULL /* value_table */
+ };
+
+ g_type_module_register_type (
+ type_module, E_TYPE_EXTENSION,
+ "ECalConfigCalendarItem", &type_info, 0);
+}
diff --git a/modules/calendar/e-cal-config-calendar-item.h b/modules/calendar/e-cal-config-calendar-item.h
new file mode 100644
index 0000000000..af12eb244a
--- /dev/null
+++ b/modules/calendar/e-cal-config-calendar-item.h
@@ -0,0 +1,30 @@
+/*
+ * e-cal-config-calendar-item.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#ifndef E_CAL_CONFIG_CALENDAR_ITEM_H
+#define E_CAL_CONFIG_CALENDAR_ITEM_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+void e_cal_config_calendar_item_register_type (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_CAL_CONFIG_CALENDAR_ITEM_H */
diff --git a/modules/calendar/e-cal-config-date-edit.c b/modules/calendar/e-cal-config-date-edit.c
new file mode 100644
index 0000000000..667e749dff
--- /dev/null
+++ b/modules/calendar/e-cal-config-date-edit.c
@@ -0,0 +1,79 @@
+/*
+ * e-cal-config-date-edit.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#include "e-cal-config-date-edit.h"
+
+#include <shell/e-shell.h>
+#include <e-util/e-binding.h>
+#include <e-util/e-extension.h>
+#include <misc/e-dateedit.h>
+
+static void
+cal_config_date_edit_constructed (GObject *object)
+{
+ EExtension *extension;
+ EExtensible *extensible;
+ EShellSettings *shell_settings;
+ EShell *shell;
+
+ extension = E_EXTENSION (object);
+ extensible = e_extension_get_extensible (extension);
+
+ shell = e_shell_get_default ();
+ shell_settings = e_shell_get_shell_settings (shell);
+
+ e_binding_new (
+ shell_settings, "cal-show-week-numbers",
+ extensible, "show-week-numbers");
+
+ e_binding_new (
+ shell_settings, "cal-week-start-day",
+ extensible, "week-start-day");
+}
+
+static void
+cal_config_date_edit_class_init (EExtensionClass *class)
+{
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = cal_config_date_edit_constructed;
+
+ class->extensible_type = E_TYPE_DATE_EDIT;
+}
+
+void
+e_cal_config_date_edit_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (EExtensionClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) cal_config_date_edit_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EExtension),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) NULL,
+ NULL /* value_table */
+ };
+
+ g_type_module_register_type (
+ type_module, E_TYPE_EXTENSION,
+ "ECalConfigDateEdit", &type_info, 0);
+}
diff --git a/modules/calendar/e-cal-config-date-edit.h b/modules/calendar/e-cal-config-date-edit.h
new file mode 100644
index 0000000000..33291201dc
--- /dev/null
+++ b/modules/calendar/e-cal-config-date-edit.h
@@ -0,0 +1,30 @@
+/*
+ * e-cal-config-date-edit.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#ifndef E_CAL_CONFIG_DATE_EDIT_H
+#define E_CAL_CONFIG_DATE_EDIT_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+void e_cal_config_date_edit_register_type (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_CAL_CONFIG_DATE_EDIT_H */
diff --git a/modules/calendar/e-cal-config-meeting-store.c b/modules/calendar/e-cal-config-meeting-store.c
new file mode 100644
index 0000000000..7169ac4029
--- /dev/null
+++ b/modules/calendar/e-cal-config-meeting-store.c
@@ -0,0 +1,79 @@
+/*
+ * e-cal-config-meeting-store.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#include "e-cal-config-meeting-store.h"
+
+#include <shell/e-shell.h>
+#include <e-util/e-binding.h>
+#include <e-util/e-extension.h>
+#include <calendar/gui/e-meeting-store.h>
+
+static void
+cal_config_meeting_store_constructed (GObject *object)
+{
+ EExtension *extension;
+ EExtensible *extensible;
+ EShellSettings *shell_settings;
+ EShell *shell;
+
+ extension = E_EXTENSION (object);
+ extensible = e_extension_get_extensible (extension);
+
+ shell = e_shell_get_default ();
+ shell_settings = e_shell_get_shell_settings (shell);
+
+ e_binding_new (
+ shell_settings, "cal-free-busy-template",
+ extensible, "free-busy-template");
+
+ e_binding_new (
+ shell_settings, "cal-timezone",
+ extensible, "timezone");
+}
+
+static void
+cal_config_meeting_store_class_init (EExtensionClass *class)
+{
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = cal_config_meeting_store_constructed;
+
+ class->extensible_type = E_TYPE_MEETING_STORE;
+}
+
+void
+e_cal_config_meeting_store_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (EExtensionClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) cal_config_meeting_store_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EExtension),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) NULL,
+ NULL /* value_table */
+ };
+
+ g_type_module_register_type (
+ type_module, E_TYPE_EXTENSION,
+ "ECalConfigMeetingStore", &type_info, 0);
+}
diff --git a/modules/calendar/e-cal-config-meeting-store.h b/modules/calendar/e-cal-config-meeting-store.h
new file mode 100644
index 0000000000..9ad2835da8
--- /dev/null
+++ b/modules/calendar/e-cal-config-meeting-store.h
@@ -0,0 +1,30 @@
+/*
+ * e-cal-config-meeting-store.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#ifndef E_CAL_CONFIG_MEETING_STORE_H
+#define E_CAL_CONFIG_MEETING_STORE_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+void e_cal_config_meeting_store_register_type (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_CAL_CONFIG_MEETING_STORE_H */
diff --git a/modules/calendar/e-cal-config-meeting-time-selector.c b/modules/calendar/e-cal-config-meeting-time-selector.c
new file mode 100644
index 0000000000..1c45d3b9ef
--- /dev/null
+++ b/modules/calendar/e-cal-config-meeting-time-selector.c
@@ -0,0 +1,83 @@
+/*
+ * e-cal-config-meeting-time-selector.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#include "e-cal-config-meeting-time-selector.h"
+
+#include <shell/e-shell.h>
+#include <e-util/e-binding.h>
+#include <e-util/e-extension.h>
+#include <calendar/gui/e-meeting-time-sel.h>
+
+static void
+cal_config_meeting_time_selector_constructed (GObject *object)
+{
+ EExtension *extension;
+ EExtensible *extensible;
+ EShellSettings *shell_settings;
+ EShell *shell;
+
+ extension = E_EXTENSION (object);
+ extensible = e_extension_get_extensible (extension);
+
+ shell = e_shell_get_default ();
+ shell_settings = e_shell_get_shell_settings (shell);
+
+ e_binding_new (
+ shell_settings, "cal-show-week-numbers",
+ extensible, "show-week-numbers");
+
+ e_binding_new (
+ shell_settings, "cal-use-24-hour-format",
+ extensible, "use-24-hour-format");
+
+ e_binding_new (
+ shell_settings, "cal-week-start-day",
+ extensible, "week-start-day");
+}
+
+static void
+cal_config_meeting_time_selector_class_init (EExtensionClass *class)
+{
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = cal_config_meeting_time_selector_constructed;
+
+ class->extensible_type = E_TYPE_MEETING_TIME_SELECTOR;
+}
+
+void
+e_cal_config_meeting_time_selector_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (EExtensionClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) cal_config_meeting_time_selector_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EExtension),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) NULL,
+ NULL /* value_table */
+ };
+
+ g_type_module_register_type (
+ type_module, E_TYPE_EXTENSION,
+ "ECalConfigMeetingTimeSelector", &type_info, 0);
+}
diff --git a/modules/calendar/e-cal-config-meeting-time-selector.h b/modules/calendar/e-cal-config-meeting-time-selector.h
new file mode 100644
index 0000000000..b244263605
--- /dev/null
+++ b/modules/calendar/e-cal-config-meeting-time-selector.h
@@ -0,0 +1,30 @@
+/*
+ * e-cal-config-meeting-time-selector.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#ifndef E_CAL_CONFIG_MEETING_TIME_SELECTOR_H
+#define E_CAL_CONFIG_MEETING_TIME_SELECTOR_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+void e_cal_config_meeting_time_selector_register_type (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_CAL_CONFIG_MEETING_TIME_SELECTOR_H */
diff --git a/modules/calendar/e-cal-config-model.c b/modules/calendar/e-cal-config-model.c
new file mode 100644
index 0000000000..d176d509e9
--- /dev/null
+++ b/modules/calendar/e-cal-config-model.c
@@ -0,0 +1,99 @@
+/*
+ * e-cal-config-model.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#include "e-cal-config-model.h"
+
+#include <shell/e-shell.h>
+#include <e-util/e-binding.h>
+#include <e-util/e-extension.h>
+#include <calendar/gui/e-cal-model.h>
+#include <calendar/gui/e-cal-model-tasks.h>
+
+static void
+cal_config_model_constructed (GObject *object)
+{
+ EExtension *extension;
+ EExtensible *extensible;
+ EShellSettings *shell_settings;
+ EShell *shell;
+
+ extension = E_EXTENSION (object);
+ extensible = e_extension_get_extensible (extension);
+
+ shell = e_shell_get_default ();
+ shell_settings = e_shell_get_shell_settings (shell);
+
+ /*** ECalModel ***/
+
+ e_binding_new (
+ shell_settings, "cal-timezone",
+ extensible, "timezone");
+
+ e_binding_new (
+ shell_settings, "cal-use-24-hour-format",
+ extensible, "use-24-hour-format");
+
+ e_binding_new (
+ shell_settings, "cal-week-start-day",
+ extensible, "week-start-day");
+
+ /*** ECalModelTasks ***/
+
+ if (E_IS_CAL_MODEL_TASKS (extensible)) {
+
+ e_binding_new (
+ shell_settings, "cal-tasks-color-due-today",
+ extensible, "color-due-today");
+
+ e_binding_new (
+ shell_settings, "cal-tasks-color-overdue",
+ extensible, "color-overdue");
+ }
+}
+
+static void
+cal_config_model_class_init (EExtensionClass *class)
+{
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = cal_config_model_constructed;
+
+ class->extensible_type = E_TYPE_CAL_MODEL;
+}
+
+void
+e_cal_config_model_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (EExtensionClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) cal_config_model_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EExtension),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) NULL,
+ NULL /* value_table */
+ };
+
+ g_type_module_register_type (
+ type_module, E_TYPE_EXTENSION,
+ "ECalConfigModel", &type_info, 0);
+}
diff --git a/modules/calendar/e-cal-config-model.h b/modules/calendar/e-cal-config-model.h
new file mode 100644
index 0000000000..1c1045a906
--- /dev/null
+++ b/modules/calendar/e-cal-config-model.h
@@ -0,0 +1,30 @@
+/*
+ * e-cal-config-model.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#ifndef E_CAL_CONFIG_MODEL_H
+#define E_CAL_CONFIG_MODEL_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+void e_cal_config_model_register_type (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_CAL_CONFIG_MODEL_H */
diff --git a/modules/calendar/e-cal-config-view.c b/modules/calendar/e-cal-config-view.c
new file mode 100644
index 0000000000..e543bf6c56
--- /dev/null
+++ b/modules/calendar/e-cal-config-view.c
@@ -0,0 +1,130 @@
+/*
+ * e-cal-config-view.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#include "e-cal-config-view.h"
+
+#include <shell/e-shell.h>
+#include <e-util/e-binding.h>
+#include <e-util/e-extension.h>
+#include <calendar/gui/e-day-view.h>
+#include <calendar/gui/e-week-view.h>
+
+static void
+cal_config_view_constructed (GObject *object)
+{
+ EExtension *extension;
+ EExtensible *extensible;
+ EShellSettings *shell_settings;
+ EShell *shell;
+
+ extension = E_EXTENSION (object);
+ extensible = e_extension_get_extensible (extension);
+
+ shell = e_shell_get_default ();
+ shell_settings = e_shell_get_shell_settings (shell);
+
+ /*** EDayView ***/
+
+ if (E_IS_DAY_VIEW (extensible)) {
+
+ e_binding_new (
+ shell_settings, "cal-show-week-numbers",
+ E_DAY_VIEW (extensible)->week_number_label, "visible");
+
+ e_binding_new (
+ shell_settings, "cal-marcus-bains-show-line",
+ extensible, "marcus-bains-show-line");
+
+ e_binding_new (
+ shell_settings, "cal-marcus-bains-day-view-color",
+ extensible, "marcus-bains-day-view-color");
+
+ e_binding_new (
+ shell_settings, "cal-marcus-bains-time-bar-color",
+ extensible, "marcus-bains-time-bar-color");
+
+ e_binding_new (
+ shell_settings, "cal-time-divisions",
+ extensible, "mins-per-row");
+
+ e_binding_new (
+ shell_settings, "cal-work-day-end-hour",
+ extensible, "work-day-end-hour");
+
+ e_binding_new (
+ shell_settings, "cal-work-day-end-minute",
+ extensible, "work-day-end-minute");
+
+ e_binding_new (
+ shell_settings, "cal-work-day-start-hour",
+ extensible, "work-day-start-hour");
+
+ e_binding_new (
+ shell_settings, "cal-work-day-start-minute",
+ extensible, "work-day-start-minute");
+
+ e_binding_new (
+ shell_settings, "cal-working-days-bitset",
+ extensible, "working-days");
+ }
+
+ /*** EWeekView ***/
+
+ if (E_IS_WEEK_VIEW (extensible)) {
+
+ e_binding_new (
+ shell_settings, "cal-compress-weekend",
+ extensible, "compress-weekend");
+
+ e_binding_new (
+ shell_settings, "cal-show-event-end-times",
+ extensible, "show-event-end-times");
+ }
+}
+
+static void
+cal_config_view_class_init (EExtensionClass *class)
+{
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = cal_config_view_constructed;
+
+ class->extensible_type = E_TYPE_CALENDAR_VIEW;
+}
+
+void
+e_cal_config_view_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (EExtensionClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) cal_config_view_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EExtension),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) NULL,
+ NULL /* value_table */
+ };
+
+ g_type_module_register_type (
+ type_module, E_TYPE_EXTENSION,
+ "ECalConfigView", &type_info, 0);
+}
diff --git a/modules/calendar/e-cal-config-view.h b/modules/calendar/e-cal-config-view.h
new file mode 100644
index 0000000000..e36acddf0c
--- /dev/null
+++ b/modules/calendar/e-cal-config-view.h
@@ -0,0 +1,31 @@
+/*
+ * e-cal-config-view.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#ifndef E_CAL_CONFIG_VIEW_H
+#define E_CAL_CONFIG_VIEW_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+void e_cal_config_view_register_type (GTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* E_CAL_CONFIG_VIEW_H */
+
diff --git a/modules/calendar/e-cal-shell-backend.c b/modules/calendar/e-cal-shell-backend.c
index 30bad0a4bf..5560d018cc 100644
--- a/modules/calendar/e-cal-shell-backend.c
+++ b/modules/calendar/e-cal-shell-backend.c
@@ -593,7 +593,7 @@ cal_shell_backend_handle_uri_cb (EShellBackend *shell_backend,
source = e_source_list_peek_source_by_uid (source_list, source_uid);
if (source == NULL) {
- g_printerr ("No source for UID `%s'\n", source_uid);
+ g_printerr ("No source for UID '%s'\n", source_uid);
g_object_unref (source_list);
goto exit;
}
diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c
index f5cc0162c0..e35b935f05 100644
--- a/modules/calendar/e-cal-shell-content.c
+++ b/modules/calendar/e-cal-shell-content.c
@@ -314,11 +314,11 @@ cal_shell_content_constructed (GObject *object)
{
ECalShellContentPrivate *priv;
ECalendarView *calendar_view;
- ECalModel *memo_model;
- ECalModel *task_model;
+ ECalModel *memo_model=NULL;
+ ECalModel *task_model=NULL;
EShell *shell;
EShellContent *shell_content;
- EShellSettings *shell_settings;
+ EShellBackend *shell_backend;
EShellView *shell_view;
EShellWindow *shell_window;
EShellContent *foreign_content;
@@ -342,51 +342,57 @@ cal_shell_content_constructed (GObject *object)
shell_window = e_shell_view_get_shell_window (shell_view);
shell = e_shell_window_get_shell (shell_window);
- shell_settings = e_shell_get_shell_settings (shell);
/* We borrow the memopad and taskpad models from the memo
* and task views, loading the views if necessary. */
-
- foreign_view = e_shell_window_get_shell_view (shell_window, "memos");
- foreign_content = e_shell_view_get_shell_content (foreign_view);
- g_object_get (foreign_content, "model", &memo_model, NULL);
-
- foreign_view = e_shell_window_get_shell_view (shell_window, "tasks");
- foreign_content = e_shell_view_get_shell_content (foreign_view);
- g_object_get (foreign_content, "model", &task_model, NULL);
-
+ if(!e_shell_get_express_mode(e_shell_get_default())) {
+ foreign_view = e_shell_window_get_shell_view (shell_window, "memos");
+ foreign_content = e_shell_view_get_shell_content (foreign_view);
+ g_object_get (foreign_content, "model", &memo_model, NULL);
+
+ foreign_view = e_shell_window_get_shell_view (shell_window, "tasks");
+ foreign_content = e_shell_view_get_shell_content (foreign_view);
+ g_object_get (foreign_content, "model", &task_model, NULL);
+ }
/* Build content widgets. */
container = GTK_WIDGET (object);
+
+ if (!e_shell_get_express_mode(e_shell_get_default())) {
+ widget = e_paned_new (GTK_ORIENTATION_HORIZONTAL);
+ gtk_container_add (GTK_CONTAINER (container), widget);
+ priv->hpaned = g_object_ref (widget);
+ gtk_widget_show (widget);
- widget = e_paned_new (GTK_ORIENTATION_HORIZONTAL);
- gtk_container_add (GTK_CONTAINER (container), widget);
- priv->hpaned = g_object_ref (widget);
- gtk_widget_show (widget);
-
- container = priv->hpaned;
+ container = priv->hpaned;
+ }
widget = gtk_notebook_new ();
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (widget), FALSE);
gtk_notebook_set_show_border (GTK_NOTEBOOK (widget), FALSE);
- gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, FALSE);
+ if (!e_shell_get_express_mode(e_shell_get_default()))
+ gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, FALSE);
+ else
+ gtk_container_add (GTK_CONTAINER (container), widget);
priv->notebook = g_object_ref (widget);
gtk_widget_show (widget);
- /* FIXME Need to deal with saving and restoring the position.
- * Month view has its own position. */
- widget = e_paned_new (GTK_ORIENTATION_VERTICAL);
- e_paned_set_fixed_resize (E_PANED (widget), FALSE);
- gtk_paned_pack2 (GTK_PANED (container), widget, FALSE, TRUE);
- priv->vpaned = g_object_ref (widget);
- gtk_widget_show (widget);
+ if (!e_shell_get_express_mode(e_shell_get_default())) {
+ /* FIXME Need to deal with saving and restoring the position.
+ * Month view has its own position. */
+ widget = e_paned_new (GTK_ORIENTATION_VERTICAL);
+ e_paned_set_fixed_resize (E_PANED (widget), FALSE);
+ gtk_paned_pack2 (GTK_PANED (container), widget, FALSE, TRUE);
+ priv->vpaned = g_object_ref (widget);
+ gtk_widget_show (widget);
+ }
container = priv->notebook;
/* Add views in the order defined by GnomeCalendarViewType, such
* that the notebook page number corresponds to the view type. */
- priv->calendar = gnome_calendar_new (shell_settings);
+ priv->calendar = gnome_calendar_new ();
calendar = GNOME_CALENDAR (priv->calendar);
for (ii = 0; ii < GNOME_CAL_LAST_VIEW; ii++) {
@@ -403,7 +409,7 @@ cal_shell_content_constructed (GObject *object)
priv->notebook, "page");
container = priv->vpaned;
-
+if(!e_shell_get_express_mode(e_shell_get_default())) {
widget = gtk_vbox_new (FALSE, 0);
gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, TRUE);
gtk_widget_show (widget);
@@ -484,7 +490,7 @@ cal_shell_content_constructed (GObject *object)
widget, "open-component",
G_CALLBACK (e_cal_shell_view_memopad_open_memo),
shell_view);
-
+}
/* Load the view instance. */
view_instance = e_shell_view_new_view_instance (shell_view, NULL);
@@ -496,21 +502,23 @@ cal_shell_content_constructed (GObject *object)
* The GtkWidget::map() callback below explains why. */
priv->view_instance = view_instance;
- g_signal_connect_swapped (
- shell_view, "notify::view-id",
- G_CALLBACK (cal_shell_content_notify_view_id_cb),
- object);
+ if (!e_shell_get_express_mode(e_shell_get_default())) {
+ g_signal_connect_swapped (
+ shell_view, "notify::view-id",
+ G_CALLBACK (cal_shell_content_notify_view_id_cb),
+ object);
- /* Bind GObject properties to GConf keys. */
+ bridge = gconf_bridge_get ();
- bridge = gconf_bridge_get ();
-
- object = G_OBJECT (priv->vpaned);
- key = "/apps/evolution/calendar/display/tag_vpane_position";
- gconf_bridge_bind_property_delayed (bridge, key, object, "proportion");
+ object = G_OBJECT (priv->vpaned);
+ key = "/apps/evolution/calendar/display/tag_vpane_position";
+ gconf_bridge_bind_property_delayed (bridge, key, object, "proportion");
+ }
- g_object_unref (memo_model);
- g_object_unref (task_model);
+ if (memo_model)
+ g_object_unref (memo_model);
+ if (task_model)
+ g_object_unref (task_model);
}
static void
@@ -545,7 +553,7 @@ cal_shell_content_class_init (ECalShellContentClass *class)
object_class->get_property = cal_shell_content_get_property;
object_class->dispose = cal_shell_content_dispose;
object_class->constructed = cal_shell_content_constructed;
-
+
widget_class = GTK_WIDGET_CLASS (class);
widget_class->map = cal_shell_content_map;
@@ -669,6 +677,7 @@ e_cal_shell_content_get_task_table (ECalShellContent *cal_shell_content)
EShellSearchbar *
e_cal_shell_content_get_searchbar (ECalShellContent *cal_shell_content)
{
+ EShellView *shell_view;
EShellContent *shell_content;
GtkWidget *widget;
@@ -676,7 +685,8 @@ e_cal_shell_content_get_searchbar (ECalShellContent *cal_shell_content)
E_IS_CAL_SHELL_CONTENT (cal_shell_content), NULL);
shell_content = E_SHELL_CONTENT (cal_shell_content);
- widget = e_shell_content_get_searchbar (shell_content);
+ shell_view = e_shell_content_get_shell_view (shell_content);
+ widget = e_shell_view_get_searchbar (shell_view);
return E_SHELL_SEARCHBAR (widget);
}
diff --git a/modules/calendar/e-cal-shell-migrate.c b/modules/calendar/e-cal-shell-migrate.c
index ea0e6aa751..f307522a9b 100644
--- a/modules/calendar/e-cal-shell-migrate.c
+++ b/modules/calendar/e-cal-shell-migrate.c
@@ -82,7 +82,7 @@ static e_gconf_map_t calendar_other_map[] = {
static e_gconf_map_t calendar_datenavigator_map[] = {
/* /Calendar/DateNavigator */
- { "ShowWeekNumbers", "calendar/date_navigator/show_week_numbers", E_GCONF_MAP_BOOL },
+ { "ShowWeekNumbers", "calendar/display/show_week_numbers", E_GCONF_MAP_BOOL },
{ NULL },
};
@@ -690,7 +690,7 @@ e_cal_shell_backend_migrate (EShellBackend *shell_backend,
if (!migrate_ical_folder (l->data, on_this_computer, source_name, E_CAL_SOURCE_TYPE_EVENT)) {
/* FIXME: domain/code */
- g_set_error(error, 0, 0, _("Unable to migrate calendar `%s'"), source_name);
+ g_set_error(error, 0, 0, _("Unable to migrate calendar '%s'"), source_name);
g_free(source_name);
goto fail;
}
diff --git a/modules/calendar/e-cal-shell-settings.c b/modules/calendar/e-cal-shell-settings.c
index 3852de0a52..4613f280bb 100644
--- a/modules/calendar/e-cal-shell-settings.c
+++ b/modules/calendar/e-cal-shell-settings.c
@@ -491,8 +491,8 @@ e_cal_shell_backend_init_settings (EShell *shell)
"/apps/evolution/calendar/prompts/confirm_purge");
e_shell_settings_install_property_for_key (
- "cal-day-view-show-week-numbers",
- "/apps/evolution/calendar/display/day_view_show_week_number");
+ "cal-show-week-numbers",
+ "/apps/evolution/calendar/display/show_week_numbers");
e_shell_settings_install_property_for_key (
"cal-free-busy-template",
@@ -539,10 +539,6 @@ e_cal_shell_backend_init_settings (EShell *shell)
"/apps/evolution/calendar/display/show_event_end");
e_shell_settings_install_property_for_key (
- "cal-show-week-numbers",
- "/apps/evolution/calendar/date_navigator/show_week_numbers");
-
- e_shell_settings_install_property_for_key (
"cal-tasks-color-due-today",
"/apps/evolution/calendar/tasks/colors/due_today");
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index eb28868ce6..546d21b3c3 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -33,6 +33,7 @@
#include "calendar/gui/calendar-config.h"
#include "calendar/gui/e-calendar-selector.h"
#include "calendar/gui/misc.h"
+#include "calendar/gui/dialogs/calendar-setup.h"
#include "e-cal-shell-view.h"
#include "e-cal-shell-backend.h"
@@ -476,7 +477,7 @@ cal_shell_sidebar_restore_state_cb (EShellWindow *shell_window,
bridge = gconf_bridge_get ();
object = G_OBJECT (priv->paned);
- key = "/apps/evolution/calendar/display/date_navigator_vpane_position";
+ key = "/apps/evolution/calendar/display/date_navigator_pane_position";
gconf_bridge_bind_property_delayed (bridge, key, object, "vposition");
}
@@ -559,6 +560,21 @@ cal_shell_sidebar_finalize (GObject *object)
}
static void
+new_calendar_clicked (GtkButton *button,
+ EShellSidebar *shell_sidebar)
+{
+ EShellView *shell_view;
+ EShellWindow *shell_window;
+ EShellBackend *shell_backend;
+
+ shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
+ shell_backend = e_shell_view_get_shell_backend (shell_view);
+ shell_window = e_shell_view_get_shell_window (shell_view);
+
+ calendar_setup_new_calendar (GTK_WINDOW (shell_window));
+}
+
+static void
cal_shell_sidebar_constructed (GObject *object)
{
ECalShellSidebarPrivate *priv;
@@ -605,7 +621,21 @@ cal_shell_sidebar_constructed (GObject *object)
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (
GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN);
- gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, TRUE);
+ if(!e_shell_get_express_mode(e_shell_get_default())) {
+ gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, TRUE);
+ } else {
+ GtkWidget *button;
+
+ container = gtk_vbox_new (FALSE, 6);
+ gtk_box_pack_start (GTK_BOX(container), widget, TRUE, TRUE, 0);
+
+ button = gtk_button_new_with_label (_("New Calendar..."));
+ gtk_box_pack_start (GTK_BOX(container), button, FALSE, FALSE, 0);
+ g_signal_connect (button, "clicked", G_CALLBACK(new_calendar_clicked), shell_sidebar);
+
+ gtk_paned_pack1 (GTK_PANED (priv->paned), container, TRUE, TRUE);
+ gtk_widget_show_all (container);
+ }
gtk_widget_show (widget);
container = widget;
@@ -624,7 +654,8 @@ cal_shell_sidebar_constructed (GObject *object)
calitem = E_CALENDAR (widget)->calitem;
e_calendar_item_set_days_start_week_sel (calitem, 9);
e_calendar_item_set_max_days_sel (calitem, 42);
- gtk_paned_pack2 (GTK_PANED (container), widget, FALSE, TRUE);
+ gtk_paned_pack2 (GTK_PANED (container), widget, FALSE, FALSE);
+ gtk_widget_set_size_request (widget, -1, 200);
priv->date_navigator = g_object_ref (widget);
gtk_widget_show (widget);
diff --git a/modules/calendar/e-cal-shell-view-actions.c b/modules/calendar/e-cal-shell-view-actions.c
index 5eaa9a4eb0..83f6101d0a 100644
--- a/modules/calendar/e-cal-shell-view-actions.c
+++ b/modules/calendar/e-cal-shell-view-actions.c
@@ -1196,6 +1196,25 @@ action_event_schedule_cb (GtkAction *action,
edit_event_as (cal_shell_view, TRUE);
}
+ static void
+quit_calendar_cb (GtkAction *action,
+ ECalShellView *cal_shell_view)
+{
+ EShellView *shell_view;
+ EShellWindow *shell_window;
+ GdkEvent *event;
+
+ shell_view = E_SHELL_VIEW (cal_shell_view);
+ shell_window = e_shell_view_get_shell_window (shell_view);
+
+ /* Synthesize a delete_event on this window. */
+ event = gdk_event_new (GDK_DELETE);
+ event->any.window = g_object_ref (((GtkWidget *) shell_window)->window);
+ event->any.send_event = TRUE;
+ gtk_main_do_event (event);
+ gdk_event_free (event);
+}
+
static void
action_event_schedule_appointment_cb (GtkAction *action,
ECalShellView *cal_shell_view)
@@ -1428,6 +1447,13 @@ static GtkActionEntry calendar_entries[] = {
N_("Converts a meeting to an appointment"),
G_CALLBACK (action_event_schedule_appointment_cb) },
+ { "quit-calendar",
+ GTK_STOCK_CLOSE,
+ N_("Quit"),
+ NULL,
+ NULL, /* XXX Add a tooltip! */
+ G_CALLBACK (quit_calendar_cb) },
+
/*** Menus ***/
{ "calendar-actions-menu",
@@ -1689,7 +1715,7 @@ e_cal_shell_view_actions_init (ECalShellView *cal_shell_view)
cal_shell_content = cal_shell_view->priv->cal_shell_content;
searchbar = e_cal_shell_content_get_searchbar (cal_shell_content);
-
+
/* Calendar Actions */
action_group = ACTION_GROUP (CALENDAR);
gtk_action_group_add_actions (
@@ -1710,8 +1736,9 @@ e_cal_shell_view_actions_init (ECalShellView *cal_shell_view)
/* Advanced Search Action */
action = ACTION (CALENDAR_SEARCH_ADVANCED_HIDDEN);
gtk_action_set_visible (action, FALSE);
- e_shell_searchbar_set_search_option (
- searchbar, GTK_RADIO_ACTION (action));
+ if (searchbar)
+ e_shell_searchbar_set_search_option (
+ searchbar, GTK_RADIO_ACTION (action));
/* Lockdown Printing Actions */
action_group = ACTION_GROUP (LOCKDOWN_PRINTING);
@@ -1833,18 +1860,20 @@ e_cal_shell_view_update_search_filter (ECalShellView *cal_shell_view)
cal_shell_content = cal_shell_view->priv->cal_shell_content;
searchbar = e_cal_shell_content_get_searchbar (cal_shell_content);
- combo_box = e_shell_searchbar_get_filter_combo_box (searchbar);
+ if (searchbar) {
+ combo_box = e_shell_searchbar_get_filter_combo_box (searchbar);
- e_shell_view_block_execute_search (shell_view);
+ e_shell_view_block_execute_search (shell_view);
- /* Use any action in the group; doesn't matter which. */
- e_action_combo_box_set_action (combo_box, radio_action);
+ /* Use any action in the group; doesn't matter which. */
+ e_action_combo_box_set_action (combo_box, radio_action);
- ii = CALENDAR_FILTER_UNMATCHED;
- e_action_combo_box_add_separator_after (combo_box, ii);
+ ii = CALENDAR_FILTER_UNMATCHED;
+ e_action_combo_box_add_separator_after (combo_box, ii);
- ii = CALENDAR_FILTER_NEXT_7_DAYS_APPOINTMENTS;
- e_action_combo_box_add_separator_after (combo_box, ii);
+ ii = CALENDAR_FILTER_NEXT_7_DAYS_APPOINTMENTS;
+ e_action_combo_box_add_separator_after (combo_box, ii);
- e_shell_view_unblock_execute_search (shell_view);
+ e_shell_view_unblock_execute_search (shell_view);
+ }
}
diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c
index c669c29b33..a958a9f05e 100644
--- a/modules/calendar/e-cal-shell-view-private.c
+++ b/modules/calendar/e-cal-shell-view-private.c
@@ -28,6 +28,16 @@
#define CHECK_NB 5
+/* be compatible with older e-d-s for MeeGo */
+#ifndef ETC_TIMEZONE
+# define ETC_TIMEZONE "/etc/timezone"
+# define ETC_TIMEZONE_MAJ "/etc/TIMEZONE"
+# define ETC_RC_CONF "/etc/rc.conf"
+# define ETC_SYSCONFIG_CLOCK "/etc/sysconfig/clock"
+# define ETC_CONF_D_CLOCK "/etc/conf.d/clock"
+# define ETC_LOCALTIME "/etc/localtime"
+#endif
+
static const gchar * files_to_check [CHECK_NB] = {
ETC_TIMEZONE,
ETC_TIMEZONE_MAJ,
@@ -611,35 +621,41 @@ e_cal_shell_view_private_constructed (ECalShellView *cal_shell_view)
G_CALLBACK (cal_shell_view_selector_client_removed_cb),
cal_shell_view);
- g_signal_connect_swapped (
- memo_table, "popup-event",
- G_CALLBACK (cal_shell_view_memopad_popup_event_cb),
- cal_shell_view);
-
- g_signal_connect_swapped (
- memo_table, "selection-change",
- G_CALLBACK (e_cal_shell_view_memopad_actions_update),
- cal_shell_view);
+ if (memo_table)
+ g_signal_connect_swapped (
+ memo_table, "popup-event",
+ G_CALLBACK (cal_shell_view_memopad_popup_event_cb),
+ cal_shell_view);
- g_signal_connect_swapped (
- memo_table, "status-message",
- G_CALLBACK (e_cal_shell_view_memopad_set_status_message),
- cal_shell_view);
+ if (memo_table)
+ g_signal_connect_swapped (
+ memo_table, "selection-change",
+ G_CALLBACK (e_cal_shell_view_memopad_actions_update),
+ cal_shell_view);
- g_signal_connect_swapped (
- task_table, "popup-event",
- G_CALLBACK (cal_shell_view_taskpad_popup_event_cb),
- cal_shell_view);
+ if (memo_table)
+ g_signal_connect_swapped (
+ memo_table, "status-message",
+ G_CALLBACK (e_cal_shell_view_memopad_set_status_message),
+ cal_shell_view);
- g_signal_connect_swapped (
- task_table, "status-message",
- G_CALLBACK (e_cal_shell_view_taskpad_set_status_message),
- cal_shell_view);
+ if (task_table)
+ g_signal_connect_swapped (
+ task_table, "popup-event",
+ G_CALLBACK (cal_shell_view_taskpad_popup_event_cb),
+ cal_shell_view);
- g_signal_connect_swapped (
- task_table, "selection-change",
- G_CALLBACK (e_cal_shell_view_taskpad_actions_update),
- cal_shell_view);
+ if (task_table)
+ g_signal_connect_swapped (
+ task_table, "status-message",
+ G_CALLBACK (e_cal_shell_view_taskpad_set_status_message),
+ cal_shell_view);
+
+ if (task_table)
+ g_signal_connect_swapped (
+ task_table, "selection-change",
+ G_CALLBACK (e_cal_shell_view_taskpad_actions_update),
+ cal_shell_view);
e_categories_add_change_hook (
(GHookFunc) e_cal_shell_view_update_search_filter,
diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c
index cd44f37c56..cf356cbc6d 100644
--- a/modules/calendar/e-cal-shell-view.c
+++ b/modules/calendar/e-cal-shell-view.c
@@ -303,6 +303,26 @@ cal_shell_view_update_actions (EShellView *shell_view)
shell_window = e_shell_view_get_shell_window (shell_view);
+ if(e_shell_get_express_mode(e_shell_get_default())) {
+ GtkWidget *widget, *item;
+
+ /* Hack: Get rid of New and Send/Receive in toolbar
+ * while in express mode */
+ widget = e_shell_window_get_managed_widget (
+ shell_window, "/main-toolbar");
+
+ item = (GtkWidget *)gtk_toolbar_get_nth_item ((GtkToolbar *)widget, 0);
+ gtk_widget_hide(item);
+
+ widget = e_shell_window_get_managed_widget (
+ shell_window, "/main-menu");
+ gtk_widget_hide(widget);
+
+ item = e_shell_window_get_managed_widget (
+ shell_window, "/main-toolbar/send-receive");
+ if (item)
+ gtk_widget_hide(item);
+ }
cal_shell_content = priv->cal_shell_content;
calendar = e_cal_shell_content_get_calendar (cal_shell_content);
view_type = gnome_calendar_get_view (calendar);
@@ -472,7 +492,7 @@ cal_shell_view_class_init (ECalShellViewClass *class,
shell_view_class->new_shell_sidebar = e_cal_shell_sidebar_new;
shell_view_class->execute_search = cal_shell_view_execute_search;
shell_view_class->update_actions = cal_shell_view_update_actions;
-}
+}
static void
cal_shell_view_init (ECalShellView *cal_shell_view,
diff --git a/modules/calendar/e-memo-shell-backend.c b/modules/calendar/e-memo-shell-backend.c
index 979b525304..b0635b6e38 100644
--- a/modules/calendar/e-memo-shell-backend.c
+++ b/modules/calendar/e-memo-shell-backend.c
@@ -419,7 +419,7 @@ memo_shell_backend_handle_uri_cb (EShellBackend *shell_backend,
source = e_source_list_peek_source_by_uid (source_list, source_uid);
if (source == NULL) {
- g_printerr ("No source for UID `%s'\n", source_uid);
+ g_printerr ("No source for UID '%s'\n", source_uid);
g_object_unref (source_list);
goto exit;
}
diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c
index 34946b7bdd..d56a6105d1 100644
--- a/modules/calendar/e-memo-shell-content.c
+++ b/modules/calendar/e-memo-shell-content.c
@@ -418,7 +418,7 @@ memo_shell_content_constructed (GObject *object)
shell = e_shell_backend_get_shell (shell_backend);
shell_settings = e_shell_get_shell_settings (shell);
- priv->memo_model = e_cal_model_memos_new (shell_settings);
+ priv->memo_model = e_cal_model_memos_new ();
timezone = e_shell_settings_get_pointer (
shell_settings, "cal-timezone");
@@ -730,6 +730,7 @@ e_memo_shell_content_set_preview_visible (EMemoShellContent *memo_shell_content,
EShellSearchbar *
e_memo_shell_content_get_searchbar (EMemoShellContent *memo_shell_content)
{
+ EShellView *shell_view;
EShellContent *shell_content;
GtkWidget *widget;
@@ -737,7 +738,8 @@ e_memo_shell_content_get_searchbar (EMemoShellContent *memo_shell_content)
E_IS_MEMO_SHELL_CONTENT (memo_shell_content), NULL);
shell_content = E_SHELL_CONTENT (memo_shell_content);
- widget = e_shell_content_get_searchbar (shell_content);
+ shell_view = e_shell_content_get_shell_view (shell_content);
+ widget = e_shell_view_get_searchbar (shell_view);
return E_SHELL_SEARCHBAR (widget);
}
diff --git a/modules/calendar/e-task-shell-backend.c b/modules/calendar/e-task-shell-backend.c
index 7926555ec6..e428c9413e 100644
--- a/modules/calendar/e-task-shell-backend.c
+++ b/modules/calendar/e-task-shell-backend.c
@@ -424,7 +424,7 @@ task_shell_backend_handle_uri_cb (EShellBackend *shell_backend,
source = e_source_list_peek_source_by_uid (source_list, source_uid);
if (source == NULL) {
- g_printerr ("No source for UID `%s'\n", source_uid);
+ g_printerr ("No source for UID '%s'\n", source_uid);
g_object_unref (source_list);
goto exit;
}
diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c
index 5fb39a9738..910b4da48e 100644
--- a/modules/calendar/e-task-shell-content.c
+++ b/modules/calendar/e-task-shell-content.c
@@ -415,7 +415,7 @@ task_shell_content_constructed (GObject *object)
shell = e_shell_window_get_shell (shell_window);
shell_settings = e_shell_get_shell_settings (shell);
- priv->task_model = e_cal_model_tasks_new (shell_settings);
+ priv->task_model = e_cal_model_tasks_new ();
timezone = e_shell_settings_get_pointer (
shell_settings, "cal-timezone");
@@ -752,6 +752,7 @@ e_task_shell_content_set_preview_visible (ETaskShellContent *task_shell_content,
EShellSearchbar *
e_task_shell_content_get_searchbar (ETaskShellContent *task_shell_content)
{
+ EShellView *shell_view;
EShellContent *shell_content;
GtkWidget *widget;
@@ -759,7 +760,8 @@ e_task_shell_content_get_searchbar (ETaskShellContent *task_shell_content)
E_IS_TASK_SHELL_CONTENT (task_shell_content), NULL);
shell_content = E_SHELL_CONTENT (task_shell_content);
- widget = e_shell_content_get_searchbar (shell_content);
+ shell_view = e_shell_content_get_shell_view (shell_content);
+ widget = e_shell_view_get_searchbar (shell_view);
return E_SHELL_SEARCHBAR (widget);
}
diff --git a/modules/calendar/e-task-shell-migrate.c b/modules/calendar/e-task-shell-migrate.c
index 3ba36ce9b1..3c3210b472 100644
--- a/modules/calendar/e-task-shell-migrate.c
+++ b/modules/calendar/e-task-shell-migrate.c
@@ -617,7 +617,7 @@ e_task_shell_backend_migrate (EShellBackend *shell_backend,
if (!migrate_ical_folder (l->data, on_this_computer, source_name, E_CAL_SOURCE_TYPE_TODO)) {
/* FIXME: domain/code */
- g_set_error(error, 0, 0, _("Unable to migrate tasks `%s'"), source_name);
+ g_set_error(error, 0, 0, _("Unable to migrate tasks '%s'"), source_name);
g_free(source_name);
goto fail;
}
diff --git a/modules/calendar/evolution-module-calendar.c b/modules/calendar/evolution-module-calendar.c
index f72e8a97e4..b54f6439a3 100644
--- a/modules/calendar/evolution-module-calendar.c
+++ b/modules/calendar/evolution-module-calendar.c
@@ -39,6 +39,13 @@
#include "e-task-shell-sidebar.h"
#include "e-task-shell-view.h"
+#include "e-cal-config-calendar-item.h"
+#include "e-cal-config-date-edit.h"
+#include "e-cal-config-meeting-store.h"
+#include "e-cal-config-meeting-time-selector.h"
+#include "e-cal-config-model.h"
+#include "e-cal-config-view.h"
+
/* Module Entry Points */
void e_module_load (GTypeModule *type_module);
void e_module_unload (GTypeModule *type_module);
@@ -67,6 +74,13 @@ e_module_load (GTypeModule *type_module)
e_task_shell_content_register_type (type_module);
e_task_shell_sidebar_register_type (type_module);
e_task_shell_view_register_type (type_module);
+
+ e_cal_config_calendar_item_register_type (type_module);
+ e_cal_config_date_edit_register_type (type_module);
+ e_cal_config_meeting_store_register_type (type_module);
+ e_cal_config_meeting_time_selector_register_type (type_module);
+ e_cal_config_model_register_type (type_module);
+ e_cal_config_view_register_type (type_module);
}
G_MODULE_EXPORT void