diff options
author | JP Rosevear <jpr@ximian.com> | 2004-01-14 02:51:54 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2004-01-14 02:51:54 +0800 |
commit | f17f36a31ed398d797cf96a9029efaaf83485f43 (patch) | |
tree | 161eef5dfb4069fae3bfbf796cc9b6b4432bf065 /shell/e-shell.c | |
parent | 39e6fc90623f50b7cd28850b8a0463d37e09a758 (diff) | |
download | gsoc2013-evolution-f17f36a31ed398d797cf96a9029efaaf83485f43.tar.gz gsoc2013-evolution-f17f36a31ed398d797cf96a9029efaaf83485f43.tar.zst gsoc2013-evolution-f17f36a31ed398d797cf96a9029efaaf83485f43.zip |
detect the version more completely with the new util routine (main): don't
2004-01-13 JP Rosevear <jpr@ximian.com>
* main.c (attempt_upgrade): detect the version more completely
with the new util routine
(main): don't upgrade the config db here
* e-shell.h: update proto
* e-shell.c (e_shell_attempt_upgrade): take the current version as
numerical params
* e-config-upgrade.h: update prototypes
* e-config-upgrade.c (e_config_upgrade): remove version detection
and saving code
(e_upgrade_detect_version): routine to do the version detection
* e-config-upgrade.c: drop my-evolution upgrade code
svn path=/trunk/; revision=24205
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r-- | shell/e-shell.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c index 22bfb1a9b3..fdc3bc024e 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -580,18 +580,14 @@ e_shell_new (EShellStartupLineMode startup_line_mode, * upgrade from @from_version is unsupported). **/ gboolean -e_shell_attempt_upgrade (EShell *shell, - const char *from_version) +e_shell_attempt_upgrade (EShell *shell, int major, int minor, int revision) { GSList *component_infos, *p; - int major, minor, revision; int current_major, current_minor, current_revision; gboolean success; g_return_val_if_fail (E_IS_SHELL (shell), FALSE); - g_return_val_if_fail (from_version != NULL, FALSE); - sscanf (from_version, "%u.%u.%u", &major, &minor, &revision); sscanf (VERSION, "%u.%u.%u", ¤t_major, ¤t_minor, ¤t_revision); if (! (current_major > major @@ -623,16 +619,16 @@ e_shell_attempt_upgrade (EShell *shell, } exception_text = bonobo_exception_get_text (&ev); - g_warning ("Upgrade of component \"%s\" from version %s failed with exception %s", - info->alias, from_version, exception_text); + g_warning ("Upgrade of component \"%s\" from version %d.%d.%d failed with exception %s", + info->alias, major, minor, revision, exception_text); g_free (exception_text); CORBA_exception_free (&ev); success = FALSE; } else { CORBA_exception_free (&ev); if (! component_upgraded) { - g_warning ("Component \"%s\" could not upgrade configuration from version \"%s\"", - info->alias, from_version); + g_warning ("Component \"%s\" could not upgrade configuration from version %d.%d.%d", + info->alias, major, minor, revision); success = FALSE; } } |