diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2003-02-08 02:47:06 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2003-02-08 02:47:06 +0800 |
commit | 9db9608ceaf67ad0864d33a3eb558be8c30fe63c (patch) | |
tree | b81b8eb9e8f27072e358e7031d4aab4bd2def89a | |
parent | e359fec5c833af3dfea0745ed986fccb168bec1c (diff) | |
download | gsoc2013-evolution-9db9608ceaf67ad0864d33a3eb558be8c30fe63c.tar.gz gsoc2013-evolution-9db9608ceaf67ad0864d33a3eb558be8c30fe63c.tar.zst gsoc2013-evolution-9db9608ceaf67ad0864d33a3eb558be8c30fe63c.zip |
Fixes #37706
2003-02-07 Rodrigo Moya <rodrigo@ximian.com>
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
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/gui/comp-editor-factory.c | 20 |
2 files changed, 25 insertions, 2 deletions
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 <rodrigo@ximian.com> + + 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 <ettore@ximian.com> * 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 <config.h> #endif +#include <gtk/gtkmessagedialog.h> #include <bonobo/bonobo-exception.h> +#include <bonobo/bonobo-i18n.h> #include <evolution-calendar.h> #include <e-util/e-url.h> #include <cal-client/cal-client.h> @@ -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); } |