aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-corba-storage.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-05-21 14:30:38 +0800
committerChris Lahey <clahey@src.gnome.org>2002-05-21 14:30:38 +0800
commitce193f65868f23a354925b92626325a72c047e06 (patch)
tree6328e80f9cecc1660cbea1e479b3409685985be9 /shell/e-corba-storage.c
parenta33709547e482bfb7c0c0b3bf2fb491a28b61dab (diff)
downloadgsoc2013-evolution-ce193f65868f23a354925b92626325a72c047e06.tar
gsoc2013-evolution-ce193f65868f23a354925b92626325a72c047e06.tar.gz
gsoc2013-evolution-ce193f65868f23a354925b92626325a72c047e06.tar.bz2
gsoc2013-evolution-ce193f65868f23a354925b92626325a72c047e06.tar.lz
gsoc2013-evolution-ce193f65868f23a354925b92626325a72c047e06.tar.xz
gsoc2013-evolution-ce193f65868f23a354925b92626325a72c047e06.tar.zst
gsoc2013-evolution-ce193f65868f23a354925b92626325a72c047e06.zip
Do async_open_folder in an idle callback.
2002-05-21 Christopher James Lahey <clahey@ximian.com> * e-corba-storage.c (async_open_folder_idle): Do async_open_folder in an idle callback. * e-shell-shared-folder-picker-dialog.c (user_clicked), glade/e-shell-shared-folder-picker-dialog.glade: Added a select names button here. svn path=/trunk/; revision=16964
Diffstat (limited to 'shell/e-corba-storage.c')
-rw-r--r--shell/e-corba-storage.c43
1 files changed, 34 insertions, 9 deletions
diff --git a/shell/e-corba-storage.c b/shell/e-corba-storage.c
index 8caaac7776..0dd61461df 100644
--- a/shell/e-corba-storage.c
+++ b/shell/e-corba-storage.c
@@ -262,6 +262,8 @@ destroy (GtkObject *object)
g_free (priv);
+ corba_storage->priv = NULL;
+
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
@@ -455,21 +457,44 @@ async_xfer_folder (EStorage *storage,
CORBA_exception_free (&ev);
}
-static void
-async_open_folder (EStorage *storage,
- const char *path)
+static gboolean
+async_open_folder_idle (gpointer data)
{
+ gpointer *pair = data;
+
+ EStorage *storage = pair[0];
+ char *path = pair[1];
+
ECorbaStorage *corba_storage;
- ECorbaStoragePrivate *priv;
CORBA_Environment ev;
corba_storage = E_CORBA_STORAGE (storage);
- priv = corba_storage->priv;
- CORBA_exception_init (&ev);
- GNOME_Evolution_Storage_asyncOpenFolder (priv->storage_interface,
- path, &ev);
- CORBA_exception_free (&ev);
+ if (corba_storage->priv != NULL) {
+
+ CORBA_exception_init (&ev);
+ GNOME_Evolution_Storage_asyncOpenFolder (corba_storage->priv->storage_interface,
+ path, &ev);
+ CORBA_exception_free (&ev);
+ }
+
+ gtk_object_unref (GTK_OBJECT (storage));
+ g_free (path);
+ g_free (pair);
+
+ return FALSE;
+}
+
+static void
+async_open_folder (EStorage *storage,
+ const char *path)
+{
+ gpointer *pair = g_new (gpointer, 2);
+ pair[0] = storage;
+ gtk_object_ref (GTK_OBJECT (storage));
+ pair[1] = g_strdup (path);
+
+ g_idle_add (async_open_folder_idle, pair);
}