Author: kelnos
Date: 2008-09-12 05:39:34 +0000 (Fri, 12 Sep 2008)
New Revision: 27825
Modified:
xfce-utils/trunk/scripts/xfconf-migration-4.6.pl.in
Log:
migrate workspace names into an xfconf string array instead
Modified: xfce-utils/trunk/scripts/xfconf-migration-4.6.pl.in
===================================================================
--- xfce-utils/trunk/scripts/xfconf-migration-4.6.pl.in 2008-09-11 18:35:07 UTC
(rev 27824)
+++ xfce-utils/trunk/scripts/xfconf-migration-4.6.pl.in 2008-09-12 05:39:34 UTC
(rev 27825)
@@ -520,9 +520,29 @@
save_xfconf_prop($ref, $chan, 'Xfwm/WorkspaceCount',
'/general/workspace_count', 'int');
- save_xfconf_prop($ref, $chan, 'names',
- '/general/workspace_names', 'string');
+ # going to use a new format for the workspace names. it used to be
+ # a semicolon delimited list of names, but we might as well use
+ # an xfconf string array.
+ if(defined(${$ref}{'names'})) {
+ my $val = ${$ref}{'names'}->{'value'};
+ my @names = split(/;/, $val);
+
+ if(scalar(@names)) {
+ my $xfconf_query = 'xfconf-query -n -c '.$chan;
+ $xfconf_query .= ' -p /general/workspace_names';
+
+ foreach my $name (@names) {
+ $name =~ s/'/'\''/g;
+ $xfconf_query .= " -t string -s '$name'";
+ }
+
+ print $xfconf_query."\n" if($debug);
+
+ system("$xfconf_query");
+ }
+ }
+
return $mcs.'.xml';
}
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits