]> www.fi.muni.cz Git - evince.git/commitdiff
[shell] Do not use the gconf gsettings backend any more
authorCarlos Garcia Campos <carlosgc@gnome.org>
Sat, 22 May 2010 08:34:12 +0000 (10:34 +0200)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Sat, 22 May 2010 08:38:05 +0000 (10:38 +0200)
  - rename keys to follow gsettings name restrictions (s/_/-/)
  - remove the hardcoding of the gconf backend
  - use new gsettings macros as they have changed in glib 2.25.6

Based on patch by Matthias Clasen, see bug #619335.

configure.ac
data/Makefile.am
data/org.gnome.Evince.gschema.xml.in
shell/ev-window.c
shell/main.c

index 14a2a7c5d926722de0d6a060d2520a08b7d743b8..ece94a300113a77d39bea60eaa8046c7c8cfa8b8 100644 (file)
@@ -124,9 +124,8 @@ AM_CONDITIONAL([PLATFORM_WIN32],[test "$with_platform" = "win32"])
 dnl Specify required versions of dependencies
 DBUS_GLIB_REQUIRED=0.70
 GTK_REQUIRED=2.21.0
-GLIB_REQUIRED=2.25.3
+GLIB_REQUIRED=2.25.6
 KEYRING_REQUIRED=2.22.0
-GCONF_REQUIRED=2.31.2
 AC_SUBST([GLIB_REQUIRED])
 AC_SUBST([GTK_REQUIRED])
 
@@ -314,7 +313,7 @@ AC_MSG_RESULT([$with_gconf])
 AM_CONDITIONAL([WITH_GCONF],[test "$with_gconf" = "yes"])
 
 if test "$with_gconf" = "yes"; then
-   PKG_CHECK_MODULES([GCONF],[gconf-2.0 >= $GCONF_REQUIRED])
+   PKG_CHECK_MODULES([GCONF],[gconf-2.0])
    AC_DEFINE([WITH_GCONF],[1],[Define if GConf support is enabled])
 
    AM_GCONF_SOURCE_2
index feb52301527bcf88e1a41a07aab9cbd3c00c0b6f..31fceaafe0f51a147863c73ee39792bccf14ee69 100644 (file)
@@ -50,19 +50,16 @@ endif
 #
 # GSettings schema
 #
-
-# gsettingsschemadir and gschema_compile are defined by the GLIB_GSETTINGS
-# macro in configure.ac
 gsettingsschema_in_files = org.gnome.Evince.gschema.xml.in
-gsettingsschema_DATA = $(gsettingsschema_in_files:.xml.in=.xml)
+# gsettings_SCHEMAS is a list of all the schemas you want to install
+gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml)
+
+.PRECIOUS: $(gsettings_SCHEMAS)
+
 @INTLTOOL_XML_NOMERGE_RULE@
-# This rule will check your schemas for validity before installation
-# Uncomment when porting is done
-# GSETTINGS_CHECK_RULE
-if GSETTINGS_SCHEMAS_INSTALL
-install-data-hook:
-       $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --allow-any-name $(DESTDIR)$(gsettingsschemadir) --targetdir=$(DESTDIR)$(gsettingsschemadir)
-endif
+
+# include the appropriate makefile rules for schema handling
+@GSETTINGS_RULES@
 
 #
 # GTK icon cache
index 19ebf1931839221dd3e7fa4bf74ec07a1a4ce5e6..3e14a958bf6652f3abe61c1a3571226e18149a71 100644 (file)
@@ -1,6 +1,6 @@
 <schemalist>
   <schema id="org.gnome.Evince" path="/apps/evince/" gettext-domain="evince">
-    <key name="override_restrictions" type="b">
+    <key name="override-restrictions" type="b">
       <default>true</default>
       <summary>Override document restrictions</summary>
       <description>Override document restrictions, like restriction to copy or to print.</description>
index dbdb63b9c3b0b92790e496a9e6de6051481f95a6..b4e87394b2768c25b0b16980af3562adcdbeee0d 100644 (file)
@@ -223,13 +223,12 @@ struct _EvWindowPrivate {
 #define NAVIGATION_ACTION      "Navigation"
 
 #define GCONF_LOCKDOWN_DIR          "/desktop/gnome/lockdown"
-#define GCONF_OVERRIDE_RESTRICTIONS "/apps/evince/override_restrictions"
 #define GCONF_LOCKDOWN_SAVE         "/desktop/gnome/lockdown/disable_save_to_disk"
 #define GCONF_LOCKDOWN_PRINT        "/desktop/gnome/lockdown/disable_printing"
 #define GCONF_LOCKDOWN_PRINT_SETUP  "/desktop/gnome/lockdown/disable_print_setup"
 
 #define GS_SCHEMA_NAME           "org.gnome.Evince"
-#define GS_OVERRIDE_RESTRICTIONS "override_restrictions"
+#define GS_OVERRIDE_RESTRICTIONS "override-restrictions"
 
 #define SIDEBAR_DEFAULT_SIZE    132
 #define LINKS_SIDEBAR_ID "links"
index 187a794c45d9eb76d195483eb5b6c5935f8e6b64..e8bc6ca1c5e20dc834376c5a7c74c410f20cb892 100644 (file)
@@ -238,11 +238,6 @@ main (int argc, char *argv[])
        GOptionContext *context;
        GError         *error = NULL;
 
-#ifdef WITH_GCONF
-       /* Remove when porting is done */
-       g_setenv ("GSETTINGS_BACKEND", "gconf", FALSE);
-#endif
-
 #ifdef G_OS_WIN32
 
     if (fileno (stdout) != -1 &&