panel/default.xml: /panels should be array and one-indexed

Bug #1993186 reported by Akbarkhon Variskhanov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xubuntu-default-settings (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

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

Revision history for this message
Sean Davis (bluesabre) wrote :

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).

Changed in xubuntu-default-settings (Ubuntu):
status: New → Fix Committed
Revision history for this message
Akbarkhon Variskhanov (kbar) wrote :

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?

Revision history for this message
Sean Davis (bluesabre) wrote :

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.

Revision history for this message
Akbarkhon Variskhanov (kbar) wrote :

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.

Revision history for this message
Sean Davis (bluesabre) wrote :

Thanks for the expanded details. I was finally able to reproduce what you're seeing and applied a patch. Coming in xubuntu-default-settings 23.04.0!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xubuntu-default-settings - 23.04.0

---------------
xubuntu-default-settings (23.04.0) lunar; urgency=medium

  * debian/rules,
    etc/xdg/xdg-xubuntu/xfce4/whiskermenu/defaults.rc.in:
    - Enable translations for Whisker Menu (LP: #1926180)
  * usr/share/xubuntu/applications/defaults.list:
    - Fix default association for debian packages (LP: #1993063)
  * etc/xdg/xdg-xubuntu/xfce4/panel/default.xml:
    - Update panel and plugin properties (LP: #1993186)
    - Use automatic icon size for systray
  * etc/xdg/xdg-xubuntu/xfce4/terminal/terminalrc:
    - Increase terminal font size to 10 (LP: #1819466)
  * debian/control:
    - Bump Standards-Version to 4.6.1.0

 -- Sean Davis <email address hidden> Fri, 25 Nov 2022 06:13:46 -0500

Changed in xubuntu-default-settings (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.