summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-window.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 4f66193f..30b2be9e 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -1476,7 +1476,8 @@ ev_window_setup_toolbar_flags (EvWindow *ev_window)
{
EggTbModelFlags flags = egg_toolbars_model_get_flags(ev_window->priv->toolbars_model, 0);
char *style;
- if ((style = g_settings_get_string (ev_window->priv->interface_settings, MATE_INTERFACE_TB_STYLE))) {
+ if (ev_window->priv->interface_settings &&
+ (style = g_settings_get_string (ev_window->priv->interface_settings, MATE_INTERFACE_TB_STYLE))) {
flags &= ~EGG_TB_MODEL_STYLES_MASK;
if (!strcmp (style, "both")) {
flags |= EGG_TB_MODEL_BOTH;
@@ -7672,11 +7673,17 @@ ev_window_init (EvWindow *ev_window)
"model", ev_window->priv->toolbars_model,
NULL));
- ev_window->priv->interface_settings = g_settings_new (MATE_INTERFACE_SCHEMA);
- g_signal_connect (ev_window->priv->interface_settings,
- "changed",
- G_CALLBACK (interface_changed),
- ev_window);
+ GSettingsSchema *schema_mate_interface_schema = g_settings_schema_source_lookup (g_settings_schema_source_get_default(), MATE_INTERFACE_SCHEMA, FALSE);
+ if (schema_mate_interface_schema != NULL) {
+ g_settings_schema_unref (schema_mate_interface_schema);
+
+ if (!ev_window->priv->interface_settings)
+ ev_window->priv->interface_settings = g_settings_new (MATE_INTERFACE_SCHEMA);
+ g_signal_connect (ev_window->priv->interface_settings,
+ "changed",
+ G_CALLBACK (interface_changed),
+ ev_window);
+ }
ev_window_setup_toolbar_flags (ev_window);
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (ev_window->priv->toolbar)),