org.mate.panel.toplevel.background: glib-compile-schemas doesn't compile panel "color" unless "type" is set

Bug #2030492 reported by David Hedlund
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mate-panel (Ubuntu)
New
Undecided
Unassigned

Bug Description

# gsettings (control)
* Check the default system settings in Ubuntu MATE 23.04:
```
gsettings get org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/ color
# Output:
# '#ffffff'
gsettings get org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/ type
# Output:
# 'none'
```
* Set a panel background with gsettings, then verify it:
```
gsettings set org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/ color '#00ff00'
gsettings get org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/ color
# Output:
# '#00ff00'
```
* Reset the color: `gsettings reset org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/ color`

# glib-compile-schemas doesn't compile it
* Run this in a terminal:
```
sudo tee /usr/share/glib-2.0/schemas/zzz.gschema.override > /dev/null << 'EOF'
# green mate-panel background color. type='color' must be set in addition
[org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/]
color='#00ff00'
EOF

sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
```
* No error was reported by glib-compile-schemas
* Log out, and log in from MATE
* Run this
```
gsettings get org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/ color
# Output:
# '#ffffff'
gsettings get org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/ type
# Output:
# 'none'

####################
# Reset to the new system wide default settings:
gsettings reset-recursively org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/

# Check the values again to compare them with their previous output:
gsettings get org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/ color
# Output:
# '#ffffff'
gsettings get org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/ type
# Output:
# 'none'
```
* As you can see, the values don't change. My under

## Workaround: Include type='color'
* Run this in a terminal:
```
sudo tee /usr/share/glib-2.0/schemas/zzz.gschema.override > /dev/null << 'EOF'

# green mate-panel background color. type='color' must be set in addition
[org.mate.panel.toplevel.background]
color='#00ff00'
type='color'

sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
```
* No error was reported by glib-compile-schemas
* Log out, and log in from MATE
* Run this
```
# Check the values:
gsettings get org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/ color
# Output:
# '#00ff00'
gsettings get org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/ type
# Output:
# 'color'

####################
# Reset to the new system wide default settings:
gsettings reset-recursively org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/

# Check the values again to compare them with their previous output:
gsettings get org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/ color
# '#00ff00'
gsettings get org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/ type
# Output:
# 'color'
```
* As you can see, the values are changed.

## Why the color variable should not be required
The color is selected even if the style is changed to "none"

![Screenshot at 2023-08-07 12-32-54](https://github.com/mate-desktop/mate-desktop/assets/6416073/fa27c36e-15b6-49a1-b007-37cd72439e71)
![Screenshot at 2023-08-07 12-33-36](https://github.com/mate-desktop/mate-desktop/assets/6416073/347e9756-6a21-409a-8d00-58d4a4f2e8fd)
![Screenshot at 2023-08-07 12-33-48](https://github.com/mate-desktop/mate-desktop/assets/6416073/dc40b407-7513-457a-9dc8-df9e2855d7dd)

# Distributions
Ubuntu MATE 22.04:
```
$ apt-cache show libglib2.0-bin | head -8
Package: libglib2.0-bin
Architecture: amd64
Version: 2.72.4-0ubuntu2.2
Multi-Arch: foreign
Priority: optional
Section: misc
Source: glib2.0
Origin: Ubuntu
```

Ubuntu MATE 23.04:
```
$ apt-cache show libglib2.0-bin | head -8
Package: libglib2.0-bin
Architecture: amd64
Version: 2.76.1-1
Multi-Arch: foreign
Priority: optional
Section: misc
Source: glib2.0
Origin: Ubuntu
```

# Upstream issue link
https://github.com/mate-desktop/mate-desktop/issues/562

David Hedlund (g-public)
description: updated
David Hedlund (g-public)
description: updated
affects: ubuntu → mate-panel (Ubuntu)
description: updated
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.