Error out at startup if the GConf schemas are missing
If we don't do this, then boolean/int/list keys will seem to sort of work (but defaulting to false/0/[] instead of the correct schema defaults), but string keys will return null, which will usually cause exceptions or crashes. https://bugzilla.gnome.org/show_bug.cgi?id=611214
This commit is contained in:
parent
7de5e78977
commit
20d3b1f8b1
@ -46,9 +46,21 @@ static void gconf_value_changed (GConfClient *client, const char *key,
|
|||||||
static void
|
static void
|
||||||
shell_gconf_init (ShellGConf *gconf)
|
shell_gconf_init (ShellGConf *gconf)
|
||||||
{
|
{
|
||||||
|
GConfValue *val;
|
||||||
|
|
||||||
gconf->client = gconf_client_get_default ();
|
gconf->client = gconf_client_get_default ();
|
||||||
gconf_client_add_dir (gconf->client, SHELL_GCONF_DIR,
|
gconf_client_add_dir (gconf->client, SHELL_GCONF_DIR,
|
||||||
GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
|
GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
|
||||||
|
|
||||||
|
val = gconf_client_get (gconf->client,
|
||||||
|
SHELL_GCONF_DIR "/development_tools", NULL);
|
||||||
|
if (!val)
|
||||||
|
{
|
||||||
|
g_error ("GNOME Shell GConf schemas not found.\n"
|
||||||
|
"This generally indicates a building or packaging problem.");
|
||||||
|
}
|
||||||
|
gconf_value_free (val);
|
||||||
|
|
||||||
g_signal_connect (gconf->client, "value_changed",
|
g_signal_connect (gconf->client, "value_changed",
|
||||||
G_CALLBACK (gconf_value_changed), gconf);
|
G_CALLBACK (gconf_value_changed), gconf);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user