diff options
author | Iain Holmes <iain@src.gnome.org> | 2001-08-31 07:21:56 +0800 |
---|---|---|
committer | Iain Holmes <iain@src.gnome.org> | 2001-08-31 07:21:56 +0800 |
commit | 553de94865892fa7473f55d71a2fdf266e5359b7 (patch) | |
tree | 81c1a44e612040308d61a9fd6a091e0baecd42fc /shell/evolution-storage.c | |
parent | d1587991064d100b1dccfdd34b293c67b603d0d0 (diff) | |
download | gsoc2013-evolution-553de94865892fa7473f55d71a2fdf266e5359b7.tar.gz gsoc2013-evolution-553de94865892fa7473f55d71a2fdf266e5359b7.tar.zst gsoc2013-evolution-553de94865892fa7473f55d71a2fdf266e5359b7.zip |
Fix the Pine and Netscape importers. Give them a nice progress reporting GUI.
Revert Jason's changes so that creating a folder works again.
svn path=/trunk/; revision=12536
Diffstat (limited to 'shell/evolution-storage.c')
-rw-r--r-- | shell/evolution-storage.c | 58 |
1 files changed, 34 insertions, 24 deletions
diff --git a/shell/evolution-storage.c b/shell/evolution-storage.c index da76c619ee..45d999c93b 100644 --- a/shell/evolution-storage.c +++ b/shell/evolution-storage.c @@ -291,23 +291,6 @@ storage_gtk_to_corba_result (EvolutionStorageResult result) } static void -notify_bonobo_listener (const Bonobo_Listener listener, - EvolutionStorageResult result, - const char *physical_path, - CORBA_Environment *ev) -{ - CORBA_any any; - GNOME_Evolution_Storage_FolderResult folder_result; - - folder_result.result = storage_gtk_to_corba_result (result); - folder_result.path = CORBA_string_dup (physical_path ? physical_path : ""); - any._type = TC_GNOME_Evolution_Storage_FolderResult; - any._value = &folder_result; - - Bonobo_Listener_event (listener, "result", &any, ev); -} - -static void impl_Storage_async_create_folder (PortableServer_Servant servant, const CORBA_char *path, const CORBA_char *type, @@ -317,17 +300,15 @@ impl_Storage_async_create_folder (PortableServer_Servant servant, CORBA_Environment *ev) { BonoboObject *bonobo_object; + CORBA_Object obj_dup; EvolutionStorage *storage; - int int_result; bonobo_object = bonobo_object_from_servant (servant); storage = EVOLUTION_STORAGE (bonobo_object); - int_result = GNOME_Evolution_Storage_UNSUPPORTED_OPERATION; + obj_dup = CORBA_Object_duplicate (listener, ev); gtk_signal_emit (GTK_OBJECT (storage), signals[CREATE_FOLDER], - path, type, description, parent_physical_uri, &int_result); - - notify_bonobo_listener (listener, int_result, path, ev); + obj_dup, path, type, description, parent_physical_uri); } @@ -341,6 +322,8 @@ impl_Storage_async_remove_folder (PortableServer_Servant servant, BonoboObject *bonobo_object; EvolutionStorage *storage; int int_result; + CORBA_any any; + GNOME_Evolution_Storage_Result corba_result; bonobo_object = bonobo_object_from_servant (servant); storage = EVOLUTION_STORAGE (bonobo_object); @@ -349,7 +332,11 @@ impl_Storage_async_remove_folder (PortableServer_Servant servant, gtk_signal_emit (GTK_OBJECT (storage), signals[REMOVE_FOLDER], path, physical_uri, &int_result); - notify_bonobo_listener (listener, int_result, path, ev); + corba_result = storage_gtk_to_corba_result (int_result); + any._type = TC_GNOME_Evolution_Storage_Result; + any._value = &corba_result; + + Bonobo_Listener_event (listener, "result", &any, ev); } static void @@ -511,6 +498,29 @@ corba_class_init (void) vepv->GNOME_Evolution_Storage_epv = evolution_storage_get_epv (); } +/* The worst signal marshaller in Scotland */ +typedef void (*GtkSignal_NONE__POINTER_POINTER_POINTER_POINTER_POINTER) (GtkObject *, + gpointer, gpointer, gpointer, gpointer, gpointer, + gpointer user_data); + +static void +e_marshal_NONE__POINTER_POINTER_POINTER_POINTER_POINTER (GtkObject *object, + GtkSignalFunc func, + gpointer func_data, + GtkArg *args) +{ + GtkSignal_NONE__POINTER_POINTER_POINTER_POINTER_POINTER rfunc; + + rfunc = (GtkSignal_NONE__POINTER_POINTER_POINTER_POINTER_POINTER) func; + (*rfunc) (object, + GTK_VALUE_POINTER (args[0]), + GTK_VALUE_POINTER (args[1]), + GTK_VALUE_POINTER (args[2]), + GTK_VALUE_POINTER (args[3]), + GTK_VALUE_POINTER (args[4]), + func_data); +} + static void class_init (EvolutionStorageClass *klass) { @@ -526,7 +536,7 @@ class_init (EvolutionStorageClass *klass) object_class->type, GTK_SIGNAL_OFFSET (EvolutionStorageClass, create_folder), - e_marshal_INT__POINTER_POINTER_POINTER_POINTER, + e_marshal_INT__POINTER_POINTER_POINTER_POINTER_POINTER, GTK_TYPE_INT, 4, GTK_TYPE_STRING, GTK_TYPE_STRING, |