aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gnome-cal.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2002-03-15 22:05:33 +0800
committerJP Rosevear <jpr@src.gnome.org>2002-03-15 22:05:33 +0800
commitac6299d7a485294d6090835b9942ea061c5279cf (patch)
tree00ce693ce5cde7f4502a63b3ae49f04be0131b2f /calendar/gui/gnome-cal.c
parent02d39bf7b3fa10dbd8cbf21c13b842bcf69ff64a (diff)
downloadgsoc2013-evolution-ac6299d7a485294d6090835b9942ea061c5279cf.tar.gz
gsoc2013-evolution-ac6299d7a485294d6090835b9942ea061c5279cf.tar.zst
gsoc2013-evolution-ac6299d7a485294d6090835b9942ea061c5279cf.zip
use bonobo exception macros to tidy
2002-03-15 JP Rosevear <jpr@ximian.com> * 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
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r--calendar/gui/gnome-cal.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 0799c6a218..9ff815211e 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -35,6 +35,7 @@
#include <libgnomeui/gnome-dialog.h>
#include <libgnomeui/gnome-dialog-util.h>
#include <liboaf/liboaf.h>
+#include <bonobo/bonobo-exception.h>
#include <gal/e-paned/e-hpaned.h>
#include <gal/e-paned/e-vpaned.h>
#include "e-util/e-url.h"
@@ -1801,7 +1802,7 @@ add_alarms (const char *uri)
CORBA_exception_init (&ev);
an = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify", 0, NULL, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
+ if (BONOBO_EX (&ev)) {
g_message ("add_alarms(): Could not activate the alarm notification service");
CORBA_exception_free (&ev);
return;
@@ -1813,18 +1814,13 @@ add_alarms (const char *uri)
CORBA_exception_init (&ev);
GNOME_Evolution_Calendar_AlarmNotify_addCalendar (an, uri, &ev);
- if (ev._major == CORBA_USER_EXCEPTION) {
- char *ex_id;
-
- ex_id = CORBA_exception_id (&ev);
- if (strcmp (ex_id, ex_GNOME_Evolution_Calendar_AlarmNotify_InvalidURI) == 0)
- g_message ("add_calendar(): Invalid URI reported from the "
- "alarm notification service");
- else if (strcmp (ex_id,
- ex_GNOME_Evolution_Calendar_AlarmNotify_BackendContactError) == 0)
- g_message ("add_calendar(): The alarm notification service could "
- "not contact the backend");
- } else if (ev._major != CORBA_NO_EXCEPTION)
+ if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_AlarmNotify_InvalidURI))
+ g_message ("add_calendar(): Invalid URI reported from the "
+ "alarm notification service");
+ else if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_AlarmNotify_BackendContactError))
+ g_message ("add_calendar(): The alarm notification service could "
+ "not contact the backend");
+ else if (BONOBO_EX (&ev))
g_message ("add_calendar(): Could not issue the addCalendar request");
CORBA_exception_free (&ev);
@@ -1833,7 +1829,7 @@ add_alarms (const char *uri)
CORBA_exception_init (&ev);
bonobo_object_release_unref (an, &ev);
- if (ev._major != CORBA_NO_EXCEPTION)
+ if (BONOBO_EX (&ev))
g_message ("add_alarms(): Could not unref the alarm notification service");
CORBA_exception_free (&ev);