[Xfce4-commits] <xfce4-panel:xfce-4.8> Fix 4.6 migration of action buttons (bug #7543).
Nick Schermer
noreply at xfce.org
Sat Jun 18 12:18:05 CEST 2011
Updating branch refs/heads/xfce-4.8
to 2f0852c8791ab3bd386fbd6f000428de6ceabf20 (commit)
from 41e5482515c400ddbad866f49f8154bc77991c75 (commit)
commit 2f0852c8791ab3bd386fbd6f000428de6ceabf20
Author: Nick Schermer <nick at xfce.org>
Date: Sat May 28 14:09:45 2011 +0200
Fix 4.6 migration of action buttons (bug #7543).
(cherry picked from commit 6bf9caa72a16240c54b1d7b91c36798a151de483)
migrate/migrate-46.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/migrate/migrate-46.c b/migrate/migrate-46.c
index 2f9ebcc..fb2bece 100644
--- a/migrate/migrate-46.c
+++ b/migrate/migrate-46.c
@@ -276,7 +276,9 @@ static void
migrate_46_plugin_actions (XfconfChannel *channel,
XfceRc *rc)
{
- gint type;
+ gint type;
+ guint first_action = 0;
+ guint second_action = 0;
if (!xfce_rc_has_entry (rc, "type"))
return;
@@ -285,18 +287,21 @@ migrate_46_plugin_actions (XfconfChannel *channel,
switch (type)
{
case 0: /* ACTION_QUIT */
- xfconf_channel_set_uint (channel, "/first-action", 0);
+ first_action = 1;
break;
case 1: /* ACTION_LOCK */
- xfconf_channel_set_uint (channel, "/first-action", 2);
+ first_action = 2;
break;
default: /* ACTION_QUIT_LOCK */
- xfconf_channel_set_uint (channel, "/first-action", 0);
- xfconf_channel_set_uint (channel, "/second-action", 2);
+ first_action = 1;
+ second_action = 3;
break;
}
+
+ xfconf_channel_set_uint (channel, "/first-action", first_action);
+ xfconf_channel_set_uint (channel, "/second-action", second_action);
}
More information about the Xfce4-commits
mailing list