[latexila] Remove option for disabling the use of gsettings-desktop-schemas



commit 27322b62d500716940ab7b8037dd99cfad0e5f78
Author: SÃbastien Wilmet <swilmet gnome org>
Date:   Tue Sep 4 22:12:55 2012 +0200

    Remove option for disabling the use of gsettings-desktop-schemas
    
    One aim of LaTeXila is to be well integrated in the GNOME destkop, soâ

 configure.ac          |    4 ----
 src/app_settings.vala |   23 ++++++++---------------
 vapi/config.vapi      |    1 -
 3 files changed, 8 insertions(+), 20 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index b8c9aac..5ff44b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,10 +114,6 @@ AC_DEFINE_UNQUOTED([SCHEMA_DIR],
                    ["${SCHEMA_DIR}"],
 		   [GSettings schemas directory])
 
-AC_DEFINE([DESKTOP_SCHEMAS],
-          [1],
-	  [Use desktop GSettings schemas])
-
 # Generate files
 AC_CONFIG_FILES([Makefile
 		 data/Makefile
diff --git a/src/app_settings.vala b/src/app_settings.vala
index 365d62f..b3e00ff 100644
--- a/src/app_settings.vala
+++ b/src/app_settings.vala
@@ -22,7 +22,6 @@ public class AppSettings : GLib.Settings
     private static AppSettings instance = null;
 
     private Settings editor;
-    private Settings desktop_interface;
 
     public string system_font { get; private set; }
 
@@ -45,21 +44,15 @@ public class AppSettings : GLib.Settings
         Settings prefs = get_child ("preferences");
         editor = prefs.get_child ("editor");
 
-        // the desktop schemas are optional
-        if (! Config.DESKTOP_SCHEMAS)
-            system_font = "Monospace 10";
-        else
+        Settings desktop_interface = new Settings ("org.gnome.desktop.interface");
+        system_font = desktop_interface.get_string ("monospace-font-name");
+
+        desktop_interface.changed["monospace-font-name"].connect ((setting, key) =>
         {
-            desktop_interface = new Settings ("org.gnome.desktop.interface");
-            system_font = desktop_interface.get_string ("monospace-font-name");
-
-            desktop_interface.changed["monospace-font-name"].connect ((setting, key) =>
-            {
-                system_font = setting.get_string (key);
-                if (editor.get_boolean ("use-default-font"))
-                    set_font (system_font);
-            });
-        }
+            system_font = setting.get_string (key);
+            if (editor.get_boolean ("use-default-font"))
+                set_font (system_font);
+        });
 
         editor.changed["use-default-font"].connect ((setting, key) =>
         {
diff --git a/vapi/config.vapi b/vapi/config.vapi
index 2d7fb2e..03895bf 100644
--- a/vapi/config.vapi
+++ b/vapi/config.vapi
@@ -8,5 +8,4 @@ namespace Config
     public const string GETTEXT_PACKAGE;
     public const string SCHEMA_DIR;
     public const string ICONS_DIR;
-    public const bool   DESKTOP_SCHEMAS;
 }



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