aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-07-02 23:52:01 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-07-02 23:52:01 +0800
commit62a4fb09124725720aa1bd5d46f594786df92c6f (patch)
tree4cba108cf27f3285467d344bc2f30eac214c22e4
parent05724f4273c8b76ce3b2bd98def409de7e6d107e (diff)
downloadgsoc2013-evolution-62a4fb09124725720aa1bd5d46f594786df92c6f.tar
gsoc2013-evolution-62a4fb09124725720aa1bd5d46f594786df92c6f.tar.gz
gsoc2013-evolution-62a4fb09124725720aa1bd5d46f594786df92c6f.tar.bz2
gsoc2013-evolution-62a4fb09124725720aa1bd5d46f594786df92c6f.tar.lz
gsoc2013-evolution-62a4fb09124725720aa1bd5d46f594786df92c6f.tar.xz
gsoc2013-evolution-62a4fb09124725720aa1bd5d46f594786df92c6f.tar.zst
gsoc2013-evolution-62a4fb09124725720aa1bd5d46f594786df92c6f.zip
Remove "last-upgraded-version" GSettings key.
AFAICT, this key does nothing useful and only confuses me every time I read the EShell migration code. The "version" key records the most recently used Evolution version. That's all we need for migration. And since downgrading Evolution is not supported, we can assume this value will only increase over time.
-rw-r--r--data/evolution.convert1
-rw-r--r--data/org.gnome.evolution.gschema.xml.in9
-rw-r--r--shell/e-shell-migrate.c19
3 files changed, 2 insertions, 27 deletions
diff --git a/data/evolution.convert b/data/evolution.convert
index a1ab31d5de..1246152013 100644
--- a/data/evolution.convert
+++ b/data/evolution.convert
@@ -1,6 +1,5 @@
[org.gnome.evolution]
version = /apps/evolution/version
-last-upgraded-version = /apps/evolution/last_version
disabled-eplugins = /apps/evolution/eplugin/disabled
[org.gnome.evolution.shell]
diff --git a/data/org.gnome.evolution.gschema.xml.in b/data/org.gnome.evolution.gschema.xml.in
index 3e8a2a7df4..c26881188d 100644
--- a/data/org.gnome.evolution.gschema.xml.in
+++ b/data/org.gnome.evolution.gschema.xml.in
@@ -2,13 +2,8 @@
<schema gettext-domain="evolution" id="org.gnome.evolution" path="/org/gnome/evolution/">
<key name="version" type="s">
<default>''</default>
- <_summary>Configuration version</_summary>
- <_description>The configuration version of Evolution, with major/minor/configuration level (for example "2.6.0").</_description>
- </key>
- <key name="last-upgraded-version" type="s">
- <default>''</default>
- <_summary>Last upgraded configuration version</_summary>
- <_description>The last upgraded configuration version of Evolution, with major/minor/configuration level (for example "2.6.0").</_description>
+ <_summary>Previous Evolution version</_summary>
+ <_description>The most recently used version of Evolution, expressed as "major.minor.micro". This is used for data and settings migration from older to newer versions.</_description>
</key>
<key name="disabled-eplugins" type="as">
<default>[]</default>
diff --git a/shell/e-shell-migrate.c b/shell/e-shell-migrate.c
index 2fe9cd69ee..5fb5ca0993 100644
--- a/shell/e-shell-migrate.c
+++ b/shell/e-shell-migrate.c
@@ -799,9 +799,7 @@ e_shell_migrate_attempt (EShell *shell)
ESEvent *ese;
GSettings *settings;
gint major, minor, micro;
- gint last_major, last_minor, last_micro;
gint curr_major, curr_minor, curr_micro;
- gboolean migrated = FALSE;
gchar *string;
g_return_val_if_fail (E_IS_SHELL (shell), FALSE);
@@ -836,23 +834,6 @@ e_shell_migrate_attempt (EShell *shell)
g_settings_set_string (settings, "version", string);
g_free (string);
- migrated = TRUE;
-
- /* Try to retrieve the last migrated version from GSettings. */
- string = g_settings_get_string (settings, "last-upgraded-version");
- if (migrated || string == NULL || sscanf (string, "%d.%d.%d",
- &last_major, &last_minor, &last_micro) != 3) {
- last_major = major;
- last_minor = minor;
- last_micro = micro;
- }
- g_free (string);
-
- string = g_strdup_printf (
- "%d.%d.%d", last_major, last_minor, last_micro);
- g_settings_set_string (settings, "last-upgraded-version", string);
- g_free (string);
-
g_object_unref (settings);
/** @Event: Shell attempted upgrade