From 35313309b875cc3316619583530134cd7d029731 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Mon, 27 Jan 2003 06:06:21 +0000 Subject: fix warning. (get_default_timezone): BonoboConfigDatabase -> 2003-01-26 Chris Toshok * conduits/calendar/calendar-conduit.c (start_calendar_server): fix warning. (get_default_timezone): BonoboConfigDatabase -> e_config_listener. (accept_all_cookies): remove. (conduit_get_gpilot_conduit): remove the oaf initialization stuff. * conduits/todo/todo-conduit.c (start_calendar_server): fix warning. (get_default_timezone): BonoboConfigDatabase -> e_config_listener. (accept_all_cookies): remove. (conduit_get_gpilot_conduit): remove the oaf initialization stuff. * Makefile.am (CONDUIT_DIR): uncomment the conduit stuff. svn path=/trunk/; revision=19642 --- calendar/ChangeLog | 16 +++++++++ calendar/Makefile.am | 13 ++++--- calendar/conduits/calendar/calendar-conduit.c | 50 ++++---------------------- calendar/conduits/todo/todo-conduit.c | 51 ++++----------------------- 4 files changed, 36 insertions(+), 94 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index b15c83f3ec..573d597138 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,19 @@ +2003-01-26 Chris Toshok + + * conduits/calendar/calendar-conduit.c (start_calendar_server): + fix warning. + (get_default_timezone): BonoboConfigDatabase -> e_config_listener. + (accept_all_cookies): remove. + (conduit_get_gpilot_conduit): remove the oaf initialization stuff. + + * conduits/todo/todo-conduit.c (start_calendar_server): + fix warning. + (get_default_timezone): BonoboConfigDatabase -> e_config_listener. + (accept_all_cookies): remove. + (conduit_get_gpilot_conduit): remove the oaf initialization stuff. + + * Makefile.am (CONDUIT_DIR): uncomment the conduit stuff. + 2003-01-26 Hans Petter Jansson Make clicks, drags and resizes work, and pangoize remaining strings. diff --git a/calendar/Makefile.am b/calendar/Makefile.am index 1d7e5941db..0e4c8d28eb 100644 --- a/calendar/Makefile.am +++ b/calendar/Makefile.am @@ -1,10 +1,9 @@ -# if ENABLE_PILOT_CONDUITS -# CONDUIT_DIR = conduits -# else -# CONDUIT_DIR = -# endif +if ENABLE_PILOT_CONDUITS +CONDUIT_DIR = conduits +else +CONDUIT_DIR = +endif -# SUBDIRS = idl cal-util pcs cal-client gui $(CONDUIT_DIR) -SUBDIRS = idl cal-util pcs cal-client gui +SUBDIRS = idl cal-util pcs cal-client gui $(CONDUIT_DIR) EXTRA_DIST = zones.h diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c index 6ebaca44d4..a454190764 100644 --- a/calendar/conduits/calendar/calendar-conduit.c +++ b/calendar/conduits/calendar/calendar-conduit.c @@ -23,8 +23,6 @@ #include -#include -#include #include #include #include @@ -39,6 +37,7 @@ #include #include #include +#include GnomePilotConduit * conduit_get_gpilot_conduit (guint32); void conduit_destroy_gpilot_conduit (GnomePilotConduit*); @@ -407,7 +406,7 @@ start_calendar_server (ECalConduitContext *ctxt) ctxt->client = cal_client_new (); gtk_signal_connect (GTK_OBJECT (ctxt->client), "cal_opened", - start_calendar_server_cb, &success); + (GtkSignalFunc)start_calendar_server_cb, &success); if (!cal_client_open_default_calendar (ctxt->client, FALSE)) return -1; @@ -438,24 +437,14 @@ get_timezone (CalClient *client, const char *tzid) static icaltimezone * get_default_timezone (void) { - Bonobo_ConfigDatabase db; + EConfigListener *listener; icaltimezone *timezone = NULL; char *location; - CORBA_Environment ev; - CORBA_exception_init (&ev); - - db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev); - - if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) { - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); + listener = e_config_listener_new (); - location = bonobo_config_get_string_with_default (db, - "/Calendar/Display/Timezone", "UTC", NULL); + location = e_config_listener_get_string_with_default (listener, + "/apps/Evolution/Calendar/Display/Timezone", "UTC", NULL); if (!location || !location[0]) { g_free (location); location = g_strdup ("UTC"); @@ -464,7 +453,7 @@ get_default_timezone (void) timezone = icaltimezone_get_builtin_timezone (location); g_free (location); - bonobo_object_release_unref (db, NULL); + g_object_unref (listener); return timezone; } @@ -1776,16 +1765,6 @@ revert_settings (GnomePilotConduit *conduit, ECalConduitContext *ctxt) ctxt->new_cfg = calconduit_dupe_configuration (ctxt->cfg); } -static ORBit_MessageValidationResult -accept_all_cookies (CORBA_unsigned_long request_id, - CORBA_Principal *principal, - CORBA_char *operation) -{ - /* allow ALL cookies */ - return ORBIT_MESSAGE_ALLOW_ALL; -} - - GnomePilotConduit * conduit_get_gpilot_conduit (guint32 pilot_id) { @@ -1794,21 +1773,6 @@ conduit_get_gpilot_conduit (guint32 pilot_id) LOG ("in calendar's conduit_get_gpilot_conduit\n"); - /* we need to find wombat with oaf, so make sure oaf - is initialized here. once the desktop is converted - to oaf and gpilotd is built with oaf, this can go away */ - if (!oaf_is_initialized ()) { - char *argv[ 1 ] = {"hi"}; - oaf_init (1, argv); - - if (bonobo_init (CORBA_OBJECT_NIL, - CORBA_OBJECT_NIL, - CORBA_OBJECT_NIL) == FALSE) - g_error (_("Could not initialize Bonobo")); - - ORBit_set_request_validation_handler (accept_all_cookies); - } - retval = gnome_pilot_conduit_sync_abs_new ("DatebookDB", 0x64617465); g_assert (retval != NULL); diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c index 42c8b3c865..7d51e757f8 100644 --- a/calendar/conduits/todo/todo-conduit.c +++ b/calendar/conduits/todo/todo-conduit.c @@ -23,9 +23,6 @@ #include -#include -#include -#include #include #include #include @@ -41,6 +38,7 @@ #include #include #include +#include GnomePilotConduit * conduit_get_gpilot_conduit (guint32); void conduit_destroy_gpilot_conduit (GnomePilotConduit*); @@ -413,7 +411,7 @@ start_calendar_server (EToDoConduitContext *ctxt) ctxt->client = cal_client_new (); gtk_signal_connect (GTK_OBJECT (ctxt->client), "cal_opened", - start_calendar_server_cb, &success); + (GtkSignalFunc)start_calendar_server_cb, &success); if (!cal_client_open_default_tasks (ctxt->client, FALSE)) return -1; @@ -444,24 +442,14 @@ get_timezone (CalClient *client, const char *tzid) static icaltimezone * get_default_timezone (void) { - Bonobo_ConfigDatabase db; + EConfigListener *listener; icaltimezone *timezone = NULL; char *location; - CORBA_Environment ev; - CORBA_exception_init (&ev); - - db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev); - - if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) { - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); + listener = e_config_listener_new (); - location = bonobo_config_get_string_with_default (db, - "/Calendar/Display/Timezone", "UTC", NULL); + location = e_config_listener_get_string_with_default (listener, + "/apps/Evolution/Calendar/Display/Timezone", "UTC", NULL); if (!location || !location[0]) { g_free (location); location = g_strdup ("UTC"); @@ -470,7 +458,7 @@ get_default_timezone (void) timezone = icaltimezone_get_builtin_timezone (location); g_free (location); - bonobo_object_release_unref (db, NULL); + g_object_unref (listener); return timezone; } @@ -1354,16 +1342,6 @@ revert_settings (GnomePilotConduit *conduit, EToDoConduitContext *ctxt) ctxt->new_cfg = todoconduit_dupe_configuration (ctxt->cfg); } -static ORBit_MessageValidationResult -accept_all_cookies (CORBA_unsigned_long request_id, - CORBA_Principal *principal, - CORBA_char *operation) -{ - /* allow ALL cookies */ - return ORBIT_MESSAGE_ALLOW_ALL; -} - - GnomePilotConduit * conduit_get_gpilot_conduit (guint32 pilot_id) { @@ -1372,21 +1350,6 @@ conduit_get_gpilot_conduit (guint32 pilot_id) LOG ("in todo's conduit_get_gpilot_conduit\n"); - /* we need to find wombat with oaf, so make sure oaf - is initialized here. once the desktop is converted - to oaf and gpilotd is built with oaf, this can go away */ - if (!oaf_is_initialized ()) { - char *argv[ 1 ] = {"hi"}; - oaf_init (1, argv); - - if (bonobo_init (CORBA_OBJECT_NIL, - CORBA_OBJECT_NIL, - CORBA_OBJECT_NIL) == FALSE) - g_error (_("Could not initialize Bonobo")); - - ORBit_set_request_validation_handler (accept_all_cookies); - } - retval = gnome_pilot_conduit_sync_abs_new ("ToDoDB", 0x746F646F); g_assert (retval != NULL); -- cgit v1.2.3