Index: calendar/ChangeLog
===================================================================
--- calendar/ChangeLog	(revision 36619)
+++ calendar/ChangeLog	(working copy)
@@ -1,3 +1,21 @@
+2008-11-03  Ashish Shrivastava  <shashish@novell.com>
+
+	** Most of the errors are now non-intrusive
+
+	* calendar.error.xml: Added a new error message for
+	  non-intrusive backend_died.
+	* apps_evolution_calendar.schemas.in:
+	* calendar-commands.c: Added new verb for help debug message
+	  (help_debug):
+	* gnome-cal.c: Support for non-intrusive error.
+	  (client_cal_opened_cb), Define fash table and accessing errors:
+	* e-calendar-view.c: (error_response):
+	  (e_calendar_utils_show_error_silent), (e_calendar_utils_show_info_silent):
+	* e-calendar-view.h:
+	* calendar-component.c: Added EActivityHandler and ELogger:
+	(calendar_component_peek_activity_handler), (calendar_component_show_logger):
+	* calendar-component.h:
+
 2008-09-08  Chenthill Palanisamy  <pchenthill@novell.com>
 
 	Fixes #544187
Index: calendar/calendar.error.xml
===================================================================
--- calendar/calendar.error.xml	(revision 36619)
+++ calendar/calendar.error.xml	(working copy)
@@ -176,6 +176,23 @@
   <_secondary>Your memos will not be available until Evolution is restarted.</_secondary>
  </error>
 
+<error id="backend_died" type="error">
+   <_primary>The Evolution calendars have quit unexpectedly.</_primary>
+   <_secondary>Your calendars will not be available until Evolution is restarted.</_secondary>
+</error>
+
+<error id="unable-to-load-the-calendar" type="error" default="GTK_RESPONSE_YES">
+ <_primary>Unable to load the calendar</_primary>
+ <_secondary>Calendar repository is offline.</_secondary>
+ <button stock ="gtk-ok" response="GTK_RESPONSE_YES"/>
+</error>
+<error id="error-on-loading-the-calendar" type="error" default="GTK_RESPONSE_YES">
+ <!-- For Translators: {0} is specify the backend server -->
+ <_primary>Error on '{0}'</_primary>
+ <_secondary>No response from the server.</_secondary>
+ <button stock ="gtk-ok" response="GTK_RESPONSE_YES"/>
+</error>
+
  <error id="editor-error" type="error">
   <_primary>Editor could not be loaded.</_primary>
   <_secondary>{0}.</_secondary>
Index: calendar/gui/apps_evolution_calendar.schemas.in
===================================================================
--- calendar/gui/apps_evolution_calendar.schemas.in	(revision 36619)
+++ calendar/gui/apps_evolution_calendar.schemas.in	(working copy)
@@ -591,5 +591,30 @@
       </locale>
     </schema>
 
+    <schema>
+      <key>/schemas/apps/evolution/calendar/display/error_timeout</key>
+      <applyto>/apps/evolution/calendar/display/error_timeout</applyto>
+      <owner>evolution-calendar</owner>
+      <type>int</type>
+      <default>60</default>
+      <locale name="C">
+          <short>Amount of time in seconds the error should be shown on the status bar.</short>
+          <long> Amount of time in seconds the error should be shown on the status bar.
+          </long>
+      </locale>
+    </schema>
+    <schema>
+      <key>/schemas/apps/evolution/calendar/display/error_level</key>
+      <applyto>/apps/evolution/calendar/display/error_level</applyto>
+      <owner>evolution-calendar</owner>
+      <type>int</type>
+      <default>0</default>
+      <locale name="C">
+         <short>Level beyond which the message should be logged.</short>
+         <long> This can have three possible values. 0 for errors. 1 for warnings.
+                2 for debug messages.
+         </long>
+      </locale>
+    </schema>
   </schemalist>
 </gconfschemafile>
Index: calendar/gui/calendar-commands.c
===================================================================
--- calendar/gui/calendar-commands.c	(revision 36619)
+++ calendar/gui/calendar-commands.c	(working copy)
@@ -553,6 +553,11 @@
 
 }
 
+static void
+help_debug (BonoboUIComponent *uid, void *data, const char *path)
+{
+	calendar_component_show_logger ((GtkWidget *) data);
+}
 
 static BonoboUIVerb verbs [] = {
 	BONOBO_UI_VERB ("EventOpen", file_open_event_cb),
@@ -578,7 +583,7 @@
 	BONOBO_UI_VERB ("ShowListView", show_list_view_clicked),
 
 	BONOBO_UI_VERB ("CalendarPurge", purge_cmd),
-
+	BONOBO_UI_VERB ("HelpDebug", help_debug),
 	BONOBO_UI_VERB_END
 };
 
Index: calendar/gui/gnome-cal.c
===================================================================
--- calendar/gui/gnome-cal.c	(revision 36619)
+++ calendar/gui/gnome-cal.c	(working copy)
@@ -93,6 +93,9 @@
 
 #define d(x) x
 
+/* hash table define for non intrusive error dialog */
+static GHashTable *non_intrusive_error_table = NULL;
+
 /* Private part of the GnomeCalendar structure */
 struct _GnomeCalendarPrivate {
 	/* The clients for display */
@@ -1820,6 +1823,9 @@
 	for (i = 0; i < E_CAL_SOURCE_TYPE_LAST; i++)
 		priv->clients[i] = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
 
+	if (non_intrusive_error_table == NULL)
+		non_intrusive_error_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
+
 	e_categories_register_change_listener (G_CALLBACK (categories_changed_cb), gcal);
 
 	priv->current_view_type = GNOME_CAL_DAY_VIEW;
@@ -1889,7 +1895,7 @@
 		}
 
 		for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
-			if (priv->configs[i])
+			if (priv->configs[i]) 
 				g_object_unref (priv->configs[i]);
 			priv->configs[i] = NULL;
 		}
@@ -1925,6 +1931,11 @@
 			priv->dn_queries = NULL;
 		}
 
+		if (non_intrusive_error_table) {
+			g_hash_table_destroy (non_intrusive_error_table);
+			non_intrusive_error_table = NULL;
+		}
+
 		if (priv->sexp) {
 			g_free (priv->sexp);
 			priv->sexp = NULL;
@@ -2711,6 +2722,12 @@
 	message_push ((Message *) msg);
 }
 
+static void 
+non_intrusive_error_remove(GtkWidget *w, void *data)
+{
+	g_hash_table_remove(non_intrusive_error_table, data);
+}
+
 static void
 client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal)
 {
@@ -2720,6 +2737,8 @@
 	ECalModel *model;
 	ECalLoadState state;
 	char *msg;
+	GtkWidget *w = NULL;
+	gchar *id;
 
 	priv = gcal->priv;
 
@@ -2751,14 +2770,26 @@
 			e_cal_open_async (ecal, FALSE);
 		return;
 	case E_CALENDAR_STATUS_INVALID_SERVER_VERSION:
-		e_error_run (NULL, "calendar:server-version", NULL);
+		id = g_strdup ("calendar:server-version");
+             
+		if (g_hash_table_lookup(non_intrusive_error_table, id)) {
+			/* We already have it */
+			g_message("Error occurred while existing dialog active:\n");
+			return;
+		}
+
+		w = e_error_new(NULL, "calendar:server-version", NULL);
+		e_calendar_utils_show_error_silent (w);
+		g_hash_table_insert (non_intrusive_error_table, id, g_object_ref(w));
+		g_signal_connect(w, "destroy", G_CALLBACK(non_intrusive_error_remove), id);
+
 		status = E_CALENDAR_STATUS_OK;
 		break;
 	case E_CALENDAR_STATUS_AUTHENTICATION_FAILED: 
 		{
 			const gchar *auth_domain = e_source_get_property (source, "auth-domain");
 			const gchar *component_name;
-
+			
 			component_name = auth_domain ? auth_domain : "Calendar";
 
 			/* Warn the user password is wrong */
@@ -2767,8 +2798,21 @@
 		}
 	case E_CALENDAR_STATUS_REPOSITORY_OFFLINE:
 		if (source_type == E_CAL_SOURCE_TYPE_EVENT)
-			e_error_run (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))),
-				"calendar:prompt-no-contents-offline-calendar", NULL);
+		{
+			/* check to see if we have dialog already running for this operation */
+			id = g_strdup ("calendar:unable-to-load-the-calendar");
+
+			if (g_hash_table_lookup(non_intrusive_error_table, id)) {
+				/* We already have it */
+				g_message("Error occurred while existing dialog active:\n");
+				return;
+			}
+
+			w = e_error_new(GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))), "calendar:unable-to-load-the-calendar", e_cal_get_error_message (status), NULL);
+			e_calendar_utils_show_error_silent (w);
+			g_hash_table_insert (non_intrusive_error_table, id, g_object_ref(w));
+			g_signal_connect(w, "destroy", G_CALLBACK(non_intrusive_error_remove), id);
+		}
 	default:
 		/* Make sure the source doesn't disappear on us */
 		g_object_ref (source);
@@ -2870,7 +2914,7 @@
 		g_hash_table_remove (priv->clients[source_type], e_source_peek_uid (source));
 
 		/* FIXME Is there a better way to handle this? */
-		if (priv->default_client[source_type])
+		if (priv->default_client[source_type]) 
 			g_object_unref (priv->default_client[source_type]);
 		priv->default_client[source_type] = NULL;
 
@@ -2948,21 +2992,25 @@
 	GnomeCalendar *gcal;
 	GtkDialog *dialog;
 	char *uristr;
+	gchar *id;
 
 	gcal = GNOME_CALENDAR (data);
 
 	uristr = get_uri_without_password (e_cal_get_uri (client));
+	id = g_strdup ("calendar:error-on-loading-the-calendar");
 
-	dialog = GTK_DIALOG (gtk_message_dialog_new (
-		GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))),
-		GTK_DIALOG_DESTROY_WITH_PARENT,
-		GTK_MESSAGE_ERROR,
-		GTK_BUTTONS_OK,
-		_("Error on %s:\n %s"),
-		uristr, message));
-	gtk_dialog_run (GTK_DIALOG (dialog));
-	gtk_widget_destroy (GTK_WIDGET (dialog));
+	if (g_hash_table_lookup(non_intrusive_error_table,id)) {
+		/* We already have it */
+		g_message("Error occurred while existing dialog active:\n");
+		return;
+	}
 
+	dialog = (GtkDialog *)e_error_new(GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))), "calendar:error-on-loading-the-calendar", uristr, message, NULL);
+	e_calendar_utils_show_error_silent(GTK_WIDGET (dialog));
+
+	g_hash_table_insert (non_intrusive_error_table, id, g_object_ref(dialog));
+	g_signal_connect(GTK_WIDGET (dialog), "destroy", G_CALLBACK(non_intrusive_error_remove), id);
+	
 	g_free (uristr);
 }
 
@@ -2975,6 +3023,7 @@
 	ECalSourceType source_type;
 	ESource *source;
 	const char *id;
+	GtkWidget *w = NULL;
 
 	gcal = GNOME_CALENDAR (data);
 	priv = gcal->priv;
@@ -2990,7 +3039,7 @@
 
 	switch (source_type) {
 	case E_CAL_SOURCE_TYPE_EVENT:
-		id = "calendar:calendar-crashed";
+		id = g_strdup ("calendar:calendar-crashed");
 
 		e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL, -1);
 
@@ -2998,7 +3047,7 @@
 		break;
 
 	case E_CAL_SOURCE_TYPE_TODO:
-		id = "calendar:tasks-crashed";
+		id = g_strdup ("calendar:calendar-crashed");
 
 		e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->todo), NULL, -1);
 
@@ -3006,7 +3055,7 @@
 		break;
 
 	case E_CAL_SOURCE_TYPE_JOURNAL:
-		id = "calendar:memos-crashed";
+		id = g_strdup ("calendar:calendar-crashed");
 
 		e_memo_table_set_status_message (E_MEMO_TABLE (priv->memo), NULL);
 
@@ -3018,7 +3067,16 @@
 
 	g_object_unref (source);
 
-	e_error_run (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))), id, NULL);
+	if (g_hash_table_lookup(non_intrusive_error_table,id)) {
+		/* We already have it */
+		g_message("Error occurred while existing dialog active:\n");
+		return;
+	}
+
+	w = e_error_new(GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))), "calendar:backend_died", NULL);
+	e_calendar_utils_show_error_silent (w);
+	g_hash_table_insert (non_intrusive_error_table, id, g_object_ref(w));
+	g_signal_connect((GtkObject *)w, "destroy", G_CALLBACK(non_intrusive_error_remove),id);
 }
 
 GtkWidget *
Index: calendar/gui/e-calendar-view.c
===================================================================
--- calendar/gui/e-calendar-view.c	(revision 36619)
+++ calendar/gui/e-calendar-view.c	(working copy)
@@ -2412,3 +2412,36 @@
 	}
 	cairo_close_path (cr);
 }
+
+static void 
+error_response(GtkWidget *widget, gint response, void *data)
+{
+	if (response == GTK_RESPONSE_DELETE_EVENT) 
+		gtk_widget_destroy(widget);
+	else if (response == GTK_RESPONSE_OK) 
+		gtk_widget_destroy(widget);
+}
+
+void
+e_calendar_utils_show_error_silent (GtkWidget *widget)
+{
+	EActivityHandler *handler = calendar_component_peek_activity_handler (calendar_component_peek ());
+
+	if(!g_object_get_data ((GObject *) widget, "response-handled")) {
+		g_signal_connect(widget, "response", G_CALLBACK(error_response), NULL);
+	}
+
+	e_activity_handler_make_error (handler, "calendar", E_LOG_ERROR, widget);
+}
+
+void
+e_calendar_utils_show_info_silent (GtkWidget *widget)
+{
+	EActivityHandler *handler = calendar_component_peek_activity_handler (calendar_component_peek ());
+
+	if(!g_object_get_data ((GObject *) widget, "response-handled")) {
+		g_signal_connect(widget, "response", G_CALLBACK(error_response), NULL);
+	}
+
+	e_activity_handler_make_error (handler, "calendar", E_LOG_WARNINGS, widget);
+}
Index: calendar/gui/e-calendar-view.h
===================================================================
--- calendar/gui/e-calendar-view.h	(revision 36619)
+++ calendar/gui/e-calendar-view.h	(working copy)
@@ -27,6 +27,7 @@
 #include <gtk/gtk.h>
 #include "e-cal-model.h"
 #include "gnome-cal.h"
+#include "e-activity-handler.h"
 
 G_BEGIN_DECLS
 
@@ -166,6 +167,8 @@
 					       CalObjModType mod,
 					       GtkWindow *toplevel,
 					       gboolean new);
+void e_calendar_utils_show_error_silent (struct _GtkWidget *widget);
+void e_calendar_utils_show_info_silent(struct _GtkWidget *widget);
 
 gboolean	e_calendar_view_get_tooltips (ECalendarViewEventData *data);
 
Index: calendar/gui/calendar-component.c
===================================================================
--- calendar/gui/calendar-component.c	(revision 36619)
+++ calendar/gui/calendar-component.c	(working copy)
@@ -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"
@@ -66,6 +68,8 @@
 #define CONTACTS_BASE_URI "contacts://"
 #define WEATHER_BASE_URI "weather://"
 #define PERSONAL_RELATIVE_URI "system"
+#define CALENDAR_ERROR_LEVEL_KEY "/apps/evolution/calendar/display/error_level"
+#define CALENDAR_ERROR_TIME_OUT_KEY "/apps/evolution/calendar/display/error_timeout" 
 
 enum DndTargetType {
 	DND_TARGET_TYPE_CALENDAR_LIST,
@@ -77,8 +81,9 @@
 	{ XCALENDAR_TYPE, 0, DND_TARGET_TYPE_CALENDAR_LIST }
 };
 static gint num_drag_types = sizeof(drag_types) / sizeof(drag_types[0]);
+#define CALENDAR_COMPONENT_DEFAULT(cc) if (cc == NULL) cc = calendar_component_peek()
+#define PARENT_TYPE bonobo_object_get_type ()
 
-#define PARENT_TYPE bonobo_object_get_type ()
 static BonoboObjectClass *parent_class = NULL;
 
 typedef struct
@@ -120,6 +125,9 @@
 	ESourceList *task_source_list;
 	ESourceList *memo_source_list;
 
+	EActivityHandler *activity_handler;
+        ELogger *logger;
+
 	GList *views;
 
 	ECal *create_ecal;
@@ -1433,6 +1441,8 @@
 	statusbar_widget = e_task_bar_new ();
 	component_view->activity_handler = e_activity_handler_new ();
 	e_activity_handler_attach_task_bar (component_view->activity_handler, E_TASK_BAR (statusbar_widget));
+	e_activity_handler_attach_task_bar (priv->activity_handler, E_TASK_BAR (statusbar_widget));
+
 	gtk_widget_show (statusbar_widget);
 
 	component_view->statusbar_control = bonobo_control_new (statusbar_widget);
@@ -1670,6 +1680,11 @@
 		priv->gconf_client = 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;
@@ -1706,6 +1721,7 @@
 
 	g_free (priv->base_directory);
 	g_free (priv->config_directory);
+	g_object_unref (priv->logger);
 	g_free (priv);
 
 	(* G_OBJECT_CLASS (parent_class)->finalize) (object);
@@ -1748,6 +1764,11 @@
 								 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;
 	ensure_sources (component);
 
@@ -1798,4 +1819,21 @@
 	return component->priv->source_list;
 }
 
+EActivityHandler *
+calendar_component_peek_activity_handler (CalendarComponent *component)
+{
+	CALENDAR_COMPONENT_DEFAULT(component);
+
+	return component->priv->activity_handler;
+}
+
+void
+calendar_component_show_logger (gpointer top)
+{
+	CalendarComponent *cc = calendar_component_peek ();
+	ELogger *logger = cc->priv->logger;
+
+	eni_show_logger(logger, top, CALENDAR_ERROR_TIME_OUT_KEY, CALENDAR_ERROR_LEVEL_KEY);
+}
+
 BONOBO_TYPE_FUNC_FULL (CalendarComponent, GNOME_Evolution_Component, PARENT_TYPE, calendar_component)
Index: calendar/gui/calendar-component.h
===================================================================
--- calendar/gui/calendar-component.h	(revision 36619)
+++ calendar/gui/calendar-component.h	(working copy)
@@ -60,6 +60,6 @@
 const char       *calendar_component_peek_base_directory    (CalendarComponent *component);
 const char       *calendar_component_peek_config_directory  (CalendarComponent *component);
 ESourceList      *calendar_component_peek_source_list       (CalendarComponent *component);
+void calendar_component_show_logger (gpointer);
 
-
 #endif /* _CALENDAR_COMPONENT_H_ */
Index: ui/ChangeLog
===================================================================
--- ui/ChangeLog	(revision 36619)
+++ ui/ChangeLog	(working copy)
@@ -1,3 +1,9 @@
+2008-11-03  Ashish Shrivastava  <shashish@novell.com>
+
+	** Support for Non-intrusive error in calendar.
+
+	* evolution-calendar.xml: Add menu for HelpDebug.
+
 2008-08-27  Philip Withnall  <philip@tecnocode.co.uk>
 
 	** Fix for bug #534762
Index: ui/evolution-calendar.xml
===================================================================
--- ui/evolution-calendar.xml	(revision 36619)
+++ ui/evolution-calendar.xml	(working copy)
@@ -25,6 +25,7 @@
     <cmd name="DeleteAllOccurrences" _tip="Delete all occurrences" pixtype="pixbuf"/>
     
     <cmd name="CalendarPurge" _label="Purg_e" _tip="Purge old appointments and meetings" accel="*Control*e"/>
+    <cmd name="HelpDebug" _tip="View the debug console for log messages"/>
   </commands>
 
   <menu>
@@ -71,6 +72,11 @@
 	<menuitem name="CalendarPurge" verb=""/>
     </submenu>
     </placeholder>
+    <submenu name="Help" _label="_Help">
+            <placeholder name="PlaceHolderDebug">
+                    <menuitem name="HelpDebug" verb="" _label="_Debug Logs"/>
+            </placeholder>
+   </submenu>
   </menu>
 
   <dockitem name="Toolbar">
Index: e-util/ChangeLog
===================================================================
--- e-util/ChangeLog	(revision 36619)
+++ e-util/ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2008-11-03  Ashish Shrivastava  <shashish@novell.com>
+
+	** Support for Non-intrusive error in calendar.
+
+	* Makefile.am: Added new files:
+	* e-non-intrusive-error-dialog.c, e-non-intrusive-error-dialog.h:
+
 2008-09-04  Sankar P  <psankar@novell.com>
 
 License Changes
Index: e-util/Makefile.am
===================================================================
--- e-util/Makefile.am	(revision 36619)
+++ e-util/Makefile.am	(working copy)
@@ -57,6 +57,7 @@
 	e-icon-factory.h			\
 	e-import.h				\
 	e-logger.h				\
+	e-non-intrusive-error-dialog.h		\
 	e-menu.h				\
 	e-mktemp.h				\
 	e-print.h				\
@@ -98,6 +99,7 @@
 	e-icon-factory.c			\
 	e-import.c				\
 	e-logger.c				\
+	e-non-intrusive-error-dialog.c		\
 	e-menu.c				\
 	e-mktemp.c				\
 	e-plugin.c				\
--- /dev/null	2007-09-22 03:20:58.000000000 +0530
+++ e-util/e-non-intrusive-error-dialog.c	2008-11-03 14:37:11.000000000 +0530
@@ -0,0 +1,306 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ *  Authors: Ashish Shrivastava <shashish@novell.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  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 General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <glib.h>
+#include <glib/gi18n.h>
+#include <glib/gstdio.h>
+#include <glib/gstdio.h>
+#include "e-non-intrusive-error-dialog.h"
+
+/* eni - non intrusive error */
+
+static gboolean
+eni_query_tooltip_cb (GtkTreeView *view,
+                  gint x,
+                  gint y,
+                  gboolean keyboard_mode,
+                  GtkTooltip *tooltip)
+{
+        GtkTreeViewColumn *column;
+        GtkTreeModel *model;
+        GtkTreePath *path;
+        GtkTreeIter iter;
+        gint level;
+
+        if (!gtk_tree_view_get_tooltip_context (
+                view, &x, &y, keyboard_mode, NULL, &path, &iter))
+                return FALSE;
+
+        /* Figure out which column we're pointing at. */
+        if (keyboard_mode)
+                gtk_tree_view_get_cursor (view, NULL, &column);
+        else
+                gtk_tree_view_get_path_at_pos (
+                        view, x, y, NULL, &column, NULL, NULL);
+
+        /* Restrict the tip area to a single cell. */
+        gtk_tree_view_set_tooltip_cell (view, tooltip, path, column, NULL);
+
+        /* This only works if the tree view is NOT reorderable. */
+        if (column != gtk_tree_view_get_column (view, 0))
+                return FALSE;
+
+        model = gtk_tree_view_get_model (view);
+        gtk_tree_model_get (model, &iter, COL_LEVEL, &level, -1);
+        gtk_tooltip_set_text (tooltip, ldata[level].key);
+
+        return TRUE;
+}
+
+static void
+eni_render_pixbuf (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
+               GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data)
+{
+        gint level;
+
+        gtk_tree_model_get (model, iter, COL_LEVEL, &level, -1);
+        g_object_set (
+                renderer, "stock-id", ldata[level].stock_id,
+                "stock-size", GTK_ICON_SIZE_MENU, NULL);
+}
+
+static void
+eni_render_date (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
+              GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data)
+{
+        time_t t;
+        char sdt[100]; /* Should be sufficient? */
+
+        gtk_tree_model_get (model, iter, COL_TIME, &t, -1);
+        strftime (sdt, 100, "%x %X", localtime (&t));
+        g_object_set (renderer, "text", sdt, NULL);
+}
+
+static void
+eni_append_logs (const char *txt, GtkListStore *store)
+{
+        char **str;
+
+        str = g_strsplit (txt,  ":", 3);
+        if (str[0] && str[1] && str[2]) {
+                GtkTreeIter iter;
+
+                gtk_list_store_append (store, &iter);
+                gtk_list_store_set (
+                        store, &iter,
+                        COL_LEVEL, atoi (str[0]),
+                        COL_TIME, atol (str[1]),
+                        COL_DATA, g_strstrip (str[2]),
+                        -1);
+        } else
+                g_printerr ("Unable to decode error log: %s\n", txt);
+
+        g_strfreev (str);
+}
+
+static guint
+eni_config_get_error_level (const char *path)
+{
+        GConfClient *gconf_client;
+        guint error_level;
+
+        gconf_client = gconf_client_get_default ();
+        error_level = gconf_client_get_int (gconf_client, path, NULL);
+
+        g_object_unref (gconf_client);
+        return error_level;
+}
+
+guint
+eni_config_get_error_timeout (const char *path)
+{
+        GConfClient *gconf_client;
+        guint error_time;
+
+        gconf_client = gconf_client_get_default ();
+        error_time = gconf_client_get_int (gconf_client, path, NULL);
+
+        g_object_unref (gconf_client);
+        return error_time;
+}
+
+static void
+eni_error_timeout_changed (GtkSpinButton *b, void *data)
+{
+        GConfClient *gconf_client;
+        int value = gtk_spin_button_get_value_as_int (b);
+
+        gconf_client = gconf_client_get_default ();
+
+        gconf_client_set_int (gconf_client, (char *) data, value, NULL);
+        g_object_unref (gconf_client);
+}
+
+static void
+eni_error_level_value_changed (GtkComboBox *w, gpointer *data)
+{
+        GConfClient *gconf_client;
+        int value = gtk_combo_box_get_active (w);
+
+        gconf_client = gconf_client_get_default ();
+
+        gconf_client_set_int (gconf_client, (char *) data, value, NULL);
+
+        g_object_unref (gconf_client);
+}
+
+void 
+eni_show_logger(ELogger *logger, GtkWidget *top,const char *error_timeout_path, const char *error_level_path)
+{
+	GtkWidget *container;
+	GtkWidget *label;
+	GtkWidget *toplevel;
+	GtkWidget *vbox;
+	GtkWidget *widget;
+	GtkWidget *window;
+	GtkListStore *store;
+	GtkCellRenderer *renderer;
+	GtkTreeViewColumn *column;
+	int i;
+
+	toplevel = gtk_widget_get_toplevel (top);
+
+	window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+	gtk_window_set_default_size (GTK_WINDOW (window), 500, 400);
+	gtk_window_set_title (GTK_WINDOW (window), _("Debug Logs"));
+	gtk_window_set_transient_for (
+			GTK_WINDOW (window), GTK_WINDOW (toplevel));
+	gtk_container_set_border_width (GTK_CONTAINER (window), 12);
+
+	vbox = gtk_vbox_new (FALSE, 12);
+	gtk_container_add (GTK_CONTAINER (window), vbox);
+
+	container = gtk_hbox_new (FALSE, 6);
+	gtk_box_pack_start (GTK_BOX (vbox), container, FALSE, FALSE, 0);
+
+	/* Translators: This is the first part of the sentence
+	 * "Show _errors in the status bar for" - XXX - "second(s)." */
+	widget = gtk_label_new_with_mnemonic (
+			_("Show _errors in the status bar for"));
+	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
+	label = widget;
+
+	widget = gtk_spin_button_new_with_range (1.0, 60.0, 1.0);
+	gtk_spin_button_set_value (
+			GTK_SPIN_BUTTON (widget),
+			(gdouble) eni_config_get_error_timeout (error_timeout_path));
+	g_signal_connect (
+			widget, "value-changed",
+			G_CALLBACK (eni_error_timeout_changed), error_timeout_path);
+
+	gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget);
+	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
+
+	/* Translators: This is the second part of the sentence
+	 * "Show _errors in the status bar for" - XXX - "second(s)." */
+	widget = gtk_label_new_with_mnemonic (_("second(s)."));
+	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
+
+	container = gtk_hbox_new (FALSE, 6);
+	gtk_box_pack_start (GTK_BOX (vbox), container, FALSE, FALSE, 0);
+
+	widget = gtk_label_new_with_mnemonic (_("Log Messages:"));
+	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
+	label = widget;
+
+	widget = gtk_combo_box_new_text ();
+	for (i = E_LOG_ERROR; i <= E_LOG_DEBUG; i++)
+		gtk_combo_box_append_text (
+				GTK_COMBO_BOX (widget), ldata[i].text);
+	gtk_combo_box_set_active ((GtkComboBox *) widget, eni_config_get_error_level(error_level_path));
+
+	g_signal_connect (
+			widget, "changed",
+			G_CALLBACK (eni_error_level_value_changed), error_level_path);
+
+	gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget);
+	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
+
+	store = gtk_list_store_new (3, G_TYPE_INT, G_TYPE_LONG, G_TYPE_STRING);
+	e_logger_get_logs (logger, (ELogFunction) eni_append_logs, store);
+	gtk_tree_sortable_set_sort_column_id (
+			GTK_TREE_SORTABLE (store), COL_TIME, GTK_SORT_DESCENDING);
+
+	container = gtk_scrolled_window_new (NULL, NULL);
+	gtk_scrolled_window_set_policy (
+			GTK_SCROLLED_WINDOW (container),
+			GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+	gtk_scrolled_window_set_shadow_type (
+			GTK_SCROLLED_WINDOW (container), GTK_SHADOW_IN);
+	gtk_box_pack_start (GTK_BOX (vbox), container, TRUE, TRUE, 0);
+
+	widget = gtk_tree_view_new();
+	gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (widget), TRUE);
+	gtk_tree_view_set_reorderable (GTK_TREE_VIEW (widget), FALSE);
+	gtk_tree_view_set_model (GTK_TREE_VIEW (widget), GTK_TREE_MODEL (store));
+	gtk_tree_view_set_search_column (GTK_TREE_VIEW (widget), COL_DATA);
+	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (widget), TRUE);
+	gtk_widget_set_has_tooltip (widget, TRUE);
+	gtk_container_add (GTK_CONTAINER (container), widget);
+
+	g_signal_connect (
+			widget, "query-tooltip",
+			G_CALLBACK (eni_query_tooltip_cb), NULL);
+
+	column = gtk_tree_view_column_new ();
+	gtk_tree_view_column_set_title (column, _("Log Level"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (widget), column);
+	renderer = gtk_cell_renderer_pixbuf_new ();
+	gtk_tree_view_column_pack_start (column, renderer, TRUE);
+	gtk_tree_view_column_set_cell_data_func (
+			column, renderer, eni_render_pixbuf, NULL, NULL);
+
+	column = gtk_tree_view_column_new ();
+	gtk_tree_view_column_set_title (column, _("Time"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (widget), column);
+
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (column, renderer, FALSE);
+	gtk_tree_view_column_set_cell_data_func (
+			column, renderer, eni_render_date, NULL, NULL);
+
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_insert_column_with_attributes(
+			GTK_TREE_VIEW (widget), -1, _("Messages"),
+			renderer, "markup", COL_DATA, NULL);
+
+	container = gtk_hbutton_box_new ();
+	gtk_button_box_set_layout (
+			GTK_BUTTON_BOX (container), GTK_BUTTONBOX_END);
+	gtk_box_pack_start (GTK_BOX (vbox), container, FALSE, FALSE, 0);
+
+	widget = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
+	gtk_widget_set_tooltip_text (widget, _("Close this window"));
+	g_signal_connect_swapped (
+			widget, "clicked",
+			G_CALLBACK (gtk_widget_destroy), window);
+	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
+
+	gtk_widget_show_all (window);
+}
+
--- /dev/null	2007-09-22 03:20:58.000000000 +0530
+++ e-util/e-non-intrusive-error-dialog.h	2008-11-03 14:37:11.000000000 +0530
@@ -0,0 +1,68 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ *  Authors: Ashish Shrivastava <shashish@novell.com>
+ *
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  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 General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __E_ERROR_DIALOG_H__
+#define __E_ERROR_DIALOG_H__
+
+#include <glib-object.h>
+#include "e-error.h"
+#include "e-icon-factory.h"
+#include "e-logger.h"
+#include "e-util/gconf-bridge.h"
+
+G_BEGIN_DECLS
+
+struct _log_data {
+        int level;
+        char *key;
+        char *text;
+        char *stock_id;
+        GdkPixbuf *pbuf;
+} ldata [] = {
+        { E_LOG_ERROR, N_("Error"), N_("Errors"), GTK_STOCK_DIALOG_ERROR },
+        { E_LOG_WARNINGS, N_("Warning"), N_("Warnings and Errors"), GTK_STOCK_DIALOG_WARNING },
+        { E_LOG_DEBUG, N_("Debug"), N_("Error, Warnings and Debug messages"), GTK_STOCK_DIALOG_INFO }
+};
+
+enum
+{
+        COL_LEVEL = 0,
+        COL_TIME,
+        COL_DATA
+};
+
+/* eni - error non intrusive*/
+static gboolean eni_query_tooltip_cb (GtkTreeView *view,gint x,gint y,gboolean keyboard_mode,GtkTooltip *tooltip);
+
+static void eni_render_pixbuf (GtkTreeViewColumn *column, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data);
+
+static void eni_render_date (GtkTreeViewColumn *column, GtkCellRenderer *renderer,GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data);
+
+static void eni_append_logs (const char *txt, GtkListStore *store);
+static void eni_error_timeout_changed (GtkSpinButton *b, void *data);
+static void eni_error_level_value_changed (GtkComboBox *w, gpointer *data);
+static guint eni_config_get_error_level (const char *path);
+guint eni_config_get_error_timeout (const char *path);
+void eni_show_logger(ELogger *logger, GtkWidget *widget, const char *error_timeout_path, const char *error_level_path);
+
+G_END_DECLS
+
+#endif /* __E_ERROR_DIALOG_H__ */
Index: mail/ChangeLog
===================================================================
--- mail/ChangeLog	(revision 36619)
+++ mail/ChangeLog	(working copy)
@@ -1,3 +1,11 @@
+2008-11-03  Ashish Shrivastava  <shashish@novell.com>
+
+	** Support for Non-intrusive error in calendar.
+
+	* mail-component.c: Remove common code between
+	  mailer and calendar and moved to
+	  e-util/e-non-intrusive-error-dialog.c
+
 2008-09-08  Milan Crha  <mcrha@redhat.com>
 
 	** Fix for bug #328216
Index: mail/mail-component.c
===================================================================
--- mail/mail-component.c	(revision 36619)
+++ mail/mail-component.c	(working copy)
@@ -91,6 +91,11 @@
 #include <bonobo/bonobo-control.h>
 #include <bonobo/bonobo-widget.h>
 
+#include "e-util/e-non-intrusive-error-dialog.h"
+
+#define MAILER_ERROR_LEVEL_KEY "/apps/evolution/mail/display/error_level"
+#define MAILER_ERROR_TIME_OUT_KEY "/apps/evolution/mail/display/error_timeout"
+
 #define d(x)
 
 static void create_local_item_cb(EUserCreatableItemsHandler *handler, const char *item_type_name, void *data);
@@ -1586,254 +1591,13 @@
 		e_component_view_set_button_icon (mc->priv->component_view, icon);
 }
 
-struct _log_data {
-	int level;
-	char *key;
-	char *text;
-	char *stock_id;
-	GdkPixbuf *pbuf;
-} ldata [] = {
-	{ E_LOG_ERROR, N_("Error"), N_("Errors"), GTK_STOCK_DIALOG_ERROR },
-	{ E_LOG_WARNINGS, N_("Warning"), N_("Warnings and Errors"), GTK_STOCK_DIALOG_WARNING },
-	{ E_LOG_DEBUG, N_("Debug"), N_("Error, Warnings and Debug messages"), GTK_STOCK_DIALOG_INFO }
-};
-
-enum
-{
-	COL_LEVEL = 0,
-	COL_TIME,
-	COL_DATA
-};
-
-static gboolean
-query_tooltip_cb (GtkTreeView *view,
-                  gint x,
-                  gint y,
-                  gboolean keyboard_mode,
-                  GtkTooltip *tooltip)
-{
-	GtkTreeViewColumn *column;
-	GtkTreeModel *model;
-	GtkTreePath *path;
-	GtkTreeIter iter;
-	gint level;
-
-	if (!gtk_tree_view_get_tooltip_context (
-		view, &x, &y, keyboard_mode, NULL, &path, &iter))
-		return FALSE;
-
-	/* Figure out which column we're pointing at. */
-	if (keyboard_mode)
-		gtk_tree_view_get_cursor (view, NULL, &column);
-	else
-		gtk_tree_view_get_path_at_pos (
-			view, x, y, NULL, &column, NULL, NULL);
-
-	/* Restrict the tip area to a single cell. */
-	gtk_tree_view_set_tooltip_cell (view, tooltip, path, column, NULL);
-
-	/* This only works if the tree view is NOT reorderable. */
-	if (column != gtk_tree_view_get_column (view, 0))
-		return FALSE;
-
-	model = gtk_tree_view_get_model (view);
-	gtk_tree_model_get (model, &iter, COL_LEVEL, &level, -1);
-	gtk_tooltip_set_text (tooltip, ldata[level].key);
-
-	return TRUE;
-}
-
-static void
-render_pixbuf (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
-	       GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data)
-{
-	gint level;
-
-	gtk_tree_model_get (model, iter, COL_LEVEL, &level, -1);
-	g_object_set (
-		renderer, "stock-id", ldata[level].stock_id,
-		"stock-size", GTK_ICON_SIZE_MENU, NULL);
-}
-
-static void
-render_date (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
-	      GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data)
-{
-	time_t t;
-	char sdt[100]; /* Should be sufficient? */
-	
-	gtk_tree_model_get (model, iter, COL_TIME, &t, -1);
-	strftime (sdt, 100, "%x %X", localtime (&t));
-	g_object_set (renderer, "text", sdt, NULL);
-}
-
-
-
-static void
-append_logs (const char *txt, GtkListStore *store)
-{
-	char **str;
-	
-	str = g_strsplit (txt, 	":", 3);
-	if (str[0] && str[1] && str[2]) {
-		GtkTreeIter iter;
-
-		gtk_list_store_append (store, &iter);
-		gtk_list_store_set (
-			store, &iter,
-			COL_LEVEL, atoi (str[0]),
-			COL_TIME, atol (str[1]),
-			COL_DATA, g_strstrip (str[2]),
-			-1);
-	} else 
-		g_printerr ("Unable to decode error log: %s\n", txt);
-	
-	g_strfreev (str);
-}
-
-static void
-spin_value_changed (GtkSpinButton *b, gpointer data)
-{
-	int value = gtk_spin_button_get_value_as_int (b);
-	GConfClient *client = mail_config_get_gconf_client ();
-
-	gconf_client_set_int (client, "/apps/evolution/mail/display/error_timeout", value, NULL);
-}
-
 void
 mail_component_show_logger (gpointer top)
 {
 	MailComponent *mc = mail_component_peek ();
-	GConfBridge *bridge;
-	GtkWidget *container;
-	GtkWidget *label;
-	GtkWidget *toplevel;
-	GtkWidget *vbox;
-	GtkWidget *widget;
-	GtkWidget *window;
 	ELogger *logger = mc->priv->logger;
-	int i;
-	GtkListStore *store;
-	GtkCellRenderer *renderer;
-	GtkTreeViewColumn *column;
 
-	bridge = gconf_bridge_get ();
-	toplevel = gtk_widget_get_toplevel (top);
-
-	window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-	gtk_window_set_default_size (GTK_WINDOW (window), 500, 400);
-	gtk_window_set_title (GTK_WINDOW (window), _("Debug Logs"));
-	gtk_window_set_transient_for (
-		GTK_WINDOW (window), GTK_WINDOW (toplevel));
-	gtk_container_set_border_width (GTK_CONTAINER (window), 12);
-
-	vbox = gtk_vbox_new (FALSE, 12);
-	gtk_container_add (GTK_CONTAINER (window), vbox);
-
-	container = gtk_hbox_new (FALSE, 6);	
-	gtk_box_pack_start (GTK_BOX (vbox), container, FALSE, FALSE, 0);
-
-	/* Translators: This is the first part of the sentence
-	 * "Show _errors in the status bar for" - XXX - "second(s)." */
-	widget = gtk_label_new_with_mnemonic (
-		_("Show _errors in the status bar for"));
-	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
-	label = widget;
-
-	widget = gtk_spin_button_new_with_range (1.0, 60.0, 1.0);
-	gtk_spin_button_set_value (
-		GTK_SPIN_BUTTON (widget),
-		(gdouble) mail_config_get_error_timeout ());
-	g_signal_connect (
-		widget, "value-changed",
-		G_CALLBACK (spin_value_changed), NULL);
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget);
-	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
-
-	/* Translators: This is the second part of the sentence
-	 * "Show _errors in the status bar for" - XXX - "second(s)." */
-	widget = gtk_label_new_with_mnemonic (_("second(s)."));
-	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
-
-	container = gtk_hbox_new (FALSE, 6);
-	gtk_box_pack_start (GTK_BOX (vbox), container, FALSE, FALSE, 0);
-
-	widget = gtk_label_new_with_mnemonic (_("Log Messages:"));
-	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
-	label = widget;
-
-	widget = gtk_combo_box_new_text ();
-	for (i = E_LOG_ERROR; i <= E_LOG_DEBUG; i++)
-		gtk_combo_box_append_text (
-			GTK_COMBO_BOX (widget), ldata[i].text);
-	gconf_bridge_bind_property (
-		bridge, "/apps/evolution/mail/display/error_level",
-		G_OBJECT (widget), "active");
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget);
-	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
-
-	store = gtk_list_store_new (3, G_TYPE_INT, G_TYPE_LONG, G_TYPE_STRING);
-	e_logger_get_logs (logger, (ELogFunction) append_logs, store); 
-	gtk_tree_sortable_set_sort_column_id (
-		GTK_TREE_SORTABLE (store), COL_TIME, GTK_SORT_DESCENDING);
-
-	container = gtk_scrolled_window_new (NULL, NULL);
-	gtk_scrolled_window_set_policy (
-		GTK_SCROLLED_WINDOW (container),
-		GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-	gtk_scrolled_window_set_shadow_type (
-		GTK_SCROLLED_WINDOW (container), GTK_SHADOW_IN);
-	gtk_box_pack_start (GTK_BOX (vbox), container, TRUE, TRUE, 0);
-
-	widget = gtk_tree_view_new();
-	gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (widget), TRUE);	
-	gtk_tree_view_set_reorderable (GTK_TREE_VIEW (widget), FALSE);
-	gtk_tree_view_set_model (GTK_TREE_VIEW (widget), GTK_TREE_MODEL (store));
-	gtk_tree_view_set_search_column (GTK_TREE_VIEW (widget), COL_DATA);
-	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (widget), TRUE);
-	gtk_widget_set_has_tooltip (widget, TRUE);
-	gtk_container_add (GTK_CONTAINER (container), widget);
-
-	g_signal_connect (
-		widget, "query-tooltip",
-		G_CALLBACK (query_tooltip_cb), NULL);
-
-	column = gtk_tree_view_column_new ();
-	gtk_tree_view_column_set_title (column, _("Log Level"));
-	gtk_tree_view_append_column (GTK_TREE_VIEW (widget), column);
-
-	renderer = gtk_cell_renderer_pixbuf_new ();
-	gtk_tree_view_column_pack_start (column, renderer, TRUE);
-	gtk_tree_view_column_set_cell_data_func (
-		column, renderer, render_pixbuf, NULL, NULL);
-
-	column = gtk_tree_view_column_new ();
-	gtk_tree_view_column_set_title (column, _("Time"));	
-	gtk_tree_view_append_column (GTK_TREE_VIEW (widget), column);
-
-	renderer = gtk_cell_renderer_text_new ();
-	gtk_tree_view_column_pack_start (column, renderer, FALSE);
-	gtk_tree_view_column_set_cell_data_func (
-		column, renderer, render_date, NULL, NULL);
-
-	renderer = gtk_cell_renderer_text_new ();
-	gtk_tree_view_insert_column_with_attributes(
-		GTK_TREE_VIEW (widget), -1, _("Messages"),
-		renderer, "markup", COL_DATA, NULL);
-
-	container = gtk_hbutton_box_new ();
-	gtk_button_box_set_layout (
-		GTK_BUTTON_BOX (container), GTK_BUTTONBOX_END);
-	gtk_box_pack_start (GTK_BOX (vbox), container, FALSE, FALSE, 0);
-
-	widget = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
-	gtk_widget_set_tooltip_text (widget, _("Close this window"));
-	g_signal_connect_swapped (
-		widget, "clicked",
-		G_CALLBACK (gtk_widget_destroy), window);
-	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
-
-	gtk_widget_show_all (window);
+	eni_show_logger(logger, top, MAILER_ERROR_TIME_OUT_KEY, MAILER_ERROR_LEVEL_KEY);
 }
 
 BONOBO_TYPE_FUNC_FULL (MailComponent, GNOME_Evolution_MailComponent, PARENT_TYPE, mail_component)
