diff options
author | Balló György <[email protected]> | 2014-10-03 00:20:05 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2014-10-03 08:31:39 +0200 |
commit | ac5bfbfd01210309674bd946f09f576773d06917 (patch) | |
tree | 7004916d766356cf181f43565ca5e2fb5b8ca6f8 /capplets/appearance/appearance-font.c | |
parent | d76fe8f9c85557ee767fd15fb692f3820ebb5610 (diff) | |
download | mate-control-center-ac5bfbfd01210309674bd946f09f576773d06917.tar.bz2 mate-control-center-ac5bfbfd01210309674bd946f09f576773d06917.tar.xz |
Use Caja GSettings schema optionally
This makes Caja dependency optional. Disable desktop font setting if no Caja present.
Closes https://github.com/mate-desktop/mate-control-center/pull/119
Diffstat (limited to 'capplets/appearance/appearance-font.c')
-rw-r--r-- | capplets/appearance/appearance-font.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/capplets/appearance/appearance-font.c b/capplets/appearance/appearance-font.c index 0ae22153..99281f23 100644 --- a/capplets/appearance/appearance-font.c +++ b/capplets/appearance/appearance-font.c @@ -759,11 +759,15 @@ void font_init(AppearanceData* data) G_SETTINGS_BIND_DEFAULT); widget = appearance_capplet_get_widget (data, "desktop_font"); - g_settings_bind (data->caja_settings, - DESKTOP_FONT_KEY, - G_OBJECT (widget), - "font-name", - G_SETTINGS_BIND_DEFAULT); + + if (data->caja_settings) + g_settings_bind (data->caja_settings, + DESKTOP_FONT_KEY, + G_OBJECT (widget), + "font-name", + G_SETTINGS_BIND_DEFAULT); + else + gtk_widget_set_sensitive (widget, FALSE); widget = appearance_capplet_get_widget (data, "window_title_font"); g_settings_bind (data->marco_settings, |