Loading custom panel layouts fails on 19.10

Bug #1847595 reported by Yoshida Shouyou on 2019-10-10
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Ubuntu MATE
Undecided
Unassigned

Bug Description

Hi,

Loading a custom panel layout (using MATE Tweak or CLI) saved with MATE Tweak fails on Ubuntu MATE 19.10.

It seems to load the correct layout for a fraction of a second and then becomes buggy.

If I save a custom layout for two monitors with one top panel per monitor and then load it, the second panel will become a blank panel on top of Monitor 1's own top panel.

Even with only one custom panel it doesn't seem to load settings correctly, whether it's related to applets (weather applet for instance won't load the previously chosen settings) or the panel itself (doesn't apply the saved custom color/transparency) as well.

Thanks !

tags: added: custom layouts panel
tags: added: ui
removed: custom layouts panel
arQon (pf.arqon) wrote :
Download full text (4.6 KiB)

Case #1: The simple example.

Customise your panel layout. Save it. Load a different layout. Load your custom layout.

Obviously, this should return you to how things were when you saved your layout. Instead, you'll probably get something that bears very little relationship to it. Even worse, every setting that you have for ALL of your panel applets will have been wiped out. For example, if you had set a location for the clock applet, that will now be gone. If you changed the clock to 12H format, it'll be back to 24H. ALL your customisation will be gone. That means that things like HW Sensors and System Monitor will be back to their defaults too. So if you were monitoring multiple cores on your CPU, those will all have vanished, and so on.

Case #2: The "WTF?!" example.

Customise your panel layout. Save it TWICE with two different names. Load the first save again.

This one resulted in something even more broken. Rather than just wipe out all your settings, it gives you DUPLICATES of the applets, with one set having what is at least partially the correct settings, and the other set using the defaults. For example, if you had System Monitor tracking CPU and RAM, you'll end up with 3 windows: two CPU and one RAM. If you had an app launcher on the panel, you might now have 2 of the same app.
(Note that I did this after the initial borkage, so this one may be presenting a combination of that with a new bug).

It's hard to even guess at what's going on here. It's especially confusing since the bugs with the panel crashing when you save a custom layout are fixed in 19.10, and it defies belief that loading panels wouldn't have been tested at least once. The behavior isn't consistent either, as seen above.

Case #2 is potentially the easiest to at least understand what happened: AFAICT, it simply MERGED the layout it was supposed to be loading, without removing the current layout first. For example, the .panel file for it contains this at line 42:

    [objects/cpufreqapplet]
    applet-iid='CPUFreqAppletFactory::CPUFreqApplet'
    locked=false
    object-type='applet'
    panel-right-stick=false
    position=260
    toplevel-id='toplevel_0'

which I expect is the layout for that applet after Case #1 wiped out all the customisation... but it also contains this at line 314:

    [objects/object-14]
    applet-iid='CPUFreqAppletFactory::CPUFreqApplet'
    object-type='applet'
    panel-right-stick=false
    position=399
    toplevel-id='toplevel-0'

    [objects/object-14/prefs]
    cpu=3
    show-text-mode=0

    [objects/object-15]
    applet-iid='CPUFreqAppletFactory::CPUFreqApplet'
    object-type='applet'
    panel-right-stick=false
    position=354
    toplevel-id='toplevel-0'

    [objects/object-15/prefs]
    cpu=2
    show-text-mode=0

    [objects/object-16]
    applet-iid='CPUFreqAppletFactory::CPUFreqApplet'
    object-type='applet'
    panel-right-stick=false
    position=309
    toplevel-id='toplevel-0'

    [objects/object-16/prefs]
    cpu=1
    show-text-mode=0

    [objects/object-17]
    applet-iid='CPUFreqAppletFactory::CPUFreqApplet'
    object-type='applet'
    panel-right-stick=false
    position=264
    toplevel-id='toplevel-0'...

Read more...

In my *.layout file The default section for my second panel looks like this. With those settings, panel 2 goes below panel 1 on monitor 1 instead of being on monitor 2:

[Toplevel toplevel-0]
size=28
expand=true
orientation=top

Adding "monitor=1" in this section allows panel 2 to be on monitor 2 as wanted.

[Toplevel toplevel-0]
size=28
expand=true
orientation=top
monitor=1

Renaming the objects of panel 2 in the *.layout file so that objects from the two panels don't share the same name fixes the blank panel 2 problem.

Norbert (nrbrtx) on 2019-10-20
tags: added: eoan
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers