aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-conduit-control-applet.c
diff options
context:
space:
mode:
authorEskil Heyn Olsen <eskil@src.gnome.org>1999-10-06 23:23:18 +0800
committerEskil Heyn Olsen <eskil@src.gnome.org>1999-10-06 23:23:18 +0800
commitfe4a9b93de19146309bf95f3ebaf1314069c1503 (patch)
treebf30984d9d13c663b3e1eb80d49b468b4ca182b6 /calendar/gui/calendar-conduit-control-applet.c
parentf0ba84bd71a02e1b6af050d6f3f6d2d31d08a3e5 (diff)
downloadgsoc2013-evolution-fe4a9b93de19146309bf95f3ebaf1314069c1503.tar.gz
gsoc2013-evolution-fe4a9b93de19146309bf95f3ebaf1314069c1503.tar.zst
gsoc2013-evolution-fe4a9b93de19146309bf95f3ebaf1314069c1503.zip
checks return values from gpilotd_init/connect.
* *conduit*[ch]: checks return values from gpilotd_init/connect. * calender.c (vcalendar_create_from_calendar): removed a set of cleanVObject cleanStrTbl, since the freed memory that the function returned. svn path=/trunk/; revision=1319
Diffstat (limited to 'calendar/gui/calendar-conduit-control-applet.c')
-rw-r--r--calendar/gui/calendar-conduit-control-applet.c51
1 files changed, 30 insertions, 21 deletions
diff --git a/calendar/gui/calendar-conduit-control-applet.c b/calendar/gui/calendar-conduit-control-applet.c
index 44ca3d7898..4b18ae920f 100644
--- a/calendar/gui/calendar-conduit-control-applet.c
+++ b/calendar/gui/calendar-conduit-control-applet.c
@@ -251,29 +251,38 @@ gchar *get_pilot_id_from_gpilotd() {
int
main( int argc, char *argv[] )
{
- /* we're a capplet */
- gnome_capplet_init ("calendar conduit control applet", NULL, argc, argv,
- NULL,
- 0, NULL);
-
- /* put all code to set things up in here */
- conduit = gpilotd_conduit_mgmt_new("calendar_conduit");
-
- /* get pilot name from gpilotd */
- /* 1. initialize the gpilotd connection */
- gpilotd_init(&argc,argv);
- /* 2 connect to gpilotd */
- if(!gpilotd_connect()) g_error("Cannot connect to gpilotd");
+ /* we're a capplet */
+ gnome_capplet_init ("calendar conduit control applet", NULL, argc, argv,
+ NULL,
+ 0, NULL);
+
+ /* put all code to set things up in here */
+ conduit = gpilotd_conduit_mgmt_new("calendar_conduit");
+
+ /* get pilot name from gpilotd */
+ /* 1. initialize the gpilotd connection */
+ if (gpilotd_init(&argc,argv)!=0) {
+ run_error_dialog(_("Cannot initialze the GnomePilot Daemon"));
+ g_error(_("Cannot initialze the GnomePilot Daemon"));
+ return -1;
+ }
+
+ /* 2 connect to gpilotd */
+ if (gpilotd_connect()!=0) {
+ run_error_dialog(_("Cannot connect to the GnomePilot Daemon"));
+ g_error(_("Cannot connect to the GnomePilot Daemon"));
+ return -1;
+ }
- pilotId = get_pilot_id_from_gpilotd();
- if(!pilotId) return -1;
- org_activation_state = activated = gpilotd_conduit_mgmt_is_enabled(conduit,pilotId);
+ pilotId = get_pilot_id_from_gpilotd();
+ if(!pilotId) return -1;
+ org_activation_state = activated = gpilotd_conduit_mgmt_is_enabled(conduit,pilotId);
- pilot_capplet_setup();
+ pilot_capplet_setup();
- /* done setting up, now run main loop */
- capplet_gtk_main();
- g_free(pilotId);
- return 0;
+ /* done setting up, now run main loop */
+ capplet_gtk_main();
+ g_free(pilotId);
+ return 0;
}