anjuta r4881 - in branches/preferences_singleton: . libanjuta plugins/build-basic-autotools plugins/cvs-plugin plugins/document-manager plugins/file-manager plugins/language-support-cpp-java plugins/macro plugins/run-program plugins/scintilla plugins/sourceview plugins/symbol-db plugins/terminal scripts src



Author: jhs
Date: Fri Mar 20 11:50:15 2009
New Revision: 4881
URL: http://svn.gnome.org/viewvc/anjuta?rev=4881&view=rev

Log:
2009-03-20  Johannes Schmid  <jhs gnome org>

	* libanjuta/anjuta-preferences.c (set_property_value_as_bool),
	(update_property_on_change_bool), (get_property),
	(register_callbacks), (connect_prop_to_object),
	(anjuta_preferences_instance_init), (gconf_notify),
	(anjuta_preferences_notify_add_int),
	(anjuta_preferences_notify_add_string),
	(anjuta_preferences_notify_add_bool):
	* libanjuta/anjuta-preferences.h:
	* plugins/build-basic-autotools/executer.c (execute_program):
	* plugins/build-basic-autotools/plugin.c
	(build_execute_command_in_context), (get_root_install_command),
	(on_update_indicators_idle):
	* plugins/cvs-plugin/cvs-interface.c
	(create_cvs_command_with_cvsroot):
	* plugins/document-manager/action-callbacks.c
	(on_editor_linenos1_activate), (on_editor_markers1_activate),
	(on_editor_codefold1_activate), (on_editor_indentguides1_activate),
	(on_editor_whitespaces1_activate), (on_editor_eolchars1_activate),
	(on_editor_linewrap1_activate):
	* plugins/document-manager/anjuta-docman.c
	(on_notebook_tab_btnrelease), (anjuta_docman_save_document_as),
	(on_notebook_switch_page), (anjuta_docman_set_current_document):
	* plugins/document-manager/plugin.c (ui_states_init),
	(on_window_key_release_event), (docman_plugin_set_tab_pos),
	(on_docman_auto_save), (on_notify_timer):
	* plugins/file-manager/Makefile.am:
	* plugins/file-manager/plugin.c (on_notify):
	* plugins/language-support-cpp-java/cpp-java-assist.c
	(on_editor_char_added), (on_assist_chosen):
	* plugins/language-support-cpp-java/plugin.c
	(on_editor_char_inserted_cpp):
	* plugins/macro/macro-util.c (get_use_tabs):
	* plugins/run-program/execute.c (run_program):
	* plugins/scintilla/print.c (anjuta_print_setup):
	* plugins/scintilla/text_editor.c (text_editor_hilite_one),
	(load_from_file), (save_to_file), (text_editor_load_file),
	(text_editor_set_line_number_width):
	* plugins/sourceview/sourceview-io.c (sourceview_io_save_as):
	* plugins/sourceview/sourceview-print.c (print_setup):
	* plugins/symbol-db/plugin.c (value_added_current_editor),
	(on_session_load), (on_scan_end_manager):
	* plugins/symbol-db/symbol-db-prefs.c
	(on_prefs_executable_changed), (sdb_prefs_init1):
	* plugins/symbol-db/symbol-db-prefs.h:
	* plugins/terminal/terminal.c (terminal_set_preferences):
	* scripts/Makefile.am:
	* src/action-callbacks.c (on_toolbar_view_toggled):
	* src/anjuta-app.c (anjuta_app_instance_init):
	* src/anjuta.c (anjuta_new):
	Fixed various plugins, especially fixed some bugs in the symbol-db plugin
	preferences


Modified:
   branches/preferences_singleton/ChangeLog
   branches/preferences_singleton/INSTALL
   branches/preferences_singleton/libanjuta/anjuta-preferences.c
   branches/preferences_singleton/libanjuta/anjuta-preferences.h
   branches/preferences_singleton/plugins/build-basic-autotools/executer.c
   branches/preferences_singleton/plugins/build-basic-autotools/plugin.c
   branches/preferences_singleton/plugins/cvs-plugin/cvs-interface.c
   branches/preferences_singleton/plugins/document-manager/action-callbacks.c
   branches/preferences_singleton/plugins/document-manager/anjuta-docman.c
   branches/preferences_singleton/plugins/document-manager/plugin.c
   branches/preferences_singleton/plugins/file-manager/Makefile.am
   branches/preferences_singleton/plugins/file-manager/plugin.c
   branches/preferences_singleton/plugins/language-support-cpp-java/cpp-java-assist.c
   branches/preferences_singleton/plugins/language-support-cpp-java/plugin.c
   branches/preferences_singleton/plugins/macro/macro-util.c
   branches/preferences_singleton/plugins/run-program/execute.c
   branches/preferences_singleton/plugins/scintilla/print.c
   branches/preferences_singleton/plugins/scintilla/text_editor.c
   branches/preferences_singleton/plugins/sourceview/sourceview-io.c
   branches/preferences_singleton/plugins/sourceview/sourceview-print.c
   branches/preferences_singleton/plugins/symbol-db/plugin.c
   branches/preferences_singleton/plugins/symbol-db/symbol-db-prefs.c
   branches/preferences_singleton/plugins/symbol-db/symbol-db-prefs.h
   branches/preferences_singleton/plugins/terminal/terminal.c
   branches/preferences_singleton/scripts/Makefile.am
   branches/preferences_singleton/src/action-callbacks.c
   branches/preferences_singleton/src/anjuta-app.c
   branches/preferences_singleton/src/anjuta.c

Modified: branches/preferences_singleton/INSTALL
==============================================================================
--- branches/preferences_singleton/INSTALL	(original)
+++ branches/preferences_singleton/INSTALL	Fri Mar 20 11:50:15 2009
@@ -2,15 +2,15 @@
 *************************
 
 Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007 Free Software Foundation, Inc.
+2006, 2007, 2008 Free Software Foundation, Inc.
 
-This file is free documentation; the Free Software Foundation gives
+   This file is free documentation; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
 
 Basic Installation
 ==================
 
-Briefly, the shell commands `./configure; make; make install' should
+   Briefly, the shell commands `./configure; make; make install' should
 configure, build, and install this package.  The following
 more-detailed instructions are generic; see the `README' file for
 instructions specific to this package.
@@ -73,9 +73,9 @@
 Compilers and Options
 =====================
 
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about.  Run `./configure --help' for
-details on some of the pertinent environment variables.
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
 
    You can give `configure' initial values for configuration parameters
 by setting variables in the command line or in the environment.  Here
@@ -88,7 +88,7 @@
 Compiling For Multiple Architectures
 ====================================
 
-You can compile the package for more than one kind of computer at the
+   You can compile the package for more than one kind of computer at the
 same time, by placing the object files for each architecture in their
 own directory.  To do this, you can use GNU `make'.  `cd' to the
 directory where you want the object files and executables to go and run
@@ -100,10 +100,24 @@
 installed the package for one architecture, use `make distclean' before
 reconfiguring for another architecture.
 
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
 Installation Names
 ==================
 
-By default, `make install' installs the package's commands under
+   By default, `make install' installs the package's commands under
 `/usr/local/bin', include files under `/usr/local/include', etc.  You
 can specify an installation prefix other than `/usr/local' by giving
 `configure' the option `--prefix=PREFIX'.
@@ -126,7 +140,7 @@
 Optional Features
 =================
 
-Some packages pay attention to `--enable-FEATURE' options to
+   Some packages pay attention to `--enable-FEATURE' options to
 `configure', where FEATURE indicates an optional part of the package.
 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
 is something like `gnu-as' or `x' (for the X Window System).  The
@@ -138,14 +152,36 @@
 you can use the `configure' options `--x-includes=DIR' and
 `--x-libraries=DIR' to specify their locations.
 
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
 Specifying the System Type
 ==========================
 
-There may be some features `configure' cannot figure out automatically,
-but needs to determine by the type of machine the package will run on.
-Usually, assuming the package is built to be run on the _same_
-architectures, `configure' can figure that out, but if it prints a
-message saying it cannot guess the machine type, give it the
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
 `--build=TYPE' option.  TYPE can either be a short name for the system
 type, such as `sun4', or a canonical name which has the form:
 
@@ -171,9 +207,9 @@
 Sharing Defaults
 ================
 
-If you want to set default values for `configure' scripts to share, you
-can create a site shell script called `config.site' that gives default
-values for variables like `CC', `cache_file', and `prefix'.
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
 `configure' looks for `PREFIX/share/config.site' if it exists, then
 `PREFIX/etc/config.site' if it exists.  Or, you can set the
 `CONFIG_SITE' environment variable to the location of the site script.
@@ -182,7 +218,7 @@
 Defining Variables
 ==================
 
-Variables not defined in a site shell script can be set in the
+   Variables not defined in a site shell script can be set in the
 environment passed to `configure'.  However, some packages may run
 configure again during the build, and the customized values of these
 variables may be lost.  In order to avoid this problem, you should set
@@ -201,11 +237,19 @@
 `configure' Invocation
 ======================
 
-`configure' recognizes the following options to control how it operates.
+   `configure' recognizes the following options to control how it
+operates.
 
 `--help'
 `-h'
-     Print a summary of the options to `configure', and exit.
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
 
 `--version'
 `-V'
@@ -232,6 +276,16 @@
      Look for the package's source code in directory DIR.  Usually
      `configure' can determine that directory automatically.
 
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *Note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
 `configure' also accepts some other, not widely useful, options.  Run
 `configure --help' for more details.
 

Modified: branches/preferences_singleton/libanjuta/anjuta-preferences.c
==============================================================================
--- branches/preferences_singleton/libanjuta/anjuta-preferences.c	(original)
+++ branches/preferences_singleton/libanjuta/anjuta-preferences.c	Fri Mar 20 11:50:15 2009
@@ -208,7 +208,7 @@
  *
  * Gets the value of @key as integer.
  *
- * Return value: Key value as integer or 0 if the key is not defined.
+ * Return value: Key value as boolean or FALSE if the key is not defined.
  */
 #ifdef __GNUC__
 inline
@@ -864,6 +864,15 @@
 	g_free (text_value);	
 }
 
+static void
+set_property_value_as_bool (AnjutaProperty *prop, gboolean value)
+{
+	gchar *text_value;
+	text_value = g_strdup_printf ("%d", value);
+	set_property_value_as_string (prop, text_value);
+	g_free (text_value);	
+}
+
 static gboolean
 update_property_on_event_str (GtkWidget *widget, GdkEvent *event,
 							  gpointer user_data)
@@ -931,6 +940,20 @@
 }
 
 static void
+update_property_on_change_bool (GtkWidget *widget, gpointer user_data)
+{
+	AnjutaPreferences *pr;
+	AnjutaProperty *p;
+	gint val;
+	
+	pr = ANJUTA_PREFERENCES (g_object_get_data (G_OBJECT (widget),
+												"AnjutaPreferences"));
+	p = (AnjutaProperty *) user_data;
+	val = get_property_value_as_int (p);
+	anjuta_preferences_set_bool (pr, p->key, val);
+}
+
+static void
 update_property_on_change_color (GtkWidget *widget, gpointer user_data)
 {
 	AnjutaPreferences *pr;
@@ -995,7 +1018,7 @@
 		gboolean gconf_value;
 		
 		gconf_value = gconf_value_get_bool (value);
-		set_property_value_as_int (p, gconf_value);
+		set_property_value_as_bool (p, gconf_value);
 	}
 	else if (p->data_type == ANJUTA_PROPERTY_DATA_TYPE_INT)
 	{
@@ -1049,7 +1072,7 @@
 			break;
 		case ANJUTA_PROPERTY_OBJECT_TYPE_TOGGLE:
 			g_signal_connect (G_OBJECT(p->object), "toggled",
-							  G_CALLBACK (update_property_on_change_int), p);
+							  G_CALLBACK (update_property_on_change_bool), p);
 			break;
 		case ANJUTA_PROPERTY_OBJECT_TYPE_COLOR:
 			g_signal_connect (G_OBJECT(p->object), "color-set",
@@ -1101,13 +1124,18 @@
 	int gconf_value;
 	gchar *value;
 	
-	if (p->data_type == ANJUTA_PROPERTY_DATA_TYPE_BOOL ||
-		p->data_type == ANJUTA_PROPERTY_DATA_TYPE_INT)
+	if (p->data_type == ANJUTA_PROPERTY_DATA_TYPE_BOOL)
 	{	
+		gconf_value = anjuta_preferences_get_bool (pr, p->key);
+		value = g_strdup_printf ("%d", gconf_value);
+		set_property_value_as_string (p, value);
+	}
+	else if (p->data_type == ANJUTA_PROPERTY_DATA_TYPE_INT)
+	{
 		gconf_value = anjuta_preferences_get_int (pr, p->key);
 		value = g_strdup_printf ("%d", gconf_value);
 		set_property_value_as_string (p, value);
-	} 
+    }
 	else 
 	{
 		value = anjuta_preferences_get (pr, p->key);
@@ -1753,7 +1781,7 @@
 												  (GDestroyNotify) property_destroy);
 	pr->priv->notifications = g_hash_table_new_full (g_int_hash,
 	                                                 g_int_equal,
-	                                                 NULL, 
+	                                                 g_free, 
 	                                                 NULL);
 	
 	pr->priv->gclient = gconf_client_get_default();
@@ -1828,7 +1856,8 @@
 	AnjutaPreferences* prefs = anjuta_preferences_default();
 	gpointer notify =
 		g_hash_table_lookup (prefs->priv->notifications,
-		                     GUINT_TO_POINTER(id));
+		                     &id);
+	
 	if (entry->value)
 	{
 		const gchar* real_key = unbuild_key (entry->key);
@@ -1868,14 +1897,14 @@
                                    gpointer data,
                                    GFreeFunc destroy_notify)
 {
-	guint id;
-	id = gconf_client_notify_add (pr->priv->gclient,
+	guint* id = g_new0 (guint, 1);
+	*id = gconf_client_notify_add (pr->priv->gclient,
 	                              build_key (key),
 	                              (GConfClientNotifyFunc) gconf_notify, data, destroy_notify, NULL);
 	g_hash_table_insert (pr->priv->notifications,
 	                     id,
 	                     func);
-	return id;
+	return *id;
 }
 
 /**
@@ -1899,14 +1928,14 @@
                                       gpointer data,
                                       GFreeFunc destroy_notify)
 {
-	guint id;
-	id = gconf_client_notify_add (pr->priv->gclient,
+	guint* id = g_new0 (guint, 1);
+	*id = gconf_client_notify_add (pr->priv->gclient,
 	                              build_key (key),
 	                              (GConfClientNotifyFunc)gconf_notify, data, destroy_notify, NULL);
 	g_hash_table_insert (pr->priv->notifications,
 	                     id,
 	                     func);
-	return id;
+	return *id;
 }
 
 guint 
@@ -1916,14 +1945,14 @@
                                     gpointer data,
                                     GFreeFunc destroy_notify)
 {
-	guint id;
-	id = gconf_client_notify_add (pr->priv->gclient,
+	guint* id = g_new0 (guint, 1);
+	*id = gconf_client_notify_add (pr->priv->gclient,
 	                              build_key (key),
 	                              (GConfClientNotifyFunc)gconf_notify, data, destroy_notify, NULL);
 	g_hash_table_insert (pr->priv->notifications,
 	                     id,
 	                     func);
-	return id;
+	return *id;
 }
 
 

Modified: branches/preferences_singleton/libanjuta/anjuta-preferences.h
==============================================================================
--- branches/preferences_singleton/libanjuta/anjuta-preferences.h	(original)
+++ branches/preferences_singleton/libanjuta/anjuta-preferences.h	Fri Mar 20 11:50:15 2009
@@ -199,7 +199,6 @@
                                             gpointer data);
 typedef void (*AnjutaPreferencesNotifyBool) (AnjutaPreferences *pr,
                                              const gchar* key,
-
                                              gboolean value,
                                              gpointer data);
 

Modified: branches/preferences_singleton/plugins/build-basic-autotools/executer.c
==============================================================================
--- branches/preferences_singleton/plugins/build-basic-autotools/executer.c	(original)
+++ branches/preferences_singleton/plugins/build-basic-autotools/executer.c	Fri Mar 20 11:50:15 2009
@@ -370,7 +370,7 @@
 	else
 		cmd = g_strdup (target);
 
-	if (anjuta_preferences_get_int (prefs , PREF_USE_SB))
+	if (anjuta_preferences_get_bool (prefs , PREF_USE_SB))
 	{
 		const gchar* sb_path = anjuta_preferences_get(prefs, PREF_SB_PATH);
 		/* we need to skip the /scratchbox/users part, maybe could be done more clever */

Modified: branches/preferences_singleton/plugins/build-basic-autotools/plugin.c
==============================================================================
--- branches/preferences_singleton/plugins/build-basic-autotools/plugin.c	(original)
+++ branches/preferences_singleton/plugins/build-basic-autotools/plugin.c	Fri Mar 20 11:50:15 2009
@@ -1241,17 +1241,17 @@
 	/* Send options to make */
 	if (strcmp (build_program_get_basename (context->program), "make") == 0)
 	{
-		if (!anjuta_preferences_get_int (prefs , PREF_TRANSLATE_MESSAGE))
+		if (!anjuta_preferences_get_bool (prefs , PREF_TRANSLATE_MESSAGE))
 		{
 			build_program_add_env (context->program, "LANGUAGE", "C");
 		}
-		if (anjuta_preferences_get_int (prefs , PREF_PARALLEL_MAKE))
+		if (anjuta_preferences_get_bool (prefs , PREF_PARALLEL_MAKE))
 		{
 			gchar *arg = g_strdup_printf ("-j%d", anjuta_preferences_get_int (prefs , PREF_PARALLEL_MAKE_JOB));
 			build_program_insert_arg (context->program, 1, arg);
 			g_free (arg);
 		}
-		if (anjuta_preferences_get_int (prefs , PREF_CONTINUE_ON_ERROR))
+		if (anjuta_preferences_get_bool (prefs , PREF_CONTINUE_ON_ERROR))
 		{
 			build_program_insert_arg (context->program, 1, "-k");
 		}
@@ -1489,7 +1489,7 @@
 {
 	AnjutaPlugin* plugin = ANJUTA_PLUGIN(bplugin);
 	AnjutaPreferences* prefs = anjuta_shell_get_preferences (plugin->shell, NULL);
-	if (anjuta_preferences_get_int (prefs , PREF_INSTALL_ROOT))
+	if (anjuta_preferences_get_bool (prefs , PREF_INSTALL_ROOT))
 	{
 		gchar* command = anjuta_preferences_get(prefs, PREF_INSTALL_ROOT_COMMAND);
 		if (command != NULL)
@@ -2765,7 +2765,7 @@
 	/* If indicators are not yet updated in the editor, do it */
 	if (ba_plugin->current_editor_filename &&
 		IANJUTA_IS_INDICABLE (editor) &&
-		anjuta_preferences_get_int (anjuta_shell_get_preferences (plugin->shell,
+		anjuta_preferences_get_bool (anjuta_shell_get_preferences (plugin->shell,
 																  NULL),
 									PREF_INDICATORS_AUTOMATIC))
 	{

Modified: branches/preferences_singleton/plugins/cvs-plugin/cvs-interface.c
==============================================================================
--- branches/preferences_singleton/plugins/cvs-plugin/cvs-interface.c	(original)
+++ branches/preferences_singleton/plugins/cvs-plugin/cvs-interface.c	Fri Mar 20 11:50:15 2009
@@ -45,7 +45,7 @@
 	
 	cvs = anjuta_preferences_get(prefs, "cvs.path");
 	compression = anjuta_preferences_get_int(prefs, "cvs.compression");
-	ignorerc = anjuta_preferences_get_int(prefs, "cvs.ignorerc");
+	ignorerc = anjuta_preferences_get_bool(prefs, "cvs.ignorerc");
 	if (compression && ignorerc)
 		global_options = g_strdup_printf("-f -z%d", compression);
 	else if (compression)

Modified: branches/preferences_singleton/plugins/document-manager/action-callbacks.c
==============================================================================
--- branches/preferences_singleton/plugins/document-manager/action-callbacks.c	(original)
+++ branches/preferences_singleton/plugins/document-manager/action-callbacks.c	Fri Mar 20 11:50:15 2009
@@ -710,7 +710,7 @@
 	DocmanPlugin *plugin;
 	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
 	state = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
-	anjuta_preferences_set_int (plugin->prefs,
+	anjuta_preferences_set_bool (plugin->prefs,
 								VIEW_LINENUMBERS_MARGIN, state);
 }
 
@@ -721,7 +721,7 @@
 	DocmanPlugin *plugin;
 	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
 	state = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
-	anjuta_preferences_set_int (plugin->prefs,
+	anjuta_preferences_set_bool (plugin->prefs,
 								VIEW_MARKER_MARGIN, state);
 }
 
@@ -732,7 +732,7 @@
 	DocmanPlugin *plugin;
 	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
 	state = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
-	anjuta_preferences_set_int (plugin->prefs,
+	anjuta_preferences_set_bool (plugin->prefs,
 								VIEW_FOLD_MARGIN, state);
 }
 
@@ -743,7 +743,7 @@
 	DocmanPlugin *plugin;
 	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
 	state = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
-	anjuta_preferences_set_int (plugin->prefs,
+	anjuta_preferences_set_bool (plugin->prefs,
 								VIEW_INDENTATION_GUIDES, state);
 }
 
@@ -754,7 +754,7 @@
 	DocmanPlugin *plugin;
 	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
 	state = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
-	anjuta_preferences_set_int (plugin->prefs,
+	anjuta_preferences_set_bool (plugin->prefs,
 								VIEW_WHITE_SPACES, state);
 }
 
@@ -765,7 +765,7 @@
 	DocmanPlugin *plugin;
 	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
 	state = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
-	anjuta_preferences_set_int (plugin->prefs,
+	anjuta_preferences_set_bool (plugin->prefs,
 								VIEW_EOL, state);
 }
 
@@ -776,7 +776,7 @@
 	DocmanPlugin *plugin;
 	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
 	state = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
-	anjuta_preferences_set_int (plugin->prefs,
+	anjuta_preferences_set_bool (plugin->prefs,
 								VIEW_LINE_WRAP, state);
 }
 

Modified: branches/preferences_singleton/plugins/document-manager/anjuta-docman.c
==============================================================================
--- branches/preferences_singleton/plugins/document-manager/anjuta-docman.c	(original)
+++ branches/preferences_singleton/plugins/document-manager/anjuta-docman.c	Fri Mar 20 11:50:15 2009
@@ -297,7 +297,7 @@
 {
 	docman->priv->tab_pressed = FALSE;
 
-	if (anjuta_preferences_get_int (docman->priv->preferences, EDITOR_TABS_RECENT_FIRST))
+	if (anjuta_preferences_get_bool (docman->priv->preferences, EDITOR_TABS_RECENT_FIRST))
 	{
 		GList *node;
 
@@ -685,7 +685,7 @@
 		ianjuta_file_savable_save_as (IANJUTA_FILE_SAVABLE (doc), file, NULL);
 	}
 	
-	if (anjuta_preferences_get_int (ANJUTA_PREFERENCES (docman->priv->preferences),
+	if (anjuta_preferences_get_bool (ANJUTA_PREFERENCES (docman->priv->preferences),
 									EDITOR_TABS_ORDERING))
 		anjuta_docman_order_tabs (docman);
 
@@ -901,8 +901,8 @@
 		 */
 		if (!docman->priv->tab_pressed	/* after a tab-click, sorting is done upon release */
 			&& !g_tabbing
-			&& !anjuta_preferences_get_int (docman->priv->preferences, EDITOR_TABS_ORDERING)
-			&& anjuta_preferences_get_int (docman->priv->preferences, EDITOR_TABS_RECENT_FIRST))
+			&& !anjuta_preferences_get_bool (docman->priv->preferences, EDITOR_TABS_ORDERING)
+			&& anjuta_preferences_get_bool (docman->priv->preferences, EDITOR_TABS_RECENT_FIRST))
 		{
 			gtk_notebook_reorder_child (notebook, page->widget, 0);
 		}
@@ -1166,7 +1166,7 @@
 											  page->widget);
 			gtk_notebook_set_current_page (GTK_NOTEBOOK (docman), page_num);
 
-			if (anjuta_preferences_get_int (ANJUTA_PREFERENCES (docman->priv->preferences),
+			if (anjuta_preferences_get_bool (ANJUTA_PREFERENCES (docman->priv->preferences),
 											EDITOR_TABS_ORDERING))
 				anjuta_docman_order_tabs (docman);
 

Modified: branches/preferences_singleton/plugins/document-manager/plugin.c
==============================================================================
--- branches/preferences_singleton/plugins/document-manager/plugin.c	(original)
+++ branches/preferences_singleton/plugins/document-manager/plugin.c	Fri Mar 20 11:50:15 2009
@@ -577,7 +577,7 @@
 		GtkAction *action;
 		gboolean state;
 		
-		state = anjuta_preferences_get_int (eplugin->prefs, prefs[i]);
+		state = anjuta_preferences_get_bool (eplugin->prefs, prefs[i]);
 		action = anjuta_ui_get_action (eplugin->ui, "ActionGroupEditorView",
 									   actions_view[i].name);
 		gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), state);
@@ -1326,7 +1326,7 @@
 		gint cur_page;
 		plugin->g_tabbing = FALSE;
 		
-		if (anjuta_preferences_get_int (plugin->prefs,
+		if (anjuta_preferences_get_bool (plugin->prefs,
 										EDITOR_TABS_RECENT_FIRST))
 		{
 			/*
@@ -1450,8 +1450,8 @@
 static void
 docman_plugin_set_tab_pos (DocmanPlugin *ep)
 {
-	if (anjuta_preferences_get_int_with_default (ep->prefs, EDITOR_TABS_HIDE,
-												 1))
+	if (anjuta_preferences_get_bool_with_default (ep->prefs, EDITOR_TABS_HIDE,
+												 TRUE))
 	{
 		gtk_notebook_set_show_tabs (GTK_NOTEBOOK (ep->docman), FALSE);
 	}
@@ -1505,7 +1505,7 @@
 		return FALSE;
 
 	prefs = anjuta_shell_get_preferences (docman->shell, NULL);
-	if (anjuta_preferences_get_int (prefs, SAVE_AUTOMATIC) == FALSE)
+	if (anjuta_preferences_get_bool (prefs, SAVE_AUTOMATIC) == FALSE)
 	{
 		plugin->autosave_on = FALSE;
 		return FALSE;
@@ -1568,7 +1568,7 @@
 	docman = ANJUTA_DOCMAN (plugin->docman);
 	
 	auto_save_timer = anjuta_preferences_get_int(prefs, AUTOSAVE_TIMER);
-	auto_save = anjuta_preferences_get_int(prefs, SAVE_AUTOMATIC);
+	auto_save = anjuta_preferences_get_bool(prefs, SAVE_AUTOMATIC);
 	
 	if (auto_save)
 	{

Modified: branches/preferences_singleton/plugins/file-manager/Makefile.am
==============================================================================
--- branches/preferences_singleton/plugins/file-manager/Makefile.am	(original)
+++ branches/preferences_singleton/plugins/file-manager/Makefile.am	Fri Mar 20 11:50:15 2009
@@ -69,7 +69,10 @@
 	        --prefix=file_view_cclosure_marshal file-view-marshal.list --body >> xgen-gmc \
 	&& cp xgen-gmc $(@F) \
 	&& rm -f xgen-gmc	
-	
+
+prefs_glade_files = file-manager.glade
+include $(top_srcdir)/scripts/build-schemas.mk
+
 EXTRA_DIST = \
 	$(plugin_in_files) \
 	$(file_manager_plugin_DATA) \

Modified: branches/preferences_singleton/plugins/file-manager/plugin.c
==============================================================================
--- branches/preferences_singleton/plugins/file-manager/plugin.c	(original)
+++ branches/preferences_singleton/plugins/file-manager/plugin.c	Fri Mar 20 11:50:15 2009
@@ -267,10 +267,10 @@
 	GtkTreeModel* file_model = gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT(sort_model));
 	
 	g_object_set (G_OBJECT (file_model),
-				  "filter_binary", anjuta_preferences_get_int (file_manager->prefs, PREF_FILTER_BINARY),
-				  "filter_hidden", anjuta_preferences_get_int (file_manager->prefs, PREF_FILTER_HIDDEN),
-				  "filter_backup", anjuta_preferences_get_int (file_manager->prefs, PREF_FILTER_BACKUP),
-				  "filter_unversioned", anjuta_preferences_get_int (file_manager->prefs, PREF_FILTER_UNVERSIONED), NULL);
+				  "filter_binary", anjuta_preferences_get_bool (file_manager->prefs, PREF_FILTER_BINARY),
+				  "filter_hidden", anjuta_preferences_get_bool (file_manager->prefs, PREF_FILTER_HIDDEN),
+				  "filter_backup", anjuta_preferences_get_bool (file_manager->prefs, PREF_FILTER_BACKUP),
+				  "filter_unversioned", anjuta_preferences_get_bool (file_manager->prefs, PREF_FILTER_UNVERSIONED), NULL);
 	file_view_refresh (file_manager->fv);
 }
 

Modified: branches/preferences_singleton/plugins/language-support-cpp-java/cpp-java-assist.c
==============================================================================
--- branches/preferences_singleton/plugins/language-support-cpp-java/cpp-java-assist.c	(original)
+++ branches/preferences_singleton/plugins/language-support-cpp-java/cpp-java-assist.c	Fri Mar 20 11:50:15 2009
@@ -875,12 +875,12 @@
 					  gchar ch, CppJavaAssist *assist)
 {
 	gboolean enable_complete =
-		anjuta_preferences_get_int_with_default (assist->priv->preferences,
+		anjuta_preferences_get_bool_with_default (assist->priv->preferences,
 												 PREF_AUTOCOMPLETE_ENABLE,
 												 TRUE);
 	
 	gboolean enable_calltips =
-		anjuta_preferences_get_int_with_default (assist->priv->preferences,
+		anjuta_preferences_get_bool_with_default (assist->priv->preferences,
 												 PREF_CALLTIP_ENABLE,
 												 TRUE);
 	cpp_java_assist_check (assist, enable_complete, enable_calltips);
@@ -919,11 +919,11 @@
 	if (tag->is_func)
 	{
 		add_space_after_func =
-			anjuta_preferences_get_int_with_default (assist->priv->preferences,
+			anjuta_preferences_get_bool_with_default (assist->priv->preferences,
 													 PREF_AUTOCOMPLETE_SPACE_AFTER_FUNC,
 													 TRUE);
 		add_brace_after_func =
-			anjuta_preferences_get_int_with_default (assist->priv->preferences,
+			anjuta_preferences_get_bool_with_default (assist->priv->preferences,
 													 PREF_AUTOCOMPLETE_BRACE_AFTER_FUNC,
 													 TRUE);
 		if (add_space_after_func)

Modified: branches/preferences_singleton/plugins/language-support-cpp-java/plugin.c
==============================================================================
--- branches/preferences_singleton/plugins/language-support-cpp-java/plugin.c	(original)
+++ branches/preferences_singleton/plugins/language-support-cpp-java/plugin.c	Fri Mar 20 11:50:15 2009
@@ -1392,7 +1392,7 @@
 	iter = ianjuta_iterable_clone (insert_pos, NULL);
 	
 	/* If autoindent is enabled*/
-	if (anjuta_preferences_get_int (plugin->prefs, PREF_INDENT_AUTOMATIC))
+	if (anjuta_preferences_get_bool (plugin->prefs, PREF_INDENT_AUTOMATIC))
 	{
 	
 		/* DEBUG_PRINT ("Char added at position %d: '%c'", insert_pos, ch); */	
@@ -1457,7 +1457,7 @@
 		}
 	}
 	
-	if (anjuta_preferences_get_int (plugin->prefs, PREF_BRACE_AUTOCOMPLETION))
+	if (anjuta_preferences_get_bool (plugin->prefs, PREF_BRACE_AUTOCOMPLETION))
 	{
 		if (ch == '[' || ch == '(')
 		{

Modified: branches/preferences_singleton/plugins/macro/macro-util.c
==============================================================================
--- branches/preferences_singleton/plugins/macro/macro-util.c	(original)
+++ branches/preferences_singleton/plugins/macro/macro-util.c	Fri Mar 20 11:50:15 2009
@@ -148,7 +148,7 @@
 	gchar *ut;
 	
 	prefs = anjuta_shell_get_preferences ((ANJUTA_PLUGIN(plugin))->shell, NULL);
-	if (anjuta_preferences_get_int (prefs, "use.tabs"))
+	if (anjuta_preferences_get_bool (prefs, "use.tabs"))
 		ut = g_strdup("indent-tabs: t");
 	else
 		ut = g_strdup("");

Modified: branches/preferences_singleton/plugins/run-program/execute.c
==============================================================================
--- branches/preferences_singleton/plugins/run-program/execute.c	(original)
+++ branches/preferences_singleton/plugins/run-program/execute.c	Fri Mar 20 11:50:15 2009
@@ -411,7 +411,7 @@
 
 	/* Take care of scratchbox */
 	prefs = anjuta_shell_get_preferences (ANJUTA_PLUGIN(plugin)->shell, NULL);
-	if (anjuta_preferences_get_int (prefs , PREF_USE_SB))
+	if (anjuta_preferences_get_bool (prefs , PREF_USE_SB))
 	{
 		const gchar* sb_path = anjuta_preferences_get(prefs, PREF_SB_PATH);
 		/* we need to skip the /scratchbox/users part, maybe could be done more clever */

Modified: branches/preferences_singleton/plugins/scintilla/print.c
==============================================================================
--- branches/preferences_singleton/plugins/scintilla/print.c	(original)
+++ branches/preferences_singleton/plugins/scintilla/print.c	Fri Mar 20 11:50:15 2009
@@ -919,13 +919,13 @@
 	
 	/* Set preferences */
 	pji->print_line_numbers =
-		anjuta_preferences_get_int_with_default (p, PRINT_LINENUM_COUNT, 1);
+		anjuta_preferences_get_bool_with_default (p, PRINT_LINENUM_COUNT, 1);
 	pji->print_header =
-		anjuta_preferences_get_int_with_default (p, PRINT_HEADER, 1);
+		anjuta_preferences_get_bool_with_default (p, PRINT_HEADER, 1);
 	pji->print_color =
-		anjuta_preferences_get_int_with_default (p, PRINT_COLOR, 1);
+		anjuta_preferences_get_bool_with_default (p, PRINT_COLOR, 1);
 	pji->wrapping =
-		anjuta_preferences_get_int_with_default (p, PRINT_WRAP, 1);
+		anjuta_preferences_get_bool_with_default (p, PRINT_WRAP, 1);
 	pji->tab_width =
 		anjuta_preferences_get_int_with_default (p, TAB_SIZE, 8);
 	pji->zoom_factor = anjuta_preferences_get_int (te->preferences,

Modified: branches/preferences_singleton/plugins/scintilla/text_editor.c
==============================================================================
--- branches/preferences_singleton/plugins/scintilla/text_editor.c	(original)
+++ branches/preferences_singleton/plugins/scintilla/text_editor.c	Fri Mar 20 11:50:15 2009
@@ -671,7 +671,7 @@
 {
 	/* If syntax highlighting is disabled ... */
 	if (override_by_pref &&
-		anjuta_preferences_get_int (ANJUTA_PREFERENCES (te->preferences),
+		anjuta_preferences_get_bool (ANJUTA_PREFERENCES (te->preferences),
 									DISABLE_SYNTAX_HILIGHTING))
 	{
 		aneditor_command (editor_id, ANE_SETHILITE, (glong) "plain.txt", 0);
@@ -1406,7 +1406,7 @@
 		/* DEBUG_PRINT ("File size and loaded size not matching"); */
 	}
 	dos_filter = 
-		anjuta_preferences_get_int (ANJUTA_PREFERENCES (te->preferences),
+		anjuta_preferences_get_bool (ANJUTA_PREFERENCES (te->preferences),
 									DOS_EOL_CHECK);
 	
 	/* Set editor mode */
@@ -1528,7 +1528,7 @@
 		}				
 		
 		/* Strip trailing spaces */
-		strip = anjuta_preferences_get_int (te->preferences,
+		strip = anjuta_preferences_get_bool (te->preferences,
 											STRIP_TRAILING_SPACES);
 		if (strip)
 		{
@@ -1540,7 +1540,7 @@
 			data[size] = '\n';
 			++ size;
 		}
-		dos_filter = anjuta_preferences_get_int (te->preferences,
+		dos_filter = anjuta_preferences_get_bool (te->preferences,
 												 DOS_EOL_CHECK);
 		editor_mode =  scintilla_send_message (SCINTILLA (te->scintilla),
 											   SCI_GETEOLMODE, 0, 0);
@@ -1607,7 +1607,7 @@
 	scintilla_send_message (SCINTILLA (te->scintilla),
 							SCI_EMPTYUNDOBUFFER, 0, 0);
 	text_editor_set_hilite_type (te, NULL);
-	if (anjuta_preferences_get_int (te->preferences, FOLD_ON_OPEN))
+	if (anjuta_preferences_get_bool (te->preferences, FOLD_ON_OPEN))
 	{
 		aneditor_command (te->editor_id, ANE_CLOSE_FOLDALL, 0, 0);
 	}
@@ -2060,8 +2060,8 @@
 text_editor_set_line_number_width (TextEditor* te)
 {
 	/* Set line numbers with according to file size */
-	if (anjuta_preferences_get_int_with_default(te->preferences,
-			"margin.linenumber.visible", 0))
+	if (anjuta_preferences_get_bool_with_default(te->preferences,
+			"margin.linenumber.visible", FALSE))
 	{
 		int lines, line_number_width;
 		gchar* line_number;

Modified: branches/preferences_singleton/plugins/sourceview/sourceview-io.c
==============================================================================
--- branches/preferences_singleton/plugins/sourceview/sourceview-io.c	(original)
+++ branches/preferences_singleton/plugins/sourceview/sourceview-io.c	Fri Mar 20 11:50:15 2009
@@ -286,7 +286,7 @@
 	
 	cancel_monitor (sio);
 	
-	backup = anjuta_preferences_get_int_with_default (sio->sv->priv->prefs,
+	backup = anjuta_preferences_get_bool_with_default (sio->sv->priv->prefs,
 													  "sourceview.backup", TRUE);
 	
 	output_stream = g_file_replace (file, NULL, backup, G_FILE_CREATE_NONE,

Modified: branches/preferences_singleton/plugins/sourceview/sourceview-print.c
==============================================================================
--- branches/preferences_singleton/plugins/sourceview/sourceview-print.c	(original)
+++ branches/preferences_singleton/plugins/sourceview/sourceview-print.c	Fri Mar 20 11:50:15 2009
@@ -98,8 +98,8 @@
 																						 GTK_WRAP_NONE);
 	
 	gtk_source_print_compositor_set_print_line_numbers (compositor,
-																											anjuta_preferences_get_int (sv->priv->prefs,
-																																									PRINT_LINENUMBERS));
+																											anjuta_preferences_get_bool (sv->priv->prefs,
+																											                             PRINT_LINENUMBERS));
 	
 	gtk_source_print_compositor_set_header_format (compositor,
 																								 TRUE,
@@ -114,15 +114,15 @@
 																								 "Page %N/%Q");
 	
 	gtk_source_print_compositor_set_print_header (compositor,
-																								anjuta_preferences_get_int (sv->priv->prefs,
+																								anjuta_preferences_get_bool (sv->priv->prefs,
 																																						PRINT_HEADER));
 	gtk_source_print_compositor_set_print_footer (compositor,
-																								anjuta_preferences_get_int (sv->priv->prefs,
-																																						PRINT_HEADER));
+																								anjuta_preferences_get_bool (sv->priv->prefs,
+																																						PRINT_FOOTER));
 	
 	
 	gtk_source_print_compositor_set_highlight_syntax (compositor,
-																										anjuta_preferences_get_int (sv->priv->prefs,
+																										anjuta_preferences_get_bool (sv->priv->prefs,
 																																								PRINT_HIGHLIGHT)),
 	
 	operation = gtk_print_operation_new ();

Modified: branches/preferences_singleton/plugins/symbol-db/plugin.c
==============================================================================
--- branches/preferences_singleton/plugins/symbol-db/plugin.c	(original)
+++ branches/preferences_singleton/plugins/symbol-db/plugin.c	Fri Mar 20 11:50:15 2009
@@ -22,8 +22,6 @@
  * 	Boston, MA  02110-1301, USA.
  */
 
-
-
 #include <config.h>
 #include <gio/gio.h>
 #include <libanjuta/anjuta-shell.h>
@@ -673,7 +671,7 @@
 	g_free (local_path);
 	
 	/* add a default timeout to the updating of buffer symbols */	
-	tags_update = anjuta_preferences_get_int (sdb_plugin->prefs, BUFFER_AUTOSCAN);
+	tags_update = anjuta_preferences_get_bool (sdb_plugin->prefs, BUFFER_AUTOSCAN);
 				
 	if (tags_update)
 		sdb_plugin->buf_update_timeout_id = 
@@ -1694,7 +1692,7 @@
 		if (sdb_plugin->session_packages == NULL)
 		{
 			/* hey, does user want to import system sources for this project? */
-			gboolean automatic_scan = anjuta_preferences_get_int (sdb_plugin->prefs, 
+			gboolean automatic_scan = anjuta_preferences_get_bool (sdb_plugin->prefs, 
 																  PROJECT_AUTOSCAN);
 			
 			if (automatic_scan == TRUE)
@@ -1704,7 +1702,7 @@
 		}
 		
 		/* get preferences about the parallel scan */
-		gboolean parallel_scan = anjuta_preferences_get_int (sdb_plugin->prefs, 
+		gboolean parallel_scan = anjuta_preferences_get_bool (sdb_plugin->prefs, 
 															 PARALLEL_SCAN); 
 		
 		if (parallel_scan == TRUE && 
@@ -2016,7 +2014,7 @@
 										  sdb_plugin);
 			
 			/* get preferences about the parallel scan */
-			gboolean parallel_scan = anjuta_preferences_get_int (sdb_plugin->prefs, 
+			gboolean parallel_scan = anjuta_preferences_get_bool (sdb_plugin->prefs, 
 														 PARALLEL_SCAN); 
 			
 			do_check_languages_count (sdb_plugin);

Modified: branches/preferences_singleton/plugins/symbol-db/symbol-db-prefs.c
==============================================================================
--- branches/preferences_singleton/plugins/symbol-db/symbol-db-prefs.c	(original)
+++ branches/preferences_singleton/plugins/symbol-db/symbol-db-prefs.c	Fri Mar 20 11:50:15 2009
@@ -106,7 +106,7 @@
 	if (new_file != NULL) 
 	{
 		GtkWidget *fchooser;
-		fchooser = 	glade_xml_get_widget (priv->prefs_gxml, CTAGS_PREFS_KEY);	
+		fchooser = 	glade_xml_get_widget (priv->prefs_gxml, CTAGS_PREFS);	
 		/*gtk_widget_set_sensitive (fchooser, TRUE);*/
 		
 		anjuta_preferences_set (priv->prefs, CTAGS_PREFS_KEY,
@@ -351,65 +351,15 @@
 }
 
 static void
-on_autoscan_button_toggled (GtkToggleButton *togglebutton, SymbolDBPrefs *sdbp)
-{
-	SymbolDBPrefsPriv *priv;	
-	gboolean check_button_value;
-	priv = sdbp->priv;
-	GtkWidget *check_button;
-	
-	check_button = glade_xml_get_widget (priv->prefs_gxml, PROJECT_AUTOSCAN);
-
-	check_button_value =  gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_button));
-	DEBUG_PRINT ("%s", "on_check_button_toggled ()");
-	anjuta_preferences_set_int (priv->prefs, PROJECT_AUTOSCAN, check_button_value);
-
-}
-
-static void
-on_update_button_toggled (GtkToggleButton *togglebutton, SymbolDBPrefs *sdbp)
-{
-	SymbolDBPrefsPriv *priv;	
-	gboolean update_button_value;
-	priv = sdbp->priv;
-	GtkWidget *update_button;
-	
-	update_button = glade_xml_get_widget (priv->prefs_gxml, BUFFER_AUTOSCAN);
-
-	update_button_value =  gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (update_button));
-	DEBUG_PRINT ("%s", "on_update_button_toggled ()");
-	anjuta_preferences_set_int (priv->prefs, BUFFER_AUTOSCAN, update_button_value);	
-
-	g_signal_emit (sdbp, signals[BUFFER_UPDATE_TOGGLED], 0, update_button_value);
-}
-
-static void
-on_parallel_button_toggled (GtkToggleButton *togglebutton, SymbolDBPrefs *sdbp)
-{
-	SymbolDBPrefsPriv *priv;	
-	gboolean parallel_button_value;
-	priv = sdbp->priv;
-	GtkWidget *parallel_button;
-	
-	parallel_button = glade_xml_get_widget (priv->prefs_gxml, PARALLEL_SCAN);
-
-	parallel_button_value =  gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (parallel_button));
-	DEBUG_PRINT ("%s", "on_parallel_button_toggled ()");
-	anjuta_preferences_set_int (priv->prefs, PARALLEL_SCAN, parallel_button_value);	
-}
-
-static void
 sdb_prefs_init1 (SymbolDBPrefs *sdbp)
 {
 	SymbolDBPrefsPriv *priv;
 	GtkWidget *fchooser;
-	GtkWidget *check_button, *update_button, *parallel_button;
-	gboolean check_button_value, update_button_value, parallel_button_value;
 	gchar *ctags_value;
 
 	priv = sdbp->priv;
 
-	fchooser = 	glade_xml_get_widget (priv->prefs_gxml, CTAGS_PREFS_KEY);
+	fchooser = 	glade_xml_get_widget (priv->prefs_gxml, CTAGS_PREFS);
 	/* we will reactivate it after the listall has been finished */
 	/*gtk_widget_set_sensitive (fchooser, FALSE);*/
 			
@@ -451,25 +401,6 @@
 	                                                              CTAGS_PREFS_KEY, 
 	                                                              on_notify_prefs, 
 	                                                              priv->prefs, NULL);
-
-	
-	check_button = glade_xml_get_widget (priv->prefs_gxml, PROJECT_AUTOSCAN);
-	g_signal_connect (G_OBJECT (check_button), "toggled", 
-					  G_CALLBACK (on_autoscan_button_toggled), sdbp);
-	check_button_value = anjuta_preferences_get_int (priv->prefs, PROJECT_AUTOSCAN);
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_button), check_button_value);
-
-	update_button = glade_xml_get_widget (priv->prefs_gxml, BUFFER_AUTOSCAN);
-	g_signal_connect (G_OBJECT (update_button), "toggled", 
-					  G_CALLBACK (on_update_button_toggled), sdbp);
-	update_button_value = anjuta_preferences_get_int (priv->prefs, BUFFER_AUTOSCAN);
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (update_button), update_button_value);
-	
-	parallel_button	= glade_xml_get_widget (priv->prefs_gxml, PARALLEL_SCAN);
-	g_signal_connect (G_OBJECT (parallel_button), "toggled", 
-					  G_CALLBACK (on_parallel_button_toggled), sdbp);
-	parallel_button_value = anjuta_preferences_get_int (priv->prefs, PARALLEL_SCAN);
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (parallel_button), parallel_button_value);
 	
 	g_free (ctags_value);
 }

Modified: branches/preferences_singleton/plugins/symbol-db/symbol-db-prefs.h
==============================================================================
--- branches/preferences_singleton/plugins/symbol-db/symbol-db-prefs.h	(original)
+++ branches/preferences_singleton/plugins/symbol-db/symbol-db-prefs.h	Fri Mar 20 11:50:15 2009
@@ -40,10 +40,11 @@
 #include "symbol-db-system.h"
 
 
-#define CTAGS_PREFS_KEY		"preferences_entry:text:/usr/bin/ctags:0:symboldb.ctags"
-#define PROJECT_AUTOSCAN	"preferences_toggle:bool:1:1:symboldb.scan_prj_pkgs"
-#define PARALLEL_SCAN		"preferences_toggle:bool:1:1:symboldb.parallel_scan"
-#define BUFFER_AUTOSCAN		"preferences_toggle:bool:1:1:symboldb.buffer_update"
+#define CTAGS_PREFS			 "preferences_entry:text:/usr/bin/ctags:0:symboldb.ctags"
+#define CTAGS_PREFS_KEY		 "symboldb.ctags"
+#define PROJECT_AUTOSCAN	 "symboldb.scan_prj_pkgs"
+#define PARALLEL_SCAN		 "symboldb.parallel_scan"
+#define BUFFER_AUTOSCAN		 "symboldb.buffer_update"
 
 struct _SymbolDBPrefsClass
 {

Modified: branches/preferences_singleton/plugins/terminal/terminal.c
==============================================================================
--- branches/preferences_singleton/plugins/terminal/terminal.c	(original)
+++ branches/preferences_singleton/plugins/terminal/terminal.c	Fri Mar 20 11:50:15 2009
@@ -145,7 +145,7 @@
 	g_return_if_fail (client != NULL);
 	
 	/* Update the currently available list of terminal profiles */
-	setting = anjuta_preferences_get_int (pref,
+	setting = anjuta_preferences_get_bool (pref,
 										  PREFS_TERMINAL_PROFILE_USE_DEFAULT);
 	if (setting)
 	{

Modified: branches/preferences_singleton/scripts/Makefile.am
==============================================================================
--- branches/preferences_singleton/scripts/Makefile.am	(original)
+++ branches/preferences_singleton/scripts/Makefile.am	Fri Mar 20 11:50:15 2009
@@ -1,6 +1,7 @@
 anjuta_datadir = $(anjuta_data_dir)
 
 anjuta_data_DATA = anjuta_project.template
+prefs_glade_schemas_DATA = $(prefs_glade_schemas)
 
 EXTRA_DIST = $(anjuta_data_DATA)
 

Modified: branches/preferences_singleton/src/action-callbacks.c
==============================================================================
--- branches/preferences_singleton/src/action-callbacks.c	(original)
+++ branches/preferences_singleton/src/action-callbacks.c	Fri Mar 20 11:50:15 2009
@@ -86,7 +86,7 @@
 	{
 		gtk_widget_hide (app->toolbar);
 	}
-	anjuta_preferences_set_int (app->preferences,
+	anjuta_preferences_set_bool (app->preferences,
 								"anjuta.toolbar.visible",
 								status);
 }

Modified: branches/preferences_singleton/src/anjuta-app.c
==============================================================================
--- branches/preferences_singleton/src/anjuta-app.c	(original)
+++ branches/preferences_singleton/src/anjuta-app.c	Fri Mar 20 11:50:15 2009
@@ -461,7 +461,7 @@
 	action = gtk_ui_manager_get_action (GTK_UI_MANAGER (app->ui),
 										"/MenuMain/MenuView/Toolbar");
 	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION(action),
-								  anjuta_preferences_get_int_with_default (app->preferences,
+								  anjuta_preferences_get_bool_with_default (app->preferences,
 																		   "anjuta.toolbar.visible",
 																		   TRUE));
 	anjuta_preferences_notify_add_string (app->preferences, "anjuta.toolbar.style",

Modified: branches/preferences_singleton/src/anjuta.c
==============================================================================
--- branches/preferences_singleton/src/anjuta.c	(original)
+++ branches/preferences_singleton/src/anjuta.c	Fri Mar 20 11:50:15 2009
@@ -364,7 +364,7 @@
 		
 		/* If preferences is set to not load last session, clear it */
 		if (no_session ||
-			anjuta_preferences_get_int (app->preferences,
+			anjuta_preferences_get_bool (app->preferences,
 										ANJUTA_SESSION_SKIP_LAST))
 		{
 			/* Reset default session */
@@ -374,7 +374,7 @@
 		}
 		/* If preferences is set to not load last project, clear it */
 		else if (no_files ||
-				 anjuta_preferences_get_int (app->preferences,
+				 anjuta_preferences_get_bool (app->preferences,
 											 ANJUTA_SESSION_SKIP_LAST_FILES))
 		{
 			session = anjuta_session_new (session_dir);



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