aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-component.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/calendar-component.c')
-rw-r--r--calendar/gui/calendar-component.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index d22d43e5ff..eafdd8c4b2 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -53,6 +53,8 @@
#include "dialogs/copy-source-dialog.h"
#include "dialogs/event-editor.h"
#include "misc/e-info-label.h"
+#include "e-util/e-non-intrusive-error-dialog.h"
+#include "e-util/gconf-bridge.h"
#include "e-util/e-error.h"
#include "e-cal-menu.h"
#include "e-cal-popup.h"
@@ -62,8 +64,9 @@
#define CREATE_MEETING_ID "meeting"
#define CREATE_ALLDAY_EVENT_ID "allday-event"
#define CREATE_CALENDAR_ID "calendar"
+#define CALENDAR_ERROR_LEVEL_KEY "/apps/evolution/calendar/display/error_level"
+#define CALENDAR_ERROR_TIME_OUT_KEY "/apps/evolution/calendar/display/error_timeout"
-#define PARENT_TYPE bonobo_object_get_type ()
static BonoboObjectClass *parent_class = NULL;
typedef struct
@@ -95,6 +98,9 @@ struct _CalendarComponentPrivate {
ESourceList *task_source_list;
ESourceList *memo_source_list;
+ EActivityHandler *activity_handler;
+ ELogger *logger;
+
GList *views;
ECal *create_ecal;
@@ -571,6 +577,11 @@ impl_dispose (GObject *object)
priv->source_list = NULL;
}
+ if (priv->activity_handler != NULL) {
+ g_object_unref (priv->activity_handler);
+ priv->activity_handler = NULL;
+ }
+
if (priv->create_ecal) {
g_object_unref (priv->create_ecal);
priv->create_ecal = NULL;
@@ -615,6 +626,11 @@ calendar_component_init (CalendarComponent *component)
component);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
+ priv->logger = e_logger_create ("calendar");
+ priv->activity_handler = e_activity_handler_new ();
+ e_activity_handler_set_logger (priv->activity_handler, priv->logger);
+ e_activity_handler_set_error_flush_time (priv->activity_handler,eni_config_get_error_timeout (CALENDAR_ERROR_TIME_OUT_KEY)*1000);
+
component->priv = priv;
if (!e_cal_get_sources (&priv->task_source_list, E_CAL_SOURCE_TYPE_TODO, NULL))