Closed github-actions[bot] closed 1 year ago
LP#0: Akbarkhon Variskhanov (kbar) wrote on 2022-10-17:
Recursively resetting both /panels and /plugins creates an empty panel-1 by default. /panels is set to type array.
Considering this default behavior (see panel_application_save), /panels should be an array in default.xml
@ochosi Can you confirm this one?
LP#1: Sean Davis (bluesabre) wrote on 2022-11-03:
I updated the /panels property to an array here: https://github.com/Xubuntu/xubuntu-default-settings/commit/d85421cb4139309b0a8168242493c15194d86b33
When I tried making the array one-indexed, the panel constantly reindexed to 0. I'm not sure if this is a bug/feature of the current panel (4.17.3).
LP#2: Akbarkhon Variskhanov (kbar) wrote on 2022-11-03:
Thanks.
Did you use
xfce4-panel-profiles
for that? Looking at its code, it resets the base property "/". Perhaps that's the issue here?I noticed that when I reset the panel manually, first "/panels" and then "/plugins", the new one is set up properly (one-indexed array). Do you observe the same behavior?
LP#3: Sean Davis (bluesabre) wrote on 2022-11-03:
I reset the panel using the Settings Editor. I tried again with just the commandline:
xfconf-query -r -R -c xfce4-panel -p /panels xfconf-query -r -R -c xfce4-panel -p /plugins
Afterwards, the only setting left in xfce4-panel was configver. I added another plugin to the panel, and it was zero-indexed again.
LP#4: Akbarkhon Variskhanov (kbar) wrote on 2022-11-06:
Ah, so you didn't restart the panel? I can observe the same behavior (4.17.4).
My guess is that the old configuration is still in memory, so adding new plug-ins "revives" it. If I monitor the whole channel:
xfconf-query -c xfce4-panel -mv
I can see that when I add a new plug-in it appears as:
set: /panels/panel-0/plugin-ids ((null))
and isn't retained after panel restart. What's more interesting is that the default plug-ins are also loaded in the process but the whole panel-0 is inaccessible and unusable: probably because position and size properties weren't set (or wiped during reset).
Resetting both /panels and /plugins, then restarting the panel fixes it. Panel IDs are stored in arrays and start from 1.
To conclude, xfce4-panel (at least the latest version) seems to prefer one-indexing newly added panels but won't refuse older configurations if they're loaded at once.
Attachments:
Issue closed on Launchpad with status: Fix Released
Reported first on Launchpad at https://bugs.launchpad.net/ubuntu/+source/xubuntu-default-settings/+bug/1993186