[evolution] Move evolution-alarm-notify to evolution-data-server
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Move evolution-alarm-notify to evolution-data-server
- Date: Fri, 11 May 2018 11:31:19 +0000 (UTC)
commit 499518d53c7e7c64bed3c58680edba49be477a4e
Author: Milan Crha <mcrha redhat com>
Date: Fri May 11 12:58:02 2018 +0200
Move evolution-alarm-notify to evolution-data-server
This way other applications can provide reminder notifications,
independently of the evolution itself.
data/CMakeLists.txt | 14 -
.../org.gnome.Evolution-alarm-notify.desktop.in.in | 15 -
data/org.gnome.Evolution.desktop.in.in | 2 +-
data/org.gnome.evolution.calendar.gschema.xml.in | 30 -
po/POTFILES.in | 6 +-
src/calendar/CMakeLists.txt | 1 -
src/calendar/alarm-notify/CMakeLists.txt | 92 -
src/calendar/alarm-notify/alarm-notify-dialog.c | 596 -----
src/calendar/alarm-notify/alarm-notify-dialog.h | 62 -
src/calendar/alarm-notify/alarm-notify.c | 362 ---
src/calendar/alarm-notify/alarm-notify.h | 75 -
src/calendar/alarm-notify/alarm-notify.ui | 366 ---
src/calendar/alarm-notify/alarm-queue.c | 2658 --------------------
src/calendar/alarm-notify/alarm-queue.h | 36 -
src/calendar/alarm-notify/alarm.c | 333 ---
src/calendar/alarm-notify/alarm.h | 42 -
src/calendar/alarm-notify/config-data.c | 346 ---
src/calendar/alarm-notify/config-data.h | 68 -
.../alarm-notify/evolution-alarm-notify-icon.rc | 1 -
.../alarm-notify/evolution-alarm-notify.ico | Bin 17542 -> 0 bytes
src/calendar/alarm-notify/notify-main.c | 112 -
src/calendar/alarm-notify/util.c | 118 -
src/calendar/alarm-notify/util.h | 36 -
src/libemail-engine/e-mail-session.c | 4 -
src/modules/CMakeLists.txt | 1 +
src/modules/alarm-notify/CMakeLists.txt | 23 +
src/modules/alarm-notify/alarm-notify.c | 251 ++
src/modules/calendar/CMakeLists.txt | 4 +-
src/modules/calendar/e-cal-shell-backend.c | 4 +-
src/modules/calendar/e-calendar-preferences.c | 17 +-
src/modules/calendar/e-calendar-preferences.ui | 39 -
31 files changed, 290 insertions(+), 5424 deletions(-)
---
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 7a21421..e09c147 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -1,5 +1,4 @@
set(filedeps)
-set(autostartdir ${SYSCONF_INSTALL_DIR}/xdg/autostart)
set(desktopdir ${SHARE_INSTALL_PREFIX}/applications)
set(themedir ${privdatadir}/theme)
@@ -18,19 +17,6 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.gnome.Evolution.desktop
add_appdata_file(org.gnome.Evolution.appdata.xml.in org.gnome.Evolution.appdata.xml)
-configure_file(org.gnome.Evolution-alarm-notify.desktop.in.in
- org.gnome.Evolution-alarm-notify.desktop.in
- @ONLY
-)
-
-intltool_merge(${CMAKE_CURRENT_BINARY_DIR}/org.gnome.Evolution-alarm-notify.desktop.in
org.gnome.Evolution-alarm-notify.desktop --desktop-style --utf8)
-
-list(APPEND filedeps ${CMAKE_CURRENT_BINARY_DIR}/org.gnome.Evolution-alarm-notify.desktop)
-
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.gnome.Evolution-alarm-notify.desktop
- DESTINATION ${autostartdir}
-)
-
install(FILES webview.css
webview-print.css
DESTINATION ${themedir}
diff --git a/data/org.gnome.Evolution.desktop.in.in b/data/org.gnome.Evolution.desktop.in.in
index f047013..cd81457 100644
--- a/data/org.gnome.Evolution.desktop.in.in
+++ b/data/org.gnome.Evolution.desktop.in.in
@@ -17,7 +17,7 @@ X-GNOME-Bugzilla-Component=BugBuddyBugs
X-GNOME-Bugzilla-Version=@BASE_VERSION@.x
X-GNOME-Bugzilla-OtherBinaries=evolution-addressbook-factory;evolution-calendar-factory;evolution-source-registry;evolution-user-prompter;
X-GNOME-UsesNotifications=true
-MimeType=text/calendar;text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;x-scheme-handler/webcal;
+MimeType=text/calendar;text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;x-scheme-handler/webcal;x-scheme-handler/calendar;x-scheme-handler/task;x-scheme-handler/memo;
[Desktop Action new-window]
_Name=New Window
diff --git a/data/org.gnome.evolution.calendar.gschema.xml.in
b/data/org.gnome.evolution.calendar.gschema.xml.in
index 44c4892..78d855a 100644
--- a/data/org.gnome.evolution.calendar.gschema.xml.in
+++ b/data/org.gnome.evolution.calendar.gschema.xml.in
@@ -174,11 +174,6 @@
<_summary>Default reminder units</_summary>
<_description>Units for a default reminder, “minutes”, “hours” or “days”</_description>
</key>
- <key name="default-snooze-minutes" type="i">
- <default>5</default>
- <_summary>Default reminder snooze interval, in minutes</_summary>
- <_description>Default reminder snooze interval, in minutes, to be filled in the reminder notification
dialog</_description>
- </key>
<key name="editor-show-categories" type="b">
<default>false</default>
<_summary>Show categories field in the event/meeting/task editor</_summary>
@@ -234,11 +229,6 @@
<_summary>Last reminder time</_summary>
<_description>Time the last reminder ran, in time_t</_description>
</key>
- <key name="allow-past-reminders" type="b">
- <default>false</default>
- <_summary>Allow past reminders</_summary>
- <_description>Whether can show reminders for events/tasks/memos which already happened</_description>
- </key>
<key name="marcus-bains-color-dayview" type="s">
<default>'#ff0000'</default>
<_summary>Marcus Bains Line Color — Day View</_summary>
@@ -279,21 +269,6 @@
<_summary>Scroll Month View by a week, not by a month</_summary>
<_description>Whether to scroll a Month View by a week, not by a month</_description>
</key>
- <key name="notify-programs" type="as">
- <default>[]</default>
- <_summary>Reminder programs</_summary>
- <_description>Programs that are allowed to be run by reminders</_description>
- </key>
- <key name="notify-with-tray" type="b">
- <default>true</default>
- <_summary>Show display reminders in notification tray</_summary>
- <_description>Whether or not to use the notification tray for display reminders</_description>
- </key>
- <key name="notify-window-on-top" type="b">
- <default>true</default>
- <_summary>Show reminder notification dialog always on top</_summary>
- <_description>Whether or not to show reminder notification dialog always on top. Note this works only
as a hint for the window manager, which may or may not obey it.</_description>
- </key>
<key name="prefer-new-item" type="s">
<default>''</default>
<_summary>Preferred New button item</_summary>
@@ -384,11 +359,6 @@
<_summary>Task preview pane position (vertical)</_summary>
<_description>Position of the task preview pane when oriented vertically</_description>
</key>
- <key name="task-reminder-for-completed" type="b">
- <default>false</default>
- <_summary>Show reminders for completed tasks</_summary>
- <_description>Whether to show reminders for completed tasks. When set to false, reminders for
completed tasks are suppressed.</_description>
- </key>
<key name="task-overdue-highlight" type="b">
<default>true</default>
<_summary>Highlight overdue tasks</_summary>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 1f3e304..f77caf5 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -21,7 +21,6 @@ data/org.gnome.evolution.spamassassin.gschema.xml.in
data/org.gnome.evolution.text-highlight.gschema.xml.in
data/org.gnome.Evolution.appdata.xml.in
data/org.gnome.Evolution.desktop.in.in
-data/org.gnome.Evolution-alarm-notify.desktop.in.in
data/views/addressbook/galview.xml
data/views/calendar/galview.xml
data/views/mail/galview.xml
@@ -60,10 +59,6 @@ src/addressbook/importers/evolution-ldif-importer.c
src/addressbook/importers/evolution-vcard-importer.c
src/addressbook/printing/e-contact-print.c
src/addressbook/util/eab-book-util.c
-src/calendar/alarm-notify/alarm-notify-dialog.c
-[type: gettext/glade]src/calendar/alarm-notify/alarm-notify.ui
-src/calendar/alarm-notify/alarm-queue.c
-src/calendar/alarm-notify/util.c
src/calendar/calendar.error.xml
src/calendar/gui/caltypes.xml.in
src/calendar/gui/comp-util.c
@@ -396,6 +391,7 @@ src/modules/addressbook/e-book-shell-migrate.c
src/modules/addressbook/e-book-shell-sidebar.c
src/modules/addressbook/e-book-shell-view-actions.c
src/modules/addressbook/e-book-shell-view.c
+src/modules/alarm-notify/alarm-notify.c
src/modules/backup-restore/e-mail-config-restore-page.c
src/modules/backup-restore/e-mail-config-restore-ready-page.c
src/modules/backup-restore/evolution-backup-restore.c
diff --git a/src/calendar/CMakeLists.txt b/src/calendar/CMakeLists.txt
index 827448f..b909124 100644
--- a/src/calendar/CMakeLists.txt
+++ b/src/calendar/CMakeLists.txt
@@ -1,5 +1,4 @@
add_error_files(calendar calendar.error)
-add_subdirectory(alarm-notify)
add_subdirectory(gui)
add_subdirectory(importers)
diff --git a/src/libemail-engine/e-mail-session.c b/src/libemail-engine/e-mail-session.c
index 9809e1e..942e6a0 100644
--- a/src/libemail-engine/e-mail-session.c
+++ b/src/libemail-engine/e-mail-session.c
@@ -35,10 +35,6 @@
#include <gtk/gtk.h>
-#ifdef HAVE_CANBERRA
-#include <canberra-gtk.h>
-#endif
-
#include <libebackend/libebackend.h>
#include <libedataserver/libedataserver.h>
diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt
index dc88551..81417a6 100644
--- a/src/modules/CMakeLists.txt
+++ b/src/modules/CMakeLists.txt
@@ -91,6 +91,7 @@ add_subdirectory(addressbook)
add_subdirectory(calendar)
add_subdirectory(mail)
add_subdirectory(accounts-window)
+add_subdirectory(alarm-notify)
add_subdirectory(backup-restore)
add_subdirectory(book-config-google)
add_subdirectory(book-config-local)
diff --git a/src/modules/alarm-notify/CMakeLists.txt b/src/modules/alarm-notify/CMakeLists.txt
new file mode 100644
index 0000000..0a6020e
--- /dev/null
+++ b/src/modules/alarm-notify/CMakeLists.txt
@@ -0,0 +1,23 @@
+pkg_check_variable(edsuimoduledir libedataserverui-1.2 uimoduledir)
+
+set(extra_deps
+ evolution-calendar
+ evolution-util
+)
+set(sources
+ alarm-notify.c
+)
+set(extra_defines)
+set(extra_cflags)
+set(extra_incdirs)
+set(extra_ldflags)
+
+add_simple_module(module-evolution-alarm-notify
+ sources
+ extra_deps
+ extra_defines
+ extra_cflags
+ extra_incdirs
+ extra_ldflags
+ ${edsuimoduledir}
+)
diff --git a/src/modules/alarm-notify/alarm-notify.c b/src/modules/alarm-notify/alarm-notify.c
new file mode 100644
index 0000000..5176357
--- /dev/null
+++ b/src/modules/alarm-notify/alarm-notify.c
@@ -0,0 +1,251 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2018 Red Hat, Inc. (www.redhat.com)
+ *
+ * This library 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.
+ *
+ * This library 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 this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "evolution-config.h"
+
+#include <gmodule.h>
+#include <glib-object.h>
+#include <glib/gi18n-lib.h>
+
+#include <libedataserverui/libedataserverui.h>
+
+#include "e-util/e-util.h"
+
+/* Standard GObject macros */
+#define E_TYPE_ALARM_NOTIFY_MODULE \
+ (e_alarm_notify_module_get_type ())
+#define E_ALARM_NOTIFY_MODULE(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_ALARM_NOTIFY_MODULE, EAlarmNotifyModule))
+#define E_ALARM_NOTIFY_MODULE_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_ALARM_NOTIFY_MODULE, EAlarmNotifyModuleClass))
+#define E_IS_ALARM_NOTIFY_MODULE(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_ALARM_NOTIFY_MODULE))
+#define E_IS_ALARM_NOTIFY_MODULE_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_ALARM_NOTIFY_MODULE))
+#define E_ALARM_NOTIFY_MODULE_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_ALARM_NOTIFY_MODULE, EAlarmNotifyModuleClass))
+
+typedef struct _EAlarmNotifyModule EAlarmNotifyModule;
+typedef struct _EAlarmNotifyModuleClass EAlarmNotifyModuleClass;
+
+struct _EAlarmNotifyModule {
+ EExtension parent;
+};
+
+struct _EAlarmNotifyModuleClass {
+ EExtensionClass parent_class;
+};
+
+GType e_alarm_notify_module_get_type (void) G_GNUC_CONST;
+
+G_DEFINE_DYNAMIC_TYPE (EAlarmNotifyModule, e_alarm_notify_module, E_TYPE_EXTENSION)
+
+static gboolean
+alarm_notify_module_map_string_to_icaltimezone (GValue *value,
+ GVariant *variant,
+ gpointer user_data)
+{
+ GSettings *settings;
+ const gchar *location = NULL;
+ icaltimezone *timezone = NULL;
+
+ settings = e_util_ref_settings ("org.gnome.evolution.calendar");
+
+ if (g_settings_get_boolean (settings, "use-system-timezone"))
+ timezone = e_cal_util_get_system_timezone ();
+ else
+ location = g_variant_get_string (variant, NULL);
+
+ if (location && *location)
+ timezone = icaltimezone_get_builtin_timezone (location);
+
+ if (!timezone)
+ timezone = icaltimezone_get_utc_timezone ();
+
+ g_value_set_boxed (value, timezone);
+
+ g_object_unref (settings);
+
+ return TRUE;
+}
+
+static void
+alarm_notify_module_format_time_cb (EReminderWatcher *watcher,
+ const EReminderData *rd,
+ struct icaltimetype *itt,
+ gchar **inout_buffer,
+ gint buffer_size)
+{
+ struct tm tm;
+ gchar *text;
+
+ g_return_if_fail (rd != NULL);
+ g_return_if_fail (itt != NULL);
+ g_return_if_fail (inout_buffer != NULL);
+ g_return_if_fail (*inout_buffer != NULL);
+ g_return_if_fail (buffer_size > 0);
+
+ tm = icaltimetype_to_tm (itt);
+ text = e_datetime_format_format_tm ("calendar", "table", itt->is_date ? DTFormatKindDate :
DTFormatKindDateTime, &tm);
+
+ if (text) {
+ g_snprintf (*inout_buffer, buffer_size, "%s", text);
+ g_free (text);
+ }
+}
+
+static gboolean
+alarm_notify_module_row_activated_cb (ERemindersWidget *reminders,
+ const EReminderData *rd,
+ gpointer user_data)
+{
+ const gchar *scheme = NULL;
+ const gchar *comp_uid = NULL;
+
+ g_return_val_if_fail (E_IS_REMINDERS_WIDGET (reminders), FALSE);
+ g_return_val_if_fail (rd != NULL, FALSE);
+
+ e_cal_component_get_uid (rd->component, &comp_uid);
+
+ switch (e_cal_component_get_vtype (rd->component)) {
+ case E_CAL_COMPONENT_EVENT:
+ scheme = "calendar:";
+ break;
+ case E_CAL_COMPONENT_TODO:
+ scheme = "task:";
+ break;
+ case E_CAL_COMPONENT_JOURNAL:
+ scheme = "memo:";
+ break;
+ default:
+ break;
+ }
+
+ if (scheme && comp_uid && rd->source_uid) {
+ GString *cmd;
+ gchar *tmp;
+ GError *error = NULL;
+
+ cmd = g_string_sized_new (128);
+
+ g_string_append (cmd, PACKAGE);
+ g_string_append (cmd, " ");
+ g_string_append (cmd, scheme);
+ g_string_append (cmd, "///?");
+
+ tmp = g_uri_escape_string (rd->source_uid, NULL, TRUE);
+ g_string_append (cmd, "source-uid=");
+ g_string_append (cmd, tmp);
+ g_free (tmp);
+
+ g_string_append (cmd, "&");
+
+ tmp = g_uri_escape_string (comp_uid, NULL, TRUE);
+ g_string_append (cmd, "comp-uid=");
+ g_string_append (cmd, tmp);
+ g_free (tmp);
+
+ if (!g_spawn_command_line_async (cmd->str, &error) &&
+ !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED)) {
+ gchar *prefix = g_strdup_printf (_("Failed to launch command “%s”:"), cmd->str);
+ e_reminders_widget_report_error (reminders, prefix, error);
+ g_free (prefix);
+ }
+
+ g_string_free (cmd, TRUE);
+ g_clear_error (&error);
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static void
+alarm_notify_module_constructed (GObject *object)
+{
+ ERemindersWidget *reminders;
+ EReminderWatcher *watcher;
+ GSettings *settings;
+
+ /* Chain up to parent's method. */
+ G_OBJECT_CLASS (e_alarm_notify_module_parent_class)->constructed (object);
+
+ reminders = E_REMINDERS_WIDGET (e_extension_get_extensible (E_EXTENSION (object)));
+ watcher = e_reminders_widget_get_watcher (reminders);
+
+ settings = e_util_ref_settings ("org.gnome.evolution.calendar");
+
+ g_settings_bind_with_mapping (
+ settings, "timezone",
+ watcher, "default-zone",
+ G_SETTINGS_BIND_GET,
+ alarm_notify_module_map_string_to_icaltimezone,
+ NULL, /* one-way binding */
+ NULL, NULL);
+
+ g_object_unref (settings);
+
+ g_signal_connect (watcher, "format-time",
+ G_CALLBACK (alarm_notify_module_format_time_cb), object);
+
+ g_signal_connect (reminders, "activated",
+ G_CALLBACK (alarm_notify_module_row_activated_cb), object);
+}
+
+static void
+e_alarm_notify_module_class_init (EAlarmNotifyModuleClass *class)
+{
+ GObjectClass *object_class;
+ EExtensionClass *extension_class;
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = alarm_notify_module_constructed;
+
+ extension_class = E_EXTENSION_CLASS (class);
+ extension_class->extensible_type = E_TYPE_REMINDERS_WIDGET;
+}
+
+static void
+e_alarm_notify_module_class_finalize (EAlarmNotifyModuleClass *class)
+{
+}
+
+static void
+e_alarm_notify_module_init (EAlarmNotifyModule *extension)
+{
+}
+
+/* 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_alarm_notify_module_register_type (type_module);
+}
+
+G_MODULE_EXPORT void
+e_module_unload (GTypeModule *type_module)
+{
+}
diff --git a/src/modules/calendar/CMakeLists.txt b/src/modules/calendar/CMakeLists.txt
index ec6c754..3117326 100644
--- a/src/modules/calendar/CMakeLists.txt
+++ b/src/modules/calendar/CMakeLists.txt
@@ -2,6 +2,8 @@ install(FILES e-calendar-preferences.ui
DESTINATION ${uidir}
)
+pkg_check_variable(edsprivlibexecdir evolution-data-server-1.2 privlibexecdir)
+
set(extra_deps
econtacteditor
econtactlisteditor
@@ -69,7 +71,7 @@ set(sources
e-task-shell-view-private.h
)
set(extra_defines
- -DEVOLUTION_PRIVLIBEXECDIR=\"${privlibexecdir}\"
+ -DEVOLUTION_DATA_SERVER_PRIVLIBEXECDIR=\"${edsprivlibexecdir}\"
)
set(extra_cflags)
set(extra_incdirs)
diff --git a/src/modules/calendar/e-cal-shell-backend.c b/src/modules/calendar/e-cal-shell-backend.c
index 0f52032..6c5e7ff 100644
--- a/src/modules/calendar/e-cal-shell-backend.c
+++ b/src/modules/calendar/e-cal-shell-backend.c
@@ -24,6 +24,8 @@
#include <calendar/gui/e-cal-ops.h>
#include <calendar/importers/evolution-calendar-importer.h>
+#include "e-util/e-util-private.h"
+
#include "e-calendar-preferences.h"
#include "e-cal-base-shell-sidebar.h"
@@ -192,7 +194,7 @@ ensure_alarm_notify_is_running (void)
#ifdef G_OS_WIN32
base_dir = EVOLUTION_BINDIR;
#else
- base_dir = EVOLUTION_PRIVLIBEXECDIR;
+ base_dir = EVOLUTION_DATA_SERVER_PRIVLIBEXECDIR;
#endif
filename = g_build_filename (base_dir, "evolution-alarm-notify", NULL);
diff --git a/src/modules/calendar/e-calendar-preferences.c b/src/modules/calendar/e-calendar-preferences.c
index 8551e4b..276e354 100644
--- a/src/modules/calendar/e-calendar-preferences.c
+++ b/src/modules/calendar/e-calendar-preferences.c
@@ -717,6 +717,7 @@ calendar_preferences_construct (ECalendarPreferences *prefs,
GSettings *settings;
GSettings *eds_settings;
GSettings *mail_settings;
+ GSettings *eds_calendar_settings;
gboolean locale_supports_12_hour_format;
gint i;
GtkWidget *toplevel;
@@ -726,6 +727,7 @@ calendar_preferences_construct (ECalendarPreferences *prefs,
settings = e_util_ref_settings ("org.gnome.evolution.calendar");
mail_settings = e_util_ref_settings ("org.gnome.evolution.mail");
+ eds_calendar_settings = e_util_ref_settings ("org.gnome.evolution-data-server.calendar");
locale_supports_12_hour_format =
calendar_config_locale_supports_12_hour_format ();
@@ -1077,34 +1079,28 @@ calendar_preferences_construct (ECalendarPreferences *prefs,
/* Alarms tab */
widget = e_builder_get_widget (prefs->priv->builder, "notify_with_tray");
g_settings_bind (
- settings, "notify-with-tray",
+ eds_calendar_settings, "notify-with-tray",
widget, "active",
G_SETTINGS_BIND_DEFAULT);
widget = e_builder_get_widget (prefs->priv->builder, "notify_window_on_top");
g_settings_bind (
- settings, "notify-window-on-top",
+ eds_calendar_settings, "notify-window-on-top",
widget, "active",
G_SETTINGS_BIND_DEFAULT);
widget = e_builder_get_widget (prefs->priv->builder, "task_reminder_for_completed");
g_settings_bind (
- settings, "task-reminder-for-completed",
+ eds_calendar_settings, "notify-completed-tasks",
widget, "active",
G_SETTINGS_BIND_DEFAULT);
widget = e_builder_get_widget (prefs->priv->builder, "allow-past-reminders");
g_settings_bind (
- settings, "allow-past-reminders",
+ eds_calendar_settings, "notify-past-events",
widget, "active",
G_SETTINGS_BIND_DEFAULT);
- widget = e_builder_get_widget (prefs->priv->builder, "default-snooze-minutes-spin");
- g_settings_bind (
- settings, "default-snooze-minutes",
- widget, "value",
- G_SETTINGS_BIND_DEFAULT);
-
prefs->priv->reminder_calendars_scrolled_window = e_builder_get_widget (prefs->priv->builder,
"reminder-calendars-scrolled-window");
prefs->priv->reminder_memos_scrolled_window = e_builder_get_widget (prefs->priv->builder,
"reminder-memos-scrolled-window");
prefs->priv->reminder_tasks_scrolled_window = e_builder_get_widget (prefs->priv->builder,
"reminder-tasks-scrolled-window");
@@ -1132,6 +1128,7 @@ calendar_preferences_construct (ECalendarPreferences *prefs,
/* FIXME: weakref? */
setup_changes (prefs);
+ g_object_unref (eds_calendar_settings);
g_object_unref (mail_settings);
g_object_unref (settings);
}
diff --git a/src/modules/calendar/e-calendar-preferences.ui b/src/modules/calendar/e-calendar-preferences.ui
index 00b5435..0cc67c5 100644
--- a/src/modules/calendar/e-calendar-preferences.ui
+++ b/src/modules/calendar/e-calendar-preferences.ui
@@ -1626,45 +1626,6 @@
<property name="position">6</property>
</packing>
</child>
- <child>
- <object class="GtkHBox" id="hbox10">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">4</property>
- <child>
- <object class="GtkLabel" id="default-snooze-minutes-label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Default _snooze time (in
minutes)</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">default-snooze-minutes-spin</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="default-snooze-minutes-spin">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment">adjustment4</property>
- <property name="climb_rate">1</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">7</property>
- </packing>
- </child>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]