[gedit/gsettings: 2/13] Update the port to build with latest GSettings



commit 50949435720d284da582de80cf1f07506af94aca
Author: Vincent Untz <vuntz gnome org>
Date:   Wed Apr 14 23:17:53 2010 -0400

    Update the port to build with latest GSettings

 configure.ac                             |    2 +-
 data/Makefile.am                         |    5 ++-
 data/org.gnome.gedit.gschema.in.in       |   68 +++++++++++++++++++++++++++
 data/org.gnome.gedit.schemas.in          |   68 ---------------------------
 gedit/dialogs/gedit-encodings-dialog.c   |    6 +-
 gedit/dialogs/gedit-preferences-dialog.c |   29 ++++++------
 gedit/gedit-app.c                        |    2 +-
 gedit/gedit-document-saver.c             |    2 +-
 gedit/gedit-document.c                   |   12 ++--
 gedit/gedit-encodings-option-menu.c      |    2 +-
 gedit/gedit-history-entry.c              |    4 +-
 gedit/gedit-io-error-message-area.c      |    3 +-
 gedit/gedit-print-job.c                  |   54 +++++++++++----------
 gedit/gedit-settings.c                   |   75 +++++++++++++++--------------
 gedit/gedit-settings.h                   |    4 +-
 gedit/gedit-tab.c                        |    6 +-
 gedit/gedit-utils.c                      |    4 +-
 gedit/gedit-utils.h                      |    4 +-
 gedit/gedit-view.c                       |   25 ++++++----
 gedit/gedit-window.c                     |   28 ++++++-----
 20 files changed, 209 insertions(+), 194 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ad54132..0b7b1d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -513,7 +513,7 @@ Makefile
 data/gedit.desktop.in
 data/gedit-bugreport.sh
 data/gedit.pc
-data/org.gnome.gedit.schemas
+data/org.gnome.gedit.gschema.in
 data/Makefile
 docs/Makefile
 docs/reference/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index f01cc96..313fdf2 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -3,7 +3,10 @@ desktop_in_files = gedit.desktop.in
 desktop_DATA 	 = $(desktop_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 
-gsettingsschema_DATA = org.gnome.gedit.schemas
+gsettingsschema_in_files = org.gnome.gedit.gschema.in
+gsettingsschema_DATA = $(gsettingsschema_in_files:.gschema.in=.gschema)
+org.gnome.gedit.gschema: org.gnome.gedit.gschema.in
+	gsettings-schema-convert -f $< -o $@
 
 man_MANS = gedit.1
 
diff --git a/data/org.gnome.gedit.gschema.in.in b/data/org.gnome.gedit.gschema.in.in
new file mode 100644
index 0000000..912799a
--- /dev/null
+++ b/data/org.gnome.gedit.gschema.in.in
@@ -0,0 +1,68 @@
+schema org.gnome.gedit:
+  path /apps/gedit/
+  
+  child preferences:
+    child editor:
+      key use_default_font = @b true
+      key editor_font = @s 'Monospace 12'
+      key scheme = @s 'classic'
+      key create_backup_copy = @b true
+      key auto_save = @b false
+      key auto_save_interval = @u 10
+      key undo_actions_limit = @u 25
+      key max_undo_actions = @u 2000
+      key wrap_mode = @s 'GTK_WRAP_WORD'
+      key tabs_size = @u 8
+      key insert_spaces = @b false
+      key auto_indent = @b false
+      key display_line_numbers = @b false
+      key highlight_current_line = @b false
+      key bracket_matching = @b false
+      key display_right_margin = @b false
+      key right_margin_position = @u 80
+      key smart_home_end = @s 'after'
+      key writable_vfs_schemes = @as ['dav', 'davs', 'ftp', 'sftp', 'smb', 'ssh']
+      key restore_cursor_position = @b true
+      key syntax_highlighting = @b true
+      key search_highlighting = @b true
+
+    child ui:
+      key toolbar_visible = @b true
+      key toolbar_buttons_style = @s @TOOLBAR_STYLE@
+      key statusbar_visible = @b true
+      key side_pane_visible = @b false
+      key bottom_pane_visible = @b false
+      key max_recents = @u 5
+
+    child print:
+      key print_syntax_highlighting = @b true
+      key print_header = @b true
+      key print_wrap_mode = @s 'GTK_WRAP_WORD'
+      key print_line_numbers = @u 0
+      key print_font_body_pango = @s 'Monospace 9'
+      key print_font_header_pango = @s 'Sans 11'
+      key print_font_numbers_pango = @s 'Sans 8'
+
+    child encodings:
+      key auto_detected = @as ['UTF-8', 'CURRENT', 'ISO-8859-15', 'UTF-16']
+      key shown_in_menu = @as ['ISO-8859-15']
+
+  child plugins:
+    key active_plugins = @as [ ACTIVE_PLUGINS@]
+
+  child history:
+    key gedit2_search_for_entry = @as ['']
+    key gedit2_replace_with_entry = @as ['']
+
+schema org.gnome.Desktop.Lockdown:
+  path /desktop/gnome/lockdown
+  
+  key disable_command_line = @b false
+  key disable_printing = @b false
+  key disable_print_setup = @b false
+  key disable_save_to_disk = @b false
+
+schema org.gnome.Desktop.Interface:
+  path /desktop/gnome/interface
+  
+  key monospace_font_name = @s 'Monospace 10'
diff --git a/gedit/dialogs/gedit-encodings-dialog.c b/gedit/dialogs/gedit-encodings-dialog.c
index b78f155..42a77c3 100644
--- a/gedit/dialogs/gedit-encodings-dialog.c
+++ b/gedit/dialogs/gedit-encodings-dialog.c
@@ -259,7 +259,7 @@ init_shown_in_menu_tree_model (GeditEncodingsDialog *dialog)
 
 	/* add data to the list store */
 	tmp = gedit_utils_get_list_from_settings (dialog->priv->enc_settings,
-						  GS_ENCONDING_SHOW_IN_MENU);
+						  GS_ENCODING_SHOW_IN_MENU);
 
 	list = gedit_utils_get_encodings_from_list_str (tmp);
 	
@@ -304,10 +304,10 @@ response_handler (GtkDialog            *dialog,
 	{
 		GSList *enc_str;
 		
-		enc_str = gedit_utils_get_str_list_from_encondings (dlg->priv->show_in_menu_list);
+		enc_str = gedit_utils_get_str_list_from_encodings (dlg->priv->show_in_menu_list);
 	
 		gedit_utils_set_list_into_settings (dlg->priv->enc_settings,
-						    GS_ENCONDING_SHOW_IN_MENU,
+						    GS_ENCODING_SHOW_IN_MENU,
 						    enc_str);
 		
 		g_slist_foreach (enc_str, (GFunc) g_free, NULL);
diff --git a/gedit/dialogs/gedit-preferences-dialog.c b/gedit/dialogs/gedit-preferences-dialog.c
index 78a70e4..7eed639 100644
--- a/gedit/dialogs/gedit-preferences-dialog.c
+++ b/gedit/dialogs/gedit-preferences-dialog.c
@@ -192,7 +192,7 @@ on_auto_save_changed (GSettings              *settings,
 
 	gedit_debug (DEBUG_PREFS);
 	
-	g_settings_get (settings, key, &value);
+	g_settings_get (settings, key, "b", &value);
 
 	if (value)
 	{
@@ -212,7 +212,7 @@ setup_editor_page (GeditPreferencesDialog *dlg)
 	gedit_debug (DEBUG_PREFS);
 
 	/* Get values */
-	g_settings_get (dlg->priv->editor, GS_AUTO_SAVE, &auto_save);
+	g_settings_get (dlg->priv->editor, GS_AUTO_SAVE, "b", &auto_save);
 
 	/* Set widget sensitivity */
 	gtk_widget_set_sensitive (dlg->priv->auto_save_spinbutton,
@@ -272,7 +272,7 @@ wrap_mode_checkbutton_toggled (GtkToggleButton        *button,
 		
 		wrap_str = gedit_utils_get_wrap_str (GTK_WRAP_NONE);
 	
-		g_settings_set (dlg->priv->editor, GS_WRAP_MODE, wrap_str);
+		g_settings_set (dlg->priv->editor, GS_WRAP_MODE, "s", wrap_str);
 		g_free (wrap_str);
 		
 		gtk_widget_set_sensitive (dlg->priv->split_checkbutton, 
@@ -304,7 +304,7 @@ wrap_mode_checkbutton_toggled (GtkToggleButton        *button,
 			wrap_str = gedit_utils_get_wrap_str (GTK_WRAP_CHAR);
 		}
 		
-		g_settings_set (dlg->priv->editor, GS_WRAP_MODE, wrap_str);
+		g_settings_set (dlg->priv->editor, GS_WRAP_MODE, "s", wrap_str);
 		g_free (wrap_str);
 	}
 }
@@ -319,7 +319,7 @@ right_margin_checkbutton_toggled (GtkToggleButton        *button,
 
 	active = gtk_toggle_button_get_active (button);
 	
-	g_settings_set (dlg->priv->editor, GS_DISPLAY_RIGHT_MARGIN, active);
+	g_settings_set (dlg->priv->editor, GS_DISPLAY_RIGHT_MARGIN, "b", active);
 
 	gtk_widget_set_sensitive (dlg->priv->right_margin_position_hbox,
 				  active);
@@ -336,11 +336,11 @@ setup_view_page (GeditPreferencesDialog *dlg)
 	gedit_debug (DEBUG_PREFS);
 	
 	/* Get values */
-	g_settings_get (dlg->priv->editor, GS_WRAP_MODE, &wrap_mode_str);
+	g_settings_get (dlg->priv->editor, GS_WRAP_MODE, "s", &wrap_mode_str);
 	g_settings_get (dlg->priv->editor, GS_DISPLAY_RIGHT_MARGIN,
-			&display_right_margin);
+			"b", &display_right_margin);
 	g_settings_get (dlg->priv->editor, GS_RIGHT_MARGIN_POSITION,
-			&right_margin_position);
+			"u", &right_margin_position);
 	
 	/* Set initial state */
 	wrap_mode = gedit_utils_get_wrap_mode_from_string (wrap_mode_str);
@@ -423,7 +423,7 @@ on_use_default_font_changed (GSettings              *settings,
 	
 	gedit_debug (DEBUG_PREFS);
 
-	g_settings_get (settings, key, &value);
+	g_settings_get (settings, key, "b", &value);
 
 	if (value)
 	{
@@ -458,7 +458,8 @@ setup_font_colors_page_font_section (GeditPreferencesDialog *dlg)
 	/* 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_settings_get (dlg->priv->editor, GS_USE_DEFAULT_FONT,
+			"b", &use_default_font);
 	g_object_unref (toplevel);
 
 	label = g_strdup_printf(_("_Use the system fixed width font (%s)"),
@@ -525,7 +526,7 @@ style_scheme_changed (GtkWidget              *treeview,
 	gtk_tree_model_get (GTK_TREE_MODEL (dlg->priv->schemes_treeview_model),
 			    &iter, ID_COLUMN, &id, -1);
 
-	g_settings_set (dlg->priv->editor, GS_SCHEME, id);
+	g_settings_set (dlg->priv->editor, GS_SCHEME, "s", id);
 
 	set_buttons_sensisitivity_according_to_scheme (dlg, id);
 
@@ -543,7 +544,7 @@ ensure_color_scheme_id (GeditPreferencesDialog *dlg,
 	{
 		gchar *pref_id;
 
-		g_settings_get (dlg->priv->editor, GS_SCHEME, &pref_id);
+		g_settings_get (dlg->priv->editor, GS_SCHEME, "s", &pref_id);
 		
 		scheme = gtk_source_style_scheme_manager_get_scheme (manager,
 								     pref_id);
@@ -664,7 +665,7 @@ add_scheme_chooser_response_cb (GtkDialog              *chooser,
 		return;
 	}
 	
-	g_settings_set (dlg->priv->editor, GS_SCHEME, scheme_id);
+	g_settings_set (dlg->priv->editor, GS_SCHEME, "s", scheme_id);
 
 	scheme_id = populate_color_scheme_list (dlg, scheme_id);
 
@@ -804,7 +805,7 @@ uninstall_scheme_clicked (GtkButton              *button,
 			
 			if (real_new_id != NULL)
 			{
-				g_settings_set (dlg->priv->editor, GS_SCHEME, real_new_id);
+				g_settings_set (dlg->priv->editor, GS_SCHEME, "s", real_new_id);
 			}
 		}
 
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index ba534db..06c6640 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -941,7 +941,7 @@ gedit_app_get_settings (GeditApp    *app,
 	{
 		GSettings *aux;
 		
-		aux = g_settings_get_settings (settings, path);
+		aux = g_settings_get_child (settings, path);
 		g_object_unref (settings);
 		settings = aux;
 		
diff --git a/gedit/gedit-document-saver.c b/gedit/gedit-document-saver.c
index bef5d57..090e800 100644
--- a/gedit/gedit-document-saver.c
+++ b/gedit/gedit-document-saver.c
@@ -318,7 +318,7 @@ gedit_document_saver_save (GeditDocumentSaver     *saver,
 		saver->keep_backup = FALSE;
 	else
 		g_settings_get (saver->editor_settings, GS_CREATE_BACKUP_COPY,
-				&saver->keep_backup);
+				"b", &saver->keep_backup);
 
 	GEDIT_DOCUMENT_SAVER_GET_CLASS (saver)->save (saver, old_mtime);
 }
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index bb1e700..a89546b 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -702,7 +702,7 @@ set_language (GeditDocument     *doc,
 		gboolean syntax_hl;
 		
 		g_settings_get (doc->priv->editor_settings, GS_SYNTAX_HIGHLIGHTING,
-				&syntax_hl);
+				"b", &syntax_hl);
 		
 		gtk_source_buffer_set_highlight_syntax (GTK_SOURCE_BUFFER (doc),
 							syntax_hl);
@@ -756,7 +756,7 @@ get_default_style_scheme (GSettings *editor_settings)
 	GtkSourceStyleSchemeManager *manager;
 
 	manager = gedit_get_style_scheme_manager ();
-	g_settings_get (editor_settings, GS_SCHEME, &scheme_id);
+	g_settings_get (editor_settings, GS_SCHEME, "s", &scheme_id);
 	def_style = gtk_source_style_scheme_manager_get_scheme (manager,
 								scheme_id);
 
@@ -941,11 +941,11 @@ 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);
+			"u", &undo_actions);
 	g_settings_get (doc->priv->editor_settings, GS_BRACKET_MATCHING,
-			&bracket_matching);
+			"b", &bracket_matching);
 	g_settings_get (doc->priv->editor_settings, GS_SEARCH_HIGHLIGHTING,
-			&search_hl);
+			"b", &search_hl);
 
 	gtk_source_buffer_set_max_undo_levels (GTK_SOURCE_BUFFER (doc), 
 					       undo_actions);
@@ -1323,7 +1323,7 @@ document_loader_loaded (GeditDocumentLoader *loader,
 		                  gedit_document_loader_get_newline_type (loader));
 
 		g_settings_get (doc->priv->editor_settings, GS_RESTORE_CURSOR_POSITION,
-				&restore_cursor);
+				"b", &restore_cursor);
 
 		/* move the cursor at the requested line if any */
 		if (doc->priv->requested_line_pos > 0)
diff --git a/gedit/gedit-encodings-option-menu.c b/gedit/gedit-encodings-option-menu.c
index 4dd7ca3..75a5445 100644
--- a/gedit/gedit-encodings-option-menu.c
+++ b/gedit/gedit-encodings-option-menu.c
@@ -230,7 +230,7 @@ update_menu (GeditEncodingsOptionMenu *option_menu)
 	menu = gtk_menu_new ();
 
 	tmp = gedit_utils_get_list_from_settings (option_menu->priv->enc_settings,
-						  GS_ENCONDING_SHOW_IN_MENU);
+						  GS_ENCODING_SHOW_IN_MENU);
 
 	encodings = list = gedit_utils_get_encodings_from_list_str (tmp);
 	
diff --git a/gedit/gedit-history-entry.c b/gedit/gedit-history-entry.c
index 3456888..cc6a7a7 100644
--- a/gedit/gedit-history-entry.c
+++ b/gedit/gedit-history-entry.c
@@ -366,7 +366,7 @@ gedit_history_entry_load_history (GeditHistoryEntry *entry)
 	const gchar **items;
 	GtkListStore *store;
 	GtkTreeIter iter;
-	gint i;
+	gsize i;
 
 	g_return_if_fail (GEDIT_IS_HISTORY_ENTRY (entry));
 
@@ -421,7 +421,7 @@ gedit_history_entry_init (GeditHistoryEntry *entry)
 	priv->completion = NULL;
 	
 	gedit = g_settings_new ("org.gnome.gedit");
-	priv->settings = g_settings_get_settings (gedit, "history");
+	priv->settings = g_settings_get_child (gedit, "history");
 	g_object_unref (gedit);
 }
 
diff --git a/gedit/gedit-io-error-message-area.c b/gedit/gedit-io-error-message-area.c
index b376f7e..5058b9e 100644
--- a/gedit/gedit-io-error-message-area.c
+++ b/gedit/gedit-io-error-message-area.c
@@ -1061,7 +1061,8 @@ gedit_no_backup_saving_error_message_area_new (GFile        *location,
 	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_settings_get (editor_settings, GS_CREATE_BACKUP_COPY,
+			"b", &create_backup_copy);
 	g_object_unref (editor_settings);
 
 	// FIXME: review this messages
diff --git a/gedit/gedit-print-job.c b/gedit/gedit-print-job.c
index 554b001..fefa941 100644
--- a/gedit/gedit-print-job.c
+++ b/gedit/gedit-print-job.c
@@ -286,11 +286,11 @@ restore_button_clicked (GtkButton     *button,
 	gchar *body, *header, *numbers;
 	
 	g_settings_get (job->priv->print_settings, GS_PRINT_FONT_BODY_PANGO,
-			&body);
+			"s", &body);
 	g_settings_get (job->priv->print_settings, GS_PRINT_FONT_HEADER_PANGO,
-			&header);
+			"s", &header);
 	g_settings_get (job->priv->print_settings, GS_PRINT_FONT_NUMBERS_PANGO,
-			&numbers);
+			"s", &numbers);
 
 	gtk_font_button_set_font_name (
 			GTK_FONT_BUTTON (job->priv->body_fontbutton),
@@ -359,19 +359,19 @@ create_custom_widget_cb (GtkPrintOperation *operation,
 
 	/* Get all settings values */
 	g_settings_get (job->priv->print_settings, GS_PRINT_SYNTAX_HIGHLIGHTING,
-			&syntax_hl);
+			"b", &syntax_hl);
 	g_settings_get (job->priv->print_settings, GS_PRINT_HEADER,
-			&print_header);
+			"b", &print_header);
 	g_settings_get (job->priv->print_settings, GS_PRINT_LINE_NUMBERS,
-			&line_numbers);
+			"u", &line_numbers);
 	g_settings_get (job->priv->print_settings, GS_PRINT_WRAP_MODE,
-			&wrap_str);
+			"s", &wrap_str);
 	g_settings_get (job->priv->print_settings, GS_PRINT_FONT_BODY_PANGO,
-			&font_body);
+			"s", &font_body);
 	g_settings_get (job->priv->print_settings, GS_PRINT_FONT_HEADER_PANGO,
-			&font_header);
+			"s", &font_header);
 	g_settings_get (job->priv->print_settings, GS_PRINT_FONT_NUMBERS_PANGO,
-			&font_numbers);
+			"s", &font_numbers);
 
 	/* Print syntax */
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (job->priv->syntax_checkbutton),
@@ -467,7 +467,7 @@ set_wrap_setting (GeditPrintJob *job,
 	
 	wrap_str = gedit_utils_get_wrap_str (mode);
 	g_settings_set (job->priv->print_settings, GS_PRINT_WRAP_MODE,
-			wrap_str);
+			"s", wrap_str);
 	g_free (wrap_str);
 }
 
@@ -486,20 +486,24 @@ custom_widget_apply_cb (GtkPrintOperation *operation,
 	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);
+			"b", syntax);
+	g_settings_set (job->priv->print_settings, GS_PRINT_HEADER,
+			"b", page_header);
+	g_settings_set (job->priv->print_settings, GS_PRINT_FONT_BODY_PANGO,
+			"s", body);
+	g_settings_set (job->priv->print_settings, GS_PRINT_FONT_HEADER_PANGO,
+			"s", header);
+	g_settings_set (job->priv->print_settings, GS_PRINT_FONT_NUMBERS_PANGO,
+			"s", numbers);
 
 	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (job->priv->line_numbers_checkbutton)))
 	{
 		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))));
+			"u", MAX (1, gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (job->priv->line_numbers_spinbutton))));
 	}
 	else
 	{
-		g_settings_set (job->priv->print_settings, GS_PRINT_LINE_NUMBERS, 0);
+		g_settings_set (job->priv->print_settings, GS_PRINT_LINE_NUMBERS, "u", 0);
 	}
 
 	if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (job->priv->text_wrapping_checkbutton)))
@@ -533,19 +537,19 @@ create_compositor (GeditPrintJob *job)
 	
 	/* Create and initialize print compositor */
 	g_settings_get (job->priv->print_settings, GS_PRINT_FONT_BODY_PANGO,
-			&print_font_body);
+			"s", &print_font_body);
 	g_settings_get (job->priv->print_settings, GS_PRINT_FONT_HEADER_PANGO,
-			&print_font_header);
+			"s", &print_font_header);
 	g_settings_get (job->priv->print_settings, GS_PRINT_FONT_NUMBERS_PANGO,
-			&print_font_numbers);
+			"s", &print_font_numbers);
 	g_settings_get (job->priv->print_settings, GS_PRINT_SYNTAX_HIGHLIGHTING,
-			&syntax_hl);
+			"b", &syntax_hl);
 	g_settings_get (job->priv->print_settings, GS_PRINT_WRAP_MODE,
-			&wrap_str);
+			"s", &wrap_str);
 	g_settings_get (job->priv->print_settings, GS_PRINT_LINE_NUMBERS,
-			&print_line_numbers);
+			"u", &print_line_numbers);
 	g_settings_get (job->priv->print_settings, GS_PRINT_HEADER,
-			&print_header);
+			"b", &print_header);
 	
 	wrap_mode = gedit_utils_get_wrap_mode_from_string (wrap_str);
 	g_free (wrap_str);
diff --git a/gedit/gedit-settings.c b/gedit/gedit-settings.c
index b1aa4e2..339b1e4 100644
--- a/gedit/gedit-settings.c
+++ b/gedit/gedit-settings.c
@@ -601,7 +601,7 @@ on_lockdown_changed (GSettings   *settings,
 	gboolean locked;
 	GeditApp *app;
 	
-	g_settings_get (settings, key, &locked);
+	g_settings_get (settings, key, "b", &locked);
 	app = gedit_app_get_default ();
 	
 	if (strcmp (key, GS_LOCKDOWN_COMMAND_LINE) == 0)
@@ -629,7 +629,7 @@ set_font (GeditSettings *gs,
 	GList *views, *l;
 	guint ts;
 	
-	g_settings_get (gs->priv->editor, GS_TABS_SIZE, &ts);
+	g_settings_get (gs->priv->editor, GS_TABS_SIZE, "u", &ts);
 	
 	views = gedit_app_get_views (gedit_app_get_default ());
 	
@@ -653,11 +653,12 @@ on_system_font_changed (GSettings     *settings,
 	gboolean use_default_font;
 	gchar *font;
 	
-	g_settings_get (gs->priv->editor, GS_USE_DEFAULT_FONT, &use_default_font);
+	g_settings_get (gs->priv->editor, GS_USE_DEFAULT_FONT,
+			"b", &use_default_font);
 	if (!use_default_font)
 		return;
 	
-	g_settings_get (settings, key, &font);
+	g_settings_get (settings, key, "s", &font);
 	
 	set_font (gs, font);
 	
@@ -672,15 +673,15 @@ on_use_default_font_changed (GSettings     *settings,
 	gboolean def;
 	gchar *font;
 
-	g_settings_get (settings, key, &def);
+	g_settings_get (settings, key, "b", &def);
 	
 	if (def)
 	{
-		g_settings_get (gs->priv->interface, GS_SYSTEM_FONT, &font);
+		g_settings_get (gs->priv->interface, GS_SYSTEM_FONT, "s", &font);
 	}
 	else
 	{
-		g_settings_get (gs->priv->editor, GS_EDITOR_FONT, &font);
+		g_settings_get (gs->priv->editor, GS_EDITOR_FONT, "s", &font);
 	}
 	
 	set_font (gs, font);
@@ -696,11 +697,12 @@ on_editor_font_changed (GSettings     *settings,
 	gboolean use_default_font;
 	gchar *font;
 	
-	g_settings_get (gs->priv->editor, GS_USE_DEFAULT_FONT, &use_default_font);
+	g_settings_get (gs->priv->editor, GS_USE_DEFAULT_FONT,
+			"b", &use_default_font);
 	if (use_default_font)
 		return;
 	
-	g_settings_get (settings, key, &font);
+	g_settings_get (settings, key, "s", &font);
 	
 	set_font (gs, font);
 	
@@ -717,7 +719,7 @@ on_scheme_changed (GSettings     *settings,
 	GList *docs;
 	GList *l;
 
-	g_settings_get (settings, key, &scheme);
+	g_settings_get (settings, key, "s", &scheme);
 
 	if (gs->priv->old_scheme != NULL && (strcmp (scheme, gs->priv->old_scheme) == 0))
 		return;
@@ -764,7 +766,7 @@ on_auto_save_changed (GSettings     *settings,
 	GList *docs, *l;
 	gboolean auto_save;
 	
-	g_settings_get (settings, key, &auto_save);
+	g_settings_get (settings, key, "b", &auto_save);
 	
 	docs = gedit_app_get_documents (gedit_app_get_default ());
 	
@@ -786,7 +788,7 @@ on_auto_save_interval_changed (GSettings     *settings,
 	GList *docs, *l;
 	gint auto_save_interval;
 	
-	g_settings_get (settings, key, &auto_save_interval);
+	g_settings_get (settings, key, "u", &auto_save_interval);
 	
 	docs = gedit_app_get_documents (gedit_app_get_default ());
 	
@@ -808,7 +810,7 @@ on_undo_actions_limit_changed (GSettings     *settings,
 	GList *docs, *l;
 	gint ul;
 	
-	g_settings_get (settings, key, &ul);
+	g_settings_get (settings, key, "u", &ul);
 	
 	ul = CLAMP (ul, -1, 250);
 	
@@ -832,7 +834,7 @@ on_wrap_mode_changed (GSettings     *settings,
 	GList *views, *l;
 	gchar *wrap_str;
 	
-	g_settings_get (settings, key, &wrap_str);
+	g_settings_get (settings, key, "s", &wrap_str);
 	
 	wrap_mode = gedit_utils_get_wrap_mode_from_string (wrap_str);
 	g_free (wrap_str);
@@ -856,7 +858,7 @@ on_tabs_size_changed (GSettings     *settings,
 	GList *views, *l;
 	guint ts;
 	
-	g_settings_get (settings, key, &ts);
+	g_settings_get (settings, key, "u", &ts);
 	
 	ts = CLAMP (ts, 1, 24);
 	
@@ -881,7 +883,7 @@ on_insert_spaces_changed (GSettings     *settings,
 	GList *views, *l;
 	gboolean spaces;
 	
-	g_settings_get (settings, key, &spaces);
+	g_settings_get (settings, key, "b", &spaces);
 	
 	views = gedit_app_get_views (gedit_app_get_default ());
 	
@@ -903,7 +905,7 @@ on_auto_indent_changed (GSettings     *settings,
 	GList *views, *l;
 	gboolean enable;
 	
-	g_settings_get (settings, key, &enable);
+	g_settings_get (settings, key, "b", &enable);
 	
 	views = gedit_app_get_views (gedit_app_get_default ());
 	
@@ -924,7 +926,7 @@ on_display_line_numbers_changed (GSettings     *settings,
 	GList *views, *l;
 	gboolean line_numbers;
 	
-	g_settings_get (settings, key, &line_numbers);
+	g_settings_get (settings, key, "b", &line_numbers);
 	
 	views = gedit_app_get_views (gedit_app_get_default ());
 	
@@ -945,7 +947,7 @@ on_hl_current_line_changed (GSettings     *settings,
 	GList *views, *l;
 	gboolean hl;
 	
-	g_settings_get (settings, key, &hl);
+	g_settings_get (settings, key, "b", &hl);
 	
 	views = gedit_app_get_views (gedit_app_get_default ());
 	
@@ -966,7 +968,7 @@ on_bracket_matching_changed (GSettings     *settings,
 	GList *docs, *l;
 	gboolean enable;
 	
-	g_settings_get (settings, key, &enable);
+	g_settings_get (settings, key, "b", &enable);
 	
 	docs = gedit_app_get_documents (gedit_app_get_default ());
 	
@@ -987,7 +989,7 @@ on_display_right_margin_changed (GSettings     *settings,
 	GList *views, *l;
 	gboolean display;
 	
-	g_settings_get (settings, key, &display);
+	g_settings_get (settings, key, "b", &display);
 	
 	views = gedit_app_get_views (gedit_app_get_default ());
 	
@@ -1008,7 +1010,7 @@ on_right_margin_position_changed (GSettings     *settings,
 	GList *views, *l;
 	gint pos;
 	
-	g_settings_get (settings, key, &pos);
+	g_settings_get (settings, key, "u", &pos);
 	
 	pos = CLAMP (pos, 1, 160);
 	
@@ -1032,7 +1034,7 @@ on_smart_home_end_changed (GSettings     *settings,
 	GList *views, *l;
 	gchar *smart_str;
 	
-	g_settings_get (settings, key, &smart_str);
+	g_settings_get (settings, key, "s", &smart_str);
 	
 	smart_he = gedit_utils_get_smart_home_end_from_string (smart_str);
 	g_free (smart_str);
@@ -1057,7 +1059,7 @@ on_syntax_highlighting_changed (GSettings     *settings,
 	GList *docs, *l;
 	gboolean enable;
 	
-	g_settings_get (settings, key, &enable);
+	g_settings_get (settings, key, "b", &enable);
 	
 	docs = gedit_app_get_documents (gedit_app_get_default ());
 	
@@ -1095,7 +1097,7 @@ on_search_highlighting_changed (GSettings     *settings,
 	GList *docs, *l;
 	gboolean enable;
 	
-	g_settings_get (settings, key, &enable);
+	g_settings_get (settings, key, "b", &enable);
 	
 	docs = gedit_app_get_documents (gedit_app_get_default ());
 	
@@ -1116,7 +1118,7 @@ on_max_recents_changed (GSettings     *settings,
 	const GList *windows;
 	gint max;
 	
-	g_settings_get (settings, key, &max);
+	g_settings_get (settings, key, "u", &max);
 	
 	windows = gedit_app_get_windows (gedit_app_get_default ());
 	while (windows != NULL)
@@ -1158,11 +1160,11 @@ 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");
+	prefs = g_settings_get_child (G_SETTINGS (gs), "preferences");
+	gs->priv->editor = g_settings_get_child (prefs, "editor");
+	gs->priv->ui = g_settings_get_child (prefs, "ui");
 	g_object_unref (prefs);
-	gs->priv->plugins = g_settings_get_settings (G_SETTINGS (gs), "plugins");
+	gs->priv->plugins = g_settings_get_child (G_SETTINGS (gs), "plugins");
 	
 	/* Load settings */
 	gs->priv->lockdown = g_settings_new ("org.gnome.Desktop.Lockdown");
@@ -1272,7 +1274,7 @@ gedit_settings_new ()
 	GeditSettings *settings;
 	
 	settings = g_object_new (GEDIT_TYPE_SETTINGS,
-				 "schema-name", "org.gnome.gedit",
+				 "schema", "org.gnome.gedit",
 				 NULL);
 	
 	initialize (settings);
@@ -1287,13 +1289,13 @@ gedit_settings_get_lockdown (GeditSettings *gs)
 	gboolean command_line, printing, print_setup, save_to_disk;
 	
 	g_settings_get (gs->priv->lockdown, GS_LOCKDOWN_COMMAND_LINE,
-			&command_line);
+			"b", &command_line);
 	g_settings_get (gs->priv->lockdown, GS_LOCKDOWN_PRINTING,
-			&printing);
+			"b", &printing);
 	g_settings_get (gs->priv->lockdown, GS_LOCKDOWN_PRINT_SETUP,
-			&print_setup);
+			"b", &print_setup);
 	g_settings_get (gs->priv->lockdown, GS_LOCKDOWN_SAVE_TO_DISK,
-			&save_to_disk);
+			"b", &save_to_disk);
 
 	if (command_line)
 		lockdown |= GEDIT_LOCKDOWN_COMMAND_LINE;
@@ -1317,7 +1319,8 @@ gedit_settings_get_system_font (GeditSettings *gs)
 
 	g_return_val_if_fail (GEDIT_IS_SETTINGS (gs), NULL);
 	
-	g_settings_get (gs->priv->interface, "monospace_font_name", &system_font);
+	g_settings_get (gs->priv->interface, "monospace_font_name",
+			"s", &system_font);
 	
 	return system_font;
 }
diff --git a/gedit/gedit-settings.h b/gedit/gedit-settings.h
index 5ce9501..867ebcc 100644
--- a/gedit/gedit-settings.h
+++ b/gedit/gedit-settings.h
@@ -145,8 +145,8 @@ G_END_DECLS
 #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_ENCODING_AUTO_DETECTED	"auto_detected"
+#define GS_ENCODING_SHOW_IN_MENU	"show_in_menu"
 #define GS_ACTIVE_PLUGINS		"active_plugins"
 
 #endif /* __GEDIT_SETTINGS_H__ */
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index 1f6f5b8..e030ac1 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -388,7 +388,7 @@ set_view_properties_according_to_state (GeditTab      *tab,
 	gboolean hl_current_line;
 	
 	g_settings_get (tab->priv->editor, GS_HIGHLIGHT_CURRENT_LINE,
-			&hl_current_line);
+			"b", &hl_current_line);
 
 	val = ((state == GEDIT_TAB_STATE_NORMAL) &&
 	       (tab->priv->print_preview == NULL) &&
@@ -1550,9 +1550,9 @@ 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, "b", &auto_save);
 	g_settings_get (tab->priv->editor, GS_AUTO_SAVE_INTERVAL,
-			&auto_save_interval);
+			"u", &auto_save_interval);
 	
 	lockdown = gedit_app_get_lockdown (gedit_app_get_default ());
 	tab->priv->auto_save = auto_save &&
diff --git a/gedit/gedit-utils.c b/gedit/gedit-utils.c
index d0e7969..b0fbb2f 100644
--- a/gedit/gedit-utils.c
+++ b/gedit/gedit-utils.c
@@ -1652,7 +1652,7 @@ gedit_utils_get_encodings_from_list_str (const GSList *enc_str)
 }
 
 GSList *
-gedit_utils_get_str_list_from_encondings (const GSList *enc_list)
+gedit_utils_get_str_list_from_encodings (const GSList *enc_list)
 {
 	GSList *list = NULL;
 	GSList *l;
@@ -1680,7 +1680,7 @@ gedit_utils_get_list_from_settings (GSettings   *settings,
 	GSList *list = NULL;
 	GVariant *variant;
 	const gchar **values;
-	gint n_items;
+	gsize n_items;
 	gint i = 0;
 	
 	g_return_val_if_fail (G_IS_SETTINGS (settings), NULL);
diff --git a/gedit/gedit-utils.h b/gedit/gedit-utils.h
index dec0d3f..e6a6ee6 100644
--- a/gedit/gedit-utils.h
+++ b/gedit/gedit-utils.h
@@ -164,7 +164,7 @@ GtkSourceSmartHomeEndType gedit_utils_get_smart_home_end_from_string (const gcha
 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_str_list_from_encodings (const GSList *enc);
 
 GSList		*gedit_utils_get_list_from_settings	(GSettings   *settings,
 							 const gchar *key);
@@ -176,5 +176,3 @@ void		 gedit_utils_set_list_into_settings	(GSettings    *settings,
 G_END_DECLS
 
 #endif /* __GEDIT_UTILS_H__ */
-
-
diff --git a/gedit/gedit-view.c b/gedit/gedit-view.c
index 50ef302..9d8fe93 100644
--- a/gedit/gedit-view.c
+++ b/gedit/gedit-view.c
@@ -360,7 +360,7 @@ gedit_view_init (GeditView *view)
 
 	/* Get setting values */
 	g_settings_get (view->priv->editor_settings, GS_USE_DEFAULT_FONT,
-			&use_default_font);
+			"b", &use_default_font);
 
 	/*
 	 *  Set tab, fonts, wrap mode, colors, etc. according
@@ -371,7 +371,7 @@ gedit_view_init (GeditView *view)
 		gchar *editor_font;
 
 		g_settings_get (view->priv->editor_settings, GS_EDITOR_FONT,
-				&editor_font);
+				"s", &editor_font);
 
 		gedit_view_set_font (view, FALSE, editor_font);
 
@@ -383,24 +383,27 @@ gedit_view_init (GeditView *view)
 	}
  
 	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);
+			"b", &display_line_numbers);
+	g_settings_get (view->priv->editor_settings,GS_AUTO_INDENT,
+			"b", &auto_indent);
+	g_settings_get (view->priv->editor_settings, GS_TABS_SIZE,
+			"u", &tabs_size);
 	g_settings_get (view->priv->editor_settings, GS_INSERT_SPACES,
-			&insert_spaces);
+			"b", &insert_spaces);
 	g_settings_get (view->priv->editor_settings, GS_DISPLAY_RIGHT_MARGIN,
-			&display_right_margin);
+			"b", &display_right_margin);
 	g_settings_get (view->priv->editor_settings, GS_RIGHT_MARGIN_POSITION,
-			&right_margin_position);
+			"u", &right_margin_position);
 	g_settings_get (view->priv->editor_settings, GS_HIGHLIGHT_CURRENT_LINE,
-			&hl_current_line);
+			"b", &hl_current_line);
 
-	g_settings_get (view->priv->editor_settings, GS_WRAP_MODE, &wrap_str);
+	g_settings_get (view->priv->editor_settings, GS_WRAP_MODE,
+			"s", &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);
+			"s", &smart_home_str);
 	smart_home_end = gedit_utils_get_smart_home_end_from_string (smart_home_str);
 	g_free (smart_home_str);
 
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index 1411064..85079dc 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -585,9 +585,9 @@ set_toolbar_style (GeditWindow *window,
 	gchar *toolbar_style_str;
 	
 	g_settings_get (window->priv->ui_settings, GS_TOOLBAR_VISIBLE,
-			&toolbar_visible);
+			"b", &toolbar_visible);
 	g_settings_get (window->priv->ui_settings, GS_TOOLBAR_BUTTONS_STYLE,
-			&toolbar_style_str);
+			"s", &toolbar_style_str);
 	
 	if (origin == NULL)
 		visible = toolbar_visible;
@@ -755,7 +755,7 @@ set_sensitivity_according_to_tab (GeditWindow *window,
 	gedit_debug (DEBUG_WINDOW);
 	
 	g_settings_get (window->priv->editor_settings, GS_SYNTAX_HIGHLIGHTING,
-			&enable_syntax_highlighting);
+			"b", &enable_syntax_highlighting);
 
 	lockdown = gedit_app_get_lockdown (gedit_app_get_default ());
 
@@ -1310,7 +1310,8 @@ update_recent_files_menu (GeditWindow *window)
 
 	gedit_debug (DEBUG_WINDOW);
 
-	g_settings_get (window->priv->ui_settings, GS_MAX_RECENTS, &max_recents);
+	g_settings_get (window->priv->ui_settings, GS_MAX_RECENTS,
+			"u", &max_recents);
 
 	g_return_if_fail (p->recents_action_group != NULL);
 
@@ -1448,7 +1449,7 @@ toolbar_visibility_changed (GtkWidget   *toolbar,
 
 	visible = GTK_WIDGET_VISIBLE (toolbar);
 
-	g_settings_set (window->priv->ui_settings, GS_TOOLBAR_VISIBLE, visible);
+	g_settings_set (window->priv->ui_settings, GS_TOOLBAR_VISIBLE, "b", visible);
 
 	action = gtk_action_group_get_action (window->priv->always_sensitive_action_group,
 					      "ViewToolbar");
@@ -1470,7 +1471,8 @@ setup_toolbar_open_button (GeditWindow *window,
 
 	recent_manager = gtk_recent_manager_get_default ();
 	
-	g_settings_get (window->priv->ui_settings, GS_MAX_RECENTS, &max_recents);
+	g_settings_get (window->priv->ui_settings, GS_MAX_RECENTS,
+			"u", &max_recents);
 
 	/* recent files menu tool button */
 	toolbar_recent_menu = gtk_recent_chooser_menu_new_for_manager (recent_manager);
@@ -1862,7 +1864,7 @@ set_statusbar_style (GeditWindow *window,
 
 	if (origin == NULL)
 		g_settings_get (window->priv->ui_settings, GS_STATUSBAR_VISIBLE,
-				&visible);
+				"b", &visible);
 	else
 		visible = GTK_WIDGET_VISIBLE (origin->priv->statusbar);
 
@@ -1889,7 +1891,7 @@ statusbar_visibility_changed (GtkWidget   *statusbar,
 
 	visible = GTK_WIDGET_VISIBLE (statusbar);
 
-	g_settings_set (window->priv->ui_settings, GS_STATUSBAR_VISIBLE, visible);
+	g_settings_set (window->priv->ui_settings, GS_STATUSBAR_VISIBLE, "b", visible);
 
 	action = gtk_action_group_get_action (window->priv->always_sensitive_action_group,
 					      "ViewStatusbar");
@@ -2683,7 +2685,7 @@ _gedit_window_set_lockdown (GeditWindow       *window,
 
 	/* start/stop autosave in each existing tab */
 	g_settings_get (window->priv->editor_settings, GS_AUTO_SAVE,
-			&autosave);
+			"b", &autosave);
 	gtk_container_foreach (GTK_CONTAINER (window->priv->notebook),
 			       update_tab_autosave,
 			       &autosave);
@@ -3679,7 +3681,7 @@ side_panel_visibility_changed (GtkWidget   *side_panel,
 	visible = GTK_WIDGET_VISIBLE (side_panel);
 
 	g_settings_set (window->priv->ui_settings, GS_SIDE_PANE_VISIBLE,
-			visible);
+			"b", visible);
 
 	action = gtk_action_group_get_action (window->priv->panes_action_group,
 	                                      "ViewSidePane");
@@ -3733,7 +3735,7 @@ bottom_panel_visibility_changed (GeditPanel  *bottom_panel,
 	visible = GTK_WIDGET_VISIBLE (bottom_panel);
 
 	g_settings_set (window->priv->ui_settings, GS_BOTTOM_PANE_VISIBLE,
-			visible);
+			"b", visible);
 
 	action = gtk_action_group_get_action (window->priv->panes_action_group,
 					      "ViewBottomPane");
@@ -3823,9 +3825,9 @@ init_panels_visibility (GeditWindow *window)
 					    active_page);
 
 	g_settings_get (window->priv->ui_settings, GS_SIDE_PANE_VISIBLE,
-			&side_pane_visible);
+			"b", &side_pane_visible);
 	g_settings_get (window->priv->ui_settings, GS_BOTTOM_PANE_VISIBLE,
-			&bottom_pane_visible);
+			"b", &bottom_pane_visible);
 
 	if (side_pane_visible)
 	{



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