Skip to content

colorpickershell: Unpack the tuple returned from PickColor()

Iain Lane requested to merge fix-shell-colorpicker into master

When calling PickColor on org.gnome.Shell, we get back an "a{sv}", which GDBus provides to us as "(a{sv})".

At the minute we're not unpacking this tuple, and so picking fails with messages like:

GLib-CRITICAL : 13:38:19.439: g_variant_lookup_value: assertion 'g_variant_is_of_type (dictionary, G_VARIANT_TYPE ("a{s}")) || g_variant_is_of_type (dictionary, G_VARIANT_TYPE ("a{o}"))' failed

Gtk-WARNING **: 13:38:19.439: Picking color failed: No color received

Let's unpack it.

For me, it was enough to start gtk3-widget-factory on Debian and then use the picker from page 3 there. (full disclosure: I didn't test the gtk4 version of this branch, but a cherry-pick of the same patch to gtk-3)

Merge request reports