aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/comp-editor-factory.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2001-10-04 02:03:14 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2001-10-04 02:03:14 +0800
commit967083749da817df0ea296343528361c3564a798 (patch)
tree669a3acc0d27852b72a3a5de34446e8ad8d6806b /calendar/gui/comp-editor-factory.c
parent6726c35ab5c59ac587a3347117b86e91e8655337 (diff)
downloadgsoc2013-evolution-967083749da817df0ea296343528361c3564a798.tar
gsoc2013-evolution-967083749da817df0ea296343528361c3564a798.tar.gz
gsoc2013-evolution-967083749da817df0ea296343528361c3564a798.tar.bz2
gsoc2013-evolution-967083749da817df0ea296343528361c3564a798.tar.lz
gsoc2013-evolution-967083749da817df0ea296343528361c3564a798.tar.xz
gsoc2013-evolution-967083749da817df0ea296343528361c3564a798.tar.zst
gsoc2013-evolution-967083749da817df0ea296343528361c3564a798.zip
replace use of gnome_vfs_uri with e_uri
2001-10-03 Rodrigo Moya <rodrigo@ximian.com> * gui/component-factory.c: * gui/calendar-offline-handler.c: * gui/comp-editor-factory.c: replace use of gnome_vfs_uri with e_uri * gui/e-meeting-model.c (start_addressbook_server): make it return void, since the return value does not mind * pcs/cal.c: * pcs/cal-factory.c: * pcs/cal-backend.[ch]: don't use GnomeVFS for URI management * pcs/cal-backend-file.c: ditto, only use GnomeVFS for internal operations * cal-client/cal-client.c (cal_client_open_calendar): don't CORBA_exception_free before checking for exceptions svn path=/trunk/; revision=13380
Diffstat (limited to 'calendar/gui/comp-editor-factory.c')
-rw-r--r--calendar/gui/comp-editor-factory.c39
1 files changed, 16 insertions, 23 deletions
diff --git a/calendar/gui/comp-editor-factory.c b/calendar/gui/comp-editor-factory.c
index 7d1bfaff2d..2c74649647 100644
--- a/calendar/gui/comp-editor-factory.c
+++ b/calendar/gui/comp-editor-factory.c
@@ -23,7 +23,7 @@
#include <config.h>
#endif
-#include <libgnomevfs/gnome-vfs.h>
+#include <e-util/e-url.h>
#include <cal-client/cal-client.h>
#include "calendar-config.h"
#include "comp-editor-factory.h"
@@ -59,7 +59,7 @@ typedef struct {
CompEditorFactory *factory;
/* Uri of the calendar, used as key in the clients hash table */
- GnomeVFSURI *uri;
+ char *uri;
/* Client of the calendar */
CalClient *client;
@@ -106,7 +106,7 @@ static void impl_editExisting (PortableServer_Servant servant,
const GNOME_Evolution_Calendar_CalObjUID uid,
CORBA_Environment *ev);
static void impl_editNew (PortableServer_Servant servant,
- const CORBA_char *uri,
+ const CORBA_char *str_uri,
const GNOME_Evolution_Calendar_CalObjType type,
CORBA_Environment *ev);
@@ -144,7 +144,7 @@ comp_editor_factory_init (CompEditorFactory *factory)
priv = g_new (CompEditorFactoryPrivate, 1);
factory->priv = priv;
- priv->uri_client_hash = g_hash_table_new (gnome_vfs_uri_hash, gnome_vfs_uri_hequal);
+ priv->uri_client_hash = g_hash_table_new (g_str_hash, g_str_equal);
}
/* Used from g_hash_table_foreach(); frees a component structure */
@@ -182,7 +182,7 @@ free_client (OpenClient *oc)
{
GSList *l;
- gnome_vfs_uri_unref (oc->uri);
+ g_free (oc->uri);
oc->uri = NULL;
gtk_object_unref (GTK_OBJECT (oc->client));
@@ -494,12 +494,11 @@ cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
* open request.
*/
static OpenClient *
-open_client (CompEditorFactory *factory, GnomeVFSURI *uri)
+open_client (CompEditorFactory *factory, const char *uristr)
{
CompEditorFactoryPrivate *priv;
CalClient *client;
OpenClient *oc;
- char *str_uri;
priv = factory->priv;
@@ -510,8 +509,7 @@ open_client (CompEditorFactory *factory, GnomeVFSURI *uri)
oc = g_new (OpenClient, 1);
oc->factory = factory;
- gnome_vfs_uri_ref (uri);
- oc->uri = uri;
+ oc->uri = g_strdup (uristr);
oc->client = client;
oc->uid_comp_hash = g_hash_table_new (g_str_hash, g_str_equal);
@@ -521,18 +519,14 @@ open_client (CompEditorFactory *factory, GnomeVFSURI *uri)
gtk_signal_connect (GTK_OBJECT (oc->client), "cal_opened",
GTK_SIGNAL_FUNC (cal_opened_cb), oc);
- str_uri = gnome_vfs_uri_to_string (uri, GNOME_VFS_URI_HIDE_NONE);
-
- if (!cal_client_open_calendar (oc->client, str_uri, FALSE)) {
- g_free (str_uri);
- gnome_vfs_uri_unref (oc->uri);
+ if (!cal_client_open_calendar (oc->client, uristr, FALSE)) {
+ g_free (oc->uri);
gtk_object_unref (GTK_OBJECT (oc->client));
g_hash_table_destroy (oc->uid_comp_hash);
g_free (oc);
return NULL;
}
- g_free (str_uri);
g_hash_table_insert (priv->uri_client_hash, oc->uri, oc);
@@ -546,27 +540,26 @@ static OpenClient *
lookup_open_client (CompEditorFactory *factory, const char *str_uri, CORBA_Environment *ev)
{
CompEditorFactoryPrivate *priv;
- GnomeVFSURI *uri;
OpenClient *oc;
+ EUri *uri;
priv = factory->priv;
/* Look up the client */
- uri = gnome_vfs_uri_new (str_uri);
+ uri = e_uri_new (str_uri);
if (!uri) {
CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
ex_GNOME_Evolution_Calendar_CompEditorFactory_InvalidURI,
NULL);
return NULL;
}
+ e_uri_free (uri);
- oc = g_hash_table_lookup (priv->uri_client_hash, uri);
+ oc = g_hash_table_lookup (priv->uri_client_hash, str_uri);
if (!oc) {
- oc = open_client (factory, uri);
+ oc = open_client (factory, str_uri);
if (!oc) {
- gnome_vfs_uri_unref (uri);
-
CORBA_exception_set (
ev, CORBA_USER_EXCEPTION,
ex_GNOME_Evolution_Calendar_CompEditorFactory_BackendContactError,
@@ -575,8 +568,6 @@ lookup_open_client (CompEditorFactory *factory, const char *str_uri, CORBA_Envir
}
}
- gnome_vfs_uri_unref (uri);
-
return oc;
}
@@ -700,3 +691,5 @@ comp_editor_factory_new (void)
{
return gtk_type_new (TYPE_COMP_EDITOR_FACTORY);
}
+
+