[gedit/gsettings: 1/7] Port main program to GSettings.



commit d8ea2e75a14142f12ef14c57eb769781233a13bb
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Tue Oct 27 21:25:18 2009 +0100

    Port main program to GSettings.
    
    Switch from gconf to gsettings to manange the configuration.
    This patch only ports the main program, plugins are missing.
    Also it needs some fixes to run in a good way.

 configure.ac                             |   21 +-
 data/Makefile.am                         |   22 +-
 data/gedit.schemas.in.in                 |  537 ----------
 data/org.gnome.gedit.schemas.in          |   68 ++
 gedit/Makefile.am                        |    5 +-
 gedit/dialogs/gedit-encodings-dialog.c   |   47 +-
 gedit/dialogs/gedit-preferences-dialog.c |  454 ++++------
 gedit/gedit-app.c                        |   64 ++-
 gedit/gedit-app.h                        |    4 +
 gedit/gedit-document-saver.c             |   14 +-
 gedit/gedit-document-saver.h             |    2 +
 gedit/gedit-document.c                   |   51 +-
 gedit/gedit-encodings-option-menu.c      |  444 ++++++++
 gedit/gedit-file-chooser-dialog.c        |    8 +-
 gedit/gedit-history-entry.c              |  103 +--
 gedit/gedit-io-error-message-area.c      |   12 +-
 gedit/gedit-language-manager.c           |    1 -
 gedit/gedit-plugins-engine.c             |   33 +-
 gedit/gedit-prefs-manager-app.c          | 1620 ------------------------------
 gedit/gedit-prefs-manager-app.h          |   84 --
 gedit/gedit-prefs-manager.c              | 1241 -----------------------
 gedit/gedit-prefs-manager.h              |  423 --------
 gedit/gedit-print-job.c                  |  236 +++--
 gedit/gedit-session.c                    |    1 -
 gedit/gedit-settings.c                   | 1323 ++++++++++++++++++++++++
 gedit/gedit-settings.h                   |  152 +++
 gedit/gedit-style-scheme-manager.c       |    1 -
 gedit/gedit-tab.c                        |   41 +-
 gedit/gedit-utils.c                      |  225 ++++-
 gedit/gedit-utils.h                      |   19 +
 gedit/gedit-view.c                       |  105 ++-
 gedit/gedit-window-private.h             |    5 +-
 gedit/gedit-window.c                     |  114 ++-
 gedit/gedit.c                            |    6 -
 plugins/checkupdate/Makefile.am          |   26 +-
 plugins/filebrowser/Makefile.am          |   20 -
 po/POTFILES.in                           |    1 -
 po/POTFILES.skip                         |    1 -
 38 files changed, 2996 insertions(+), 4538 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7f45264..9ac8d94 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,7 +51,7 @@ dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
 AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS -I m4")
 
 dnl active plugins for gedit.schemas
-ACTIVE_PLUGINS="docinfo,modelines,filebrowser,spell,time"
+ACTIVE_PLUGINS="'docinfo', 'modelines', 'filebrowser', 'spell', 'time'"
 AC_SUBST(ACTIVE_PLUGINS)
 
 dnl toolbar style for gedit schemas
@@ -63,7 +63,7 @@ AC_MSG_CHECKING([for Win32 platform])
 case "$host" in
   *-*-mingw*|*-*-cygwin*)
     platform_win32=yes
-    TOOLBAR_STYLE="GEDIT_TOOLBAR_ICONS"
+    TOOLBAR_STYLE="'GEDIT_TOOLBAR_ICONS'"
     ;;
   *)
     platform_win32=no
@@ -77,7 +77,7 @@ case "$host" in
   *-*-mingw*)
     os_win32=yes
     AC_CHECK_TOOL(WINDRES, windres)
-    ACTIVE_PLUGINS="${ACTIVE_PLUGINS},checkupdate"
+    ACTIVE_PLUGINS="${ACTIVE_PLUGINS}, 'checkupdate'"
     ;;
   *)
     os_win32=no
@@ -105,7 +105,7 @@ gdk_windowing=`$PKG_CONFIG --variable=target gdk-2.0`
 AC_MSG_CHECKING([for native Mac OS X])
 if test "$gdk_windowing" = "quartz"; then
 	os_osx=yes
-	ACTIVE_PLUGINS="${ACTIVE_PLUGINS},checkupdate"
+	ACTIVE_PLUGINS="${ACTIVE_PLUGINS}, 'checkupdate'"
 else
 	os_osx=no
 fi
@@ -272,6 +272,11 @@ GEDIT_LIBS="$GEDIT_LIBS $X11_LIBS"
 AC_SUBST(GEDIT_CFLAGS)
 AC_SUBST(GEDIT_LIBS)
 
+AC_SUBST(gsettingsschemadir,
+         `pkg-config --variable gsettingsschemadir gio-2.0`)
+AC_SUBST(gsettingsupdateschemacache,
+         `pkg-config --variable gsettingsupdateschemacache gio-2.0`)
+
 dnl FIXME: Remove this when removing gedit-message-area
 
 if $PKG_CONFIG --atleast-version 2.17.1 gtk+-2.0; then
@@ -309,12 +314,6 @@ AC_SUBST(EGG_SMCLIENT_CFLAGS)
 AC_SUBST(EGG_SMCLIENT_LIBS)
 
 dnl ================================================================
-dnl GConf related settings
-dnl ================================================================
-
-AM_GCONF_SOURCE_2
-
-dnl ================================================================
 dnl Python
 dnl ================================================================
 
@@ -493,7 +492,7 @@ Makefile
 data/gedit.desktop.in
 data/gedit-bugreport.sh
 data/gedit.pc
-data/gedit.schemas.in
+data/org.gnome.gedit.schemas
 data/Makefile
 docs/Makefile
 docs/reference/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index 669f1dd..f01cc96 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -3,10 +3,7 @@ desktop_in_files = gedit.desktop.in
 desktop_DATA 	 = $(desktop_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 
-schemasdir	 = $(GCONF_SCHEMA_FILE_DIR)
-schemas_in_files = gedit.schemas.in
-schemas_DATA 	 = $(schemas_in_files:.schemas.in=.schemas)
- INTLTOOL_SCHEMAS_RULE@
+gsettingsschema_DATA = org.gnome.gedit.schemas
 
 man_MANS = gedit.1
 
@@ -19,28 +16,19 @@ gedit- GEDIT_API_VERSION@.pc: gedit.pc
 bugreportdir = $(libexecdir)/gedit-2
 bugreport_SCRIPTS = gedit-bugreport.sh
 
-if GCONF_SCHEMAS_INSTALL
-install-data-local:
-	        if test -z "$(DESTDIR)" ; then \
-	                for p in $(schemas_DATA) ; do \
-	                        GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_builddir)/data/$$p ; \
-	                done \
-	        fi
-else
-install-data-local:
-endif
+install-data-hook:
+	$(gsettingsupdateschemacache) $(gsettingsschemadir)
 
 EXTRA_DIST = 				\
 	$(desktop_in_files)		\
-	$(schemas_in_files)		\
 	gedit.schemas.in.in		\
 	$(man_MANS)			\
 	gedit.pc.in			\
-	gedit-bugreport.sh.in
+	gedit-bugreport.sh.in		\
+	$(gsettingsschema_DATA)
 
 CLEANFILES =	 			\
 	$(desktop_DATA)			\
-	$(schemas_DATA)			\
 	$(pkgconfig_DATA)
 
 
diff --git a/data/org.gnome.gedit.schemas.in b/data/org.gnome.gedit.schemas.in
new file mode 100644
index 0000000..6ca5402
--- /dev/null
+++ b/data/org.gnome.gedit.schemas.in
@@ -0,0 +1,68 @@
+schema org.gnome.gedit:
+  path apps/gedit/
+  
+  child preferences:
+    child editor:
+      key use_default_font = true
+      key editor_font = 'Monospace 12'
+      key scheme = 'classic'
+      key create_backup_copy = false
+      key auto_save = false
+      key auto_save_interval = 10
+      key undo_actions_limit = 25
+      key max_undo_actions = 2000
+      key wrap_mode = 'GTK_WRAP_WORD'
+      key tabs_size = 8
+      key insert_spaces = false
+      key auto_indent = false
+      key display_line_numbers = false
+      key highlight_current_line = false
+      key bracket_matching = false
+      key display_right_margin = false
+      key right_margin_position = 80
+      key smart_home_end = 'after'
+      key writable_vfs_schemes = ['dav', 'davs', 'ftp', 'sftp', 'smb', 'ssh']
+      key restore_cursor_position = true
+      key syntax_highlighting = true
+      key search_highlighting = true
+
+    child ui:
+      key toolbar_visible = true
+      key toolbar_buttons_style = @TOOLBAR_STYLE@
+      key statusbar_visible = true
+      key side_pane_visible = false
+      key bottom_pane_visible = false
+      key max_recents = 5
+
+    child print:
+      key print_syntax_highlighting = true
+      key print_header = true
+      key print_wrap_mode = 'GTK_WRAP_WORD'
+      key print_line_numbers = 0
+      key print_font_body_pango = 'Monospace 9'
+      key print_font_header_pango = 'Sans 11'
+      key print_font_numbers_pango = 'Sans 8'
+
+    child encodings:
+      key auto_detected = ['UTF-8', 'CURRENT', 'ISO-8859-15', 'UTF-16']
+      key shown_in_menu = ['ISO-8859-15']
+
+  child plugins:
+    key active_plugins = [ ACTIVE_PLUGINS@]
+
+  child history:
+    key gedit2_search_for_entry = ['']
+    key gedit2_replace_with_entry = ['']
+
+schema org.gnome.Desktop.Lockdown:
+  path desktop/gnome/lockdown
+  
+  key disable_command_line = false
+  key disable_printing = false
+  key disable_print_setup = false
+  key disable_save_to_disk = false
+
+schema org.gnome.Desktop.Interface:
+  path desktop/gnome/interface
+  
+  key monospace_font_name = 'Monospace 10'
diff --git a/gedit/Makefile.am b/gedit/Makefile.am
index 9c61383..c9ce29c 100644
--- a/gedit/Makefile.am
+++ b/gedit/Makefile.am
@@ -85,6 +85,7 @@ NOINST_H_FILES =			\
 	gedit-print-job.h		\
 	gedit-print-preview.h		\
 	gedit-session.h			\
+	gedit-settings.h		\
 	gedit-smart-charset-converter.h	\
 	gedit-style-scheme-manager.h	\
 	gedit-tab-label.h		\
@@ -168,13 +169,11 @@ libgedit_la_SOURCES = 			\
 	gedit-plugin-loader.c		\
 	gedit-plugin-manager.c		\
 	gedit-plugins-engine.c		\
-	gedit-prefs-manager-app.c	\
-	gedit-prefs-manager.c		\
-	gedit-prefs-manager-private.h	\
 	gedit-print-job.c		\
 	gedit-print-preview.c		\
 	gedit-progress-message-area.c	\
 	gedit-session.c			\
+	gedit-settings.c		\
 	gedit-smart-charset-converter.c	\
 	gedit-statusbar.c		\
 	gedit-status-combo-box.c	\
diff --git a/gedit/dialogs/gedit-encodings-dialog.c b/gedit/dialogs/gedit-encodings-dialog.c
index b480080..b78f155 100644
--- a/gedit/dialogs/gedit-encodings-dialog.c
+++ b/gedit/dialogs/gedit-encodings-dialog.c
@@ -40,11 +40,11 @@
 
 #include "gedit-encodings-dialog.h"
 #include "gedit-encodings.h"
-#include "gedit-prefs-manager.h"
 #include "gedit-utils.h"
 #include "gedit-debug.h"
 #include "gedit-help.h"
 #include "gedit-dirs.h"
+#include "gedit-settings.h"
 
 #define GEDIT_ENCODINGS_DIALOG_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
 						   GEDIT_TYPE_ENCODINGS_DIALOG,           \
@@ -52,6 +52,8 @@
 
 struct _GeditEncodingsDialogPrivate
 {
+	GSettings	*enc_settings;
+
 	GtkListStore	*available_liststore;
 	GtkListStore	*displayed_liststore;
 	GtkWidget	*available_treeview;
@@ -75,11 +77,26 @@ gedit_encodings_dialog_finalize (GObject *object)
 }
 
 static void
+gedit_encodings_dialog_dispose (GObject *object)
+{
+	GeditEncodingsDialogPrivate *priv = GEDIT_ENCODINGS_DIALOG (object)->priv;
+
+	if (priv->enc_settings != NULL)
+	{
+		g_object_unref (priv->enc_settings);
+		priv->enc_settings = NULL;
+	}
+
+	G_OBJECT_CLASS (gedit_encodings_dialog_parent_class)->dispose (object);
+}
+
+static void
 gedit_encodings_dialog_class_init (GeditEncodingsDialogClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
 	object_class->finalize = gedit_encodings_dialog_finalize;
+	object_class->dispose = gedit_encodings_dialog_dispose;
 
 	g_type_class_add_private (object_class, sizeof (GeditEncodingsDialogPrivate));
 }
@@ -241,11 +258,15 @@ init_shown_in_menu_tree_model (GeditEncodingsDialog *dialog)
 	GSList *list, *tmp;
 
 	/* add data to the list store */
-	list = gedit_prefs_manager_get_shown_in_menu_encodings ();
+	tmp = gedit_utils_get_list_from_settings (dialog->priv->enc_settings,
+						  GS_ENCONDING_SHOW_IN_MENU);
 
-	tmp = list;
+	list = gedit_utils_get_encodings_from_list_str (tmp);
+	
+	g_slist_foreach (tmp, (GFunc) g_free, NULL);
+	g_slist_free (tmp);
 
-	while (tmp != NULL)
+	for (tmp = list; tmp != NULL; tmp = g_slist_next (tmp))
 	{
 		const GeditEncoding *enc;
 
@@ -262,8 +283,6 @@ init_shown_in_menu_tree_model (GeditEncodingsDialog *dialog)
 				    gedit_encoding_get_charset (enc),
 				    COLUMN_NAME,
 				    gedit_encoding_get_name (enc), -1);
-
-		tmp = g_slist_next (tmp);
 	}
 
 	g_slist_free (list);
@@ -283,8 +302,16 @@ response_handler (GtkDialog            *dialog,
 
 	if (response_id == GTK_RESPONSE_OK)
 	{
-		g_return_if_fail (gedit_prefs_manager_shown_in_menu_encodings_can_set ());
-		gedit_prefs_manager_set_shown_in_menu_encodings (dlg->priv->show_in_menu_list);
+		GSList *enc_str;
+		
+		enc_str = gedit_utils_get_str_list_from_encondings (dlg->priv->show_in_menu_list);
+	
+		gedit_utils_set_list_into_settings (dlg->priv->enc_settings,
+						    GS_ENCONDING_SHOW_IN_MENU,
+						    enc_str);
+		
+		g_slist_foreach (enc_str, (GFunc) g_free, NULL);
+		g_slist_free (enc_str);
 	}
 }
 
@@ -309,6 +336,10 @@ gedit_encodings_dialog_init (GeditEncodingsDialog *dlg)
 
 	dlg->priv = GEDIT_ENCODINGS_DIALOG_GET_PRIVATE (dlg);
 	
+	dlg->priv->enc_settings = gedit_app_get_settings (gedit_app_get_default (),
+							  "preferences", "encodings",
+							  NULL);
+	
 	gtk_dialog_add_buttons (GTK_DIALOG (dlg),
 				GTK_STOCK_CANCEL, 
 				GTK_RESPONSE_CANCEL,
diff --git a/gedit/dialogs/gedit-preferences-dialog.c b/gedit/dialogs/gedit-preferences-dialog.c
index 3af5e72..78a70e4 100644
--- a/gedit/dialogs/gedit-preferences-dialog.c
+++ b/gedit/dialogs/gedit-preferences-dialog.c
@@ -37,9 +37,6 @@
 #include <string.h>
 
 #include <glib/gi18n.h>
-#include <gconf/gconf-client.h>
-
-#include <gedit/gedit-prefs-manager.h>
 
 #include "gedit-preferences-dialog.h"
 #include "gedit-utils.h"
@@ -49,6 +46,9 @@
 #include "gedit-plugin-manager.h"
 #include "gedit-help.h"
 #include "gedit-dirs.h"
+#include "gedit-app.h"
+#include "gedit-settings.h"
+#include "gedit-utils.h"
 
 /*
  * gedit-preferences dialog is a singleton since we don't
@@ -77,6 +77,8 @@ enum
 
 struct _GeditPreferencesDialogPrivate
 {
+	GSettings	*editor;
+
 	GtkWidget	*notebook;
 
 	/* Font */
@@ -135,10 +137,26 @@ struct _GeditPreferencesDialogPrivate
 G_DEFINE_TYPE(GeditPreferencesDialog, gedit_preferences_dialog, GTK_TYPE_DIALOG)
 
 
+static void
+gedit_preferences_dialog_dispose (GObject *object)
+{
+	GeditPreferencesDialog *dlg = GEDIT_PREFERENCES_DIALOG (object);
+
+	if (dlg->priv->editor != NULL)
+	{
+		g_object_unref (dlg->priv->editor);
+		dlg->priv->editor = NULL;
+	}
+
+	G_OBJECT_CLASS (gedit_preferences_dialog_parent_class)->dispose (object);
+}
+
 static void 
 gedit_preferences_dialog_class_init (GeditPreferencesDialogClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	
+	object_class->dispose = gedit_preferences_dialog_dispose;
 
 	g_type_class_add_private (object_class, sizeof (GeditPreferencesDialogPrivate));
 }
@@ -166,181 +184,80 @@ dialog_response_handler (GtkDialog *dlg,
 }
 
 static void
-tabs_width_spinbutton_value_changed (GtkSpinButton          *spin_button,
-				     GeditPreferencesDialog *dlg)
-{
-	gedit_debug (DEBUG_PREFS);
-
-	g_return_if_fail (spin_button == GTK_SPIN_BUTTON (dlg->priv->tabs_width_spinbutton));
-
-	gedit_prefs_manager_set_tabs_size (gtk_spin_button_get_value_as_int (spin_button));
-}
-	
-static void
-insert_spaces_checkbutton_toggled (GtkToggleButton        *button,
-				   GeditPreferencesDialog *dlg)
+on_auto_save_changed (GSettings              *settings,
+		      const gchar            *key,
+		      GeditPreferencesDialog *dlg)
 {
-	gedit_debug (DEBUG_PREFS);
-
-	g_return_if_fail (button == GTK_TOGGLE_BUTTON (dlg->priv->insert_spaces_checkbutton));
-
-	gedit_prefs_manager_set_insert_spaces (gtk_toggle_button_get_active (button));
-}
+	gboolean value;
 
-static void
-auto_indent_checkbutton_toggled (GtkToggleButton        *button,
-				 GeditPreferencesDialog *dlg)
-{
 	gedit_debug (DEBUG_PREFS);
+	
+	g_settings_get (settings, key, &value);
 
-	g_return_if_fail (button == GTK_TOGGLE_BUTTON (dlg->priv->auto_indent_checkbutton));
-
-	gedit_prefs_manager_set_auto_indent (gtk_toggle_button_get_active (button));
-}
-
-static void
-auto_save_checkbutton_toggled (GtkToggleButton        *button,
-			       GeditPreferencesDialog *dlg)
-{
-	gedit_debug (DEBUG_PREFS);
-
-	g_return_if_fail (button == GTK_TOGGLE_BUTTON (dlg->priv->auto_save_checkbutton));
-
-	if (gtk_toggle_button_get_active (button))
+	if (value)
 	{
-		gtk_widget_set_sensitive (dlg->priv->auto_save_spinbutton, 
-					  gedit_prefs_manager_auto_save_interval_can_set());
-
-		gedit_prefs_manager_set_auto_save (TRUE);
+		gtk_widget_set_sensitive (dlg->priv->auto_save_spinbutton, TRUE);
 	}
-	else	
+	else
 	{
 		gtk_widget_set_sensitive (dlg->priv->auto_save_spinbutton, FALSE);
-		gedit_prefs_manager_set_auto_save (FALSE);
 	}
 }
 
 static void
-backup_copy_checkbutton_toggled (GtkToggleButton        *button,
-				 GeditPreferencesDialog *dlg)
-{
-	gedit_debug (DEBUG_PREFS);
-
-	g_return_if_fail (button == GTK_TOGGLE_BUTTON (dlg->priv->backup_copy_checkbutton));
-	
-	gedit_prefs_manager_set_create_backup_copy (gtk_toggle_button_get_active (button));
-}
-
-static void
-auto_save_spinbutton_value_changed (GtkSpinButton          *spin_button,
-				    GeditPreferencesDialog *dlg)
-{
-	g_return_if_fail (spin_button == GTK_SPIN_BUTTON (dlg->priv->auto_save_spinbutton));
-
-	gedit_prefs_manager_set_auto_save_interval (
-			MAX (1, gtk_spin_button_get_value_as_int (spin_button)));
-}
-
-static void
 setup_editor_page (GeditPreferencesDialog *dlg)
 {
 	gboolean auto_save;
-	gint auto_save_interval;
 
 	gedit_debug (DEBUG_PREFS);
 
-	/* Set initial state */
-	gtk_spin_button_set_value (GTK_SPIN_BUTTON (dlg->priv->tabs_width_spinbutton),
-				   (guint) gedit_prefs_manager_get_tabs_size ());
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->priv->insert_spaces_checkbutton), 
-				      gedit_prefs_manager_get_insert_spaces ());
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->priv->auto_indent_checkbutton), 
-				      gedit_prefs_manager_get_auto_indent ());
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->priv->backup_copy_checkbutton),
-				      gedit_prefs_manager_get_create_backup_copy ());
-
-	auto_save = gedit_prefs_manager_get_auto_save ();
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->priv->auto_save_checkbutton),
-				      auto_save);
-
-	auto_save_interval = gedit_prefs_manager_get_auto_save_interval ();
-	if (auto_save_interval <= 0)
-		auto_save_interval = GPM_DEFAULT_AUTO_SAVE_INTERVAL;
-
-	gtk_spin_button_set_value (GTK_SPIN_BUTTON (dlg->priv->auto_save_spinbutton),
-				   auto_save_interval);
+	/* Get values */
+	g_settings_get (dlg->priv->editor, GS_AUTO_SAVE, &auto_save);
 
 	/* Set widget sensitivity */
-	gtk_widget_set_sensitive (dlg->priv->tabs_width_hbox, 
-				  gedit_prefs_manager_tabs_size_can_set ());
-	gtk_widget_set_sensitive (dlg->priv->insert_spaces_checkbutton,
-				  gedit_prefs_manager_insert_spaces_can_set ());
-	gtk_widget_set_sensitive (dlg->priv->auto_indent_checkbutton,
-				  gedit_prefs_manager_auto_indent_can_set ());
-	gtk_widget_set_sensitive (dlg->priv->backup_copy_checkbutton,
-				  gedit_prefs_manager_create_backup_copy_can_set ());
-	gtk_widget_set_sensitive (dlg->priv->autosave_hbox, 
-				  gedit_prefs_manager_auto_save_can_set ()); 
-	gtk_widget_set_sensitive (dlg->priv->auto_save_spinbutton, 
-			          auto_save &&
-				  gedit_prefs_manager_auto_save_interval_can_set ());
+	gtk_widget_set_sensitive (dlg->priv->auto_save_spinbutton,
+				  auto_save);
 
 	/* Connect signal */
-	g_signal_connect (dlg->priv->tabs_width_spinbutton,
-			  "value_changed",
-			  G_CALLBACK (tabs_width_spinbutton_value_changed),
-			  dlg);
-	g_signal_connect (dlg->priv->insert_spaces_checkbutton,
-			 "toggled",
-			  G_CALLBACK (insert_spaces_checkbutton_toggled),
-			  dlg);
-	g_signal_connect (dlg->priv->auto_indent_checkbutton,
-			  "toggled",
-			  G_CALLBACK (auto_indent_checkbutton_toggled),
-			  dlg);
-	g_signal_connect (dlg->priv->auto_save_checkbutton,
-			  "toggled",
-			  G_CALLBACK (auto_save_checkbutton_toggled),
+	g_settings_bind (dlg->priv->editor,
+			 GS_TABS_SIZE,
+			 dlg->priv->tabs_width_spinbutton,
+			 "value",
+			 G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+	g_settings_bind (dlg->priv->editor,
+			 GS_INSERT_SPACES,
+			 dlg->priv->insert_spaces_checkbutton,
+			 "active",
+			 G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+	g_settings_bind (dlg->priv->editor,
+			 GS_AUTO_INDENT,
+			 dlg->priv->auto_indent_checkbutton,
+			 "active",
+			 G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+	g_settings_bind (dlg->priv->editor,
+			 GS_CREATE_BACKUP_COPY,
+			 dlg->priv->backup_copy_checkbutton,
+			 "active",
+			 G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+	g_settings_bind (dlg->priv->editor,
+			 GS_BRACKET_MATCHING,
+			 dlg->priv->bracket_matching_checkbutton,
+			 "active",
+			 G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+	g_settings_bind (dlg->priv->editor,
+			 GS_AUTO_SAVE_INTERVAL,
+			 dlg->priv->auto_save_spinbutton,
+			 "value",
+			 G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+	g_signal_connect (dlg->priv->editor,
+			  "changed::auto_save",
+			  G_CALLBACK (on_auto_save_changed),
 			  dlg);
-	g_signal_connect (dlg->priv->backup_copy_checkbutton,
-			  "toggled",
-			  G_CALLBACK (backup_copy_checkbutton_toggled),
-			  dlg);
-	g_signal_connect (dlg->priv->auto_save_spinbutton,
-			  "value_changed",
-			  G_CALLBACK (auto_save_spinbutton_value_changed),
-			  dlg);
-}
-
-static void
-display_line_numbers_checkbutton_toggled (GtkToggleButton        *button,
-					  GeditPreferencesDialog *dlg)
-{
-	g_return_if_fail (button == 
-			GTK_TOGGLE_BUTTON (dlg->priv->display_line_numbers_checkbutton));
-
-	gedit_prefs_manager_set_display_line_numbers (gtk_toggle_button_get_active (button));
-}
-
-static void
-highlight_current_line_checkbutton_toggled (GtkToggleButton        *button,
-					    GeditPreferencesDialog *dlg)
-{
-	g_return_if_fail (button == 
-			GTK_TOGGLE_BUTTON (dlg->priv->highlight_current_line_checkbutton));
-
-	gedit_prefs_manager_set_highlight_current_line (gtk_toggle_button_get_active (button));
-}
-
-static void
-bracket_matching_checkbutton_toggled (GtkToggleButton        *button,
-				      GeditPreferencesDialog *dlg)
-{
-	g_return_if_fail (button == 
-			GTK_TOGGLE_BUTTON (dlg->priv->bracket_matching_checkbutton));
-
-	gedit_prefs_manager_set_bracket_matching (
-				gtk_toggle_button_get_active (button));
+	g_settings_bind (dlg->priv->editor,
+			 GS_AUTO_SAVE,
+			 dlg->priv->auto_save_checkbutton,
+			 "active",
+			 G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
 }
 
 static gboolean split_button_state = TRUE;
@@ -351,7 +268,12 @@ wrap_mode_checkbutton_toggled (GtkToggleButton        *button,
 {
 	if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dlg->priv->wrap_text_checkbutton)))
 	{
-		gedit_prefs_manager_set_wrap_mode (GTK_WRAP_NONE);
+		gchar *wrap_str;
+		
+		wrap_str = gedit_utils_get_wrap_str (GTK_WRAP_NONE);
+	
+		g_settings_set (dlg->priv->editor, GS_WRAP_MODE, wrap_str);
+		g_free (wrap_str);
 		
 		gtk_widget_set_sensitive (dlg->priv->split_checkbutton, 
 					  FALSE);
@@ -360,6 +282,8 @@ wrap_mode_checkbutton_toggled (GtkToggleButton        *button,
 	}
 	else
 	{
+		gchar *wrap_str;
+		
 		gtk_widget_set_sensitive (dlg->priv->split_checkbutton, 
 					  TRUE);
 
@@ -371,14 +295,17 @@ wrap_mode_checkbutton_toggled (GtkToggleButton        *button,
 		{
 			split_button_state = TRUE;
 			
-			gedit_prefs_manager_set_wrap_mode (GTK_WRAP_WORD);
+			wrap_str = gedit_utils_get_wrap_str (GTK_WRAP_WORD);
 		}
 		else
 		{
 			split_button_state = FALSE;
 			
-			gedit_prefs_manager_set_wrap_mode (GTK_WRAP_CHAR);
+			wrap_str = gedit_utils_get_wrap_str (GTK_WRAP_CHAR);
 		}
+		
+		g_settings_set (dlg->priv->editor, GS_WRAP_MODE, wrap_str);
+		g_free (wrap_str);
 	}
 }
 
@@ -392,47 +319,33 @@ right_margin_checkbutton_toggled (GtkToggleButton        *button,
 
 	active = gtk_toggle_button_get_active (button);
 	
-	gedit_prefs_manager_set_display_right_margin (active);
+	g_settings_set (dlg->priv->editor, GS_DISPLAY_RIGHT_MARGIN, active);
 
 	gtk_widget_set_sensitive (dlg->priv->right_margin_position_hbox,
-				  active && 
-				  gedit_prefs_manager_right_margin_position_can_set ());
-}
-
-static void
-right_margin_position_spinbutton_value_changed (GtkSpinButton          *spin_button, 
-						GeditPreferencesDialog *dlg)
-{
-	gint value;
-	
-	g_return_if_fail (spin_button == GTK_SPIN_BUTTON (dlg->priv->right_margin_position_spinbutton));
-
-	value = CLAMP (gtk_spin_button_get_value_as_int (spin_button), 1, 160);
-
-	gedit_prefs_manager_set_right_margin_position (value);
+				  active);
 }
 
 static void
 setup_view_page (GeditPreferencesDialog *dlg)
 {
+	gchar *wrap_mode_str;
 	GtkWrapMode wrap_mode;
 	gboolean display_right_margin;
-	gboolean wrap_mode_can_set;
+	guint right_margin_position;
 
 	gedit_debug (DEBUG_PREFS);
 	
-	/* Set initial state */
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->priv->display_line_numbers_checkbutton),
-				      gedit_prefs_manager_get_display_line_numbers ());
-	
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->priv->highlight_current_line_checkbutton),
-				      gedit_prefs_manager_get_highlight_current_line ());
+	/* Get values */
+	g_settings_get (dlg->priv->editor, GS_WRAP_MODE, &wrap_mode_str);
+	g_settings_get (dlg->priv->editor, GS_DISPLAY_RIGHT_MARGIN,
+			&display_right_margin);
+	g_settings_get (dlg->priv->editor, GS_RIGHT_MARGIN_POSITION,
+			&right_margin_position);
 	
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->priv->bracket_matching_checkbutton),
-				      gedit_prefs_manager_get_bracket_matching ());
-
-	wrap_mode = gedit_prefs_manager_get_wrap_mode ();
-	switch (wrap_mode )
+	/* Set initial state */
+	wrap_mode = gedit_utils_get_wrap_mode_from_string (wrap_mode_str);
+	g_free (wrap_mode_str);
+	switch (wrap_mode)
 	{
 		case GTK_WRAP_WORD:
 			gtk_toggle_button_set_active (
@@ -455,49 +368,38 @@ setup_view_page (GeditPreferencesDialog *dlg)
 				GTK_TOGGLE_BUTTON (dlg->priv->split_checkbutton), TRUE);
 
 	}
-
-	display_right_margin = gedit_prefs_manager_get_display_right_margin ();
 	
 	gtk_toggle_button_set_active (
 		GTK_TOGGLE_BUTTON (dlg->priv->right_margin_checkbutton), 
 		display_right_margin);
-	
-	gtk_spin_button_set_value (
-		GTK_SPIN_BUTTON (dlg->priv->right_margin_position_spinbutton),
-		(guint)CLAMP (gedit_prefs_manager_get_right_margin_position (), 1, 160));
 		
 	/* Set widgets sensitivity */
-	gtk_widget_set_sensitive (dlg->priv->display_line_numbers_checkbutton,
-				  gedit_prefs_manager_display_line_numbers_can_set ());
-	gtk_widget_set_sensitive (dlg->priv->highlight_current_line_checkbutton,
-				  gedit_prefs_manager_highlight_current_line_can_set ());
-	gtk_widget_set_sensitive (dlg->priv->bracket_matching_checkbutton,
-				  gedit_prefs_manager_bracket_matching_can_set ());
-	wrap_mode_can_set = gedit_prefs_manager_wrap_mode_can_set ();
-	gtk_widget_set_sensitive (dlg->priv->wrap_text_checkbutton, 
-				  wrap_mode_can_set);
 	gtk_widget_set_sensitive (dlg->priv->split_checkbutton, 
-				  wrap_mode_can_set && 
 				  (wrap_mode != GTK_WRAP_NONE));
-	gtk_widget_set_sensitive (dlg->priv->right_margin_checkbutton,
-				  gedit_prefs_manager_display_right_margin_can_set ());
 	gtk_widget_set_sensitive (dlg->priv->right_margin_position_hbox,
-				  display_right_margin && 
-				  gedit_prefs_manager_right_margin_position_can_set ());
-				  
+				  display_right_margin);
+	
 	/* Connect signals */
-	g_signal_connect (dlg->priv->display_line_numbers_checkbutton,
-			  "toggled",
-			  G_CALLBACK (display_line_numbers_checkbutton_toggled), 
-			  dlg);
-	g_signal_connect (dlg->priv->highlight_current_line_checkbutton,
-			  "toggled", 
-			  G_CALLBACK (highlight_current_line_checkbutton_toggled), 
-			  dlg);
-	g_signal_connect (dlg->priv->bracket_matching_checkbutton,
-			  "toggled", 
-			  G_CALLBACK (bracket_matching_checkbutton_toggled), 
-			  dlg);
+	g_settings_bind (dlg->priv->editor,
+			 GS_DISPLAY_LINE_NUMBERS,
+			 dlg->priv->display_line_numbers_checkbutton,
+			 "active",
+			 G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+	g_settings_bind (dlg->priv->editor,
+			 GS_HIGHLIGHT_CURRENT_LINE,
+			 dlg->priv->highlight_current_line_checkbutton,
+			 "active",
+			 G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+	g_settings_bind (dlg->priv->editor,
+			 GS_RIGHT_MARGIN_POSITION,
+			 dlg->priv->right_margin_position_spinbutton,
+			 "value",
+			 G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+	g_settings_bind (dlg->priv->editor,
+			 GS_AUTO_SAVE_INTERVAL,
+			 dlg->priv->auto_save_spinbutton,
+			 "value",
+			 G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
 	g_signal_connect (dlg->priv->wrap_text_checkbutton,
 			  "toggled", 
 			  G_CALLBACK (wrap_mode_checkbutton_toggled), 
@@ -510,59 +412,35 @@ setup_view_page (GeditPreferencesDialog *dlg)
 			  "toggled", 
 			  G_CALLBACK (right_margin_checkbutton_toggled), 
 			  dlg);
-	g_signal_connect (dlg->priv->right_margin_position_spinbutton,
-			  "value_changed",
-			  G_CALLBACK (right_margin_position_spinbutton_value_changed), 
-			  dlg);
 }
 
 static void
-default_font_font_checkbutton_toggled (GtkToggleButton        *button,
-				       GeditPreferencesDialog *dlg)
+on_use_default_font_changed (GSettings              *settings,
+			     const gchar            *key,
+			     GeditPreferencesDialog *dlg)
 {
+	gboolean value;
+	
 	gedit_debug (DEBUG_PREFS);
 
-	g_return_if_fail (button == GTK_TOGGLE_BUTTON (dlg->priv->default_font_checkbutton));
+	g_settings_get (settings, key, &value);
 
-	if (gtk_toggle_button_get_active (button))
+	if (value)
 	{
 		gtk_widget_set_sensitive (dlg->priv->font_hbox, FALSE);
-		gedit_prefs_manager_set_use_default_font (TRUE);
 	}
 	else
 	{
-		gtk_widget_set_sensitive (dlg->priv->font_hbox, 
-					  gedit_prefs_manager_editor_font_can_set ());
-		gedit_prefs_manager_set_use_default_font (FALSE);
-	}
-}
-
-static void
-editor_font_button_font_set (GtkFontButton          *font_button,
-			     GeditPreferencesDialog *dlg)
-{
-	const gchar *font_name;
-
-	gedit_debug (DEBUG_PREFS);
-
-	g_return_if_fail (font_button == GTK_FONT_BUTTON (dlg->priv->font_button));
-
-	/* FIXME: Can this fail? Gtk docs are a bit terse... 21-02-2004 pbor */
-	font_name = gtk_font_button_get_font_name (font_button);
-	if (!font_name)
-	{
-		g_warning ("Could not get font name");
-		return;
+		gtk_widget_set_sensitive (dlg->priv->font_hbox, TRUE);
 	}
-
-	gedit_prefs_manager_set_editor_font (font_name);
 }
 
 static void
 setup_font_colors_page_font_section (GeditPreferencesDialog *dlg)
 {
+	GSettings *toplevel;
 	gboolean use_default_font;
-	gchar *editor_font = NULL;
+	gchar *system_font = NULL;
 	gchar *label;
 
 	gedit_debug (DEBUG_PREFS);
@@ -575,48 +453,46 @@ setup_font_colors_page_font_section (GeditPreferencesDialog *dlg)
 				      ATK_RELATION_CONTROLLED_BY);
 	gedit_utils_set_atk_relation (dlg->priv->default_font_checkbutton,
 				      dlg->priv->font_button, 
-				      ATK_RELATION_CONTROLLER_FOR);	
+				      ATK_RELATION_CONTROLLER_FOR);
+
+	/* Get values */
+	toplevel = gedit_app_get_settings (gedit_app_get_default (), NULL);
+	system_font = gedit_settings_get_system_font (GEDIT_SETTINGS (toplevel));
+	g_settings_get (dlg->priv->editor, GS_USE_DEFAULT_FONT, &use_default_font);
+	g_object_unref (toplevel);
 
-	editor_font = gedit_prefs_manager_get_system_font ();
 	label = g_strdup_printf(_("_Use the system fixed width font (%s)"),
-				editor_font);
+				system_font);
 	gtk_button_set_label (GTK_BUTTON (dlg->priv->default_font_checkbutton),
 			      label);
-	g_free (editor_font);
+	g_free (system_font);
 	g_free (label);
 
 	/* read current config and setup initial state */
-	use_default_font = gedit_prefs_manager_get_use_default_font ();
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->priv->default_font_checkbutton),
 				      use_default_font);
 
-	editor_font = gedit_prefs_manager_get_editor_font ();
-	if (editor_font != NULL)
-	{
-		gtk_font_button_set_font_name (GTK_FONT_BUTTON (dlg->priv->font_button),
-					       editor_font);
-		g_free (editor_font);
-	}
-
 	/* Connect signals */
-	g_signal_connect (dlg->priv->default_font_checkbutton,
-			  "toggled",
-			  G_CALLBACK (default_font_font_checkbutton_toggled),
-			  dlg);
-	g_signal_connect (dlg->priv->font_button,
-			  "font_set",
-			  G_CALLBACK (editor_font_button_font_set),
+	g_signal_connect (dlg->priv->editor,
+			  "changed::use_default_font",
+			  G_CALLBACK (on_use_default_font_changed),
 			  dlg);
+	g_settings_bind (dlg->priv->editor,
+			 GS_USE_DEFAULT_FONT,
+			 dlg->priv->default_font_checkbutton,
+			 "active",
+			 G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+	g_settings_bind (dlg->priv->editor,
+			 GS_EDITOR_FONT,
+			 dlg->priv->font_button,
+			 "font-name",
+			 G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
 
 	/* Set initial widget sensitivity */
-	gtk_widget_set_sensitive (dlg->priv->default_font_checkbutton, 
-				  gedit_prefs_manager_use_default_font_can_set ());
-
 	if (use_default_font)
 		gtk_widget_set_sensitive (dlg->priv->font_hbox, FALSE);
 	else
-		gtk_widget_set_sensitive (dlg->priv->font_hbox, 
-					  gedit_prefs_manager_editor_font_can_set ());
+		gtk_widget_set_sensitive (dlg->priv->font_hbox, TRUE);
 }
 
 static void
@@ -649,7 +525,7 @@ style_scheme_changed (GtkWidget              *treeview,
 	gtk_tree_model_get (GTK_TREE_MODEL (dlg->priv->schemes_treeview_model),
 			    &iter, ID_COLUMN, &id, -1);
 
-	gedit_prefs_manager_set_source_style_scheme (id);
+	g_settings_set (dlg->priv->editor, GS_SCHEME, id);
 
 	set_buttons_sensisitivity_according_to_scheme (dlg, id);
 
@@ -657,7 +533,8 @@ style_scheme_changed (GtkWidget              *treeview,
 }
 
 static const gchar *
-ensure_color_scheme_id (const gchar *id)
+ensure_color_scheme_id (GeditPreferencesDialog *dlg,
+			const gchar            *id)
 {
 	GtkSourceStyleScheme *scheme = NULL;
 	GtkSourceStyleSchemeManager *manager = gedit_get_style_scheme_manager ();
@@ -666,7 +543,8 @@ ensure_color_scheme_id (const gchar *id)
 	{
 		gchar *pref_id;
 
-		pref_id = gedit_prefs_manager_get_source_style_scheme ();
+		g_settings_get (dlg->priv->editor, GS_SCHEME, &pref_id);
+		
 		scheme = gtk_source_style_scheme_manager_get_scheme (manager,
 								     pref_id);
 		g_free (pref_id);
@@ -704,7 +582,7 @@ populate_color_scheme_list (GeditPreferencesDialog *dlg, const gchar *def_id)
 	
 	gtk_list_store_clear (dlg->priv->schemes_treeview_model);
 	
-	def_id = ensure_color_scheme_id (def_id);
+	def_id = ensure_color_scheme_id (dlg, def_id);
 	if (def_id == NULL) 
 	{
 		g_warning ("Cannot build the list of available color schemes.\n"
@@ -785,8 +663,8 @@ add_scheme_chooser_response_cb (GtkDialog              *chooser,
 
 		return;
 	}
-
-	gedit_prefs_manager_set_source_style_scheme (scheme_id);
+	
+	g_settings_set (dlg->priv->editor, GS_SCHEME, scheme_id);
 
 	scheme_id = populate_color_scheme_list (dlg, scheme_id);
 
@@ -925,7 +803,9 @@ uninstall_scheme_clicked (GtkButton              *button,
 			set_buttons_sensisitivity_according_to_scheme (dlg, real_new_id);
 			
 			if (real_new_id != NULL)
-				gedit_prefs_manager_set_source_style_scheme (real_new_id);
+			{
+				g_settings_set (dlg->priv->editor, GS_SCHEME, real_new_id);
+			}
 		}
 
 		g_free (id);
@@ -1076,6 +956,10 @@ gedit_preferences_dialog_init (GeditPreferencesDialog *dlg)
 	gedit_debug (DEBUG_PREFS);
 
 	dlg->priv = GEDIT_PREFERENCES_DIALOG_GET_PRIVATE (dlg);
+	
+	dlg->priv->editor = gedit_app_get_settings (gedit_app_get_default (),
+						    "preferences", "editor",
+						    NULL);
 
 	gtk_dialog_add_buttons (GTK_DIALOG (dlg),
 				GTK_STOCK_CLOSE,
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index 2e0a667..ba534db 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -38,13 +38,13 @@
 #include <glib/gi18n.h>
 
 #include "gedit-app.h"
-#include "gedit-prefs-manager-app.h"
 #include "gedit-commands.h"
 #include "gedit-notebook.h"
 #include "gedit-debug.h"
 #include "gedit-utils.h"
 #include "gedit-enum-types.h"
 #include "gedit-dirs.h"
+#include "gedit-settings.h"
 
 #ifdef OS_OSX
 #include <ige-mac-integration.h>
@@ -71,6 +71,8 @@ struct _GeditAppPrivate
 
 	GtkPageSetup      *page_setup;
 	GtkPrintSettings  *print_settings;
+	
+	GSettings         *settings;
 };
 
 G_DEFINE_TYPE(GeditApp, gedit_app, G_TYPE_OBJECT)
@@ -91,6 +93,20 @@ gedit_app_finalize (GObject *object)
 }
 
 static void
+gedit_app_dispose (GObject *object)
+{
+	GeditApp *app = GEDIT_APP (object); 
+
+	if (app->priv->settings != NULL)
+	{
+		g_object_unref (app->priv->settings);
+		app->priv->settings = NULL;
+	}
+
+	G_OBJECT_CLASS (gedit_app_parent_class)->dispose (object);
+}
+
+static void
 gedit_app_get_property (GObject    *object,
 			guint       prop_id,
 			GValue     *value,
@@ -115,6 +131,7 @@ gedit_app_class_init (GeditAppClass *klass)
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
 	object_class->finalize = gedit_app_finalize;
+	object_class->dispose = gedit_app_dispose;
 	object_class->get_property = gedit_app_get_property;
 	
 	g_object_class_install_property (object_class,
@@ -336,9 +353,12 @@ gedit_app_init (GeditApp *app)
 	app->priv = GEDIT_APP_GET_PRIVATE (app);
 
 	load_accels ();
+	
+	/* Load settings */
+	app->priv->settings = gedit_settings_new ();
 
 	/* initial lockdown state */
-	app->priv->lockdown = gedit_prefs_manager_get_lockdown ();
+	app->priv->lockdown = gedit_settings_get_lockdown (GEDIT_SETTINGS (app->priv->settings));
 }
 
 static void
@@ -523,17 +543,17 @@ gedit_app_create_window_real (GeditApp    *app,
 		GdkWindowState state;
 		gint w, h;
 
-		state = gedit_prefs_manager_get_window_state ();
+		state = gedit_settings_get_window_state ();
 
 		if ((state & GDK_WINDOW_STATE_MAXIMIZED) != 0)
 		{
-			gedit_prefs_manager_get_default_window_size (&w, &h);
+			gedit_settings_get_default_window_size (&w, &h);
 			gtk_window_set_default_size (GTK_WINDOW (window), w, h);
 			gtk_window_maximize (GTK_WINDOW (window));
 		}
 		else
 		{
-			gedit_prefs_manager_get_window_size (&w, &h);
+			gedit_settings_get_window_size (&w, &h);
 			gtk_window_set_default_size (GTK_WINDOW (window), w, h);
 			gtk_window_unmaximize (GTK_WINDOW (window));
 		}
@@ -902,3 +922,37 @@ _gedit_app_set_default_print_settings (GeditApp         *app,
 	app->priv->print_settings = g_object_ref (settings);
 }
 
+GSettings *
+gedit_app_get_settings (GeditApp    *app,
+			const gchar *path_list,
+			...)
+{
+	GSettings   *settings;
+	va_list      args;
+	const gchar *path;
+
+	g_return_val_if_fail (GEDIT_IS_APP (app), NULL);
+
+	settings = app->priv->settings;
+	g_object_ref (settings);
+	
+	va_start (args, path_list);
+	for (path = path_list; path; path = va_arg (args, const gchar *))
+	{
+		GSettings *aux;
+		
+		aux = g_settings_get_settings (settings, path);
+		g_object_unref (settings);
+		settings = aux;
+		
+		if (settings == NULL)
+		{
+			va_end (args);
+			return NULL;
+		}
+	}
+	va_end (args);
+	
+	return settings;
+}
+
diff --git a/gedit/gedit-app.h b/gedit/gedit-app.h
index 5311930..c2dcd99 100644
--- a/gedit/gedit-app.h
+++ b/gedit/gedit-app.h
@@ -137,6 +137,10 @@ GtkPrintSettings	*_gedit_app_get_default_print_settings	(GeditApp         *app);
 void			 _gedit_app_set_default_print_settings	(GeditApp         *app,
 								 GtkPrintSettings *settings);
 
+GSettings		*gedit_app_get_settings			(GeditApp    *app,
+								 const gchar *path_list,
+								 ...);
+
 G_END_DECLS
 
 #endif  /* __GEDIT_APP_H__  */
diff --git a/gedit/gedit-document-saver.c b/gedit/gedit-document-saver.c
index 1a064da..3ca5961 100644
--- a/gedit/gedit-document-saver.c
+++ b/gedit/gedit-document-saver.c
@@ -43,6 +43,7 @@
 #include "gedit-marshal.h"
 #include "gedit-utils.h"
 #include "gedit-enum-types.h"
+#include "gedit-settings.h"
 #include "gedit-gio-document-saver.h"
 
 G_DEFINE_ABSTRACT_TYPE(GeditDocumentSaver, gedit_document_saver, G_TYPE_OBJECT)
@@ -153,6 +154,12 @@ gedit_document_saver_dispose (GObject *object)
 		saver->info = NULL;
 	}
 
+	if (saver->editor_settings != NULL)
+	{
+		g_object_unref (saver->editor_settings);
+		saver->editor_settings = NULL;
+	}
+
 	G_OBJECT_CLASS (gedit_document_saver_parent_class)->dispose (object);
 }
 
@@ -235,6 +242,10 @@ static void
 gedit_document_saver_init (GeditDocumentSaver *saver)
 {
 	saver->used = FALSE;
+	
+	saver->editor_settings = gedit_app_get_settings (gedit_app_get_default (),
+							 "preferences", "editor",
+							 NULL);
 }
 
 GeditDocumentSaver *
@@ -312,7 +323,8 @@ gedit_document_saver_save (GeditDocumentSaver     *saver,
 	if ((saver->flags & GEDIT_DOCUMENT_SAVE_PRESERVE_BACKUP) != 0)
 		saver->keep_backup = FALSE;
 	else
-		saver->keep_backup = gedit_prefs_manager_get_create_backup_copy ();
+		g_settings_get (saver->editor_settings, GS_CREATE_BACKUP_COPY,
+				&saver->keep_backup);
 
 	GEDIT_DOCUMENT_SAVER_GET_CLASS (saver)->save (saver, old_mtime);
 }
diff --git a/gedit/gedit-document-saver.h b/gedit/gedit-document-saver.h
index ccc0b5c..c6c1c62 100644
--- a/gedit/gedit-document-saver.h
+++ b/gedit/gedit-document-saver.h
@@ -57,6 +57,8 @@ struct _GeditDocumentSaver
 
 	/*< private >*/
 	GFileInfo		 *info;
+	GSettings		 *editor_settings;
+
 	GeditDocument		 *document;
 	gboolean		  used;
 
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index 808b494..98e917a 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -40,7 +40,7 @@
 #include <glib/gi18n.h>
 #include <gtksourceview/gtksourceiter.h>
 
-#include "gedit-prefs-manager-app.h"
+#include "gedit-settings.h"
 #include "gedit-document.h"
 #include "gedit-debug.h"
 #include "gedit-utils.h"
@@ -101,6 +101,8 @@ static void	delete_range_cb 		(GeditDocument *doc,
 			     
 struct _GeditDocumentPrivate
 {
+	GSettings   *editor_settings;
+
 	gchar	    *uri;
 	gint 	     untitled_number;
 	gchar       *short_name;
@@ -273,6 +275,12 @@ gedit_document_dispose (GObject *object)
 		g_object_unref (doc->priv->loader);
 		doc->priv->loader = NULL;
 	}
+	
+	if (doc->priv->editor_settings)
+	{
+		g_object_unref (doc->priv->editor_settings);
+		doc->priv->editor_settings = NULL;
+	}
 
 	if (doc->priv->metadata_info != NULL)
 	{
@@ -669,8 +677,15 @@ set_language (GeditDocument     *doc,
 	gtk_source_buffer_set_language (GTK_SOURCE_BUFFER (doc), lang);
 
 	if (lang != NULL)
+	{
+		gboolean syntax_hl;
+		
+		g_settings_get (doc->priv->editor_settings, GS_SYNTAX_HIGHLIGHTING,
+				&syntax_hl);
+		
 		gtk_source_buffer_set_highlight_syntax (GTK_SOURCE_BUFFER (doc),
-				 gedit_prefs_manager_get_enable_syntax_highlighting ());
+							syntax_hl);
+	}
 	else
 		gtk_source_buffer_set_highlight_syntax (GTK_SOURCE_BUFFER (doc), 
 				 FALSE);
@@ -713,14 +728,14 @@ set_encoding (GeditDocument       *doc,
 }
 
 static GtkSourceStyleScheme *
-get_default_style_scheme (void)
+get_default_style_scheme (GSettings *editor_settings)
 {
 	gchar *scheme_id;
 	GtkSourceStyleScheme *def_style;
 	GtkSourceStyleSchemeManager *manager;
 
 	manager = gedit_get_style_scheme_manager ();
-	scheme_id = gedit_prefs_manager_get_source_style_scheme ();
+	g_settings_get (editor_settings, GS_SCHEME, &scheme_id);
 	def_style = gtk_source_style_scheme_manager_get_scheme (manager,
 								scheme_id);
 
@@ -867,10 +882,17 @@ static void
 gedit_document_init (GeditDocument *doc)
 {
 	GtkSourceStyleScheme *style_scheme;
+	gint undo_actions;
+	gboolean bracket_matching;
+	gboolean search_hl;
 
 	gedit_debug (DEBUG_DOCUMENT);
 
 	doc->priv = GEDIT_DOCUMENT_GET_PRIVATE (doc);
+	
+	doc->priv->editor_settings = gedit_app_get_settings (gedit_app_get_default (),
+							     "preferences", "editor",
+							     NULL);
 
 	doc->priv->uri = NULL;
 	doc->priv->untitled_number = get_untitled_number ();
@@ -897,16 +919,23 @@ gedit_document_init (GeditDocument *doc)
 
 	doc->priv->newline_type = GEDIT_DOCUMENT_NEWLINE_TYPE_DEFAULT;
 
+	g_settings_get (doc->priv->editor_settings, GS_MAX_UNDO_ACTIONS,
+			&undo_actions);
+	g_settings_get (doc->priv->editor_settings, GS_BRACKET_MATCHING,
+			&bracket_matching);
+	g_settings_get (doc->priv->editor_settings, GS_SEARCH_HIGHLIGHTING,
+			&search_hl);
+
 	gtk_source_buffer_set_max_undo_levels (GTK_SOURCE_BUFFER (doc), 
-					       gedit_prefs_manager_get_undo_actions_limit ());
+					       undo_actions);
 
 	gtk_source_buffer_set_highlight_matching_brackets (GTK_SOURCE_BUFFER (doc), 
-							   gedit_prefs_manager_get_bracket_matching ());
+							   bracket_matching);
 
 	gedit_document_set_enable_search_highlighting (doc,
-						       gedit_prefs_manager_get_enable_search_highlighting ());
+						       search_hl);
 
-	style_scheme = get_default_style_scheme ();
+	style_scheme = get_default_style_scheme (doc->priv->editor_settings);
 	if (style_scheme != NULL)
 		gtk_source_buffer_set_style_scheme (GTK_SOURCE_BUFFER (doc),
 						    style_scheme);
@@ -1227,6 +1256,7 @@ document_loader_loaded (GeditDocumentLoader *loader,
 	{
 		GtkTextIter iter;
 		GFileInfo *info;
+		gboolean restore_cursor;
 		const gchar *content_type = NULL;
 		gboolean read_only = FALSE;
 		GTimeVal mtime = {0, 0};
@@ -1262,6 +1292,9 @@ document_loader_loaded (GeditDocumentLoader *loader,
 		gedit_document_set_newline_type (doc,
 		                                 gedit_document_loader_get_newline_type (loader));
 
+		g_settings_get (doc->priv->editor_settings, GS_RESTORE_CURSOR_POSITION,
+				&restore_cursor);
+
 		/* move the cursor at the requested line if any */
 		if (doc->priv->requested_line_pos > 0)
 		{
@@ -1271,7 +1304,7 @@ document_loader_loaded (GeditDocumentLoader *loader,
 							  doc->priv->requested_line_pos - 1);
 		}
 		/* else, if enabled, to the position stored in the metadata */
-		else if (gedit_prefs_manager_get_restore_cursor_position ())
+		else if (restore_cursor)
 		{
 			gchar *pos;
 			gint offset;
diff --git a/gedit/gedit-encodings-option-menu.c b/gedit/gedit-encodings-option-menu.c
new file mode 100644
index 0000000..4dd7ca3
--- /dev/null
+++ b/gedit/gedit-encodings-option-menu.c
@@ -0,0 +1,444 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * gedit-encodings-option-menu.c
+ * This file is part of gedit
+ *
+ * Copyright (C) 2003-2005 - Paolo Maggi
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, 
+ * Boston, MA 02111-1307, USA.
+ */
+ 
+/*
+ * Modified by the gedit Team, 2003-2005. See the AUTHORS file for a 
+ * list of people on the gedit Team.  
+ * See the ChangeLog files for a list of changes. 
+ *
+ * $Id$
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
+
+#include <gedit/gedit-encodings-option-menu.h>
+#include <gedit/dialogs/gedit-encodings-dialog.h>
+#include "gedit-settings.h"
+#include "gedit-utils.h"
+#include "gedit-app.h"
+
+#define ENCODING_KEY "Enconding"
+
+static void	  update_menu 		(GeditEncodingsOptionMenu       *option_menu);
+
+/* Properties */
+enum {
+	PROP_0,
+	PROP_SAVE_MODE
+};
+
+#define GEDIT_ENCODINGS_OPTION_MENU_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object),	\
+							GEDIT_TYPE_ENCODINGS_OPTION_MENU,	\
+							GeditEncodingsOptionMenuPrivate))
+
+struct _GeditEncodingsOptionMenuPrivate
+{
+	GSettings *enc_settings;
+
+	gint activated_item;
+
+	gboolean save_mode;
+};
+
+
+G_DEFINE_TYPE(GeditEncodingsOptionMenu, gedit_encodings_option_menu, GTK_TYPE_OPTION_MENU)
+
+static void
+gedit_encodings_option_menu_set_property (GObject 	*object, 
+					  guint 	 prop_id,
+			    		  const GValue *value, 
+					  GParamSpec	*pspec)
+{
+	GeditEncodingsOptionMenu *om;
+
+	g_return_if_fail (GEDIT_IS_ENCODINGS_OPTION_MENU (object));
+
+    	om = GEDIT_ENCODINGS_OPTION_MENU (object);
+
+	switch (prop_id)
+	{
+	case PROP_SAVE_MODE:
+		om->priv->save_mode = g_value_get_boolean (value);
+
+		update_menu (om);		
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+		break;
+	}
+}
+
+static void
+gedit_encodings_option_menu_get_property (GObject 	*object, 
+					  guint 	 prop_id,
+			    		  GValue 	*value, 
+					  GParamSpec	*pspec)
+{
+	GeditEncodingsOptionMenu *om;
+
+	g_return_if_fail (GEDIT_IS_ENCODINGS_OPTION_MENU (object));
+
+	om = GEDIT_ENCODINGS_OPTION_MENU (object);
+
+	switch (prop_id)
+	{	
+	case PROP_SAVE_MODE:
+		g_value_set_boolean (value, om->priv->save_mode);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+		break;
+	}
+}
+
+static void
+gedit_encodings_option_menu_dispose (GObject *object)
+{
+	GeditEncodingsOptionMenuPrivate *priv = GEDIT_ENCODINGS_OPTION_MENU (object)->priv;
+
+	if (priv->enc_settings != NULL)
+	{
+		g_object_unref (priv->enc_settings);
+		priv->enc_settings = NULL;
+	}
+
+	G_OBJECT_CLASS (gedit_encodings_option_menu_parent_class)->dispose (object);
+}
+
+static void
+gedit_encodings_option_menu_class_init (GeditEncodingsOptionMenuClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+	object_class->dispose = gedit_encodings_option_menu_dispose;
+	object_class->set_property = gedit_encodings_option_menu_set_property;
+	object_class->get_property = gedit_encodings_option_menu_get_property;
+
+	g_object_class_install_property (object_class,
+					 PROP_SAVE_MODE,
+					 g_param_spec_boolean ("save-mode",
+							       ("Save Mode"),
+							       ("Save Mode"),
+							       FALSE,
+							       G_PARAM_READWRITE | 
+							       G_PARAM_CONSTRUCT |
+							       G_PARAM_STATIC_STRINGS));
+
+	g_type_class_add_private (object_class, sizeof(GeditEncodingsOptionMenuPrivate));
+}
+
+static void
+dialog_response_cb (GtkDialog                *dialog,
+                    gint                      response_id,
+                    GeditEncodingsOptionMenu *option_menu)
+{
+	update_menu (option_menu);
+
+	gtk_widget_destroy (GTK_WIDGET (dialog));
+}
+
+static void
+add_or_remove (GtkMenuItem              *menu_item,
+	       GeditEncodingsOptionMenu *option_menu)
+{
+	if (GTK_IS_RADIO_MENU_ITEM (menu_item))
+	{
+		option_menu->priv->activated_item = 
+			gtk_option_menu_get_history (GTK_OPTION_MENU (option_menu));
+	}
+	else
+	{
+		GtkWidget *dialog;
+
+		GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (option_menu));
+	
+		if (!GTK_WIDGET_TOPLEVEL (toplevel))
+			toplevel = NULL;	
+		
+		gtk_option_menu_set_history (GTK_OPTION_MENU (option_menu),
+					     option_menu->priv->activated_item);
+
+		dialog = gedit_encodings_dialog_new();
+
+		if (toplevel != NULL)
+		{
+			GtkWindowGroup *wg;
+
+			gtk_window_set_transient_for (GTK_WINDOW (dialog),
+						      GTK_WINDOW (toplevel));
+
+			wg = gtk_window_get_group (GTK_WINDOW (toplevel));
+			if (wg == NULL)
+			{
+				wg = gtk_window_group_new ();
+				gtk_window_group_add_window (wg,
+							     GTK_WINDOW (toplevel));
+			}
+
+			gtk_window_group_add_window (wg,
+						     GTK_WINDOW (dialog));
+		}
+
+		gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
+		
+		g_signal_connect (dialog,
+				  "response",
+				  G_CALLBACK (dialog_response_cb),
+				  option_menu);
+
+		gtk_widget_show (dialog);
+	}
+}
+
+static void
+update_menu (GeditEncodingsOptionMenu *option_menu)
+{
+	GtkWidget *menu;
+	GtkWidget *menu_item;
+	GSList    *group = NULL;
+	GSList	  *encodings, *list, *tmp;
+	gchar     *str;
+
+	const GeditEncoding *utf8_encoding;
+	const GeditEncoding *current_encoding;
+
+	menu = gtk_menu_new ();
+
+	tmp = gedit_utils_get_list_from_settings (option_menu->priv->enc_settings,
+						  GS_ENCONDING_SHOW_IN_MENU);
+
+	encodings = list = gedit_utils_get_encodings_from_list_str (tmp);
+	
+	g_slist_foreach (tmp, (GFunc) g_free, NULL);
+	g_slist_free (tmp);
+
+	utf8_encoding = gedit_encoding_get_utf8 ();
+	current_encoding = gedit_encoding_get_current ();
+
+	if (!option_menu->priv->save_mode)
+	{
+		menu_item = gtk_radio_menu_item_new_with_label (group, _("Auto Detected"));
+		group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_item));
+
+		gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
+		gtk_widget_show (menu_item);
+
+		g_signal_connect (menu_item,
+				  "activate",
+				  G_CALLBACK (add_or_remove),
+				  option_menu);
+
+		menu_item = gtk_separator_menu_item_new ();
+
+		gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
+		gtk_widget_show (menu_item);
+	}
+
+	if (current_encoding != utf8_encoding)
+		str = gedit_encoding_to_string (utf8_encoding);
+	else
+		str = g_strdup_printf (_("Current Locale (%s)"), 
+				       gedit_encoding_get_charset (utf8_encoding));
+
+	menu_item = gtk_radio_menu_item_new_with_label (group, str);
+
+	g_signal_connect (menu_item,
+			  "activate",
+			  G_CALLBACK (add_or_remove),
+			  option_menu);
+
+	group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_item));
+
+	g_object_set_data (G_OBJECT (menu_item), ENCODING_KEY, (gpointer)utf8_encoding);
+
+	gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
+	gtk_widget_show (menu_item);
+
+	g_free (str);
+
+	if ((utf8_encoding != current_encoding) && 
+	    (current_encoding != NULL))
+	{
+		str = g_strdup_printf (_("Current Locale (%s)"), 
+				       gedit_encoding_get_charset (current_encoding));
+
+		menu_item = gtk_radio_menu_item_new_with_label (group, str);
+
+		g_signal_connect (menu_item,
+				  "activate",
+				  G_CALLBACK (add_or_remove),
+				  option_menu);
+
+		group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_item));
+
+		g_object_set_data (G_OBJECT (menu_item), 
+				   ENCODING_KEY, (gpointer)current_encoding);
+
+		gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
+		gtk_widget_show (menu_item);
+
+		g_free (str);
+	}
+
+	while (list != NULL)
+	{
+		const GeditEncoding *enc;
+		
+		enc = (const GeditEncoding *)list->data;
+
+		if ((enc != current_encoding) && 
+		    (enc != utf8_encoding) && 
+		    (enc != NULL))
+		{
+			str = gedit_encoding_to_string (enc);
+
+			menu_item = gtk_radio_menu_item_new_with_label (group, str);
+
+			g_signal_connect (menu_item,
+					  "activate",
+					  G_CALLBACK (add_or_remove),
+					  option_menu);
+
+			group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_item));
+
+			g_object_set_data (G_OBJECT (menu_item), ENCODING_KEY, (gpointer)enc);
+
+			gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
+			gtk_widget_show (menu_item);
+
+			g_free (str);
+		}
+		
+		list = g_slist_next (list);
+	}
+
+	g_slist_free (encodings);
+
+	menu_item = gtk_separator_menu_item_new ();
+	gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
+	gtk_widget_show (menu_item);
+
+	menu_item = gtk_menu_item_new_with_mnemonic (_("Add or _Remove..."));
+
+	g_signal_connect (menu_item,
+			  "activate",
+			  G_CALLBACK (add_or_remove),
+			  option_menu);
+	
+	gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
+	gtk_widget_show (menu_item);
+
+	gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu);
+}
+
+static void
+gedit_encodings_option_menu_init (GeditEncodingsOptionMenu *menu)
+{
+	menu->priv = GEDIT_ENCODINGS_OPTION_MENU_GET_PRIVATE (menu);
+	
+	menu->priv->enc_settings = gedit_app_get_settings (gedit_app_get_default (),
+							   "preferences", "encodings",
+							   NULL);
+}
+
+GtkWidget *
+gedit_encodings_option_menu_new (gboolean save_mode)
+{
+	return g_object_new (GEDIT_TYPE_ENCODINGS_OPTION_MENU, 
+			     "save_mode", save_mode,
+			     NULL);
+}
+
+const GeditEncoding *
+gedit_encodings_option_menu_get_selected_encoding (GeditEncodingsOptionMenu *menu)
+{
+	GtkWidget *active_widget;
+
+	GtkOptionMenu *option_menu;
+
+	g_return_val_if_fail (GEDIT_IS_ENCODINGS_OPTION_MENU (menu), NULL);
+
+	option_menu = GTK_OPTION_MENU (menu);
+	g_return_val_if_fail (option_menu != NULL, NULL);
+	
+	if (option_menu->menu)
+    	{
+      		active_widget = gtk_menu_get_active (GTK_MENU (option_menu->menu));
+
+	      	if (active_widget != NULL)
+		{
+			const GeditEncoding *ret;
+
+			ret = (const GeditEncoding *)g_object_get_data (G_OBJECT (active_widget), 
+									ENCODING_KEY);
+
+			return ret;
+		}
+	}
+
+	return NULL;
+}
+
+void
+gedit_encodings_option_menu_set_selected_encoding (GeditEncodingsOptionMenu *menu,
+						   const GeditEncoding      *encoding)
+{
+	GtkOptionMenu *option_menu;
+	GList *list;
+	GList *l;
+	gint i;
+
+	g_return_if_fail (GEDIT_IS_ENCODINGS_OPTION_MENU (menu));
+
+	option_menu = GTK_OPTION_MENU (menu);
+	g_return_if_fail (option_menu != NULL);
+
+	list = gtk_container_get_children (GTK_CONTAINER (option_menu->menu));
+	i = 0;
+	for (l = list; l != NULL; l = g_list_next (l))
+	{
+		GtkWidget *menu_item;
+		const GeditEncoding *enc;
+
+		menu_item = GTK_WIDGET (l->data);
+
+		enc = (const GeditEncoding *)g_object_get_data (G_OBJECT (menu_item), 
+								ENCODING_KEY);
+
+		if (enc == encoding)
+		{
+			gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), TRUE);
+			gtk_option_menu_set_history (GTK_OPTION_MENU (menu), i);
+			break;
+		}
+
+		++i;
+	}
+
+	g_list_free (list);
+}
diff --git a/gedit/gedit-file-chooser-dialog.c b/gedit/gedit-file-chooser-dialog.c
index 8094ea9..730668b 100644
--- a/gedit/gedit-file-chooser-dialog.c
+++ b/gedit/gedit-file-chooser-dialog.c
@@ -43,9 +43,9 @@
 #include "gedit-file-chooser-dialog.h"
 #include "gedit-encodings-combo-box.h"
 #include "gedit-language-manager.h"
-#include "gedit-prefs-manager-app.h"
 #include "gedit-debug.h"
 #include "gedit-enum-types.h"
+#include "gedit-settings.h"
 
 #define GEDIT_FILE_CHOOSER_DIALOG_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), GEDIT_TYPE_FILE_CHOOSER_DIALOG, GeditFileChooserDialogPrivate))
 
@@ -245,7 +245,7 @@ filter_changed (GeditFileChooserDialog *dialog,
 {
 	GtkFileFilter *filter;
 
-	if (!gedit_prefs_manager_active_file_filter_can_set ())
+	if (!gedit_settings_active_file_filter_can_set ())
 		return;
 
 	filter = gtk_file_chooser_get_filter (GTK_FILE_CHOOSER (dialog));
@@ -262,7 +262,7 @@ filter_changed (GeditFileChooserDialog *dialog,
 
 		gedit_debug_message (DEBUG_COMMANDS, "Active filter: %s (%d)", name, id);
 
-		gedit_prefs_manager_set_active_file_filter (id);
+		gedit_settings_set_active_file_filter (id);
 	}
 }
 
@@ -386,7 +386,7 @@ gedit_file_chooser_dialog_new_valist (const gchar          *title,
 				GEDIT_ENCODINGS_COMBO_BOX (GEDIT_FILE_CHOOSER_DIALOG (result)->priv->option_menu),
 				encoding);
 
-	active_filter = gedit_prefs_manager_get_active_file_filter ();
+	active_filter = gedit_settings_get_active_file_filter ();
 	gedit_debug_message (DEBUG_COMMANDS, "Active filter: %d", active_filter);
 
 	/* Filters */
diff --git a/gedit/gedit-history-entry.c b/gedit/gedit-history-entry.c
index d2e8f85..3456888 100644
--- a/gedit/gedit-history-entry.c
+++ b/gedit/gedit-history-entry.c
@@ -35,7 +35,6 @@
 #include <string.h>
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
-#include <gconf/gconf-client.h>
 
 #include "gedit-history-entry.h"
 
@@ -60,7 +59,7 @@ struct _GeditHistoryEntryPrivate
 	
 	GtkEntryCompletion *completion;
 	
-	GConfClient        *gconf_client;
+	GSettings          *settings;
 };
 
 G_DEFINE_TYPE(GeditHistoryEntry, gedit_history_entry, GTK_TYPE_COMBO_BOX_ENTRY)
@@ -132,10 +131,10 @@ gedit_history_entry_finalize (GObject *object)
 	
 	g_free (priv->history_id);
 
-	if (priv->gconf_client != NULL)
+	if (priv->settings != NULL)
 	{
-		g_object_unref (G_OBJECT (priv->gconf_client));
-		priv->gconf_client = NULL;
+		g_object_unref (G_OBJECT (priv->settings));
+		priv->settings = NULL;
 	}
 
 	G_OBJECT_CLASS (gedit_history_entry_parent_class)->finalize (object);
@@ -188,42 +187,24 @@ get_history_store (GeditHistoryEntry *entry)
 	return (GtkListStore *) store;
 }
 
-static char *
-get_history_key (GeditHistoryEntry *entry)
-{
-	gchar *tmp;
-	gchar *key;
-
-	/*
-	 * We store the data under /apps/gnome-settings/
-	 * like the old GnomeEntry did. Maybe we should
-	 * consider moving it to the /gedit GConf prefix...
-	 * Or maybe we should just switch away from GConf.
-	 */
-
-	tmp = gconf_escape_key (entry->priv->history_id, -1);
-	key = g_strconcat ("/apps/gnome-settings/",
-			   "gedit",
-			   "/history-",
-			   tmp,
-			   NULL);
-	g_free (tmp);
-
-	return key;
-}
-
-static GSList *
-get_history_list (GeditHistoryEntry *entry)
+static GVariant *
+get_history_variant (GeditHistoryEntry *entry)
 {
 	GtkListStore *store;
 	GtkTreeIter iter;
+	GVariant *variant;
 	gboolean valid;
-	GSList *list = NULL;
+	gchar **items;
+	gint n_children;
+	gint i = 0;
 
 	store = get_history_store (entry);
 
 	valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store),
 					       &iter);
+	n_children = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (store),
+						     &iter);
+	items = g_new (gchar *, n_children + 1);
 
 	while (valid)
 	{
@@ -234,35 +215,34 @@ get_history_list (GeditHistoryEntry *entry)
 				    0, &str,
 				    -1);
 
-		list = g_slist_prepend (list, str);
+		items[i] = str;
 
 		valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (store),
 						  &iter);
+		i++;
 	}
+	
+	items[i] = NULL;
+	
+	variant = g_variant_new_strv ((const gchar * const *)items, n_children);
+	g_strfreev (items);
 
-	return g_slist_reverse (list);
+	return variant;;
 }
 
 static void
 gedit_history_entry_save_history (GeditHistoryEntry *entry)
 {
-	GSList *gconf_items;
-	gchar *key;
+	GVariant *items;
 
 	g_return_if_fail (GEDIT_IS_HISTORY_ENTRY (entry));
 
-	gconf_items = get_history_list (entry);
-	key = get_history_key (entry);
+	items = get_history_variant (entry);
 
-	gconf_client_set_list (entry->priv->gconf_client,
-			      key,
-			      GCONF_VALUE_STRING,
-			      gconf_items,
-			      NULL);
+	g_settings_set_value (entry->priv->settings,
+			      entry->priv->history_id, items);
 
-	g_slist_foreach (gconf_items, (GFunc) g_free, NULL);
-	g_slist_free (gconf_items);
-	g_free (key);
+	g_variant_unref (items);
 }
 
 static gboolean
@@ -382,39 +362,35 @@ gedit_history_entry_append_text (GeditHistoryEntry *entry,
 static void
 gedit_history_entry_load_history (GeditHistoryEntry *entry)
 {
-	GSList *gconf_items, *l;
+	GVariant *variant;
+	const gchar **items;
 	GtkListStore *store;
 	GtkTreeIter iter;
-	gchar *key;
-	guint i;
+	gint i;
 
 	g_return_if_fail (GEDIT_IS_HISTORY_ENTRY (entry));
 
 	store = get_history_store (entry);
-	key = get_history_key (entry);
 
-	gconf_items = gconf_client_get_list (entry->priv->gconf_client,
-					     key,
-					     GCONF_VALUE_STRING,
-					     NULL);
+	variant = g_settings_get_value (entry->priv->settings,
+					entry->priv->history_id);
+	items = g_variant_get_strv (variant, &i);
 
 	gtk_list_store_clear (store);
 
-	for (l = gconf_items, i = 0;
-	     l != NULL && i < entry->priv->history_length;
-	     l = l->next, i++)
+	for (i = 0;
+	     items[i] != NULL && i < entry->priv->history_length;
+	     i++)
 	{
 		gtk_list_store_append (store, &iter);
 		gtk_list_store_set (store, 
 				    &iter,
 				    0,
-				    l->data,
+				    items[i],
 				    -1);
 	}
 
-	g_slist_foreach (gconf_items, (GFunc) g_free, NULL);
-	g_slist_free (gconf_items);
-	g_free (key);
+	g_variant_unref (variant);
 }
 
 void
@@ -434,6 +410,7 @@ static void
 gedit_history_entry_init (GeditHistoryEntry *entry)
 {
 	GeditHistoryEntryPrivate *priv;
+	GSettings *gedit;
 
 	priv = GEDIT_HISTORY_ENTRY_GET_PRIVATE (entry);
 	entry->priv = priv;
@@ -443,7 +420,9 @@ gedit_history_entry_init (GeditHistoryEntry *entry)
 
 	priv->completion = NULL;
 	
-	priv->gconf_client = gconf_client_get_default ();
+	gedit = g_settings_new ("org.gnome.gedit");
+	priv->settings = g_settings_get_settings (gedit, "history");
+	g_object_unref (gedit);
 }
 
 void
diff --git a/gedit/gedit-io-error-message-area.c b/gedit/gedit-io-error-message-area.c
index e116a15..4aa504a 100644
--- a/gedit/gedit-io-error-message-area.c
+++ b/gedit/gedit-io-error-message-area.c
@@ -45,7 +45,6 @@
 #include "gedit-utils.h"
 #include "gedit-document.h"
 #include "gedit-io-error-message-area.h"
-#include "gedit-prefs-manager.h"
 #include <gedit/gedit-encodings-combo-box.h>
 
 #if !GTK_CHECK_VERSION (2, 17, 1)
@@ -997,6 +996,8 @@ gedit_no_backup_saving_error_message_area_new (const gchar  *uri,
 	gchar *full_formatted_uri;
 	gchar *uri_for_display;
 	gchar *temp_uri_for_display;
+	gboolean create_backup_copy;
+	GSettings *editor_settings;
 
 	g_return_val_if_fail (uri != NULL, NULL);
 	g_return_val_if_fail (error != NULL, NULL);
@@ -1050,9 +1051,14 @@ gedit_no_backup_saving_error_message_area_new (const gchar  *uri,
 	vbox = gtk_vbox_new (FALSE, 6);
 	gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
 
-	// FIXME: review this messages
+	editor_settings = gedit_app_get_settings (gedit_app_get_default (),
+						  "preferences", "editor", NULL);
+
+	g_settings_get (editor_settings, GS_CREATE_BACKUP_COPY, &create_backup_copy);
+	g_object_unref (editor_settings);
 
-	if (gedit_prefs_manager_get_create_backup_copy ())
+	// FIXME: review this messages
+	if (create_backup_copy)
 		primary_text = g_strdup_printf (_("Could not create a backup file while saving %s"),
 						uri_for_display);
 	else
diff --git a/gedit/gedit-language-manager.c b/gedit/gedit-language-manager.c
index a402e4a..46a0bf0 100644
--- a/gedit/gedit-language-manager.c
+++ b/gedit/gedit-language-manager.c
@@ -32,7 +32,6 @@
 #include <string.h>
 
 #include "gedit-language-manager.h"
-#include "gedit-prefs-manager.h"
 #include "gedit-utils.h"
 #include "gedit-debug.h"
 
diff --git a/gedit/gedit-plugins-engine.c b/gedit/gedit-plugins-engine.c
index 3f020d3..2300f5d 100644
--- a/gedit/gedit-plugins-engine.c
+++ b/gedit/gedit-plugins-engine.c
@@ -41,10 +41,11 @@
 #include "gedit-plugin.h"
 #include "gedit-debug.h"
 #include "gedit-app.h"
-#include "gedit-prefs-manager.h"
 #include "gedit-plugin-loader.h"
 #include "gedit-object-module.h"
 #include "gedit-dirs.h"
+#include "gedit-settings.h"
+#include "gedit-utils.h"
 
 #define GEDIT_PLUGINS_ENGINE_BASE_KEY "/apps/gedit-2/plugins"
 #define GEDIT_PLUGINS_ENGINE_KEY GEDIT_PLUGINS_ENGINE_BASE_KEY "/active-plugins"
@@ -72,6 +73,8 @@ G_DEFINE_TYPE(GeditPluginsEngine, gedit_plugins_engine, G_TYPE_OBJECT)
 
 struct _GeditPluginsEnginePrivate
 {
+	GSettings *plugin_settings;
+
 	GList *plugin_list;
 	GHashTable *loaders;
 
@@ -282,6 +285,9 @@ gedit_plugins_engine_init (GeditPluginsEngine *engine)
 						    GEDIT_TYPE_PLUGINS_ENGINE,
 						    GeditPluginsEnginePrivate);
 
+	engine->priv->plugin_settings = gedit_app_get_settings (gedit_app_get_default (),
+								"plugins", NULL);
+
 	load_all_plugins (engine);
 
 	/* make sure that the first reactivation will read active plugins
@@ -344,12 +350,27 @@ gedit_plugins_engine_finalize (GObject *object)
 }
 
 static void
+gedit_plugins_engine_dispose (GObject *object)
+{
+	GeditPluginsEngine *engine = GEDIT_PLUGINS_ENGINE (object);
+	
+	if (engine->priv->plugin_settings != NULL)
+	{
+		g_object_unref (engine->priv->plugin_settings);
+		engine->priv->plugin_settings = NULL;
+	}
+	
+	G_OBJECT_CLASS (gedit_plugins_engine_parent_class)->dispose (object);
+}
+
+static void
 gedit_plugins_engine_class_init (GeditPluginsEngineClass *klass)
 {
 	GType the_type = G_TYPE_FROM_CLASS (klass);
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
 	object_class->finalize = gedit_plugins_engine_finalize;
+	object_class->dispose = gedit_plugins_engine_dispose;
 	klass->activate_plugin = gedit_plugins_engine_activate_plugin_real;
 	klass->deactivate_plugin = gedit_plugins_engine_deactivate_plugin_real;
 
@@ -543,7 +564,9 @@ save_active_plugin_list (GeditPluginsEngine *engine)
 		}
 	}
 
-	gedit_prefs_manager_set_active_plugins (active_plugins);
+	gedit_utils_set_list_into_settings (engine->priv->plugin_settings,
+					    GS_ACTIVE_PLUGINS,
+					    active_plugins);
 
 	g_slist_free (active_plugins);
 }
@@ -702,7 +725,8 @@ gedit_plugins_engine_activate_plugins (GeditPluginsEngine *engine,
 	/* the first time, we get the 'active' plugins from gconf */
 	if (engine->priv->activate_from_prefs)
 	{
-		active_plugins = gedit_prefs_manager_get_active_plugins ();
+		active_plugins = gedit_utils_get_list_from_settings (engine->priv->plugin_settings,
+								     GS_ACTIVE_PLUGINS);
 	}
 
 	for (pl = engine->priv->plugin_list; pl; pl = pl->next)
@@ -829,7 +853,8 @@ gedit_plugins_engine_active_plugins_changed (GeditPluginsEngine *engine)
 
 	gedit_debug (DEBUG_PLUGINS);
 
-	active_plugins = gedit_prefs_manager_get_active_plugins ();
+	active_plugins = gedit_utils_get_list_from_settings (engine->priv->plugin_settings,
+							     GS_ACTIVE_PLUGINS);
 
 	for (pl = engine->priv->plugin_list; pl; pl = pl->next)
 	{
diff --git a/gedit/gedit-print-job.c b/gedit/gedit-print-job.c
index 00acba2..554b001 100644
--- a/gedit/gedit-print-job.c
+++ b/gedit/gedit-print-job.c
@@ -38,11 +38,11 @@
 
 #include "gedit-print-job.h"
 #include "gedit-debug.h"
-#include "gedit-prefs-manager.h"
 #include "gedit-print-preview.h"
 #include "gedit-marshal.h"
 #include "gedit-utils.h"
 #include "gedit-dirs.h"
+#include "gedit-settings.h"
 
 
 #define GEDIT_PRINT_JOB_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
@@ -51,6 +51,8 @@
 
 struct _GeditPrintJobPrivate
 {
+	GSettings                *print_settings;
+
 	GeditView                *view;
 	GeditDocument            *doc;
 
@@ -167,6 +169,20 @@ gedit_print_job_finalize (GObject *object)
 	G_OBJECT_CLASS (gedit_print_job_parent_class)->finalize (object);
 }
 
+static void
+gedit_print_job_dispose (GObject *object)
+{
+	GeditPrintJob *job = GEDIT_PRINT_JOB (object);
+	
+	if (job->priv->print_settings != NULL)
+	{
+		g_object_unref (job->priv->print_settings);
+		job->priv->print_settings = NULL;
+	}
+	
+	G_OBJECT_CLASS (gedit_print_job_parent_class)->dispose (object);
+}
+
 static void 
 gedit_print_job_class_init (GeditPrintJobClass *klass)
 {
@@ -177,6 +193,7 @@ gedit_print_job_class_init (GeditPrintJobClass *klass)
 	object_class->get_property = gedit_print_job_get_property;
 	object_class->set_property = gedit_print_job_set_property;
 	object_class->finalize = gedit_print_job_finalize;
+	object_class->finalize = gedit_print_job_dispose;
 
 	g_object_class_install_property (object_class,
 					 PROP_VIEW,
@@ -231,8 +248,7 @@ line_numbers_checkbutton_toggled (GtkToggleButton *button,
 {
 	if (gtk_toggle_button_get_active (button))
 	{
-		gtk_widget_set_sensitive (job->priv->line_numbers_hbox, 
-					  gedit_prefs_manager_print_line_numbers_can_set ());
+		gtk_widget_set_sensitive (job->priv->line_numbers_hbox, TRUE);
 	}
 	else
 	{
@@ -267,38 +283,30 @@ restore_button_clicked (GtkButton     *button,
 			GeditPrintJob *job)
 
 {
-	if (gedit_prefs_manager_print_font_body_can_set ())
-	{
-		const gchar *font;
-
-		font = gedit_prefs_manager_get_default_print_font_body ();
-
-		gtk_font_button_set_font_name (
-				GTK_FONT_BUTTON (job->priv->body_fontbutton),
-				font);
-	}
+	gchar *body, *header, *numbers;
 	
-	if (gedit_prefs_manager_print_font_header_can_set ())
-	{
-		const gchar *font;
-
-		font = gedit_prefs_manager_get_default_print_font_header ();
-
-		gtk_font_button_set_font_name (
-				GTK_FONT_BUTTON (job->priv->headers_fontbutton),
-				font);
-	}
-
-	if (gedit_prefs_manager_print_font_numbers_can_set ())
-	{
-		const gchar *font;
-
-		font = gedit_prefs_manager_get_default_print_font_numbers ();
-
-		gtk_font_button_set_font_name (
-				GTK_FONT_BUTTON (job->priv->numbers_fontbutton),
-				font);
-	}
+	g_settings_get (job->priv->print_settings, GS_PRINT_FONT_BODY_PANGO,
+			&body);
+	g_settings_get (job->priv->print_settings, GS_PRINT_FONT_HEADER_PANGO,
+			&header);
+	g_settings_get (job->priv->print_settings, GS_PRINT_FONT_NUMBERS_PANGO,
+			&numbers);
+
+	gtk_font_button_set_font_name (
+			GTK_FONT_BUTTON (job->priv->body_fontbutton),
+			body);
+
+	gtk_font_button_set_font_name (
+			GTK_FONT_BUTTON (job->priv->headers_fontbutton),
+			header);
+
+	gtk_font_button_set_font_name (
+			GTK_FONT_BUTTON (job->priv->numbers_fontbutton),
+			numbers);
+	
+	g_free (body);
+	g_free (header);
+	g_free (numbers);
 }
 
 static GObject *
@@ -308,11 +316,13 @@ create_custom_widget_cb (GtkPrintOperation *operation,
 	gboolean ret;
 	GtkWidget *widget;
 	GtkWidget *error_widget;
-	gchar *font;
 	gint line_numbers;
-	gboolean can_set;
 	GtkWrapMode wrap_mode;
+	gchar *wrap_str;
 	gchar *file;
+	gboolean syntax_hl;
+	gboolean print_header;
+	gchar *font_body, *font_header, *font_numbers;
 	gchar *root_objects[] = {
 		"adjustment1",
 		"contents",
@@ -347,31 +357,39 @@ create_custom_widget_cb (GtkPrintOperation *operation,
 		return G_OBJECT (error_widget);
 	}
 
+	/* Get all settings values */
+	g_settings_get (job->priv->print_settings, GS_PRINT_SYNTAX_HIGHLIGHTING,
+			&syntax_hl);
+	g_settings_get (job->priv->print_settings, GS_PRINT_HEADER,
+			&print_header);
+	g_settings_get (job->priv->print_settings, GS_PRINT_LINE_NUMBERS,
+			&line_numbers);
+	g_settings_get (job->priv->print_settings, GS_PRINT_WRAP_MODE,
+			&wrap_str);
+	g_settings_get (job->priv->print_settings, GS_PRINT_FONT_BODY_PANGO,
+			&font_body);
+	g_settings_get (job->priv->print_settings, GS_PRINT_FONT_HEADER_PANGO,
+			&font_header);
+	g_settings_get (job->priv->print_settings, GS_PRINT_FONT_NUMBERS_PANGO,
+			&font_numbers);
+
 	/* Print syntax */
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (job->priv->syntax_checkbutton),
-				      gedit_prefs_manager_get_print_syntax_hl ());
-	gtk_widget_set_sensitive (job->priv->syntax_checkbutton,
-				  gedit_prefs_manager_print_syntax_hl_can_set ());
+				      syntax_hl);
 
 	/* Print page headers */
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (job->priv->page_header_checkbutton),
-				      gedit_prefs_manager_get_print_header ());
-	gtk_widget_set_sensitive (job->priv->page_header_checkbutton,
-				  gedit_prefs_manager_print_header_can_set ());
+				      print_header);
 
 	/* Line numbers */
-	line_numbers =  gedit_prefs_manager_get_print_line_numbers ();
-	can_set = gedit_prefs_manager_print_line_numbers_can_set ();
-
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (job->priv->line_numbers_checkbutton),
 				      line_numbers > 0);
-	gtk_widget_set_sensitive (job->priv->line_numbers_checkbutton, can_set);
 
 	if (line_numbers > 0)
 	{
 		gtk_spin_button_set_value (GTK_SPIN_BUTTON (job->priv->line_numbers_spinbutton),
 					   (guint) line_numbers);
-		gtk_widget_set_sensitive (job->priv->line_numbers_hbox, can_set);	
+		gtk_widget_set_sensitive (job->priv->line_numbers_hbox, TRUE);
 	}
 	else
 	{
@@ -381,8 +399,9 @@ create_custom_widget_cb (GtkPrintOperation *operation,
 	}
 
 	/* Text wrapping */
-	wrap_mode = gedit_prefs_manager_get_print_wrap_mode ();
-
+	wrap_mode = gedit_utils_get_wrap_mode_from_string (wrap_str);
+	g_free (wrap_str);
+	
 	switch (wrap_mode)
 	{
 		case GTK_WRAP_WORD:
@@ -404,39 +423,21 @@ create_custom_widget_cb (GtkPrintOperation *operation,
 				GTK_TOGGLE_BUTTON (job->priv->do_not_split_checkbutton), TRUE);
 	}
 
-	can_set = gedit_prefs_manager_print_wrap_mode_can_set ();
-
-	gtk_widget_set_sensitive (job->priv->text_wrapping_checkbutton, can_set);
 	gtk_widget_set_sensitive (job->priv->do_not_split_checkbutton, 
-				  can_set && (wrap_mode != GTK_WRAP_NONE));
+				  wrap_mode != GTK_WRAP_NONE);
 
 	/* Set initial values */
-	font = gedit_prefs_manager_get_print_font_body ();
 	gtk_font_button_set_font_name (GTK_FONT_BUTTON (job->priv->body_fontbutton),
-				       font);
-	g_free (font);
+				       font_body);
+	g_free (font_body);
 
-	font = gedit_prefs_manager_get_print_font_header ();
 	gtk_font_button_set_font_name (GTK_FONT_BUTTON (job->priv->headers_fontbutton),
-				       font);
-	g_free (font);
+				       font_header);
+	g_free (font_header);
 
-	font = gedit_prefs_manager_get_print_font_numbers ();
 	gtk_font_button_set_font_name (GTK_FONT_BUTTON (job->priv->numbers_fontbutton),
-				       font);
-	g_free (font);
-
-	can_set = gedit_prefs_manager_print_font_body_can_set ();
-	gtk_widget_set_sensitive (job->priv->body_fontbutton, can_set);
-	gtk_widget_set_sensitive (job->priv->body_font_label, can_set);
-
-	can_set = gedit_prefs_manager_print_font_header_can_set ();
-	gtk_widget_set_sensitive (job->priv->headers_fontbutton, can_set);
-	gtk_widget_set_sensitive (job->priv->headers_font_label, can_set);
-
-	can_set = gedit_prefs_manager_print_font_numbers_can_set ();
-	gtk_widget_set_sensitive (job->priv->numbers_fontbutton, can_set);
-	gtk_widget_set_sensitive (job->priv->numbers_font_label, can_set);
+				       font_numbers);
+	g_free (font_numbers);
 
 	g_signal_connect (job->priv->line_numbers_checkbutton,
 			  "toggled",
@@ -459,43 +460,63 @@ create_custom_widget_cb (GtkPrintOperation *operation,
 }
 
 static void
+set_wrap_setting (GeditPrintJob *job,
+		  gint           mode)
+{
+	gchar *wrap_str;
+	
+	wrap_str = gedit_utils_get_wrap_str (mode);
+	g_settings_set (job->priv->print_settings, GS_PRINT_WRAP_MODE,
+			wrap_str);
+	g_free (wrap_str);
+}
+
+static void
 custom_widget_apply_cb (GtkPrintOperation *operation,
 			GtkWidget         *widget,
 			GeditPrintJob     *job)
 {
-	gedit_prefs_manager_set_print_syntax_hl (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (job->priv->syntax_checkbutton)));
-
-	gedit_prefs_manager_set_print_header (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (job->priv->page_header_checkbutton)));
+	gboolean syntax, page_header;
+	const gchar *body, *header, *numbers;
+
+	syntax = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (job->priv->syntax_checkbutton));
+	page_header = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (job->priv->page_header_checkbutton));
+	body = gtk_font_button_get_font_name (GTK_FONT_BUTTON (job->priv->body_fontbutton));
+	header = gtk_font_button_get_font_name (GTK_FONT_BUTTON (job->priv->headers_fontbutton));
+	numbers = gtk_font_button_get_font_name (GTK_FONT_BUTTON (job->priv->numbers_fontbutton));
+
+	g_settings_set (job->priv->print_settings, GS_PRINT_SYNTAX_HIGHLIGHTING,
+			syntax);
+	g_settings_set (job->priv->print_settings, GS_PRINT_HEADER, page_header);
+	g_settings_set (job->priv->print_settings, GS_PRINT_FONT_BODY_PANGO, body);
+	g_settings_set (job->priv->print_settings, GS_PRINT_FONT_HEADER_PANGO, header);
+	g_settings_set (job->priv->print_settings, GS_PRINT_FONT_NUMBERS_PANGO, numbers);
 
 	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (job->priv->line_numbers_checkbutton)))
 	{
-		gedit_prefs_manager_set_print_line_numbers (
+		g_settings_set (job->priv->print_settings, GS_PRINT_LINE_NUMBERS,
 			MAX (1, gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (job->priv->line_numbers_spinbutton))));
 	}
 	else
 	{
-		gedit_prefs_manager_set_print_line_numbers (0);
+		g_settings_set (job->priv->print_settings, GS_PRINT_LINE_NUMBERS, 0);
 	}
 
 	if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (job->priv->text_wrapping_checkbutton)))
 	{
-		gedit_prefs_manager_set_print_wrap_mode (GTK_WRAP_NONE);
+		set_wrap_setting (job, GTK_WRAP_NONE);
 	}
 	else
 	{
 		if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (job->priv->do_not_split_checkbutton)))
 		{
-			gedit_prefs_manager_set_print_wrap_mode (GTK_WRAP_WORD);
+			set_wrap_setting (job, GTK_WRAP_WORD);
 		}
 		else
 		{
-			gedit_prefs_manager_set_print_wrap_mode (GTK_WRAP_CHAR);
-		}	
+			set_wrap_setting (job, GTK_WRAP_CHAR);
+		}
 	}
-
-	gedit_prefs_manager_set_print_font_body (gtk_font_button_get_font_name (GTK_FONT_BUTTON (job->priv->body_fontbutton)));
-	gedit_prefs_manager_set_print_font_header (gtk_font_button_get_font_name (GTK_FONT_BUTTON (job->priv->headers_fontbutton)));
-	gedit_prefs_manager_set_print_font_numbers (gtk_font_button_get_font_name (GTK_FONT_BUTTON (job->priv->numbers_fontbutton)));
 }
 
 static void
@@ -504,21 +525,40 @@ create_compositor (GeditPrintJob *job)
 	gchar *print_font_body;
 	gchar *print_font_header;
 	gchar *print_font_numbers;
+	gchar *wrap_str;
+	gboolean syntax_hl;
+	GtkWrapMode wrap_mode;
+	guint print_line_numbers;
+	gboolean print_header;
 	
 	/* Create and initialize print compositor */
-	print_font_body = gedit_prefs_manager_get_print_font_body ();
-	print_font_header = gedit_prefs_manager_get_print_font_header ();
-	print_font_numbers = gedit_prefs_manager_get_print_font_numbers ();
+	g_settings_get (job->priv->print_settings, GS_PRINT_FONT_BODY_PANGO,
+			&print_font_body);
+	g_settings_get (job->priv->print_settings, GS_PRINT_FONT_HEADER_PANGO,
+			&print_font_header);
+	g_settings_get (job->priv->print_settings, GS_PRINT_FONT_NUMBERS_PANGO,
+			&print_font_numbers);
+	g_settings_get (job->priv->print_settings, GS_PRINT_SYNTAX_HIGHLIGHTING,
+			&syntax_hl);
+	g_settings_get (job->priv->print_settings, GS_PRINT_WRAP_MODE,
+			&wrap_str);
+	g_settings_get (job->priv->print_settings, GS_PRINT_LINE_NUMBERS,
+			&print_line_numbers);
+	g_settings_get (job->priv->print_settings, GS_PRINT_HEADER,
+			&print_header);
+	
+	wrap_mode = gedit_utils_get_wrap_mode_from_string (wrap_str);
+	g_free (wrap_str);
 	
 	job->priv->compositor = GTK_SOURCE_PRINT_COMPOSITOR (
 					g_object_new (GTK_TYPE_SOURCE_PRINT_COMPOSITOR,
 						     "buffer", GTK_SOURCE_BUFFER (job->priv->doc),
 						     "tab-width", gtk_source_view_get_tab_width (GTK_SOURCE_VIEW (job->priv->view)),
 						     "highlight-syntax", gtk_source_buffer_get_highlight_syntax (GTK_SOURCE_BUFFER (job->priv->doc)) &&
-					   				 gedit_prefs_manager_get_print_syntax_hl (),
-						     "wrap-mode", gedit_prefs_manager_get_print_wrap_mode (),
-						     "print-line-numbers", gedit_prefs_manager_get_print_line_numbers (),
-						     "print-header", gedit_prefs_manager_get_print_header (),
+									 syntax_hl,
+						     "wrap-mode", wrap_mode,
+						     "print-line-numbers", print_line_numbers,
+						     "print-header", print_header,
 						     "print-footer", FALSE,
 						     "body-font-name", print_font_body,
 						     "line-numbers-font-name", print_font_numbers,
@@ -529,7 +569,7 @@ create_compositor (GeditPrintJob *job)
 	g_free (print_font_header);
 	g_free (print_font_numbers);
 	
-	if (gedit_prefs_manager_get_print_header ())
+	if (print_header)
 	{
 		gchar *doc_name;
 		gchar *name_to_display;
@@ -552,7 +592,7 @@ create_compositor (GeditPrintJob *job)
 		g_free (doc_name);
 		g_free (name_to_display);
 		g_free (left);
-	}		
+	}
 }
 
 static void
@@ -804,6 +844,10 @@ gedit_print_job_init (GeditPrintJob *job)
 {
 	job->priv = GEDIT_PRINT_JOB_GET_PRIVATE (job);
 	
+	job->priv->print_settings = gedit_app_get_settings (gedit_app_get_default (),
+							    "preferences", "print",
+							    NULL);
+	
 	job->priv->status = GEDIT_PRINT_JOB_STATUS_INIT;
 	
 	job->priv->status_string = g_strdup (_("Preparing..."));
diff --git a/gedit/gedit-session.c b/gedit/gedit-session.c
index 7468664..8c0a8ad 100644
--- a/gedit/gedit-session.c
+++ b/gedit/gedit-session.c
@@ -46,7 +46,6 @@
 
 #include "gedit-debug.h"
 #include "gedit-plugins-engine.h"
-#include "gedit-prefs-manager-app.h"
 #include "gedit-metadata-manager.h"
 #include "gedit-window.h"
 #include "gedit-app.h"
diff --git a/gedit/gedit-settings.c b/gedit/gedit-settings.c
new file mode 100644
index 0000000..b1aa4e2
--- /dev/null
+++ b/gedit/gedit-settings.c
@@ -0,0 +1,1323 @@
+/*
+ * gedit-settings.c
+ * This file is part of gedit
+ *
+ * Copyright (C) 2002-2005 - Paolo Maggi
+ *               2009 - Ignacio Casal Quinteiro
+ *
+ * gedit is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * gedit is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with gedit; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, 
+ * Boston, MA  02110-1301  USA
+ */
+
+#include <string.h>
+
+#include "gedit-settings.h"
+#include "gedit-app.h"
+#include "gedit-debug.h"
+#include "gedit-view.h"
+#include "gedit-window.h"
+#include "gedit-plugins-engine.h"
+#include "gedit-style-scheme-manager.h"
+#include "gedit-dirs.h"
+#include "gedit-utils.h"
+#include "gedit-window-private.h"
+
+#define GS_LOCKDOWN_COMMAND_LINE "disable_command_line"
+#define GS_LOCKDOWN_PRINTING "disable_printing"
+#define GS_LOCKDOWN_PRINT_SETUP "disable_print_setup"
+#define GS_LOCKDOWN_SAVE_TO_DISK "disable_save_to_disk"
+
+#define GS_SYSTEM_FONT "monospace_font_name"
+
+#define GEDIT_STATE_DEFAULT_WINDOW_STATE	0
+#define GEDIT_STATE_DEFAULT_WINDOW_WIDTH	650
+#define GEDIT_STATE_DEFAULT_WINDOW_HEIGHT	500
+#define GEDIT_STATE_DEFAULT_SIDE_PANEL_SIZE	200
+#define GEDIT_STATE_DEFAULT_BOTTOM_PANEL_SIZE	140
+
+#define GEDIT_STATE_FILE_LOCATION "gedit-2"
+
+#define GEDIT_STATE_WINDOW_GROUP "window"
+#define GEDIT_STATE_WINDOW_STATE "state"
+#define GEDIT_STATE_WINDOW_HEIGHT "height"
+#define GEDIT_STATE_WINDOW_WIDTH "width"
+#define GEDIT_STATE_SIDE_PANEL_SIZE "side_panel_size"
+#define GEDIT_STATE_BOTTOM_PANEL_SIZE "bottom_panel_size"
+#define GEDIT_STATE_SIDE_PANEL_ACTIVE_PAGE "side_panel_active_page"
+#define GEDIT_STATE_BOTTOM_PANEL_ACTIVE_PAGE "bottom_panel_active_page"
+
+#define GEDIT_STATE_FILEFILTER_GROUP "filefilter"
+#define GEDIT_STATE_FILEFILTER_ID "id"
+
+#define GEDIT_SETTINGS_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), GEDIT_TYPE_SETTINGS, GeditSettingsPrivate))
+
+struct _GeditSettingsPrivate
+{
+	GSettings *lockdown;
+	GSettings *interface;
+	GSettings *editor;
+	GSettings *ui;
+	GSettings *plugins;
+	
+	gchar *old_scheme;
+};
+
+G_DEFINE_TYPE (GeditSettings, gedit_settings, G_TYPE_SETTINGS)
+
+/* GUI state is serialized to a .desktop file, not in gconf */
+
+/* FIXME: use the class to manage this */
+static gint window_state = -1;
+static gint window_height = -1;
+static gint window_width = -1;
+static gint side_panel_size = -1;
+static gint bottom_panel_size = -1;
+static gint side_panel_active_page = -1;
+static gint bottom_panel_active_page = -1;
+static gint active_file_filter = -1;
+
+
+static gchar *
+get_state_filename (void)
+{
+	gchar *config_dir;
+	gchar *filename = NULL;
+
+	config_dir = gedit_dirs_get_user_config_dir ();
+
+	if (config_dir != NULL)
+	{
+		filename = g_build_filename (config_dir,
+					     GEDIT_STATE_FILE_LOCATION,
+					     NULL);
+		g_free (config_dir);
+	}
+
+	return filename;
+}
+
+static GKeyFile *
+get_gedit_state_file (void)
+{
+	static GKeyFile *state_file = NULL;
+
+	if (state_file == NULL)
+	{
+		gchar *filename;
+		GError *err = NULL;
+
+		state_file = g_key_file_new ();
+
+		filename = get_state_filename ();
+
+		if (!g_key_file_load_from_file (state_file,
+						filename,
+						G_KEY_FILE_NONE,
+						&err))
+		{
+			if (err->domain != G_FILE_ERROR ||
+			    err->code != G_FILE_ERROR_NOENT)
+			{
+				g_warning ("Could not load gedit state file: %s\n",
+					   err->message);
+			}
+
+			g_error_free (err);
+		}
+
+		g_free (filename);
+	}
+
+	return state_file;
+}
+
+static void
+gedit_state_get_int (const gchar *group,
+		     const gchar *key,
+		     gint         defval,
+		     gint        *result)
+{
+	GKeyFile *state_file;
+	gint res;
+	GError *err = NULL;
+
+	state_file = get_gedit_state_file ();
+	res = g_key_file_get_integer (state_file,
+				      group,
+				      key,
+				      &err);
+
+	if (err != NULL)
+	{
+		if ((err->domain != G_KEY_FILE_ERROR) ||
+		    ((err->code != G_KEY_FILE_ERROR_GROUP_NOT_FOUND &&
+		      err->code != G_KEY_FILE_ERROR_KEY_NOT_FOUND)))
+		{
+			g_warning ("Could not get state value %s::%s : %s\n",
+				   group,
+				   key,
+				   err->message);
+		}
+
+		*result = defval;
+		g_error_free (err);
+	}
+	else
+	{
+		*result = res;
+	}
+}
+
+static void
+gedit_state_set_int (const gchar *group,
+		     const gchar *key,
+		     gint         value)
+{
+	GKeyFile *state_file;
+
+	state_file = get_gedit_state_file ();
+	g_key_file_set_integer (state_file,
+				group,
+				key,
+				value);
+}
+
+static gboolean
+gedit_state_file_sync (void)
+{
+	GKeyFile *state_file;
+	gchar *config_dir;
+	gchar *filename = NULL;
+	gchar *content = NULL;
+	gsize length;
+	gint res;
+	GError *err = NULL;
+	gboolean ret = FALSE;
+
+	state_file = get_gedit_state_file ();
+	g_return_val_if_fail (state_file != NULL, FALSE);
+
+	config_dir = gedit_dirs_get_user_config_dir ();
+	if (config_dir == NULL)
+	{
+		g_warning ("Could not get config directory\n");
+		return ret;
+	}
+
+	res = g_mkdir_with_parents (config_dir, 0755);
+	if (res < 0)
+	{
+		g_warning ("Could not create config directory\n");
+		goto out;
+	}
+
+	content = g_key_file_to_data (state_file,
+				      &length,
+				      &err);
+
+	if (err != NULL)
+	{
+		g_warning ("Could not get data from state file: %s\n",
+			   err->message);
+		goto out;
+	}
+
+	if (content != NULL)
+	{
+		filename = get_state_filename ();
+		if (!g_file_set_contents (filename,
+					  content,
+					  length,
+					  &err))
+		{
+			g_warning ("Could not write gedit state file: %s\n",
+				   err->message);
+			goto out;
+		}
+	}
+
+	ret = TRUE;
+
+ out:
+	if (err != NULL)
+		g_error_free (err);
+
+	g_free (config_dir);
+	g_free (filename);
+	g_free (content);
+
+	return ret;
+}
+
+/* Window state */
+gint
+gedit_settings_get_window_state (void)
+{
+	if (window_state == -1)
+	{
+		gedit_state_get_int (GEDIT_STATE_WINDOW_GROUP,
+				     GEDIT_STATE_WINDOW_STATE,
+				     GEDIT_STATE_DEFAULT_WINDOW_STATE,
+				     &window_state);
+	}
+
+	return window_state;
+}
+			
+void
+gedit_settings_set_window_state (gint ws)
+{
+	g_return_if_fail (ws > -1);
+	
+	window_state = ws;
+
+	gedit_state_set_int (GEDIT_STATE_WINDOW_GROUP,
+			     GEDIT_STATE_WINDOW_STATE,
+			     ws);
+}
+
+gboolean
+gedit_settings_window_state_can_set (void)
+{
+	return TRUE;
+}
+
+/* Window size */
+void
+gedit_settings_get_window_size (gint *width, gint *height)
+{
+	g_return_if_fail (width != NULL && height != NULL);
+
+	if (window_width == -1)
+	{
+		gedit_state_get_int (GEDIT_STATE_WINDOW_GROUP,
+				     GEDIT_STATE_WINDOW_WIDTH,
+				     GEDIT_STATE_DEFAULT_WINDOW_WIDTH,
+				     &window_width);
+	}
+
+	if (window_height == -1)
+	{
+		gedit_state_get_int (GEDIT_STATE_WINDOW_GROUP,
+				     GEDIT_STATE_WINDOW_HEIGHT,
+				     GEDIT_STATE_DEFAULT_WINDOW_HEIGHT,
+				     &window_height);
+	}
+
+	*width = window_width;
+	*height = window_height;
+}
+
+void
+gedit_settings_get_default_window_size (gint *width, gint *height)
+{
+	g_return_if_fail (width != NULL && height != NULL);
+
+	*width = GEDIT_STATE_DEFAULT_WINDOW_WIDTH;
+	*height = GEDIT_STATE_DEFAULT_WINDOW_HEIGHT;
+}
+
+void
+gedit_settings_set_window_size (gint width, gint height)
+{
+	g_return_if_fail (width > -1 && height > -1);
+
+	window_width = width;
+	window_height = height;
+
+	gedit_state_set_int (GEDIT_STATE_WINDOW_GROUP,
+			     GEDIT_STATE_WINDOW_WIDTH,
+			     width);
+	gedit_state_set_int (GEDIT_STATE_WINDOW_GROUP,
+			     GEDIT_STATE_WINDOW_HEIGHT,
+			     height);
+}
+
+gboolean 
+gedit_settings_window_size_can_set (void)
+{
+	return TRUE;
+}
+
+/* Side panel */
+gint
+gedit_settings_get_side_panel_size (void)
+{
+	if (side_panel_size == -1)
+	{
+		gedit_state_get_int (GEDIT_STATE_WINDOW_GROUP,
+				     GEDIT_STATE_SIDE_PANEL_SIZE,
+				     GEDIT_STATE_DEFAULT_SIDE_PANEL_SIZE,
+				     &side_panel_size);
+	}
+
+	return side_panel_size;
+}
+
+gint 
+gedit_settings_get_default_side_panel_size (void)
+{
+	return GEDIT_STATE_DEFAULT_SIDE_PANEL_SIZE;
+}
+
+void 
+gedit_settings_set_side_panel_size (gint ps)
+{
+	g_return_if_fail (ps > -1);
+	
+	if (side_panel_size == ps)
+		return;
+		
+	side_panel_size = ps;
+	gedit_state_set_int (GEDIT_STATE_WINDOW_GROUP,
+			     GEDIT_STATE_SIDE_PANEL_SIZE,
+			     ps);
+}
+
+gboolean 
+gedit_settings_side_panel_size_can_set (void)
+{
+	return TRUE;
+}
+
+gint
+gedit_settings_get_side_panel_active_page (void)
+{
+	if (side_panel_active_page == -1)
+	{
+		gedit_state_get_int (GEDIT_STATE_WINDOW_GROUP,
+				     GEDIT_STATE_SIDE_PANEL_ACTIVE_PAGE,
+				     0,
+				     &side_panel_active_page);
+	}
+
+	return side_panel_active_page;
+}
+
+void
+gedit_settings_set_side_panel_active_page (gint id)
+{
+	if (side_panel_active_page == id)
+		return;
+
+	side_panel_active_page = id;
+	gedit_state_set_int (GEDIT_STATE_WINDOW_GROUP,
+			     GEDIT_STATE_SIDE_PANEL_ACTIVE_PAGE,
+			     id);
+}
+
+gboolean 
+gedit_settings_side_panel_active_page_can_set (void)
+{
+	return TRUE;
+}
+
+/* Bottom panel */
+gint
+gedit_settings_get_bottom_panel_size (void)
+{
+	if (bottom_panel_size == -1)
+	{
+		gedit_state_get_int (GEDIT_STATE_WINDOW_GROUP,
+				     GEDIT_STATE_BOTTOM_PANEL_SIZE,
+				     GEDIT_STATE_DEFAULT_BOTTOM_PANEL_SIZE,
+				     &bottom_panel_size);
+	}
+
+	return bottom_panel_size;
+}
+
+gint 
+gedit_settings_get_default_bottom_panel_size (void)
+{
+	return GEDIT_STATE_DEFAULT_BOTTOM_PANEL_SIZE;
+}
+
+void 
+gedit_settings_set_bottom_panel_size (gint ps)
+{
+	g_return_if_fail (ps > -1);
+
+	if (bottom_panel_size == ps)
+		return;
+	
+	bottom_panel_size = ps;
+	gedit_state_set_int (GEDIT_STATE_WINDOW_GROUP,
+			     GEDIT_STATE_BOTTOM_PANEL_SIZE,
+			     ps);
+}
+
+gboolean 
+gedit_settings_bottom_panel_size_can_set (void)
+{
+	return TRUE;
+}
+
+gint
+gedit_settings_get_bottom_panel_active_page (void)
+{
+	if (bottom_panel_active_page == -1)
+	{
+		gedit_state_get_int (GEDIT_STATE_WINDOW_GROUP,
+				     GEDIT_STATE_BOTTOM_PANEL_ACTIVE_PAGE,
+				     0,
+				     &bottom_panel_active_page);
+	}
+
+	return bottom_panel_active_page;
+}
+
+void
+gedit_settings_set_bottom_panel_active_page (gint id)
+{
+	if (bottom_panel_active_page == id)
+		return;
+
+	bottom_panel_active_page = id;
+	gedit_state_set_int (GEDIT_STATE_WINDOW_GROUP,
+			     GEDIT_STATE_BOTTOM_PANEL_ACTIVE_PAGE,
+			     id);
+}
+
+gboolean 
+gedit_settings_bottom_panel_active_page_can_set (void)
+{
+	return TRUE;
+}
+
+/* File filter */
+gint
+gedit_settings_get_active_file_filter (void)
+{
+	if (active_file_filter == -1)
+	{
+		gedit_state_get_int (GEDIT_STATE_FILEFILTER_GROUP,
+				     GEDIT_STATE_FILEFILTER_ID,
+				     0,
+				     &active_file_filter);
+	}
+
+	return active_file_filter;
+}
+
+void
+gedit_settings_set_active_file_filter (gint id)
+{
+	g_return_if_fail (id >= 0);
+	
+	if (active_file_filter == id)
+		return;
+
+	active_file_filter = id;
+	gedit_state_set_int (GEDIT_STATE_FILEFILTER_GROUP,
+			     GEDIT_STATE_FILEFILTER_ID,
+			     id);
+}
+
+gboolean 
+gedit_settings_active_file_filter_can_set (void)
+{
+	return TRUE;
+}
+
+static void
+gedit_settings_finalize (GObject *object)
+{
+	GeditSettings *gs = GEDIT_SETTINGS (object);
+	
+	g_free (gs->priv->old_scheme);
+	
+	gedit_state_file_sync ();
+
+	G_OBJECT_CLASS (gedit_settings_parent_class)->finalize (object);
+}
+
+static void
+gedit_settings_dispose (GObject *object)
+{
+	GeditSettings *gs = GEDIT_SETTINGS (object);
+	
+	if (gs->priv->lockdown != NULL)
+	{
+		g_object_unref (gs->priv->lockdown);
+		gs->priv->lockdown = NULL;
+	}
+	
+	if (gs->priv->interface != NULL)
+	{
+		g_object_unref (gs->priv->interface);
+		gs->priv->interface = NULL;
+	}
+	
+	if (gs->priv->editor != NULL)
+	{
+		g_object_unref (gs->priv->editor);
+		gs->priv->editor = NULL;
+	}
+	
+	if (gs->priv->ui != NULL)
+	{
+		g_object_unref (gs->priv->ui);
+		gs->priv->ui = NULL;
+	}
+	
+	if (gs->priv->plugins != NULL)
+	{
+		g_object_unref (gs->priv->plugins);
+		gs->priv->plugins = NULL;
+	}
+
+	G_OBJECT_CLASS (gedit_settings_parent_class)->dispose (object);
+}
+
+static void
+gedit_settings_class_init (GeditSettingsClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	
+	object_class->finalize = gedit_settings_finalize;
+	object_class->dispose = gedit_settings_dispose;
+
+	g_type_class_add_private (object_class, sizeof (GeditSettingsPrivate));
+}
+
+static void
+on_lockdown_changed (GSettings   *settings,
+		     const gchar *key,
+		     gpointer     useless)
+{
+	gboolean locked;
+	GeditApp *app;
+	
+	g_settings_get (settings, key, &locked);
+	app = gedit_app_get_default ();
+	
+	if (strcmp (key, GS_LOCKDOWN_COMMAND_LINE) == 0)
+		_gedit_app_set_lockdown_bit (app, 
+					     GEDIT_LOCKDOWN_COMMAND_LINE,
+					     locked);
+	else if (strcmp (key, GS_LOCKDOWN_PRINTING) == 0)
+		_gedit_app_set_lockdown_bit (app, 
+					     GEDIT_LOCKDOWN_PRINTING,
+					     locked);
+	else if (strcmp (key, GS_LOCKDOWN_PRINT_SETUP) == 0)
+		_gedit_app_set_lockdown_bit (app, 
+					     GEDIT_LOCKDOWN_PRINT_SETUP,
+					     locked);
+	else if (strcmp (key, GS_LOCKDOWN_SAVE_TO_DISK) == 0)
+		_gedit_app_set_lockdown_bit (app, 
+					     GEDIT_LOCKDOWN_SAVE_TO_DISK,
+					     locked);
+}
+
+static void
+set_font (GeditSettings *gs,
+	  const gchar *font)
+{
+	GList *views, *l;
+	guint ts;
+	
+	g_settings_get (gs->priv->editor, GS_TABS_SIZE, &ts);
+	
+	views = gedit_app_get_views (gedit_app_get_default ());
+	
+	for (l = views; l != NULL; l = g_list_next (l))
+	{
+		/* Note: we use def=FALSE to avoid GeditView to query gconf */
+		gedit_view_set_font (GEDIT_VIEW (l->data), FALSE, font);
+
+		gtk_source_view_set_tab_width (GTK_SOURCE_VIEW (l->data), ts);
+	}
+	
+	g_list_free (views);
+}
+
+static void
+on_system_font_changed (GSettings     *settings,
+			const gchar   *key,
+			GeditSettings *gs)
+{
+	
+	gboolean use_default_font;
+	gchar *font;
+	
+	g_settings_get (gs->priv->editor, GS_USE_DEFAULT_FONT, &use_default_font);
+	if (!use_default_font)
+		return;
+	
+	g_settings_get (settings, key, &font);
+	
+	set_font (gs, font);
+	
+	g_free (font);
+}
+
+static void
+on_use_default_font_changed (GSettings     *settings,
+			     const gchar   *key,
+			     GeditSettings *gs)
+{
+	gboolean def;
+	gchar *font;
+
+	g_settings_get (settings, key, &def);
+	
+	if (def)
+	{
+		g_settings_get (gs->priv->interface, GS_SYSTEM_FONT, &font);
+	}
+	else
+	{
+		g_settings_get (gs->priv->editor, GS_EDITOR_FONT, &font);
+	}
+	
+	set_font (gs, font);
+	
+	g_free (font);
+}
+
+static void
+on_editor_font_changed (GSettings     *settings,
+			const gchar   *key,
+			GeditSettings *gs)
+{
+	gboolean use_default_font;
+	gchar *font;
+	
+	g_settings_get (gs->priv->editor, GS_USE_DEFAULT_FONT, &use_default_font);
+	if (use_default_font)
+		return;
+	
+	g_settings_get (settings, key, &font);
+	
+	set_font (gs, font);
+	
+	g_free (font);
+}
+
+static void
+on_scheme_changed (GSettings     *settings,
+		   const gchar   *key,
+		   GeditSettings *gs)
+{
+	GtkSourceStyleScheme *style;
+	gchar *scheme;
+	GList *docs;
+	GList *l;
+
+	g_settings_get (settings, key, &scheme);
+
+	if (gs->priv->old_scheme != NULL && (strcmp (scheme, gs->priv->old_scheme) == 0))
+		return;
+
+	g_free (gs->priv->old_scheme);
+	gs->priv->old_scheme = scheme;
+
+	style = gtk_source_style_scheme_manager_get_scheme (
+			gedit_get_style_scheme_manager (),
+			scheme);
+
+	if (style == NULL)
+	{
+		g_warning ("Default style scheme '%s' not found, falling back to 'classic'", scheme);
+		
+		style = gtk_source_style_scheme_manager_get_scheme (
+			gedit_get_style_scheme_manager (),
+			"classic");
+
+		if (style == NULL) 
+		{
+			g_warning ("Style scheme 'classic' cannot be found, check your GtkSourceView installation.");
+			return;
+		}
+	}
+
+	docs = gedit_app_get_documents (gedit_app_get_default ());
+	for (l = docs; l != NULL; l = g_list_next (l))
+	{
+		g_return_if_fail (GTK_IS_SOURCE_BUFFER (l->data));
+
+		gtk_source_buffer_set_style_scheme (GTK_SOURCE_BUFFER (l->data),
+						    style);
+	}
+
+	g_list_free (docs);
+}
+
+static void
+on_auto_save_changed (GSettings     *settings,
+		      const gchar   *key,
+		      GeditSettings *gs)
+{
+	GList *docs, *l;
+	gboolean auto_save;
+	
+	g_settings_get (settings, key, &auto_save);
+	
+	docs = gedit_app_get_documents (gedit_app_get_default ());
+	
+	for (l = docs; l != NULL; l = g_list_next (l))
+	{
+		GeditTab *tab = gedit_tab_get_from_document (GEDIT_DOCUMENT (l->data));
+		
+		gedit_tab_set_auto_save_enabled (tab, auto_save);
+	}
+	
+	g_list_free (docs);
+}
+
+static void
+on_auto_save_interval_changed (GSettings     *settings,
+			       const gchar   *key,
+			       GeditSettings *gs)
+{
+	GList *docs, *l;
+	gint auto_save_interval;
+	
+	g_settings_get (settings, key, &auto_save_interval);
+	
+	docs = gedit_app_get_documents (gedit_app_get_default ());
+	
+	for (l = docs; l != NULL; l = g_list_next (l))
+	{
+		GeditTab *tab = gedit_tab_get_from_document (GEDIT_DOCUMENT (l->data));
+		
+		gedit_tab_set_auto_save_interval (tab, auto_save_interval);
+	}
+	
+	g_list_free (docs);
+}
+
+static void
+on_undo_actions_limit_changed (GSettings     *settings,
+			       const gchar   *key,
+			       GeditSettings *gs)
+{
+	GList *docs, *l;
+	gint ul;
+	
+	g_settings_get (settings, key, &ul);
+	
+	ul = CLAMP (ul, -1, 250);
+	
+	docs = gedit_app_get_documents (gedit_app_get_default ());
+	
+	for (l = docs; l != NULL; l = g_list_next (l))
+	{
+		gtk_source_buffer_set_max_undo_levels (GTK_SOURCE_BUFFER (l->data),
+						       ul);
+	}
+	
+	g_list_free (docs);
+}
+
+static void
+on_wrap_mode_changed (GSettings     *settings,
+		      const gchar   *key,
+		      GeditSettings *gs)
+{
+	GtkWrapMode wrap_mode;
+	GList *views, *l;
+	gchar *wrap_str;
+	
+	g_settings_get (settings, key, &wrap_str);
+	
+	wrap_mode = gedit_utils_get_wrap_mode_from_string (wrap_str);
+	g_free (wrap_str);
+	
+	views = gedit_app_get_views (gedit_app_get_default ());
+	
+	for (l = views; l != NULL; l = g_list_next (l))
+	{
+		gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (l->data),
+					     wrap_mode);
+	}
+	
+	g_list_free (views);
+}
+
+static void
+on_tabs_size_changed (GSettings     *settings,
+		      const gchar   *key,
+		      GeditSettings *gs)
+{
+	GList *views, *l;
+	guint ts;
+	
+	g_settings_get (settings, key, &ts);
+	
+	ts = CLAMP (ts, 1, 24);
+	
+	views = gedit_app_get_views (gedit_app_get_default ());
+	
+	for (l = views; l != NULL; l = g_list_next (l))
+	{
+		gtk_source_view_set_tab_width (GTK_SOURCE_VIEW (l->data),
+					       ts);
+	}
+	
+	g_list_free (views);
+}
+
+/* FIXME: insert_spaces and line_numbers are mostly the same it just changes
+ the func called, maybe typedef the func and refactorize? */
+static void
+on_insert_spaces_changed (GSettings     *settings,
+			  const gchar   *key,
+			  GeditSettings *gs)
+{
+	GList *views, *l;
+	gboolean spaces;
+	
+	g_settings_get (settings, key, &spaces);
+	
+	views = gedit_app_get_views (gedit_app_get_default ());
+	
+	for (l = views; l != NULL; l = g_list_next (l))
+	{
+		gtk_source_view_set_insert_spaces_instead_of_tabs (
+					GTK_SOURCE_VIEW (l->data),
+					spaces);
+	}
+	
+	g_list_free (views);
+}
+
+static void
+on_auto_indent_changed (GSettings     *settings,
+			const gchar   *key,
+			GeditSettings *gs)
+{
+	GList *views, *l;
+	gboolean enable;
+	
+	g_settings_get (settings, key, &enable);
+	
+	views = gedit_app_get_views (gedit_app_get_default ());
+	
+	for (l = views; l != NULL; l = g_list_next (l))
+	{
+		gtk_source_view_set_auto_indent (GTK_SOURCE_VIEW (l->data),
+						 enable);
+	}
+	
+	g_list_free (views);
+}
+
+static void
+on_display_line_numbers_changed (GSettings     *settings,
+				 const gchar   *key,
+				 GeditSettings *gs)
+{
+	GList *views, *l;
+	gboolean line_numbers;
+	
+	g_settings_get (settings, key, &line_numbers);
+	
+	views = gedit_app_get_views (gedit_app_get_default ());
+	
+	for (l = views; l != NULL; l = g_list_next (l))
+	{
+		gtk_source_view_set_show_line_numbers (GTK_SOURCE_VIEW (l->data),
+						       line_numbers);
+	}
+	
+	g_list_free (views);
+}
+
+static void
+on_hl_current_line_changed (GSettings     *settings,
+			    const gchar   *key,
+			    GeditSettings *gs)
+{
+	GList *views, *l;
+	gboolean hl;
+	
+	g_settings_get (settings, key, &hl);
+	
+	views = gedit_app_get_views (gedit_app_get_default ());
+	
+	for (l = views; l != NULL; l = g_list_next (l))
+	{
+		gtk_source_view_set_highlight_current_line (GTK_SOURCE_VIEW (l->data),
+							    hl);
+	}
+	
+	g_list_free (views);
+}
+
+static void
+on_bracket_matching_changed (GSettings     *settings,
+			     const gchar   *key,
+			     GeditSettings *gs)
+{
+	GList *docs, *l;
+	gboolean enable;
+	
+	g_settings_get (settings, key, &enable);
+	
+	docs = gedit_app_get_documents (gedit_app_get_default ());
+	
+	for (l = docs; l != NULL; l = g_list_next (l))
+	{
+		gtk_source_buffer_set_highlight_matching_brackets (GTK_SOURCE_BUFFER (l->data),
+								   enable);
+	}
+	
+	g_list_free (docs);
+}
+
+static void
+on_display_right_margin_changed (GSettings     *settings,
+				 const gchar   *key,
+				 GeditSettings *gs)
+{
+	GList *views, *l;
+	gboolean display;
+	
+	g_settings_get (settings, key, &display);
+	
+	views = gedit_app_get_views (gedit_app_get_default ());
+	
+	for (l = views; l != NULL; l = g_list_next (l))
+	{
+		gtk_source_view_set_show_right_margin (GTK_SOURCE_VIEW (l->data),
+						       display);
+	}
+	
+	g_list_free (views);
+}
+
+static void
+on_right_margin_position_changed (GSettings     *settings,
+				  const gchar   *key,
+				  GeditSettings *gs)
+{
+	GList *views, *l;
+	gint pos;
+	
+	g_settings_get (settings, key, &pos);
+	
+	pos = CLAMP (pos, 1, 160);
+	
+	views = gedit_app_get_views (gedit_app_get_default ());
+	
+	for (l = views; l != NULL; l = g_list_next (l))
+	{
+		gtk_source_view_set_right_margin_position (GTK_SOURCE_VIEW (l->data),
+							   pos);
+	}
+	
+	g_list_free (views);
+}
+
+static void
+on_smart_home_end_changed (GSettings     *settings,
+			   const gchar   *key,
+			   GeditSettings *gs)
+{
+	GtkSourceSmartHomeEndType smart_he;
+	GList *views, *l;
+	gchar *smart_str;
+	
+	g_settings_get (settings, key, &smart_str);
+	
+	smart_he = gedit_utils_get_smart_home_end_from_string (smart_str);
+	g_free (smart_str);
+	
+	views = gedit_app_get_views (gedit_app_get_default ());
+	
+	for (l = views; l != NULL; l = g_list_next (l))
+	{
+		gtk_source_view_set_smart_home_end (GTK_SOURCE_VIEW (l->data),
+						    smart_he);
+	}
+	
+	g_list_free (views);
+}
+
+static void
+on_syntax_highlighting_changed (GSettings     *settings,
+				const gchar   *key,
+				GeditSettings *gs)
+{
+	const GList *windows;
+	GList *docs, *l;
+	gboolean enable;
+	
+	g_settings_get (settings, key, &enable);
+	
+	docs = gedit_app_get_documents (gedit_app_get_default ());
+	
+	for (l = docs; l != NULL; l = g_list_next (l))
+	{
+		gtk_source_buffer_set_highlight_syntax (GTK_SOURCE_BUFFER (l->data),
+							enable);
+	}
+	
+	g_list_free (docs);
+
+	/* update the sensitivity of the Higlight Mode menu item */
+	windows = gedit_app_get_windows (gedit_app_get_default ());
+	while (windows != NULL)
+	{
+		GtkUIManager *ui;
+		GtkAction *a;
+
+		ui = gedit_window_get_ui_manager (GEDIT_WINDOW (windows->data));
+
+		a = gtk_ui_manager_get_action (ui,
+					       "/MenuBar/ViewMenu/ViewHighlightModeMenu");
+
+		gtk_action_set_sensitive (a, enable);
+
+		windows = g_list_next (windows);
+	}
+}
+
+static void
+on_search_highlighting_changed (GSettings     *settings,
+				const gchar   *key,
+				GeditSettings *gs)
+{
+	GList *docs, *l;
+	gboolean enable;
+	
+	g_settings_get (settings, key, &enable);
+	
+	docs = gedit_app_get_documents (gedit_app_get_default ());
+	
+	for (l = docs; l != NULL; l = g_list_next (l))
+	{
+		gedit_document_set_enable_search_highlighting  (GEDIT_DOCUMENT (l->data),
+								enable);
+	}
+	
+	g_list_free (docs);
+}
+
+static void
+on_max_recents_changed (GSettings     *settings,
+			const gchar   *key,
+			GeditSettings *gs)
+{
+	const GList *windows;
+	gint max;
+	
+	g_settings_get (settings, key, &max);
+	
+	windows = gedit_app_get_windows (gedit_app_get_default ());
+	while (windows != NULL)
+	{
+		GeditWindow *w = GEDIT_WINDOW (windows->data);
+
+		gtk_recent_chooser_set_limit (GTK_RECENT_CHOOSER (w->priv->toolbar_recent_menu),
+					      max);
+
+		windows = g_list_next (windows);
+	}
+	
+	/* FIXME: we have no way at the moment to trigger the
+	 * update of the inline recents in the File menu */
+}
+
+static void
+on_active_plugins_changed (GSettings     *settings,
+			   const gchar   *key,
+			   GeditSettings *gs)
+{
+	GeditPluginsEngine *engine;
+
+	engine = gedit_plugins_engine_get_default ();
+
+	gedit_plugins_engine_active_plugins_changed (engine);
+}
+
+static void
+gedit_settings_init (GeditSettings *gs)
+{
+	gs->priv = GEDIT_SETTINGS_GET_PRIVATE (gs);
+	
+	gs->priv->old_scheme = NULL;
+}
+
+static void
+initialize (GeditSettings *gs)
+{
+	GSettings *prefs;
+	
+	prefs = g_settings_get_settings (G_SETTINGS (gs), "preferences");
+	gs->priv->editor = g_settings_get_settings (prefs, "editor");
+	gs->priv->ui = g_settings_get_settings (prefs, "ui");
+	g_object_unref (prefs);
+	gs->priv->plugins = g_settings_get_settings (G_SETTINGS (gs), "plugins");
+	
+	/* Load settings */
+	gs->priv->lockdown = g_settings_new ("org.gnome.Desktop.Lockdown");
+	
+	g_signal_connect (gs->priv->lockdown,
+			  "changed",
+			  G_CALLBACK (on_lockdown_changed),
+			  NULL);
+
+	gs->priv->interface = g_settings_new ("org.gnome.Desktop.Interface");
+	
+	g_signal_connect (gs->priv->interface,
+			  "changed",
+			  G_CALLBACK (on_system_font_changed),
+			  gs);
+
+	/* editor changes */
+	g_signal_connect (gs->priv->editor,
+			  "changed::use_default_font",
+			  G_CALLBACK (on_use_default_font_changed),
+			  gs);
+	g_signal_connect (gs->priv->editor,
+			  "changed::editor_font",
+			  G_CALLBACK (on_editor_font_changed),
+			  gs);
+	g_signal_connect (gs->priv->editor,
+			  "changed::scheme",
+			  G_CALLBACK (on_scheme_changed),
+			  gs);
+	g_signal_connect (gs->priv->editor,
+			  "changed::auto_save",
+			  G_CALLBACK (on_auto_save_changed),
+			  gs);
+	g_signal_connect (gs->priv->editor,
+			  "changed::auto_save_interval",
+			  G_CALLBACK (on_auto_save_interval_changed),
+			  gs);
+	g_signal_connect (gs->priv->editor,
+			  "changed::undo_actions_limit",
+			  G_CALLBACK (on_undo_actions_limit_changed),
+			  gs);
+	g_signal_connect (gs->priv->editor,
+			  "changed::wrap_mode",
+			  G_CALLBACK (on_wrap_mode_changed),
+			  gs);
+	g_signal_connect (gs->priv->editor,
+			  "changed::tabs_size",
+			  G_CALLBACK (on_tabs_size_changed),
+			  gs);
+	g_signal_connect (gs->priv->editor,
+			  "changed::insert_spaces",
+			  G_CALLBACK (on_insert_spaces_changed),
+			  gs);
+	g_signal_connect (gs->priv->editor,
+			  "changed::auto_indent",
+			  G_CALLBACK (on_auto_indent_changed),
+			  gs);
+	g_signal_connect (gs->priv->editor,
+			  "changed::display_line_numbers",
+			  G_CALLBACK (on_display_line_numbers_changed),
+			  gs);
+	g_signal_connect (gs->priv->editor,
+			  "changed::highlight_current_line",
+			  G_CALLBACK (on_hl_current_line_changed),
+			  gs);
+	g_signal_connect (gs->priv->editor,
+			  "changed::bracket_matching",
+			  G_CALLBACK (on_bracket_matching_changed),
+			  gs);
+	g_signal_connect (gs->priv->editor,
+			  "changed::display_right_margin",
+			  G_CALLBACK (on_display_right_margin_changed),
+			  gs);
+	g_signal_connect (gs->priv->editor,
+			  "changed::right_margin_position",
+			  G_CALLBACK (on_right_margin_position_changed),
+			  gs);
+	g_signal_connect (gs->priv->editor,
+			  "changed::smart_home_end",
+			  G_CALLBACK (on_smart_home_end_changed),
+			  gs);
+	g_signal_connect (gs->priv->editor,
+			  "changed::syntax_highlighting",
+			  G_CALLBACK (on_syntax_highlighting_changed),
+			  gs);
+	g_signal_connect (gs->priv->editor,
+			  "changed::search_highlighting",
+			  G_CALLBACK (on_search_highlighting_changed),
+			  gs);
+
+	/* ui changes */
+	g_signal_connect (gs->priv->ui,
+			  "changed::max_recents",
+			  G_CALLBACK (on_max_recents_changed),
+			  gs);
+
+	/* plugins changes */
+	g_signal_connect (gs->priv->plugins,
+			  "changed::active_plugins",
+			  G_CALLBACK (on_active_plugins_changed),
+			  gs);
+}
+
+GSettings *
+gedit_settings_new ()
+{
+	GeditSettings *settings;
+	
+	settings = g_object_new (GEDIT_TYPE_SETTINGS,
+				 "schema-name", "org.gnome.gedit",
+				 NULL);
+	
+	initialize (settings);
+	
+	return G_SETTINGS (settings);
+}
+
+GeditLockdownMask
+gedit_settings_get_lockdown (GeditSettings *gs)
+{
+	guint lockdown = 0;
+	gboolean command_line, printing, print_setup, save_to_disk;
+	
+	g_settings_get (gs->priv->lockdown, GS_LOCKDOWN_COMMAND_LINE,
+			&command_line);
+	g_settings_get (gs->priv->lockdown, GS_LOCKDOWN_PRINTING,
+			&printing);
+	g_settings_get (gs->priv->lockdown, GS_LOCKDOWN_PRINT_SETUP,
+			&print_setup);
+	g_settings_get (gs->priv->lockdown, GS_LOCKDOWN_SAVE_TO_DISK,
+			&save_to_disk);
+
+	if (command_line)
+		lockdown |= GEDIT_LOCKDOWN_COMMAND_LINE;
+
+	if (printing)
+		lockdown |= GEDIT_LOCKDOWN_PRINTING;
+
+	if (print_setup)
+		lockdown |= GEDIT_LOCKDOWN_PRINT_SETUP;
+
+	if (save_to_disk)
+		lockdown |= GEDIT_LOCKDOWN_SAVE_TO_DISK;
+
+	return lockdown;
+}
+
+gchar *
+gedit_settings_get_system_font (GeditSettings *gs)
+{
+	gchar *system_font;
+
+	g_return_val_if_fail (GEDIT_IS_SETTINGS (gs), NULL);
+	
+	g_settings_get (gs->priv->interface, "monospace_font_name", &system_font);
+	
+	return system_font;
+}
diff --git a/gedit/gedit-settings.h b/gedit/gedit-settings.h
new file mode 100644
index 0000000..5ce9501
--- /dev/null
+++ b/gedit/gedit-settings.h
@@ -0,0 +1,152 @@
+/*
+ * gedit-settings.h
+ * This file is part of gedit
+ *
+ * Copyright (C) 2009 - Ignacio Casal Quinteiro
+ *               2002 - Paolo Maggi
+ *
+ * gedit is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * gedit is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with gedit; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, 
+ * Boston, MA  02110-1301  USA
+ */
+
+
+#ifndef __GEDIT_SETTINGS_H__
+#define __GEDIT_SETTINGS_H__
+
+#include <glib-object.h>
+#include <glib.h>
+#include "gedit-app.h"
+
+G_BEGIN_DECLS
+
+#define GEDIT_TYPE_SETTINGS		(gedit_settings_get_type ())
+#define GEDIT_SETTINGS(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), GEDIT_TYPE_SETTINGS, GeditSettings))
+#define GEDIT_SETTINGS_CONST(obj)	(G_TYPE_CHECK_INSTANCE_CAST ((obj), GEDIT_TYPE_SETTINGS, GeditSettings const))
+#define GEDIT_SETTINGS_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST ((klass), GEDIT_TYPE_SETTINGS, GeditSettingsClass))
+#define GEDIT_IS_SETTINGS(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEDIT_TYPE_SETTINGS))
+#define GEDIT_IS_SETTINGS_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), GEDIT_TYPE_SETTINGS))
+#define GEDIT_SETTINGS_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS ((obj), GEDIT_TYPE_SETTINGS, GeditSettingsClass))
+
+typedef struct _GeditSettings		GeditSettings;
+typedef struct _GeditSettingsClass	GeditSettingsClass;
+typedef struct _GeditSettingsPrivate	GeditSettingsPrivate;
+
+struct _GeditSettings
+{
+	GSettings parent;
+	
+	GeditSettingsPrivate *priv;
+};
+
+struct _GeditSettingsClass
+{
+	GSettingsClass parent_class;
+};
+
+typedef enum {
+	GEDIT_TOOLBAR_SYSTEM = 0,
+	GEDIT_TOOLBAR_ICONS,
+	GEDIT_TOOLBAR_ICONS_AND_TEXT,
+	GEDIT_TOOLBAR_ICONS_BOTH_HORIZ
+} GeditToolbarSetting;
+
+GType			 gedit_settings_get_type			(void) G_GNUC_CONST;
+
+GSettings		*gedit_settings_new				(void);
+
+GeditLockdownMask	 gedit_settings_get_lockdown			(GeditSettings *gs);
+
+gchar			*gedit_settings_get_system_font			(GeditSettings *gs);
+
+/* Window state */
+gint			 gedit_settings_get_window_state		(void);
+void			 gedit_settings_set_window_state		(gint ws);
+gboolean		 gedit_settings_window_state_can_set		(void);
+
+/* Window size */
+void			 gedit_settings_get_window_size			(gint *width,
+									 gint *height);
+void			 gedit_settings_get_default_window_size		(gint *width,
+									 gint *height);
+void 			 gedit_settings_set_window_size			(gint width,
+									 gint height);
+gboolean		 gedit_settings_window_size_can_set		(void);
+
+/* Side panel */
+gint			 gedit_settings_get_side_panel_size		(void);
+gint			 gedit_settings_get_default_side_panel_size	(void);
+void 			 gedit_settings_set_side_panel_size		(gint ps);
+gboolean		 gedit_settings_side_panel_size_can_set		(void);
+gint			 gedit_settings_get_side_panel_active_page 	(void);
+void 			 gedit_settings_set_side_panel_active_page 	(gint id);
+gboolean		 gedit_settings_side_panel_active_page_can_set	(void);
+
+/* Bottom panel */
+gint			 gedit_settings_get_bottom_panel_size		(void);
+gint			 gedit_settings_get_default_bottom_panel_size	(void);
+void 			 gedit_settings_set_bottom_panel_size		(gint ps);
+gboolean		 gedit_settings_bottom_panel_size_can_set	(void);
+gint			 gedit_settings_get_bottom_panel_active_page	(void);
+void 			 gedit_settings_set_bottom_panel_active_page	(gint id);
+gboolean		 gedit_settings_bottom_panel_active_page_can_set (void);
+
+/* File filter */
+gint			 gedit_settings_get_active_file_filter	(void);
+void			 gedit_settings_set_active_file_filter	(gint id);
+gboolean		 gedit_settings_active_file_filter_can_set	(void);
+
+G_END_DECLS
+
+/* key constants */
+#define GS_USE_DEFAULT_FONT		"use_default_font"
+#define GS_EDITOR_FONT			"editor_font"
+#define GS_SCHEME			"scheme"
+#define GS_CREATE_BACKUP_COPY		"create_backup_copy"
+#define GS_AUTO_SAVE			"auto_save"
+#define GS_AUTO_SAVE_INTERVAL		"auto_save_interval"
+#define GS_UNDO_ACTIONS_LIMIT		"undo_actions_limit"
+#define GS_MAX_UNDO_ACTIONS		"max_undo_actions"
+#define GS_WRAP_MODE			"wrap_mode"
+#define GS_TABS_SIZE			"tabs_size"
+#define GS_INSERT_SPACES		"insert_spaces"
+#define GS_AUTO_INDENT			"auto_indent"
+#define GS_DISPLAY_LINE_NUMBERS		"display_line_numbers"
+#define GS_HIGHLIGHT_CURRENT_LINE	"highlight_current_line"
+#define GS_BRACKET_MATCHING		"bracket_matching"
+#define GS_DISPLAY_RIGHT_MARGIN		"display_right_margin"
+#define GS_RIGHT_MARGIN_POSITION	"right_margin_position"
+#define GS_SMART_HOME_END		"smart_home_end"
+#define GS_WRITABLE_VFS_SCHEMES		"writable_vfs_schemes"
+#define GS_RESTORE_CURSOR_POSITION	"restore_cursor_position"
+#define GS_SYNTAX_HIGHLIGHTING		"syntax_highlighting"
+#define GS_SEARCH_HIGHLIGHTING		"search_highlighting"
+#define GS_TOOLBAR_VISIBLE		"toolbar_visible"
+#define GS_TOOLBAR_BUTTONS_STYLE	"toolbar_buttons_style"
+#define GS_STATUSBAR_VISIBLE		"statusbar_visible"
+#define GS_SIDE_PANE_VISIBLE		"side_pane_visible"
+#define GS_BOTTOM_PANE_VISIBLE		"bottom_pane_visible"
+#define GS_MAX_RECENTS			"max_recents"
+#define GS_PRINT_SYNTAX_HIGHLIGHTING	"print_syntax_highlighting"
+#define GS_PRINT_HEADER			"print_header"
+#define GS_PRINT_WRAP_MODE		"print_wrap_mode"
+#define GS_PRINT_LINE_NUMBERS		"print_line_numbers"
+#define GS_PRINT_FONT_BODY_PANGO	"print_font_body_pango"
+#define GS_PRINT_FONT_HEADER_PANGO	"print_font_header_pango"
+#define GS_PRINT_FONT_NUMBERS_PANGO	"print_font_numbers_pango"
+#define GS_ENCONDING_AUTO_DETECTED	"auto_detected"
+#define GS_ENCONDING_SHOW_IN_MENU	"show_in_menu"
+#define GS_ACTIVE_PLUGINS		"active_plugins"
+
+#endif /* __GEDIT_SETTINGS_H__ */
diff --git a/gedit/gedit-style-scheme-manager.c b/gedit/gedit-style-scheme-manager.c
index a65fedd..eea2730 100644
--- a/gedit/gedit-style-scheme-manager.c
+++ b/gedit/gedit-style-scheme-manager.c
@@ -35,7 +35,6 @@
 #include <glib/gstdio.h>
 
 #include "gedit-style-scheme-manager.h"
-#include "gedit-prefs-manager.h"
 #include "gedit-dirs.h"
 
 static GtkSourceStyleSchemeManager *style_scheme_manager = NULL;
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index 633f6b1..654aa2b 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -42,8 +42,8 @@
 #include "gedit-print-preview.h"
 #include "gedit-progress-message-area.h"
 #include "gedit-debug.h"
-#include "gedit-prefs-manager-app.h"
 #include "gedit-enum-types.h"
+#include "gedit-settings.h"
 
 #if !GTK_CHECK_VERSION (2, 17, 1)
 #include "gedit-message-area.h"
@@ -55,6 +55,7 @@
 
 struct _GeditTabPrivate
 {
+	GSettings	       *editor;
 	GeditTabState	        state;
 	
 	GtkWidget	       *view;
@@ -225,6 +226,20 @@ gedit_tab_set_property (GObject      *object,
 }
 
 static void
+gedit_tab_dispose (GObject *object)
+{
+	GeditTab *tab = GEDIT_TAB (object);
+	
+	if (tab->priv->editor != NULL)
+	{
+		g_object_unref (tab->priv->editor);
+		tab->priv->editor = NULL;
+	}
+	
+	G_OBJECT_CLASS (gedit_tab_parent_class)->dispose (object);
+}
+
+static void
 gedit_tab_finalize (GObject *object)
 {
 	GeditTab *tab = GEDIT_TAB (object);
@@ -246,6 +261,7 @@ gedit_tab_class_init (GeditTabClass *klass)
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
 	object_class->finalize = gedit_tab_finalize;
+	object_class->dispose = gedit_tab_dispose;
 	object_class->get_property = gedit_tab_get_property;
 	object_class->set_property = gedit_tab_set_property;
 	
@@ -363,6 +379,10 @@ set_view_properties_according_to_state (GeditTab      *tab,
 					GeditTabState  state)
 {
 	gboolean val;
+	gboolean hl_current_line;
+	
+	g_settings_get (tab->priv->editor, GS_HIGHLIGHT_CURRENT_LINE,
+			&hl_current_line);
 
 	val = ((state == GEDIT_TAB_STATE_NORMAL) &&
 	       (tab->priv->print_preview == NULL) &&
@@ -375,7 +395,7 @@ set_view_properties_according_to_state (GeditTab      *tab,
 
 	val = ((state != GEDIT_TAB_STATE_LOADING) &&
 	       (state != GEDIT_TAB_STATE_CLOSING) &&
-	       (gedit_prefs_manager_get_highlight_current_line ()));
+	       (hl_current_line));
 	gtk_source_view_set_highlight_current_line (GTK_SOURCE_VIEW (tab->priv->view), val);
 }
 
@@ -1495,9 +1515,15 @@ gedit_tab_init (GeditTab *tab)
 	GtkWidget *sw;
 	GeditDocument *doc;
 	GeditLockdownMask lockdown;
+	gboolean auto_save;
+	gint auto_save_interval;
 
 	tab->priv = GEDIT_TAB_GET_PRIVATE (tab);
 
+	tab->priv->editor = gedit_app_get_settings (gedit_app_get_default (),
+						    "preferences", "editor",
+						    NULL);
+
 	tab->priv->state = GEDIT_TAB_STATE_NORMAL;
 
 	tab->priv->not_editable = FALSE;
@@ -1515,14 +1541,19 @@ gedit_tab_init (GeditTab *tab)
 					GTK_POLICY_AUTOMATIC);
 
 	/* Manage auto save data */
+	g_settings_get (tab->priv->editor, GS_AUTO_SAVE, &auto_save);
+	g_settings_get (tab->priv->editor, GS_AUTO_SAVE_INTERVAL,
+			&auto_save_interval);
+	
 	lockdown = gedit_app_get_lockdown (gedit_app_get_default ());
-	tab->priv->auto_save = gedit_prefs_manager_get_auto_save () &&
+	tab->priv->auto_save = auto_save &&
 			       !(lockdown & GEDIT_LOCKDOWN_SAVE_TO_DISK);
 	tab->priv->auto_save = (tab->priv->auto_save != FALSE);
 
-	tab->priv->auto_save_interval = gedit_prefs_manager_get_auto_save_interval ();
+	tab->priv->auto_save_interval = auto_save_interval;
+	/*FIXME
 	if (tab->priv->auto_save_interval <= 0)
-		tab->priv->auto_save_interval = GPM_DEFAULT_AUTO_SAVE_INTERVAL;
+		tab->priv->auto_save_interval = GPM_DEFAULT_AUTO_SAVE_INTERVAL;*/
 
 	/* Create the view */
 	doc = gedit_document_new ();
diff --git a/gedit/gedit-utils.c b/gedit/gedit-utils.c
index 41a5afd..7324c41 100644
--- a/gedit/gedit-utils.c
+++ b/gedit/gedit-utils.c
@@ -48,7 +48,6 @@
 #include "gedit-utils.h"
 
 #include "gedit-document.h"
-#include "gedit-prefs-manager.h"
 #include "gedit-debug.h"
 
 /* For the workspace/viewport stuff */
@@ -83,6 +82,7 @@ gedit_utils_uri_has_writable_scheme (const gchar *uri)
 	gchar *scheme;
 	GSList *writable_schemes;
 	gboolean res;
+	GSettings *editor_settings;
 
 	gfile = g_file_new_for_uri (uri);
 	scheme = g_file_get_uri_scheme (gfile);
@@ -91,7 +91,13 @@ gedit_utils_uri_has_writable_scheme (const gchar *uri)
 
 	g_object_unref (gfile);
 
-	writable_schemes = gedit_prefs_manager_get_writable_vfs_schemes ();
+	editor_settings = gedit_app_get_settings (gedit_app_get_default (),
+						  "preferences", "editor",
+						  NULL);
+
+	writable_schemes = gedit_utils_get_list_from_settings (editor_settings,
+							       GS_WRITABLE_VFS_SCHEMES);
+	g_object_unref (editor_settings);
 
 	/* CHECK: should we use g_ascii_strcasecmp? - Paolo (Nov 6, 2005) */
 	res = (g_slist_find_custom (writable_schemes,
@@ -1544,3 +1550,218 @@ gedit_utils_decode_uri (const gchar *uri,
 	
 	return TRUE;
 }
+
+GtkWrapMode
+gedit_utils_get_wrap_mode_from_string (const gchar *str)
+{
+	GtkWrapMode res;
+
+	g_return_val_if_fail (str != NULL, GTK_WRAP_WORD);
+	
+	if (strcmp (str, "GTK_WRAP_NONE") == 0)
+		res = GTK_WRAP_NONE;
+	else
+	{
+		if (strcmp (str, "GTK_WRAP_CHAR") == 0)
+			res = GTK_WRAP_CHAR;
+		else
+			res = GTK_WRAP_WORD;
+	}
+
+	return res;
+}
+
+gchar *
+gedit_utils_get_wrap_str (guint mode)
+{
+	gchar *str;
+
+	switch (mode)
+	{
+		case GTK_WRAP_NONE:
+			str = g_strdup ("GTK_WRAP_NONE");
+			break;
+
+		case GTK_WRAP_CHAR:
+			str = g_strdup ("GTK_WRAP_CHAR");
+			break;
+
+		default: /* GTK_WRAP_WORD */
+			str = g_strdup ("GTK_WRAP_WORD");
+	}
+	
+	return str;
+}
+
+GtkSourceSmartHomeEndType
+gedit_utils_get_smart_home_end_from_string (const gchar *str)
+{
+	GtkSourceSmartHomeEndType res;
+
+	g_return_val_if_fail (str != NULL, GTK_SOURCE_SMART_HOME_END_AFTER);
+
+	if (strcmp (str, "DISABLED") == 0)
+		res = GTK_SOURCE_SMART_HOME_END_DISABLED;
+	else if (strcmp (str, "BEFORE") == 0)
+		res = GTK_SOURCE_SMART_HOME_END_BEFORE;
+	else if (strcmp (str, "ALWAYS") == 0)
+		res = GTK_SOURCE_SMART_HOME_END_ALWAYS;
+	else
+		res = GTK_SOURCE_SMART_HOME_END_AFTER;
+
+	return res;
+}
+
+GeditToolbarSetting
+gedit_utils_get_toolbar_style_from_string (const gchar *str)
+{
+	GeditToolbarSetting res;
+
+	g_return_val_if_fail (str != NULL, 0);
+
+	if (strcmp (str, "GEDIT_TOOLBAR_ICONS") == 0)
+		res = GEDIT_TOOLBAR_ICONS;
+	else
+	{
+		if (strcmp (str, "GEDIT_TOOLBAR_ICONS_AND_TEXT") == 0)
+			res = GEDIT_TOOLBAR_ICONS_AND_TEXT;
+		else 
+		{
+			if (strcmp (str, "GEDIT_TOOLBAR_ICONS_BOTH_HORIZ") == 0)
+				res = GEDIT_TOOLBAR_ICONS_BOTH_HORIZ;
+			else
+				res = GEDIT_TOOLBAR_SYSTEM;
+		}
+	}
+	
+	return res;
+}
+
+/* Encodings */
+
+static gboolean
+data_exists (GSList         *list,
+	     const gpointer  data)
+{
+	while (list != NULL)
+	{
+		if (list->data == data)
+			return TRUE;
+
+		list = g_slist_next (list);
+	}
+
+	return FALSE;
+}
+
+GSList *
+gedit_utils_get_encodings_from_list_str (const GSList *enc_str)
+{
+	GSList *res = NULL;
+	GSList *l;
+	const GeditEncoding *enc;
+	
+	for (l = (GSList *)enc_str; l != NULL; l = g_slist_next (l))
+	{
+		const gchar *charset = l->data;
+
+		if (strcmp (charset, "CURRENT") == 0)
+			g_get_charset (&charset);
+
+		g_return_val_if_fail (charset != NULL, NULL);
+		enc = gedit_encoding_get_from_charset (charset);
+
+		if (enc != NULL)
+		{
+			if (!data_exists (res, (gpointer)enc))
+				res = g_slist_prepend (res, (gpointer)enc);
+
+		}
+	}
+
+	return g_slist_reverse (res);
+}
+
+GSList *
+gedit_utils_get_str_list_from_encondings (const GSList *enc_list)
+{
+	GSList *list = NULL;
+	GSList *l;
+
+	for (l = (GSList *)enc_list; l != NULL; l = g_slist_next (l))
+	{
+		const GeditEncoding *enc;
+		const gchar *charset;
+		
+		enc = (const GeditEncoding *)l->data;
+
+		charset = gedit_encoding_get_charset (enc);
+		g_return_val_if_fail (charset != NULL, NULL);
+
+		list = g_slist_prepend (list, g_strdup (charset));
+	}
+
+	return g_slist_reverse (list);
+}
+
+GSList *
+gedit_utils_get_list_from_settings (GSettings   *settings,
+				    const gchar *key)
+{
+	GSList *list = NULL;
+	GVariant *variant;
+	const gchar **values;
+	gint n_items;
+	gint i = 0;
+	
+	g_return_val_if_fail (G_IS_SETTINGS (settings), NULL);
+	g_return_val_if_fail (key != NULL, NULL);
+	
+	variant = g_settings_get_value (settings, key);
+	g_return_val_if_fail (variant != NULL, NULL);
+	
+	values = g_variant_get_strv (variant, &n_items);
+	
+	while (i < n_items)
+	{
+		list = g_slist_prepend (list, g_strdup (values[i]));
+		i++;
+	}
+	
+	g_free (values);
+	g_variant_unref (variant);
+	
+	return g_slist_reverse (list);
+}
+
+void
+gedit_utils_set_list_into_settings (GSettings    *settings,
+				    const gchar  *key,
+				    const GSList *list)
+{
+	GVariant *variant;
+	gchar **values;
+	GSList *l;
+	gint i;
+	gint len;
+	
+	g_return_if_fail (G_IS_SETTINGS (settings));
+	g_return_if_fail (key != NULL);
+	g_return_if_fail (list != NULL);
+	
+	len = g_slist_length ((GSList *)list);
+	
+	values = g_new (gchar *, len);
+	
+	for (l = (GSList *)list, i = 0; l != NULL; l = g_slist_next (l), i++);
+	{
+		values[i] = l->data;
+	}
+	
+	variant = g_variant_new_strv ((const gchar * const *)values, len);
+	
+	g_settings_set_value (settings, key, variant);
+	
+	g_free (values);
+	g_variant_unref (variant);
+}
diff --git a/gedit/gedit-utils.h b/gedit/gedit-utils.h
index ddf1d9c..a1b85c2 100644
--- a/gedit/gedit-utils.h
+++ b/gedit/gedit-utils.h
@@ -37,6 +37,8 @@
 #include <gtk/gtk.h>
 #include <atk/atk.h>
 #include <gedit/gedit-encodings.h>
+#include <gtksourceview/gtksourceview.h>
+#include "gedit-settings.h"
 
 G_BEGIN_DECLS
 
@@ -155,6 +157,23 @@ gboolean	 gedit_utils_decode_uri 		(const gchar *uri,
 /* Turns data from a drop into a list of well formatted uris */
 gchar 	       **gedit_utils_drop_get_uris		(GtkSelectionData *selection_data);
 
+GtkWrapMode	 gedit_utils_get_wrap_mode_from_string	(const gchar *str);
+gchar		*gedit_utils_get_wrap_str		(guint mode);
+
+GtkSourceSmartHomeEndType gedit_utils_get_smart_home_end_from_string (const gchar *str);
+
+GeditToolbarSetting gedit_utils_get_toolbar_style_from_string (const gchar *str);
+
+GSList		*gedit_utils_get_encodings_from_list_str (const GSList *enc_str);
+GSList		*gedit_utils_get_str_list_from_encondings (const GSList *enc);
+
+GSList		*gedit_utils_get_list_from_settings	(GSettings   *settings,
+							 const gchar *key);
+
+void		 gedit_utils_set_list_into_settings	(GSettings    *settings,
+							 const gchar  *key,
+							 const GSList *list);
+
 G_END_DECLS
 
 #endif /* __GEDIT_UTILS_H__ */
diff --git a/gedit/gedit-view.c b/gedit/gedit-view.c
index b999d29..50ef302 100644
--- a/gedit/gedit-view.c
+++ b/gedit/gedit-view.c
@@ -43,10 +43,10 @@
 
 #include "gedit-view.h"
 #include "gedit-debug.h"
-#include "gedit-prefs-manager.h"
-#include "gedit-prefs-manager-app.h"
 #include "gedit-marshal.h"
 #include "gedit-utils.h"
+#include "gedit-app.h"
+#include "gedit-settings.h"
 
 
 #define GEDIT_VIEW_SCROLL_MARGIN 0.02
@@ -69,6 +69,8 @@ enum
 
 struct _GeditViewPrivate
 {
+	GSettings   *editor_settings;
+
 	SearchMode   search_mode;
 	
 	GtkTextIter  start_search_iter;
@@ -335,20 +337,41 @@ static void
 gedit_view_init (GeditView *view)
 {
 	GtkTargetList *tl;
+	gboolean use_default_font;
+	gboolean display_line_numbers;
+	gboolean auto_indent;
+	gboolean insert_spaces;
+	gboolean display_right_margin;
+	gboolean hl_current_line;
+	guint tabs_size;
+	guint right_margin_position;
+	GtkWrapMode wrap_mode;
+	gchar *wrap_str;
+	GtkSourceSmartHomeEndType smart_home_end;
+	gchar *smart_home_str;
 	
 	gedit_debug (DEBUG_VIEW);
 	
 	view->priv = GEDIT_VIEW_GET_PRIVATE (view);
+	
+	view->priv->editor_settings = gedit_app_get_settings (gedit_app_get_default (),
+							      "preferences", "editor",
+							      NULL);
+
+	/* Get setting values */
+	g_settings_get (view->priv->editor_settings, GS_USE_DEFAULT_FONT,
+			&use_default_font);
 
 	/*
 	 *  Set tab, fonts, wrap mode, colors, etc. according
 	 *  to preferences 
 	 */
-	if (!gedit_prefs_manager_get_use_default_font ())
+	if (!use_default_font)
 	{
 		gchar *editor_font;
 
-		editor_font = gedit_prefs_manager_get_editor_font ();
+		g_settings_get (view->priv->editor_settings, GS_EDITOR_FONT,
+				&editor_font);
 
 		gedit_view_set_font (view, FALSE, editor_font);
 
@@ -358,17 +381,39 @@ gedit_view_init (GeditView *view)
 	{
 		gedit_view_set_font (view, TRUE, NULL);
 	}
+ 
+	g_settings_get (view->priv->editor_settings,GS_DISPLAY_LINE_NUMBERS,
+			&display_line_numbers);
+	g_settings_get (view->priv->editor_settings,GS_AUTO_INDENT, &auto_indent);
+	g_settings_get (view->priv->editor_settings, GS_TABS_SIZE, &tabs_size);
+	g_settings_get (view->priv->editor_settings, GS_INSERT_SPACES,
+			&insert_spaces);
+	g_settings_get (view->priv->editor_settings, GS_DISPLAY_RIGHT_MARGIN,
+			&display_right_margin);
+	g_settings_get (view->priv->editor_settings, GS_RIGHT_MARGIN_POSITION,
+			&right_margin_position);
+	g_settings_get (view->priv->editor_settings, GS_HIGHLIGHT_CURRENT_LINE,
+			&hl_current_line);
+
+	g_settings_get (view->priv->editor_settings, GS_WRAP_MODE, &wrap_str);
+	wrap_mode = gedit_utils_get_wrap_mode_from_string (wrap_str);
+	g_free (wrap_str);
+	
+	g_settings_get (view->priv->editor_settings, GS_SMART_HOME_END,
+			&smart_home_str);
+	smart_home_end = gedit_utils_get_smart_home_end_from_string (smart_home_str);
+	g_free (smart_home_str);
 
 	g_object_set (G_OBJECT (view), 
-		      "wrap_mode", gedit_prefs_manager_get_wrap_mode (),
-		      "show_line_numbers", gedit_prefs_manager_get_display_line_numbers (),
-		      "auto_indent", gedit_prefs_manager_get_auto_indent (),
-		      "tab_width", gedit_prefs_manager_get_tabs_size (),
-		      "insert_spaces_instead_of_tabs", gedit_prefs_manager_get_insert_spaces (),
-		      "show_right_margin", gedit_prefs_manager_get_display_right_margin (), 
-		      "right_margin_position", gedit_prefs_manager_get_right_margin_position (),
-		      "highlight_current_line", gedit_prefs_manager_get_highlight_current_line (),
-		      "smart_home_end", gedit_prefs_manager_get_smart_home_end (),
+		      "wrap_mode", wrap_mode,
+		      "show_line_numbers", display_line_numbers,
+		      "auto_indent", auto_indent,
+		      "tab_width", tabs_size,
+		      "insert_spaces_instead_of_tabs", insert_spaces,
+		      "show_right_margin", display_right_margin,
+		      "right_margin_position", right_margin_position,
+		      "highlight_current_line", hl_current_line,
+		      "smart_home_end", smart_home_end,
 		      "indent_on_tab", TRUE,
 		      NULL);
 
@@ -414,6 +459,12 @@ gedit_view_destroy (GtkObject *object)
 	current_buffer_removed (view);
 	g_signal_handlers_disconnect_by_func (view, on_notify_buffer_cb, NULL);
 	
+	if (view->priv->editor_settings != NULL)
+	{
+		g_object_unref (view->priv->editor_settings);
+		view->priv->editor_settings = NULL;
+	}
+	
 	(* GTK_OBJECT_CLASS (gedit_view_parent_class)->destroy) (object);
 }
 
@@ -660,9 +711,13 @@ gedit_view_set_font (GeditView   *view,
 
 	if (def)
 	{
+		GSettings *settings;
 		gchar *font;
 
-		font = gedit_prefs_manager_get_system_font ();
+		settings = gedit_app_get_settings (gedit_app_get_default (), NULL);
+		font = gedit_settings_get_system_font (GEDIT_SETTINGS (settings));
+		g_object_unref (settings);
+		
 		font_desc = pango_font_description_from_string (font);
 		g_free (font);
 	}
@@ -677,7 +732,7 @@ gedit_view_set_font (GeditView   *view,
 
 	gtk_widget_modify_font (GTK_WIDGET (view), font_desc);
 
-	pango_font_description_free (font_desc);		
+	pango_font_description_free (font_desc);
 }
 
 static void
@@ -1946,17 +2001,6 @@ gedit_view_drag_drop (GtkWidget      *widget,
 	return result;
 }
 
-static void
-show_line_numbers_toggled (GtkMenu   *menu,
-			   GeditView *view)
-{
-	gboolean show;
-
-	show = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (menu));
-
-	gedit_prefs_manager_set_display_line_numbers (show);
-}
-
 static GtkWidget *
 create_line_numbers_menu (GtkWidget *view)
 {
@@ -1968,8 +2012,13 @@ create_line_numbers_menu (GtkWidget *view)
 	item = gtk_check_menu_item_new_with_mnemonic (_("_Display line numbers"));
 	gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item),
 					gtk_source_view_get_show_line_numbers (GTK_SOURCE_VIEW (view)));
-	g_signal_connect (item, "toggled",
-			  G_CALLBACK (show_line_numbers_toggled), view);
+
+	g_settings_bind (GEDIT_VIEW (view)->priv->editor_settings,
+			 "active",
+			 item,
+			 GS_DISPLAY_LINE_NUMBERS,
+			 G_SETTINGS_BIND_SET);
+	
 	gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
 	
 	gtk_widget_show_all (menu);
diff --git a/gedit/gedit-window-private.h b/gedit/gedit-window-private.h
index 399433a..6d010a5 100644
--- a/gedit/gedit-window-private.h
+++ b/gedit/gedit-window-private.h
@@ -32,8 +32,8 @@
 #define __GEDIT_WINDOW_PRIVATE_H__
 
 #include "gedit/gedit-window.h"
-#include "gedit-prefs-manager.h"
 #include "gedit-message-bus.h"
+#include "gedit-settings.h"
 
 #ifdef OS_OSX
 #include <ige-mac-integration.h>
@@ -45,6 +45,9 @@ G_BEGIN_DECLS
 
 struct _GeditWindowPrivate
 {
+	GSettings      *editor_settings;
+	GSettings      *ui_settings;
+
 	GtkWidget      *notebook;
 
 	GtkWidget      *side_panel;
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index c4bf240..f756dce 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -49,13 +49,13 @@
 #include "gedit-commands.h"
 #include "gedit-debug.h"
 #include "gedit-language-manager.h"
-#include "gedit-prefs-manager-app.h"
 #include "gedit-panel.h"
 #include "gedit-documents-panel.h"
 #include "gedit-plugins-engine.h"
 #include "gedit-enum-types.h"
 #include "gedit-dirs.h"
 #include "gedit-status-combo-box.h"
+#include "gedit-settings.h"
 
 #ifdef OS_OSX
 #include "osx/gedit-osx.h"
@@ -127,32 +127,32 @@ save_panes_state (GeditWindow *window)
 
 	gedit_debug (DEBUG_WINDOW);
 
-	if (gedit_prefs_manager_window_size_can_set ())
-		gedit_prefs_manager_set_window_size (window->priv->width,
-						     window->priv->height);
+	if (gedit_settings_window_size_can_set ())
+		gedit_settings_set_window_size (window->priv->width,
+						window->priv->height);
 
-	if (gedit_prefs_manager_window_state_can_set ())
-		gedit_prefs_manager_set_window_state (window->priv->window_state);
+	if (gedit_settings_window_state_can_set ())
+		gedit_settings_set_window_state (window->priv->window_state);
 
 	if ((window->priv->side_panel_size > 0) &&
-	    gedit_prefs_manager_side_panel_size_can_set ())
-		gedit_prefs_manager_set_side_panel_size	(
+	    gedit_settings_side_panel_size_can_set ())
+		gedit_settings_set_side_panel_size (
 					window->priv->side_panel_size);
 
 	pane_page = _gedit_panel_get_active_item_id (GEDIT_PANEL (window->priv->side_panel));
 	if (pane_page != 0 &&
-	    gedit_prefs_manager_side_panel_active_page_can_set ())
-		gedit_prefs_manager_set_side_panel_active_page (pane_page);
+	    gedit_settings_side_panel_active_page_can_set ())
+		gedit_settings_set_side_panel_active_page (pane_page);
 
 	if ((window->priv->bottom_panel_size > 0) && 
-	    gedit_prefs_manager_bottom_panel_size_can_set ())
-		gedit_prefs_manager_set_bottom_panel_size (
+	    gedit_settings_bottom_panel_size_can_set ())
+		gedit_settings_set_bottom_panel_size (
 					window->priv->bottom_panel_size);
 
 	pane_page = _gedit_panel_get_active_item_id (GEDIT_PANEL (window->priv->bottom_panel));
 	if (pane_page != 0 &&
-	    gedit_prefs_manager_bottom_panel_active_page_can_set ())
-		gedit_prefs_manager_set_bottom_panel_active_page (pane_page);
+	    gedit_settings_bottom_panel_active_page_can_set ())
+		gedit_settings_set_bottom_panel_active_page (pane_page);
 }
 
 #ifdef OS_OSX
@@ -215,6 +215,18 @@ gedit_window_dispose (GObject *object)
 	gedit_debug (DEBUG_WINDOW);
 
 	window = GEDIT_WINDOW (object);
+	
+	if (window->priv->editor_settings != NULL)
+	{
+		g_object_unref (window->priv->editor_settings);
+		window->priv->editor_settings = NULL;
+	}
+	
+	if (window->priv->ui_settings != NULL)
+	{
+		g_object_unref (window->priv->ui_settings);
+		window->priv->ui_settings = NULL;
+	}
 
 	/* Stop tracking removal of panes otherwise we always
 	 * end up with thinking we had no pane active, since they
@@ -569,9 +581,16 @@ set_toolbar_style (GeditWindow *window,
 	gboolean visible;
 	GeditToolbarSetting style;
 	GtkAction *action;
+	gboolean toolbar_visible;
+	gchar *toolbar_style_str;
+	
+	g_settings_get (window->priv->ui_settings, GS_TOOLBAR_VISIBLE,
+			&toolbar_visible);
+	g_settings_get (window->priv->ui_settings, GS_TOOLBAR_BUTTONS_STYLE,
+			&toolbar_style_str);
 	
 	if (origin == NULL)
-		visible = gedit_prefs_manager_get_toolbar_visible ();
+		visible = toolbar_visible;
 	else
 		visible = GTK_WIDGET_VISIBLE (origin->priv->toolbar);
 	
@@ -589,10 +608,12 @@ set_toolbar_style (GeditWindow *window,
 
 	/* Set style */
 	if (origin == NULL)
-		style = gedit_prefs_manager_get_toolbar_buttons_style ();
+		style = gedit_utils_get_toolbar_style_from_string (toolbar_style_str);
 	else
 		style = origin->priv->toolbar_style;
 	
+	g_free (toolbar_style_str);
+	
 	window->priv->toolbar_style = style;
 	
 	apply_toolbar_style (window, window->priv->toolbar);
@@ -727,10 +748,14 @@ set_sensitivity_according_to_tab (GeditWindow *window,
 	GeditTabState  state;
 	GtkClipboard  *clipboard;
 	GeditLockdownMask lockdown;
+	gboolean       enable_syntax_highlighting;
 
 	g_return_if_fail (GEDIT_TAB (tab));
 
 	gedit_debug (DEBUG_WINDOW);
+	
+	g_settings_get (window->priv->editor_settings, GS_SYNTAX_HIGHLIGHTING,
+			&enable_syntax_highlighting);
 
 	lockdown = gedit_app_get_lockdown (gedit_app_get_default ());
 
@@ -886,7 +911,7 @@ set_sensitivity_according_to_tab (GeditWindow *window,
 					      "ViewHighlightMode");
 	gtk_action_set_sensitive (action, 
 				  (state != GEDIT_TAB_STATE_CLOSING) &&
-				  gedit_prefs_manager_get_enable_syntax_highlighting ());
+				  enable_syntax_highlighting);
 
 	update_next_prev_doc_sensitivity (window, tab);
 
@@ -1265,7 +1290,7 @@ update_recent_files_menu (GeditWindow *window)
 
 	gedit_debug (DEBUG_WINDOW);
 
-	max_recents = gedit_prefs_manager_get_max_recents ();
+	g_settings_get (window->priv->ui_settings, GS_MAX_RECENTS, &max_recents);
 
 	g_return_if_fail (p->recents_action_group != NULL);
 
@@ -1400,8 +1425,7 @@ toolbar_visibility_changed (GtkWidget   *toolbar,
 
 	visible = GTK_WIDGET_VISIBLE (toolbar);
 
-	if (gedit_prefs_manager_toolbar_visible_can_set ())
-		gedit_prefs_manager_set_toolbar_visible (visible);
+	g_settings_set (window->priv->ui_settings, GS_TOOLBAR_VISIBLE, visible);
 
 	action = gtk_action_group_get_action (window->priv->always_sensitive_action_group,
 					      "ViewToolbar");
@@ -1419,8 +1443,11 @@ setup_toolbar_open_button (GeditWindow *window,
 	GtkWidget *toolbar_recent_menu;
 	GtkToolItem *open_button;
 	GtkAction *action;
+	gint max_recents;
 
 	recent_manager = gtk_recent_manager_get_default ();
+	
+	g_settings_get (window->priv->ui_settings, GS_MAX_RECENTS, &max_recents);
 
 	/* recent files menu tool button */
 	toolbar_recent_menu = gtk_recent_chooser_menu_new_for_manager (recent_manager);
@@ -1430,7 +1457,7 @@ setup_toolbar_open_button (GeditWindow *window,
 	gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (toolbar_recent_menu),
 					  GTK_RECENT_SORT_MRU);
 	gtk_recent_chooser_set_limit (GTK_RECENT_CHOOSER (toolbar_recent_menu),
-				      gedit_prefs_manager_get_max_recents ());
+				      max_recents);
 
 	filter = gtk_recent_filter_new ();
 	gtk_recent_filter_add_group (filter, "gedit");
@@ -1808,11 +1835,11 @@ set_statusbar_style (GeditWindow *window,
 		     GeditWindow *origin)
 {
 	GtkAction *action;
-	
 	gboolean visible;
 
 	if (origin == NULL)
-		visible = gedit_prefs_manager_get_statusbar_visible ();
+		g_settings_get (window->priv->ui_settings, GS_STATUSBAR_VISIBLE,
+				&visible);
 	else
 		visible = GTK_WIDGET_VISIBLE (origin->priv->statusbar);
 
@@ -1839,8 +1866,7 @@ statusbar_visibility_changed (GtkWidget   *statusbar,
 
 	visible = GTK_WIDGET_VISIBLE (statusbar);
 
-	if (gedit_prefs_manager_statusbar_visible_can_set ())
-		gedit_prefs_manager_set_statusbar_visible (visible);
+	g_settings_set (window->priv->ui_settings, GS_STATUSBAR_VISIBLE, visible);
 
 	action = gtk_action_group_get_action (window->priv->always_sensitive_action_group,
 					      "ViewStatusbar");
@@ -2079,7 +2105,7 @@ clone_window (GeditWindow *origin)
 	{
 		gint w, h;
 
-		gedit_prefs_manager_get_default_window_size (&w, &h);
+		gedit_settings_get_default_window_size (&w, &h);
 		gtk_window_set_default_size (GTK_WINDOW (window), w, h);
 		gtk_window_maximize (GTK_WINDOW (window));
 	}
@@ -2633,7 +2659,8 @@ _gedit_window_set_lockdown (GeditWindow       *window,
 	gboolean autosave;
 
 	/* start/stop autosave in each existing tab */
-	autosave = gedit_prefs_manager_get_auto_save ();
+	g_settings_get (window->priv->editor_settings, GS_AUTO_SAVE,
+			&autosave);
 	gtk_container_foreach (GTK_CONTAINER (window->priv->notebook),
 			       update_tab_autosave,
 			       &autosave);
@@ -3626,8 +3653,8 @@ side_panel_visibility_changed (GtkWidget   *side_panel,
 
 	visible = GTK_WIDGET_VISIBLE (side_panel);
 
-	if (gedit_prefs_manager_side_pane_visible_can_set ())
-		gedit_prefs_manager_set_side_pane_visible (visible);
+	g_settings_set (window->priv->ui_settings, GS_SIDE_PANE_VISIBLE,
+			visible);
 
 	action = gtk_action_group_get_action (window->priv->panes_action_group,
 	                                      "ViewSidePane");
@@ -3680,8 +3707,8 @@ bottom_panel_visibility_changed (GeditPanel  *bottom_panel,
 
 	visible = GTK_WIDGET_VISIBLE (bottom_panel);
 
-	if (gedit_prefs_manager_bottom_panel_visible_can_set ())
-		gedit_prefs_manager_set_bottom_panel_visible (visible);
+	g_settings_set (window->priv->ui_settings, GS_BOTTOM_PANE_VISIBLE,
+			visible);
 
 	action = gtk_action_group_get_action (window->priv->panes_action_group,
 					      "ViewBottomPane");
@@ -3760,15 +3787,22 @@ static void
 init_panels_visibility (GeditWindow *window)
 {
 	gint active_page;
+	gboolean side_pane_visible;
+	gboolean bottom_pane_visible;
 
 	gedit_debug (DEBUG_WINDOW);
 
 	/* side pane */
-	active_page = gedit_prefs_manager_get_side_panel_active_page ();
+	active_page = gedit_settings_get_side_panel_active_page ();
 	_gedit_panel_set_active_item_by_id (GEDIT_PANEL (window->priv->side_panel),
 					    active_page);
 
-	if (gedit_prefs_manager_get_side_pane_visible ())
+	g_settings_get (window->priv->ui_settings, GS_SIDE_PANE_VISIBLE,
+			&side_pane_visible);
+	g_settings_get (window->priv->ui_settings, GS_BOTTOM_PANE_VISIBLE,
+			&bottom_pane_visible);
+
+	if (side_pane_visible)
 	{
 		gtk_widget_show (window->priv->side_panel);
 	}
@@ -3776,11 +3810,11 @@ init_panels_visibility (GeditWindow *window)
 	/* bottom pane, it can be empty */
 	if (gedit_panel_get_n_items (GEDIT_PANEL (window->priv->bottom_panel)) > 0)
 	{
-		active_page = gedit_prefs_manager_get_bottom_panel_active_page ();
+		active_page = gedit_settings_get_bottom_panel_active_page ();
 		_gedit_panel_set_active_item_by_id (GEDIT_PANEL (window->priv->bottom_panel),
 						    active_page);
 
-		if (gedit_prefs_manager_get_bottom_panel_visible ())
+		if (bottom_pane_visible)
 		{
 			gtk_widget_show (window->priv->bottom_panel);
 		}
@@ -3951,6 +3985,12 @@ gedit_window_init (GeditWindow *window)
 	window->priv->dispose_has_run = FALSE;
 	window->priv->fullscreen_controls = NULL;
 	window->priv->fullscreen_animation_timeout_id = 0;
+	window->priv->editor_settings = gedit_app_get_settings (gedit_app_get_default (),
+								"preferences", "editor",
+								NULL);
+	window->priv->ui_settings = gedit_app_get_settings (gedit_app_get_default (),
+							    "preferences", "ui",
+							    NULL);
 
 	window->priv->message_bus = gedit_message_bus_new ();
 
@@ -3992,8 +4032,8 @@ gedit_window_init (GeditWindow *window)
 
 	/* panes' state must be restored after panels have been mapped,
 	 * since the bottom pane position depends on the size of the vpaned. */
-	window->priv->side_panel_size = gedit_prefs_manager_get_side_panel_size ();
-	window->priv->bottom_panel_size = gedit_prefs_manager_get_bottom_panel_size ();
+	window->priv->side_panel_size = gedit_settings_get_side_panel_size ();
+	window->priv->bottom_panel_size = gedit_settings_get_bottom_panel_size ();
 
 	g_signal_connect_after (window->priv->hpaned,
 				"map",
diff --git a/gedit/gedit.c b/gedit/gedit.c
index e53437e..6107552 100644
--- a/gedit/gedit.c
+++ b/gedit/gedit.c
@@ -51,7 +51,6 @@
 #include "gedit-dirs.h"
 #include "gedit-encodings.h"
 #include "gedit-plugins-engine.h"
-#include "gedit-prefs-manager-app.h"
 #include "gedit-session.h"
 #include "gedit-utils.h"
 #include "gedit-window.h"
@@ -679,10 +678,6 @@ main (int argc, char *argv[])
 	gtk_window_set_default_icon_name ("accessories-text-editor");
 #endif
 
-	/* Load user preferences */
-	gedit_debug_message (DEBUG_APP, "Init prefs manager");
-	gedit_prefs_manager_app_init ();
-
 	/* Init plugins engine */
 	gedit_debug_message (DEBUG_APP, "Init plugins");
 	engine = gedit_plugins_engine_get_default ();
@@ -751,7 +746,6 @@ main (int argc, char *argv[])
 	 * finalize it properly. 
 	 */
 	g_object_unref (engine);
-	gedit_prefs_manager_app_shutdown ();
 
 #ifdef G_OS_WIN32
 	gedit_metadata_manager_shutdown ();
diff --git a/plugins/checkupdate/Makefile.am b/plugins/checkupdate/Makefile.am
index 66885a3..72aff58 100644
--- a/plugins/checkupdate/Makefile.am
+++ b/plugins/checkupdate/Makefile.am
@@ -24,26 +24,10 @@ plugin_in_files = checkupdate.gedit-plugin.desktop.in
 
 plugin_DATA = $(plugin_in_files:.gedit-plugin.desktop.in=.gedit-plugin)
 
-schemasdir	 = $(GCONF_SCHEMA_FILE_DIR)
-schemas_in_files = gedit-check-update.schemas.in
-schemas_DATA 	 = $(schemas_in_files:.schemas.in=.schemas)
- INTLTOOL_SCHEMAS_RULE@
-
-if GCONF_SCHEMAS_INSTALL
-install-data-local:
-	        if test -z "$(DESTDIR)" ; then \
-	                for p in $(schemas_DATA) ; do \
-	                        GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_builddir)/plugins/checkupdate/$$p ; \
-	                done \
-	        fi
-else
-install-data-local:
-endif
-
-EXTRA_DIST = $(plugin_in_files) $(schemas_in_files)
-
-CLEANFILES = $(plugin_DATA) $(schemas_DATA)
-
-DISTCLEANFILES = $(plugin_DATA) $(schemas_DATA)
+EXTRA_DIST = $(plugin_in_files)
+
+CLEANFILES = $(plugin_DATA)
+
+DISTCLEANFILES = $(plugin_DATA)
 
 -include $(top_srcdir)/git.mk
diff --git a/plugins/filebrowser/Makefile.am b/plugins/filebrowser/Makefile.am
index ac986df..6de5d69 100644
--- a/plugins/filebrowser/Makefile.am
+++ b/plugins/filebrowser/Makefile.am
@@ -65,27 +65,9 @@ gedit-file-browser-marshal.c: gedit-file-browser-marshal.list $(GLIB_GENMARSHAL)
 
 plugin_DATA = $(plugin_in_files:.gedit-plugin.desktop.in=.gedit-plugin)
 
-schemasdir	 = $(GCONF_SCHEMA_FILE_DIR)
-schemas_in_files = gedit-file-browser.schemas.in
-schemas_DATA 	 = $(schemas_in_files:.schemas.in=.schemas)
- INTLTOOL_SCHEMAS_RULE@
-
-if GCONF_SCHEMAS_INSTALL
-install-data-local:
-	        if test -z "$(DESTDIR)" ; then \
-	                for p in $(schemas_DATA) ; do \
-	                        GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_builddir)/plugins/filebrowser/$$p ; \
-	                done \
-	        fi
-else
-install-data-local:
-endif
-
-
 EXTRA_DIST = \
 	$(ui_DATA)					\
 	$(plugin_in_files)				\
-	$(schemas_in_files)				\
 	gedit-file-browser-enum-types.h.template	\
 	gedit-file-browser-enum-types.c.template	\
 	gedit-file-browser-enum-register.c.template	\
@@ -93,12 +75,10 @@ EXTRA_DIST = \
 
 CLEANFILES = \
 	$(plugin_DATA)		\
-	$(schemas_DATA)		\
 	$(BUILT_SOURCES)
 
 DISTCLEANFILES = \
 	$(plugin_DATA)		\
-	$(schemas_DATA)		\
 	$(BUILT_SOURCES)
 
 -include $(top_srcdir)/git.mk
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5bb747b..6f53199 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -2,7 +2,6 @@
 # Please keep this file sorted alphabetically.
 [encoding: UTF-8]
 data/gedit.desktop.in.in
-data/gedit.schemas.in.in
 gedit/dialogs/gedit-close-confirmation-dialog.c
 gedit/dialogs/gedit-encodings-dialog.c
 [type: gettext/glade]gedit/dialogs/gedit-encodings-dialog.ui
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 3e6ea29..6f4bb45 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,5 +1,4 @@
 data/gedit.desktop.in
-data/gedit.schemas.in
 gedit/gedit-document-output-stream.c
 gedit/dialogs/gedit-style-scheme-dialog.c
 gedit/dialogs/gedit-style-scheme-dialog.ui



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