Add GLib.VariantDict.to_pydict()
Submitted by Simon Feltman
Link to original bug (#736597)
Description
Gio.Application:handle-local-options receives a GLib.VariantDict() instance which is hard to work with in Python. We should probably add a to_pydict() override.
Note the fundamental type of VariantDict is boxed not Variant:
In [1]: from gi.repository import GLib
In [2]: GLib.Variant.__gtype__.fundamental
Out[2]: <GType GVariant (84)>
In [3]: GLib.VariantDict.__gtype__.fundamental
Out[3]: <GType GBoxed (72)>
A noted workaround is to use GLib.VariantDict.end().unpack() to get back a Python dictionary.
Edited by Christoph Reiter