diff options
-rw-r--r-- | shell/ChangeLog | 14 | ||||
-rw-r--r-- | shell/e-shell-importer.c | 7 | ||||
-rw-r--r-- | shell/importer/GNOME_Evolution_Importer.idl | 4 | ||||
-rw-r--r-- | shell/importer/evolution-importer-client.c | 5 | ||||
-rw-r--r-- | shell/importer/evolution-importer-client.h | 3 | ||||
-rw-r--r-- | shell/importer/evolution-importer.c | 3 | ||||
-rw-r--r-- | shell/importer/evolution-importer.h | 1 |
7 files changed, 30 insertions, 7 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 325a3f1c6d..63c8c93b44 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,17 @@ +2003-04-02 Rodrigo Moya <rodrigo@ximian.com> + + * importer/GNOME_Evolution_Importer.idl: + * importer/evolution-importer.[ch]: added "foldertype" argument to + GNOME::Evolution::Importer. + + * importer/evolution-importer-client.[ch] + (evolution_importer_client_load_file): added "folder_type" argument + and use it in the call to GNOME_Evolution_Importer_loadFile. + + * e-shell-importer.c (start_import): added "folder_type" argument and + use it in the call to evolution_importer_client_load_file. + (folder_selected): pass in the "folder_type" argument to start_import, + 2003-04-02 Not Zed <NotZed@Ximian.com> [#40652] diff --git a/shell/e-shell-importer.c b/shell/e-shell-importer.c index 638e8c5eff..a093d4dd4c 100644 --- a/shell/e-shell-importer.c +++ b/shell/e-shell-importer.c @@ -478,7 +478,8 @@ show_error (const char *message, static void start_import (const char *physical_uri, const char *filename, - const char *iid) + const char *iid, + const char *folder_type) { ImporterComponentData *icd; char *label; @@ -546,7 +547,7 @@ start_import (const char *physical_uri, } g_free (real_iid); - if (evolution_importer_client_load_file (icd->client, filename, physical_uri) == FALSE) { + if (evolution_importer_client_load_file (icd->client, filename, physical_uri, folder_type) == FALSE) { label = g_strdup_printf (_("Error loading %s"), filename); show_error (label, _("Evolution Error")); @@ -966,7 +967,7 @@ folder_selected (EShellFolderSelectionDialog *dialog, gtk_widget_destroy (data->dialog); gtk_widget_hide (GTK_WIDGET (dialog)); - start_import (e_folder_get_physical_uri (folder), filename, iid); + start_import (e_folder_get_physical_uri (folder), filename, iid, e_folder_get_type_string (folder)); g_free (iid); g_free (filename); diff --git a/shell/importer/GNOME_Evolution_Importer.idl b/shell/importer/GNOME_Evolution_Importer.idl index 18ea7a65bb..775ba47377 100644 --- a/shell/importer/GNOME_Evolution_Importer.idl +++ b/shell/importer/GNOME_Evolution_Importer.idl @@ -72,6 +72,7 @@ module Evolution { * loadFile: * @filename: The filename of the file. * @folderpath: The full pathname to the folder. + * @foldertpe: The type of the folder to import to. * * Loads the file and prepares an Importer object that can * process files of this type. @@ -79,7 +80,8 @@ module Evolution { * Returns: An Importer object. */ boolean loadFile (in string filename, - in string folderpath); + in string folderpath, + in string foldertype); }; interface IntelligentImporter : Bonobo::Unknown { diff --git a/shell/importer/evolution-importer-client.c b/shell/importer/evolution-importer-client.c index b8be15bc08..1f6807b3c8 100644 --- a/shell/importer/evolution-importer-client.c +++ b/shell/importer/evolution-importer-client.c @@ -152,6 +152,7 @@ evolution_importer_client_support_format (EvolutionImporterClient *client, * @client: The EvolutionImporterClient. * @filename: The file to load. * @physical_uri: The physical URI of the folder to import data into. + * @folder_type: The type of the folder represented by @physical_uri. * * Loads and initialises the importer. * @@ -160,7 +161,8 @@ evolution_importer_client_support_format (EvolutionImporterClient *client, gboolean evolution_importer_client_load_file (EvolutionImporterClient *client, const char *filename, - const char *physical_uri) + const char *physical_uri, + const char *folder_type) { GNOME_Evolution_Importer corba_importer; gboolean result; @@ -175,6 +177,7 @@ evolution_importer_client_load_file (EvolutionImporterClient *client, result = GNOME_Evolution_Importer_loadFile (corba_importer, filename, physical_uri ? physical_uri : "", + folder_type ? folder_type : "", &ev); if (ev._major != CORBA_NO_EXCEPTION) { g_warning ("Oh there *WAS* an exception.\nIt was %s", diff --git a/shell/importer/evolution-importer-client.h b/shell/importer/evolution-importer-client.h index 6f105589f4..46b38e851a 100644 --- a/shell/importer/evolution-importer-client.h +++ b/shell/importer/evolution-importer-client.h @@ -61,7 +61,8 @@ gboolean evolution_importer_client_support_format (EvolutionImporterClient *clie const char *filename); gboolean evolution_importer_client_load_file (EvolutionImporterClient *client, const char *filename, - const char *physical_uri); + const char *physical_uri, + const char *folder_type); void evolution_importer_client_process_item (EvolutionImporterClient *client, EvolutionImporterListener *listener); const char *evolution_importer_client_get_error (EvolutionImporterClient *client); diff --git a/shell/importer/evolution-importer.c b/shell/importer/evolution-importer.c index c76e727c3c..cd419b4ca9 100644 --- a/shell/importer/evolution-importer.c +++ b/shell/importer/evolution-importer.c @@ -72,6 +72,7 @@ static CORBA_boolean impl_GNOME_Evolution_Importer_loadFile (PortableServer_Servant servant, const CORBA_char *filename, const CORBA_char *physical_uri, + const CORBA_char *folder_type, CORBA_Environment *ev) { EvolutionImporter *importer; @@ -81,7 +82,7 @@ impl_GNOME_Evolution_Importer_loadFile (PortableServer_Servant servant, priv = importer->priv; if (priv->load_file_fn != NULL) - return (priv->load_file_fn) (importer, filename, physical_uri, priv->closure); + return (priv->load_file_fn) (importer, filename, physical_uri, folder_type, priv->closure); else return FALSE; } diff --git a/shell/importer/evolution-importer.h b/shell/importer/evolution-importer.h index da7fe94daa..d2fd94be0f 100644 --- a/shell/importer/evolution-importer.h +++ b/shell/importer/evolution-importer.h @@ -48,6 +48,7 @@ typedef gboolean (* EvolutionImporterSupportFormatFn) (EvolutionImporter *import typedef gboolean (* EvolutionImporterLoadFileFn) (EvolutionImporter *importer, const char *filename, const char *physical_uri, + const char *folder_type, void *closure); typedef void (* EvolutionImporterProcessItemFn) (EvolutionImporter *importer, CORBA_Object listener, |