diff options
author | Chris Toshok <toshok@ximian.com> | 2004-04-10 01:20:51 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2004-04-10 01:20:51 +0800 |
commit | 65a076f8dc040039769be03e5461506ce43148ab (patch) | |
tree | a6a1ee0f2cde28524b0d1752d770a43f33ac8ddb /shell | |
parent | 19fed9bc8395928b12a7351e334b336148290440 (diff) | |
download | gsoc2013-evolution-65a076f8dc040039769be03e5461506ce43148ab.tar.gz gsoc2013-evolution-65a076f8dc040039769be03e5461506ce43148ab.tar.zst gsoc2013-evolution-65a076f8dc040039769be03e5461506ce43148ab.zip |
use BASE_VERSION to supply the major/minor version, and use
2004-04-09 Chris Toshok <toshok@ximian.com>
* e-shell.c (e_shell_attempt_upgrade): use BASE_VERSION to supply
the major/minor version, and use UPGRADE_REVISION for the
revision.
(attempt_upgrade): store the key based on BASE_VERSION and
UPGRADE_REVISION.
svn path=/trunk/; revision=25386
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 8 | ||||
-rw-r--r-- | shell/e-shell.c | 17 |
2 files changed, 19 insertions, 6 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 8635e6537a..dc6f8ad5df 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,11 @@ +2004-04-09 Chris Toshok <toshok@ximian.com> + + * e-shell.c (e_shell_attempt_upgrade): use BASE_VERSION to supply + the major/minor version, and use UPGRADE_REVISION for the + revision. + (attempt_upgrade): store the key based on BASE_VERSION and + UPGRADE_REVISION. + 2004-04-09 Dan Winship <danw@ximian.com> * e-user-creatable-items-handler.c: Change this a lot. Now each diff --git a/shell/e-shell.c b/shell/e-shell.c index 4c5748031f..fb6909c5c5 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -521,6 +521,7 @@ attempt_upgrade (EShell *shell) { GConfClient *gconf_client; int major = 0, minor = 0, revision = 0; + char *version_string; gconf_client = gconf_client_get_default (); @@ -531,8 +532,10 @@ attempt_upgrade (EShell *shell) "The data hasn't been deleted, but it will not be seen by this version of Evolution.\n"), major, minor, revision); - gconf_client_set_string (gconf_client, "/apps/evolution/version", VERSION, NULL); + version_string = g_strdup_printf ("%s.%s", BASE_VERSION, UPGRADE_REVISION); + gconf_client_set_string (gconf_client, "/apps/evolution/version", version_string, NULL); g_object_unref (gconf_client); + g_free (version_string); } /** @@ -659,7 +662,9 @@ e_shell_attempt_upgrade (EShell *shell, int major, int minor, int revision) g_return_val_if_fail (E_IS_SHELL (shell), FALSE); - sscanf (VERSION, "%u.%u.%u", ¤t_major, ¤t_minor, ¤t_revision); + sscanf (BASE_VERSION, "%u.%u", ¤t_major, ¤t_minor); + + current_revision = atoi (UPGRADE_REVISION); if (! (current_major > major || (current_major == major && current_minor > minor) @@ -682,8 +687,8 @@ e_shell_attempt_upgrade (EShell *shell, int major, int minor, int revision) if (BONOBO_EX (&ev)) { char *exception_text; - // Ignore components that do not implement this version, it might just mean that they don't need an - // upgrade path. + /* Ignore components that do not implement this version, it might just mean that they don't need an + upgrade path. */ if (strcmp (ev._id, ex_CORBA_NO_IMPLEMENT) == 0) { CORBA_exception_free (&ev); continue; @@ -1008,8 +1013,8 @@ e_shell_send_receive (EShell *shell) GNOME_Evolution_Component_sendAndReceive (info->iface, &ev); - // Ignore errors, the components can decide to not implement - // this interface. + /* Ignore errors, the components can decide to not implement + this interface. */ CORBA_exception_free (&ev); } |