[Vala] GSettings and not-available schemas




-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all:

I'm working with GSettings. I want to read org.gnome.desktop.background
and want to ensure that my code works even when the schema is not
installed (let's say, if the user is using KDE).

When I try to access an inexistent schema, I receive this message:

(cronopete:15673): GLib-GIO-ERROR **: Settings schema
'org.gnome54.desktop.background' is not installed

Trace/breakpoint trap (core dumped)

I tried to catch it with try/catch, but I'm unable: always got the core
dumped and the code ends.

I'm considering to read all the installed schemas and ensure that the
one I want is installed before creating the gsettings, but I'm sure
there must be a more elegant way of doing it. The question is: how?

Thanks!

- -- 
Nos leemos
                 RASTER    (Linux user #228804)
raster rastersoft com              http://www.rastersoft.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlDONkwACgkQXEZvyfy1ha9n2wCeJjijAxLI3wJAvHf1LxxZFAcL
WrgAn21u+/iu8P9mRysBADoB9ByBZFVu
=Jq+V
-----END PGP SIGNATURE-----




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]