diff options
author | Nick Schermer <nick@xfce.org> | 2012-04-28 21:35:14 +0200 |
---|---|---|
committer | Nick Schermer <nick@xfce.org> | 2012-04-28 21:35:14 +0200 |
commit | 4d9f193f5195f4c62f9abf5a49a55488f9d6c1b3 (patch) | |
tree | ee88e0ee2de2022a02255d61ab2801bc3ca71534 | |
parent | 4d4972b533409b5ea43658e05d31ec8066728e57 (diff) |
Migrate: Don't try to migrate already migrated plugin (bug #8778).
If the migration fails, don't reset the action type but
abort instead.
-rw-r--r-- | migrate/migrate-config.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/migrate/migrate-config.c b/migrate/migrate-config.c index eb8c5faf..d0d49e78 100644 --- a/migrate/migrate-config.c +++ b/migrate/migrate-config.c @@ -125,6 +125,15 @@ migrate_config_action_48 (gpointer key, || g_strcmp0 (g_value_get_string (gvalue), "actions") != 0) return; + /* this is a bug that affects pre users: don't try to migrate + * when the appearance property is already set */ + g_snprintf (str, sizeof (str), "%s/appearance", prop); + if (xfconf_channel_has_property (channel, str)) + return; + + /* set appearance to button mode */ + xfconf_channel_set_uint (channel, str, 0); + /* read and remove the old properties */ g_snprintf (str, sizeof (str), "%s/first-action", prop); first_action_int = xfconf_channel_get_uint (channel, str, 0) + 1; @@ -140,10 +149,6 @@ migrate_config_action_48 (gpointer key, if (first_action_int == second_action_int) second_action_int = 0; - /* set appearance to button mode */ - g_snprintf (str, sizeof (str), "%s/appearance", prop); - xfconf_channel_set_uint (channel, str, 0); - /* set orientation */ g_snprintf (str, sizeof (str), "%s/invert-orientation", prop); xfconf_channel_set_bool (channel, str, second_action_int > 0); |