From 47f01927e15b6eb279d2cbf046b2707467096666 Mon Sep 17 00:00:00 2001 From: Eskil Heyn Olsen Date: Fri, 22 Oct 1999 01:16:15 +0000 Subject: now it doesn't build todo conduit anymore. Since the conduit is just a * Makefile.am: now it doesn't build todo conduit anymore. Since the conduit is just a skeleton, no need to build and install it. * calendar-conduit-control-applet.c: revamped for all the changes in calendar-conduit.h. Also fixed the pilotId bug that all conduit capplets had. * calendar-conduit-control-applet.desktop: renamed to GnomeCalendar. * calendar-conduit.h: Fixed namespace pollution, appended GCal to structures, gcalconduit to methods. Introduced the GCalConduitContext. * calendar-conduit.c: No more global variables, all is contained in a GCalConduitContext variable, that all the signals are passed as user data. svn path=/trunk/; revision=1338 --- calendar/gui/todo-conduit-control-applet.c | 46 +++++++++++++++--------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'calendar/gui/todo-conduit-control-applet.c') diff --git a/calendar/gui/todo-conduit-control-applet.c b/calendar/gui/todo-conduit-control-applet.c index 973a6192c8..54a26715ef 100644 --- a/calendar/gui/todo-conduit-control-applet.c +++ b/calendar/gui/todo-conduit-control-applet.c @@ -38,7 +38,7 @@ static void doSaveSettings(GtkWidget *widget, ConduitCfg *conduitCfg); static void readStateCfg(GtkWidget *w); static void setStateCfg(GtkWidget *w); -gchar *pilotId; +gint pilotId; CORBA_Environment ev; static void @@ -223,28 +223,29 @@ void run_error_dialog(gchar *mesg,...) { va_end(ap); } -gchar *get_pilot_id_from_gpilotd() { - gchar **pilots; - int i; +gint get_pilot_id_from_gpilotd() { + gint *pilots; + int i; - i=0; - gpilotd_get_pilots(&pilots); - if(pilots) { - while(pilots[i]) { g_message("pilot %d = \"%s\"",i,pilots[i]); i++; } - if(i==0) { - run_error_dialog(_("No pilot configured, please choose the\n'Pilot Link Properties' capplet first.")); - return NULL; - } else - if(i==1) - return pilots[0]; - else { - g_message("too many pilots..."); - return pilots[0]; - } - } else { - run_error_dialog(_("No pilot configured, please choose the\n'Pilot Link Properties' capplet first.")); - return NULL; - } + i=0; + gpilotd_get_pilot_ids(&pilots); + if(pilots) { + while(pilots[i]!=-1) { g_message("pilot %d = \"%d\"",i,pilots[i]); i++; } + if(i==0) { + run_error_dialog(_("No pilot configured, please choose the\n'Pilot Link Properties' capplet first.")); + return -1; + } else { + if(i==1) + return pilots[0]; + else { + g_message("too many pilots..."); + return pilots[0]; + } + } + } else { + run_error_dialog(_("No pilot configured, please choose the\n'Pilot Link Properties' capplet first.")); + return -1; + } } int @@ -282,6 +283,5 @@ main( int argc, char *argv[] ) /* done setting up, now run main loop */ capplet_gtk_main(); - g_free(pilotId); return 0; } -- cgit v1.2.3