Index: calendar/libedata-cal/e-cal-backend-util.c
===================================================================
--- calendar/libedata-cal/e-cal-backend-util.c	(revision 8990)
+++ calendar/libedata-cal/e-cal-backend-util.c	(working copy)
@@ -20,7 +20,12 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <string.h>
+#include <glib/gi18n-lib.h>
 #include "e-cal-backend-util.h"
 #include "libedataserver/e-account-list.h"
 
@@ -77,3 +82,64 @@ e_cal_backend_mail_account_is_valid (cha
 
 	return account != NULL;
 }
+
+/**
+ * e_cal_backend_status_to_string:
+ *
+ * Converts status code to string.
+ **/
+const char *
+e_cal_backend_status_to_string (GNOME_Evolution_Calendar_CallStatus status)
+{
+	switch (status) {
+	case GNOME_Evolution_Calendar_Success:
+		return _("No error");
+	case GNOME_Evolution_Calendar_RepositoryOffline:
+		return _("Repository is offline");
+	case GNOME_Evolution_Calendar_PermissionDenied:
+		return _("Permission denied");
+	case GNOME_Evolution_Calendar_InvalidRange:
+		return _("Invalid range");
+	case GNOME_Evolution_Calendar_ObjectNotFound:
+		return _("Object not found");
+	case GNOME_Evolution_Calendar_InvalidObject:
+		return _("Invalid object");
+	case GNOME_Evolution_Calendar_ObjectIdAlreadyExists:
+		return _("Object ID already exists");
+	case GNOME_Evolution_Calendar_AuthenticationFailed:
+		return _("Authentication failed");
+	case GNOME_Evolution_Calendar_AuthenticationRequired:
+		return _("Authentication required");
+	case GNOME_Evolution_Calendar_UnsupportedField:
+		return _("Unsupported field");
+	case GNOME_Evolution_Calendar_UnsupportedMethod:
+		return _("Unsupported method");
+	case GNOME_Evolution_Calendar_UnsupportedAuthenticationMethod:
+		return _("Unsupported authentication method");
+	case GNOME_Evolution_Calendar_TLSNotAvailable:
+		return _("TLS not available");
+	case GNOME_Evolution_Calendar_NoSuchCal:
+		return _("No such calendar");
+	case GNOME_Evolution_Calendar_UnknownUser:
+		return _("Unknown User");
+	case GNOME_Evolution_Calendar_OfflineUnavailable:
+		return _("Offline unavailable");
+	case GNOME_Evolution_Calendar_SearchSizeLimitExceeded:
+		return _("Search size limit exceeded");
+	case GNOME_Evolution_Calendar_SearchTimeLimitExceeded:
+		return _("Search time limit exceeded");
+	case GNOME_Evolution_Calendar_InvalidQuery:
+		return _("Invalid query");
+	case GNOME_Evolution_Calendar_QueryRefused:
+		return _("Query refused");
+	case GNOME_Evolution_Calendar_CouldNotCancel:
+		return _("Could not cancel operation");
+	default:
+	case GNOME_Evolution_Calendar_OtherError:
+		return _("Unknown error");
+	case GNOME_Evolution_Calendar_InvalidServerVersion:
+		return _("Invalid server version");
+	}
+
+	return NULL;
+}
Index: calendar/libedata-cal/e-cal-backend-util.h
===================================================================
--- calendar/libedata-cal/e-cal-backend-util.h	(revision 8990)
+++ calendar/libedata-cal/e-cal-backend-util.h	(working copy)
@@ -34,6 +34,8 @@ G_BEGIN_DECLS
 gboolean e_cal_backend_mail_account_get_default (char **address, char **name);
 gboolean e_cal_backend_mail_account_is_valid (char *user, char **name);
 
+const char *e_cal_backend_status_to_string (GNOME_Evolution_Calendar_CallStatus status);
+
 G_END_DECLS
 
 #endif
Index: calendar/ChangeLog
===================================================================
--- calendar/ChangeLog	(revision 8990)
+++ calendar/ChangeLog	(working copy)
@@ -1,3 +1,16 @@
+2008-06-18  Milan Crha  <mcrha@redhat.com>
+
+	** Fix for bug #515998
+
+	* libedata-cal/e-cal-backend-util.h: (e_cal_backend_status_to_string):
+	* libedata-cal/e-cal-backend-util.c: (e_cal_backend_status_to_string):
+	New helper function to convert call status to the string.
+	* backends/file/e-cal-backend-file.c: (e_cal_backend_file_remove):
+	* backends/caldav/e-cal-backend-caldav.c: (caldav_remove):
+	* backends/weather/e-cal-backend-weather.c:
+	(e_cal_backend_weather_remove): On any error in remove calendar just
+	print the message on the console and return success.
+
 2008-06-13  Milan Crha  <mcrha@redhat.com>
 
 	** Fix for bug #534080
Index: calendar/backends/file/e-cal-backend-file.c
===================================================================
--- calendar/backends/file/e-cal-backend-file.c	(revision 8990)
+++ calendar/backends/file/e-cal-backend-file.c	(working copy)
@@ -1021,7 +1021,12 @@ e_cal_backend_file_remove (ECalBackendSy
         g_free (full_path);
 
         g_static_rec_mutex_unlock (&priv->idle_save_rmutex);
-        return status;
+
+	/* lie here a bit, but otherwise the calendar will not be removed, even it should */
+	if (status != GNOME_Evolution_Calendar_Success)
+		g_print (G_STRLOC ": %s", e_cal_backend_status_to_string (status));
+
+        return GNOME_Evolution_Calendar_Success;
 }
 
 /* is_loaded handler for the file backend */
Index: calendar/backends/weather/e-cal-backend-weather.c
===================================================================
--- calendar/backends/weather/e-cal-backend-weather.c	(revision 8990)
+++ calendar/backends/weather/e-cal-backend-weather.c	(working copy)
@@ -495,8 +495,11 @@ e_cal_backend_weather_remove (ECalBacken
 	cbw = E_CAL_BACKEND_WEATHER (backend);
 	priv = cbw->priv;
 
-	if (!priv->cache)
-		return GNOME_Evolution_Calendar_OtherError;
+	if (!priv->cache) {
+		/* lie here a bit, but otherwise the calendar will not be removed, even it should */
+		g_print (G_STRLOC ": Doesn't have a cache?!?");
+		return GNOME_Evolution_Calendar_Success;
+	}
 
 	e_file_cache_remove (E_FILE_CACHE (priv->cache));
 	return GNOME_Evolution_Calendar_Success;
Index: calendar/backends/caldav/e-cal-backend-caldav.c
===================================================================
--- calendar/backends/caldav/e-cal-backend-caldav.c	(revision 8990)
+++ calendar/backends/caldav/e-cal-backend-caldav.c	(working copy)
@@ -1611,10 +1611,9 @@ caldav_remove (ECalBackendSync *backend,
 
 	status = check_state (cbdav, &online);
 
-	if (status != GNOME_Evolution_Calendar_Success) {
-		g_mutex_unlock (priv->lock);
-		return status;
-	}
+	/* lie here a bit, but otherwise the calendar will not be removed, even it should */
+	if (status != GNOME_Evolution_Calendar_Success)
+		g_print (G_STRLOC ": %s", e_cal_backend_status_to_string (status));
 
 	e_file_cache_remove (E_FILE_CACHE (priv->cache));
 	priv->cache  = NULL;
