Browse Source

Migrate: Don't try to migrate already migrated plugin (bug #8778).

If the migration fails, don't reset the action type but
abort instead.
tags/xfce4-panel-4.10.0
Nick Schermer 9 years ago
parent
commit
4d9f193f51
1 changed files with 9 additions and 4 deletions
  1. +9
    -4
      migrate/migrate-config.c

+ 9
- 4
migrate/migrate-config.c View File

@@ -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);


Loading…
Cancel
Save