use EConfigListener instead of BonoboConfig.

2002-11-03  Rodrigo Moya <rodrigo@ximian.com>

	* cal-client/cal-client.c (get_default_uri): use EConfigListener
	instead of BonoboConfig.

	* cal-client/cal-client.c:
	* cal-client/cal-listener.[ch]:
	* cal-client/query-listener.c: warning free.

svn path=/trunk/; revision=18517
This commit is contained in:
Rodrigo Moya
2002-11-03 23:38:42 +00:00
committed by Rodrigo Moya
parent f3608fedd8
commit e134fc8fe3
6 changed files with 30 additions and 32 deletions

View File

@ -1,3 +1,12 @@
2002-11-03 Rodrigo Moya <rodrigo@ximian.com>
* cal-client/cal-client.c (get_default_uri): use EConfigListener
instead of BonoboConfig.
* cal-client/cal-client.c:
* cal-client/cal-listener.[ch]:
* cal-client/query-listener.c: warning free.
2002-11-03 Rodrigo Moya <rodrigo@ximian.com>
* pcs/cal-backend-util.[ch]: don't use BonoboConfig, but

View File

@ -25,11 +25,10 @@
#include <gtk/gtksignal.h>
#include <bonobo-activation/bonobo-activation.h>
#include <bonobo/bonobo-exception.h>
#include <bonobo/bonobo-moniker-util.h>
#include <bonobo-config/bonobo-config-database.h>
#include <libgnome/gnome-util.h>
#include "e-util/e-component-listener.h"
#include "e-util/e-config-listener.h"
#include "cal-client-types.h"
#include "cal-client.h"
#include "cal-listener.h"
@ -552,7 +551,7 @@ cal_set_mode_cb (CalListener *listener,
/* Handle the obj_updated signal from the listener */
static void
obj_updated_cb (CalListener *listener, const GNOME_Evolution_Calendar_CalObjUID uid, gpointer data)
obj_updated_cb (CalListener *listener, const CORBA_char *uid, gpointer data)
{
CalClient *client;
@ -562,7 +561,7 @@ obj_updated_cb (CalListener *listener, const GNOME_Evolution_Calendar_CalObjUID
/* Handle the obj_removed signal from the listener */
static void
obj_removed_cb (CalListener *listener, const GNOME_Evolution_Calendar_CalObjUID uid, gpointer data)
obj_removed_cb (CalListener *listener, const CORBA_char *uid, gpointer data)
{
CalClient *client;
@ -865,31 +864,21 @@ get_fall_back_uri (gboolean tasks)
static char *
get_default_uri (gboolean tasks)
{
Bonobo_ConfigDatabase db;
EConfigListener *db;
char *uri;
CORBA_Environment ev;
CORBA_exception_init (&ev);
db = e_config_listener_new ();
db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
CORBA_exception_free (&ev);
return NULL;
}
if (tasks)
uri = bonobo_config_get_string (db, "/DefaultFolders/tasks_uri", &ev);
uri = e_config_listener_get_string (db, "/apps/Evolution/DefaultFolders/tasks_uri");
else
uri = bonobo_config_get_string (db, "/DefaultFolders/calendar_uri", &ev);
bonobo_object_release_unref (db, NULL);
uri = e_config_listener_get_string (db, "/apps/Evolution/DefaultFolders/calendar_uri");
g_object_unref (G_OBJECT (db));
if (BONOBO_EX (&ev)) {
CORBA_exception_free (&ev);
if (!uri)
uri = get_fall_back_uri (tasks);
} else {
else
uri = cal_util_expand_uri (uri, tasks);
}
return uri;
}

View File

@ -53,10 +53,10 @@ static void impl_notifyCalSetMode (PortableServer_Servant servant,
GNOME_Evolution_Calendar_CalMode mode,
CORBA_Environment *ev);
static void impl_notifyObjUpdated (PortableServer_Servant servant,
GNOME_Evolution_Calendar_CalObjUID uid,
const CORBA_char *uid,
CORBA_Environment *ev);
static void impl_notifyObjRemoved (PortableServer_Servant servant,
GNOME_Evolution_Calendar_CalObjUID uid,
const CORBA_char *uid,
CORBA_Environment *ev);
static void impl_notifyErrorOccurred (PortableServer_Servant servant,
const CORBA_char *message,
@ -200,7 +200,7 @@ impl_notifyCalSetMode (PortableServer_Servant servant,
/* ::notifyObjUpdated method */
static void
impl_notifyObjUpdated (PortableServer_Servant servant,
GNOME_Evolution_Calendar_CalObjUID uid,
const CORBA_char *uid,
CORBA_Environment *ev)
{
CalListener *listener;
@ -219,7 +219,7 @@ impl_notifyObjUpdated (PortableServer_Servant servant,
/* ::notifyObjRemoved method */
static void
impl_notifyObjRemoved (PortableServer_Servant servant,
GNOME_Evolution_Calendar_CalObjUID uid,
const CORBA_char *uid,
CORBA_Environment *ev)
{
CalListener *listener;

View File

@ -63,10 +63,10 @@ typedef void (* CalListenerCalSetModeFn) (CalListener *listener,
gpointer data);
typedef void (* CalListenerObjUpdatedFn) (CalListener *listener,
const GNOME_Evolution_Calendar_CalObjUID uid,
const CORBA_char *uid,
gpointer data);
typedef void (* CalListenerObjRemovedFn) (CalListener *listener,
const GNOME_Evolution_Calendar_CalObjUID uid,
const CORBA_char *uid,
gpointer data);
typedef void (* CalListenerErrorOccurredFn) (CalListener *listener,

View File

@ -47,14 +47,14 @@ static void query_listener_init (QueryListener *ql);
static void query_listener_destroy (GtkObject *object);
static void impl_notifyObjUpdated (PortableServer_Servant servant,
GNOME_Evolution_Calendar_CalObjUIDSeq *uids,
const GNOME_Evolution_Calendar_CalObjUIDSeq *uids,
CORBA_boolean query_in_progress,
CORBA_long n_scanned,
CORBA_long total,
CORBA_Environment *ev);
static void impl_notifyObjRemoved (PortableServer_Servant servant,
GNOME_Evolution_Calendar_CalObjUID uid,
const CORBA_char *uid,
CORBA_Environment *ev);
static void impl_notifyQueryDone (PortableServer_Servant servant,
@ -146,7 +146,7 @@ query_listener_destroy (GtkObject *object)
/* ::notifyObjUpdated() method */
static void
impl_notifyObjUpdated (PortableServer_Servant servant,
GNOME_Evolution_Calendar_CalObjUIDSeq *uids,
const GNOME_Evolution_Calendar_CalObjUIDSeq *uids,
CORBA_boolean query_in_progress,
CORBA_long n_scanned,
CORBA_long total,
@ -168,7 +168,7 @@ impl_notifyObjUpdated (PortableServer_Servant servant,
/* ::notifyObjRemoved() method */
static void
impl_notifyObjRemoved (PortableServer_Servant servant,
GNOME_Evolution_Calendar_CalObjUID uid,
const CORBA_char *uid,
CORBA_Environment *ev)
{
QueryListener *ql;

View File

@ -61,7 +61,7 @@ typedef void (* QueryListenerObjUpdatedFn) (QueryListener *ql,
gpointer data);
typedef void (* QueryListenerObjRemovedFn) (QueryListener *ql,
const GNOME_Evolution_Calendar_CalObjUID uid,
const CORBA_char *uid,
gpointer data);
typedef void (* QueryListenerQueryDoneFn) (