}
gc = GConf.Client.get_default ();
- download_posters = gc.get_bool ("/apps/cinaest/download_posters");
- gc.add_dir ("/apps/cinaest", GConf.ClientPreloadType.ONELEVEL);
- cxnid = gc.notify_add ("/apps/cinaest/download_posters", on_download_posters_changed);
+ try {
+ download_posters = gc.get_bool ("/apps/cinaest/download_posters");
+ gc.add_dir ("/apps/cinaest", GConf.ClientPreloadType.ONELEVEL);
+ cxnid = gc.notify_add ("/apps/cinaest/download_posters", on_download_posters_changed);
+ } catch (Error e) {
+ stdout.printf ("Error installing GConf notification: %s\n", e.message);
+ }
}
private static void on_download_posters_changed (GConf.Client gc, uint cxnid, GConf.Entry entry) {
int res = 0;
var gc = GConf.Client.get_default ();
- download_posters.set_active (gc.get_bool ("/apps/cinaest/download_posters"));
+ try {
+ download_posters.set_active (gc.get_bool ("/apps/cinaest/download_posters"));
+ } catch (Error e) {
+ stdout.printf ("Error getting GConf option: %s\n", e.message);
+ }
show_all ();
}
} while (res >= 0);
- if (res == ResponseType.ACCEPT)
+ if (res == ResponseType.ACCEPT) try {
gc.set_bool ("/apps/cinaest/download_posters", download_posters.get_active ());
+ } catch (Error e) {
+ stdout.printf ("Error setting GConf option: %s\n", e.message);
+ }
destroy ();
return res;