aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-08-31 19:26:57 +0800
committerMilan Crha <mcrha@redhat.com>2012-08-31 19:26:57 +0800
commite28f99649f26fa7c0200d124f2ba9ec29404892c (patch)
tree556313ec44edbbfa497ff77ba61c8912a811bfe1 /calendar
parented81260ccf822b7f60497dfe8fde6eedbfdc2ae0 (diff)
downloadgsoc2013-evolution-e28f99649f26fa7c0200d124f2ba9ec29404892c.tar.gz
gsoc2013-evolution-e28f99649f26fa7c0200d124f2ba9ec29404892c.tar.zst
gsoc2013-evolution-e28f99649f26fa7c0200d124f2ba9ec29404892c.zip
evolution-alarm-notify: Save changes in LastNotified
Thus they persist between alarm notify process runs.
Diffstat (limited to 'calendar')
-rw-r--r--calendar/alarm-notify/config-data.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/calendar/alarm-notify/config-data.c b/calendar/alarm-notify/config-data.c
index 94dd813ab8..a2f9a2d448 100644
--- a/calendar/alarm-notify/config-data.c
+++ b/calendar/alarm-notify/config-data.c
@@ -114,6 +114,19 @@ config_data_get_notify_with_tray (void)
return g_settings_get_boolean (calendar_settings, "notify-with-tray");
}
+static void
+source_written_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
+{
+ GError *error = NULL;
+
+ if (!e_source_write_finish (E_SOURCE (source_object), result, &error)) {
+ g_warning ("Failed to write source changes: %s", error ? error->message : "Unknown error");
+ g_clear_error (&error);
+ }
+}
+
/**
* config_data_set_last_notification_time:
* @t: A time value.
@@ -150,6 +163,8 @@ config_data_set_last_notification_time (ECalClient *cal,
iso8601 = g_time_val_to_iso8601 (&tv);
e_source_alarms_set_last_notified (extension, iso8601);
g_free (iso8601);
+
+ e_source_write (source, NULL, source_written_cb, NULL);
}
}