aboutsummaryrefslogtreecommitdiffstats
path: root/shell/main.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2004-01-14 02:51:54 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-01-14 02:51:54 +0800
commitf17f36a31ed398d797cf96a9029efaaf83485f43 (patch)
tree161eef5dfb4069fae3bfbf796cc9b6b4432bf065 /shell/main.c
parent39e6fc90623f50b7cd28850b8a0463d37e09a758 (diff)
downloadgsoc2013-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/main.c')
-rw-r--r--shell/main.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/shell/main.c b/shell/main.c
index 6f56f6b4e9..5d7cebf635 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -338,21 +338,21 @@ new_window_created_callback (EShell *shell,
#endif /* DEVELOPMENT_WARNING */
-
static void
attempt_upgrade (EShell *shell)
{
- GConfClient *gconf_client = gconf_client_get_default ();
- char *previous_version = gconf_client_get_string (gconf_client, "/apps/evolution/version", NULL);
+ GConfClient *gconf_client;
+ int major = 0, minor = 0, revision = 0;
+
+ if (!e_upgrade_detect_version (&major, &minor, &revision)
+ || !e_shell_attempt_upgrade (shell, major, minor, revision))
+ e_notice (NULL, GTK_MESSAGE_ERROR,
+ _("Warning: Evolution could not upgrade all your data from version %d.%d.%d.\n"
+ "The data hasn't been deleted, but it will not be seen by this version of Evolution.\n"),
+ major, minor, revision);
- if (previous_version != NULL) {
- if (! e_shell_attempt_upgrade (shell, previous_version))
- e_notice (NULL, GTK_MESSAGE_ERROR,
- _("Warning: Evolution could not upgrade all your data from version %s.\n"
- "The data hasn't been deleted, but it will not be seen by this version of Evolution.\n"),
- previous_version);
- }
+ gconf_client = gconf_client_get_default ();
gconf_client_set_string (gconf_client, "/apps/evolution/version", VERSION, NULL);
g_object_unref (gconf_client);
}
@@ -612,8 +612,6 @@ main (int argc, char **argv)
uri_list = g_slist_reverse (uri_list);
g_value_unset (&popt_context_value);
- e_config_upgrade (evolution_directory);
-
g_idle_add (idle_cb, uri_list);
bonobo_main ();