aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Zucci <zucchi@src.gnome.org>2003-03-20 18:07:51 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-03-20 18:07:51 +0800
commit4ac5734af0ee578f5e769bf4bd5a420d379d2155 (patch)
tree3b448d4ed50083284a8cab8d5d23f5d9f3148768
parent9e5f92c8e4f778a3293a7cfe208995a2ac8ab069 (diff)
downloadgsoc2013-evolution-4ac5734af0ee578f5e769bf4bd5a420d379d2155.tar
gsoc2013-evolution-4ac5734af0ee578f5e769bf4bd5a420d379d2155.tar.gz
gsoc2013-evolution-4ac5734af0ee578f5e769bf4bd5a420d379d2155.tar.bz2
gsoc2013-evolution-4ac5734af0ee578f5e769bf4bd5a420d379d2155.tar.lz
gsoc2013-evolution-4ac5734af0ee578f5e769bf4bd5a420d379d2155.tar.xz
gsoc2013-evolution-4ac5734af0ee578f5e769bf4bd5a420d379d2155.tar.zst
gsoc2013-evolution-4ac5734af0ee578f5e769bf4bd5a420d379d2155.zip
*** empty log message ***
svn path=/trunk/; revision=20378
-rw-r--r--shell/ChangeLog18
-rw-r--r--shell/e-config-upgrade.c29
-rw-r--r--shell/e-shell-importer.c15
-rw-r--r--shell/importer/evolution-importer-client.c6
-rw-r--r--shell/importer/evolution-importer-client.h2
-rw-r--r--shell/importer/evolution-importer.c5
-rw-r--r--shell/importer/evolution-importer.h2
7 files changed, 59 insertions, 18 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 45d1da17ef..3878cd49fd 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,21 @@
+2003-03-19 Not Zed <NotZed@Ximian.com>
+
+ * e-config-upgrade.c (e_config_upgrade): Added some more doco just
+ to make it clear how it was intended to be used/expanded.
+
+2003-03-18 Ettore Perazzoli <ettore@ximian.com>
+
+ * importer/evolution-importer.c
+ (impl_GNOME_Evolution_Importer_loadFile): Get a physical_uri arg
+ instead of a folderpath arg.
+
+ * importer/evolution-importer-client.c
+ (evolution_importer_client_load_file): Get a physical_uri arg.
+
+ * e-shell-importer.c (start_import): Get a physical_uri arg
+ instead of a folderpath.
+ (folder_selected): Updated accordingly.
+
2003-03-19 Ettore Perazzoli <ettore@ximian.com>
* e-shell-importer.c (get_name_from_component_info): Look for the
diff --git a/shell/e-config-upgrade.c b/shell/e-config-upgrade.c
index 4d574cc28e..e096b74c6b 100644
--- a/shell/e-config-upgrade.c
+++ b/shell/e-config-upgrade.c
@@ -1601,7 +1601,30 @@ static int load_accounts_1_0(xmlDocPtr doc)
*
* The tracked version is upgraded to the latest even if no
* configuration upgrades are required for that version.
+ *
+ * Further information about how this is intended to work:
+ *
+ * There are 3 basic steps, numbered in the comments below.
+ * 1. Determine the current config verison
+ * 2. Upgrade to the current source version
+ * 3. Save the version number, as defined by CONF_MAJOR, CONF_MINOR,
+ * CONF_REVISION. These are all treated as integers, so 10 is
+ * greater than 9.
+ *
+ * 1 and 3 should not need changing. After an upgrade to 1.3.x and
+ * until the config system changes again (!), step one becomes
+ * trivial. Any changes to part 2 should be added to the end of the
+ * section, or as required. This allows for very fine-grained version
+ * upgrades, including pre-release and patch-level changes to fix
+ * config problems which may have lasted for a single version or
+ * patch, in which case CONF_REVISION can be bumped.
*
+ * At any time, the CONF_VERSION/MAJOR/REVISION can be increased to
+ * match the source release, even if no new configuration changes will
+ * be required from the previous version. This should be done at each
+ * release in case bugs in that configuration version are required to
+ * be fixed at any time in the future.
+ *
* Return value: -1 on an error.
**/
int
@@ -1617,7 +1640,7 @@ e_config_upgrade(const char *edir)
evolution_dir = edir;
- /* determine existing version */
+ /* 1. determine existing version */
gconf = gconf_client_get_default();
val = gconf_client_get_string(gconf, "/apps/evolution/version", NULL);
if (val) {
@@ -1648,6 +1671,8 @@ e_config_upgrade(const char *edir)
xmlFree(tmp);
}
+ /* 2. Now perform any upgrade duties */
+
d(printf("current config version is '%u.%u.%u'\n", major, minor, revision));
/* For 1.0.x we need to load the accounts first, as data it initialises is used elsewhere */
@@ -1681,7 +1706,7 @@ e_config_upgrade(const char *edir)
}
}
- /* we're done, update our version info if its changed */
+ /* 3. we're done, update our version info if its changed */
if (major < CONF_MAJOR
|| minor < CONF_MINOR
|| revision < CONF_REVISION) {
diff --git a/shell/e-shell-importer.c b/shell/e-shell-importer.c
index 98ae31d578..638e8c5eff 100644
--- a/shell/e-shell-importer.c
+++ b/shell/e-shell-importer.c
@@ -476,7 +476,7 @@ show_error (const char *message,
}
static void
-start_import (const char *folderpath,
+start_import (const char *physical_uri,
const char *filename,
const char *iid)
{
@@ -546,12 +546,7 @@ start_import (const char *folderpath,
}
g_free (real_iid);
- /* NULL for folderpath means use Inbox */
- if (*folderpath == '/') {
- folderpath = strchr (folderpath + 1, '/');
- }
-
- if (evolution_importer_client_load_file (icd->client, filename, folderpath) == FALSE) {
+ if (evolution_importer_client_load_file (icd->client, filename, physical_uri) == FALSE) {
label = g_strdup_printf (_("Error loading %s"), filename);
show_error (label, _("Evolution Error"));
@@ -959,15 +954,19 @@ folder_selected (EShellFolderSelectionDialog *dialog,
const char *path,
ImportData *data)
{
+ EFolder *folder;
char *filename, *iid;
iid = g_strdup (data->choosen_iid);
filename = gnome_file_entry_get_full_path (GNOME_FILE_ENTRY (data->filepage->filename), FALSE);
+ folder = e_storage_set_get_folder (e_shell_get_storage_set (data->shell), path);
+ g_assert (folder != NULL);
+
gtk_widget_destroy (data->dialog);
gtk_widget_hide (GTK_WIDGET (dialog));
- start_import (path, filename, iid);
+ start_import (e_folder_get_physical_uri (folder), filename, iid);
g_free (iid);
g_free (filename);
diff --git a/shell/importer/evolution-importer-client.c b/shell/importer/evolution-importer-client.c
index 99e096a833..b8be15bc08 100644
--- a/shell/importer/evolution-importer-client.c
+++ b/shell/importer/evolution-importer-client.c
@@ -151,7 +151,7 @@ evolution_importer_client_support_format (EvolutionImporterClient *client,
* evolution_importer_client_load_file:
* @client: The EvolutionImporterClient.
* @filename: The file to load.
- * @folderpath: The full path to the folder, or NULL for Inbox.
+ * @physical_uri: The physical URI of the folder to import data into.
*
* Loads and initialises the importer.
*
@@ -160,7 +160,7 @@ evolution_importer_client_support_format (EvolutionImporterClient *client,
gboolean
evolution_importer_client_load_file (EvolutionImporterClient *client,
const char *filename,
- const char *folderpath)
+ const char *physical_uri)
{
GNOME_Evolution_Importer corba_importer;
gboolean result;
@@ -174,7 +174,7 @@ evolution_importer_client_load_file (EvolutionImporterClient *client,
corba_importer = client->objref;
result = GNOME_Evolution_Importer_loadFile (corba_importer,
filename,
- folderpath ? folderpath : "",
+ physical_uri ? physical_uri : "",
&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 13d144e076..6f105589f4 100644
--- a/shell/importer/evolution-importer-client.h
+++ b/shell/importer/evolution-importer-client.h
@@ -61,7 +61,7 @@ gboolean evolution_importer_client_support_format (EvolutionImporterClient *clie
const char *filename);
gboolean evolution_importer_client_load_file (EvolutionImporterClient *client,
const char *filename,
- const char *folderpath);
+ const char *physical_uri);
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 59723bb732..c76e727c3c 100644
--- a/shell/importer/evolution-importer.c
+++ b/shell/importer/evolution-importer.c
@@ -71,7 +71,7 @@ impl_GNOME_Evolution_Importer_supportFormat (PortableServer_Servant servant,
static CORBA_boolean
impl_GNOME_Evolution_Importer_loadFile (PortableServer_Servant servant,
const CORBA_char *filename,
- const CORBA_char *folderpath,
+ const CORBA_char *physical_uri,
CORBA_Environment *ev)
{
EvolutionImporter *importer;
@@ -81,8 +81,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,
- folderpath, priv->closure);
+ return (priv->load_file_fn) (importer, filename, physical_uri, priv->closure);
else
return FALSE;
}
diff --git a/shell/importer/evolution-importer.h b/shell/importer/evolution-importer.h
index 9b655138ec..da7fe94daa 100644
--- a/shell/importer/evolution-importer.h
+++ b/shell/importer/evolution-importer.h
@@ -47,7 +47,7 @@ typedef gboolean (* EvolutionImporterSupportFormatFn) (EvolutionImporter *import
void *closure);
typedef gboolean (* EvolutionImporterLoadFileFn) (EvolutionImporter *importer,
const char *filename,
- const char *folderpath,
+ const char *physical_uri,
void *closure);
typedef void (* EvolutionImporterProcessItemFn) (EvolutionImporter *importer,
CORBA_Object listener,