From ac6299d7a485294d6090835b9942ea061c5279cf Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Fri, 15 Mar 2002 14:05:33 +0000 Subject: use bonobo exception macros to tidy 2002-03-15 JP Rosevear * gui/main.c: use bonobo exception macros to tidy * gui/itip-control-factory.c: ditto * gui/gnome-cal.c: ditto * gui/comp-editor-factory.c: ditto * gui/calendar-commands.c: ditto svn path=/trunk/; revision=16172 --- calendar/gui/itip-control-factory.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'calendar/gui/itip-control-factory.c') diff --git a/calendar/gui/itip-control-factory.c b/calendar/gui/itip-control-factory.c index 54681346cc..d05cee6d9a 100644 --- a/calendar/gui/itip-control-factory.c +++ b/calendar/gui/itip-control-factory.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include "e-itip-control.h" @@ -63,7 +64,7 @@ stream_read (Bonobo_Stream stream) Bonobo_Stream_read (stream, READ_CHUNK_SIZE, &buffer, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { + if (BONOBO_EX (&ev)) { CORBA_exception_free (&ev); return NULL; } @@ -101,15 +102,13 @@ pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream, gchar *text; if (type && g_strcasecmp (type, "text/calendar") != 0 && - g_strcasecmp (type, "text/x-calendar") != 0) { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Bonobo_Persist_WrongDataType, NULL); + g_strcasecmp (type, "text/x-calendar") != 0) { + bonobo_exception_set (ev, ex_Bonobo_Persist_WrongDataType); return; } if ((text = stream_read (stream)) == NULL) { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Bonobo_Persist_FileNotFound, NULL); + bonobo_exception_set (ev, ex_Bonobo_Persist_FileNotFound); return; } @@ -130,8 +129,7 @@ pstream_save (BonoboPersistStream *ps, const Bonobo_Stream stream, if (type && g_strcasecmp (type, "text/calendar") != 0 && g_strcasecmp (type, "text/x-calendar") != 0) { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Bonobo_Persist_WrongDataType, NULL); + bonobo_exception_set (ev, ex_Bonobo_Persist_WrongDataType); return; } -- cgit v1.2.3