Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2010-05-22 08:34:12 (GMT)
committer Carlos Garcia Campos <carlosgc@gnome.org>2010-05-22 08:38:05 (GMT)
commitc71cb3c049f191734d90cd144cd5ec8920c02abe (patch)
tree152d9ef2368814d0cd9a8f1f7862d95eaac18cfd
parent985f7016929bae86f89e63fc2b7b56145fbd0382 (diff)
[shell] Do not use the gconf gsettings backend any more
- 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.
-rw-r--r--configure.ac5
-rw-r--r--data/Makefile.am19
-rw-r--r--data/org.gnome.Evince.gschema.xml.in2
-rw-r--r--shell/ev-window.c3
-rw-r--r--shell/main.c5
5 files changed, 12 insertions, 22 deletions
diff --git a/configure.ac b/configure.ac
index 14a2a7c..ece94a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/data/Makefile.am b/data/Makefile.am
index feb5230..31fceaa 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -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
diff --git a/data/org.gnome.Evince.gschema.xml.in b/data/org.gnome.Evince.gschema.xml.in
index 19ebf19..3e14a95 100644
--- a/data/org.gnome.Evince.gschema.xml.in
+++ b/data/org.gnome.Evince.gschema.xml.in
@@ -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>
diff --git a/shell/ev-window.c b/shell/ev-window.c
index dbdb63b..b4e8739 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -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"
diff --git a/shell/main.c b/shell/main.c
index 187a794..e8bc6ca 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -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 &&