From 9db9608ceaf67ad0864d33a3eb558be8c30fe63c Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Fri, 7 Feb 2003 18:47:06 +0000 Subject: Fixes #37706 2003-02-07 Rodrigo Moya Fixes #37706 * gui/comp-editor-factory.c (cal_opened_cb): added PERMISSION_DENIED case for not ending process on g_assert_not_reached. svn path=/trunk/; revision=19845 --- calendar/ChangeLog | 7 +++++++ calendar/gui/comp-editor-factory.c | 20 ++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index d085efacee..f3276cd515 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2003-02-07 Rodrigo Moya + + Fixes #37706 + + * gui/comp-editor-factory.c (cal_opened_cb): added PERMISSION_DENIED + case for not ending process on g_assert_not_reached. + 2003-02-06 Ettore Perazzoli * gui/e-day-view-time-item.c diff --git a/calendar/gui/comp-editor-factory.c b/calendar/gui/comp-editor-factory.c index 60b59f3b9e..2588d9be59 100644 --- a/calendar/gui/comp-editor-factory.c +++ b/calendar/gui/comp-editor-factory.c @@ -22,7 +22,9 @@ #include #endif +#include #include +#include #include #include #include @@ -437,6 +439,7 @@ cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data) OpenClient *oc; CompEditorFactory *factory; CompEditorFactoryPrivate *priv; + GtkWidget *dialog = NULL; oc = data; factory = oc->factory; @@ -449,7 +452,9 @@ cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data) return; case CAL_CLIENT_OPEN_ERROR: - g_message ("cal_opened_cb(): Error while opening the calendar"); + dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, + GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, + _("Error while opening the calendar")); break; case CAL_CLIENT_OPEN_NOT_FOUND: @@ -458,14 +463,25 @@ cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data) return; case CAL_CLIENT_OPEN_METHOD_NOT_SUPPORTED: - g_message ("cal_opened_cb(): Method not supported when opening the calendar"); + dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, + GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, + _("Method not supported when opening the calendar")); break; + case CAL_CLIENT_OPEN_PERMISSION_DENIED : + dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, + GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, + _("Permission denied to open the calendar")); + break; + default: g_assert_not_reached (); return; } + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + g_hash_table_remove (priv->uri_client_hash, oc->uri); free_client (oc); } -- cgit