Updating branch refs/heads/master to 4d9f193f5195f4c62f9abf5a49a55488f9d6c1b3 (commit) from 4d4972b533409b5ea43658e05d31ec8066728e57 (commit)
commit 4d9f193f5195f4c62f9abf5a49a55488f9d6c1b3 Author: Nick Schermer <n...@xfce.org> Date: Sat Apr 28 21:35:14 2012 +0200 Migrate: Don't try to migrate already migrated plugin (bug #8778). If the migration fails, don't reset the action type but abort instead. 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 eb8c5fa..d0d49e7 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); _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits