aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-storage.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2003-03-15 02:13:58 +0800
committerDan Winship <danw@src.gnome.org>2003-03-15 02:13:58 +0800
commit0f75c9693668acf8e5a1f8ca3e7aa3cd2cd0d399 (patch)
tree3ca29899a3cfc9ee08329c99151c49fe0b55fed9 /shell/e-storage.c
parent1df1d4aead3ebacf457f637c6df2a5e8539b7fbf (diff)
downloadgsoc2013-evolution-0f75c9693668acf8e5a1f8ca3e7aa3cd2cd0d399.tar
gsoc2013-evolution-0f75c9693668acf8e5a1f8ca3e7aa3cd2cd0d399.tar.gz
gsoc2013-evolution-0f75c9693668acf8e5a1f8ca3e7aa3cd2cd0d399.tar.bz2
gsoc2013-evolution-0f75c9693668acf8e5a1f8ca3e7aa3cd2cd0d399.tar.lz
gsoc2013-evolution-0f75c9693668acf8e5a1f8ca3e7aa3cd2cd0d399.tar.xz
gsoc2013-evolution-0f75c9693668acf8e5a1f8ca3e7aa3cd2cd0d399.tar.zst
gsoc2013-evolution-0f75c9693668acf8e5a1f8ca3e7aa3cd2cd0d399.zip
add a Bonobo::Listener to this like the other async interfaces, rather
* Evolution-Storage.idl (asyncOpenFolder): add a Bonobo::Listener to this like the other async interfaces, rather than having a hacky way to signal failure. * evolution-storage.c (impl_Storage_asyncOpenFolder): Update to take a listener and emit it as part of the signal (evolution_storage_class_init): update OPEN_FOLDER signal prototype. * e-shell-marshal.list (NONE:POINTER,STRING): add, for changed EvolutionStorage open_folder signal * e-storage.c (e_storage_async_open_folder): add a callback arg (impl_async_open_folder): call the callback with NOTIMPLEMENTED. (class_init): remove the CLOSE_FOLDER signal (e_storage_has_subfolders): Don't emit CLOSE_FOLDER since it doesn't exist any more, and this function is used for that side effect any more anyway. * e-corba-storage.c (async_open_folder): add the callback arg and create a proper closure. (async_open_folder_idle): Call the callback in case of error. Create a listener and pass that to the CORBA call. (async_open_cb): Listener callback. * e-storage-set.c (storage_set_view_folder_opened): Pass a callback to e_storage_async_open_folder. (async_open_cb): emit CLOSE_FOLDER if the open failed (storage_close_folder_cb): Remove this since the signal no longer exists. svn path=/trunk/; revision=20297
Diffstat (limited to 'shell/e-storage.c')
-rw-r--r--shell/e-storage.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/shell/e-storage.c b/shell/e-storage.c
index d311135fe1..6825485f9d 100644
--- a/shell/e-storage.c
+++ b/shell/e-storage.c
@@ -64,7 +64,6 @@ enum {
NEW_FOLDER,
UPDATED_FOLDER,
REMOVED_FOLDER,
- CLOSE_FOLDER,
LAST_SIGNAL
};
@@ -229,9 +228,11 @@ impl_async_xfer_folder (EStorage *storage,
static void
impl_async_open_folder (EStorage *storage,
- const char *path)
+ const char *path,
+ EStorageDiscoveryCallback callback,
+ void *data)
{
- ;
+ (*callback) (storage, E_STORAGE_NOTIMPLEMENTED, path, data);
}
static gboolean
@@ -311,15 +312,6 @@ class_init (EStorageClass *class)
e_shell_marshal_NONE__STRING,
G_TYPE_NONE, 1,
G_TYPE_STRING);
- signals[CLOSE_FOLDER] =
- g_signal_new ("close_folder",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EStorageClass, close_folder),
- NULL, NULL,
- e_shell_marshal_NONE__STRING,
- G_TYPE_NONE, 1,
- G_TYPE_STRING);
}
static void
@@ -498,17 +490,21 @@ e_storage_async_xfer_folder (EStorage *storage,
void
e_storage_async_open_folder (EStorage *storage,
- const char *path)
+ const char *path,
+ EStorageDiscoveryCallback callback,
+ void *data)
{
g_return_if_fail (storage != NULL);
g_return_if_fail (E_IS_STORAGE (storage));
g_return_if_fail (path != NULL);
g_return_if_fail (g_path_is_absolute (path));
- if (g_hash_table_lookup (storage->priv->pseudofolders, path) == NULL)
+ if (g_hash_table_lookup (storage->priv->pseudofolders, path) == NULL) {
+ (* callback) (storage, E_STORAGE_OK, path, data);
return;
+ }
- (* ES_CLASS (storage)->async_open_folder) (storage, path);
+ (* ES_CLASS (storage)->async_open_folder) (storage, path, callback, data);
}
@@ -742,8 +738,6 @@ e_storage_has_subfolders (EStorage *storage,
priv = storage->priv;
- g_signal_emit (storage, signals[CLOSE_FOLDER], 0, path);
-
if (g_hash_table_lookup (priv->pseudofolders, path))
return TRUE;