anjuta r4884 - in branches/gnome-2-26: . plugins/sourceview plugins/symbol-db scripts



Author: jhs
Date: Fri Mar 20 12:23:55 2009
New Revision: 4884
URL: http://svn.gnome.org/viewvc/anjuta?rev=4884&view=rev

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

        * plugins/sourceview/sourceview-print.c (print_setup):
        Fixed "print footer"

        * plugins/symbol-db/plugin.c:
        * plugins/symbol-db/symbol-db-prefs.c
        (on_prefs_executable_changed), (on_notify_prefs),
        (sdb_prefs_init1):
        * plugins/symbol-db/symbol-db-prefs.h:
        Fixed symbol-db preferences system (backport from trunk)

        * scripts/build-schemas.mk:
        #575893 â plugins schema files are not installed (from trunk)



Modified:
   branches/gnome-2-26/ChangeLog
   branches/gnome-2-26/plugins/sourceview/sourceview-print.c
   branches/gnome-2-26/plugins/symbol-db/   (props changed)
   branches/gnome-2-26/plugins/symbol-db/plugin.c
   branches/gnome-2-26/plugins/symbol-db/symbol-db-prefs.c
   branches/gnome-2-26/plugins/symbol-db/symbol-db-prefs.h
   branches/gnome-2-26/scripts/   (props changed)
   branches/gnome-2-26/scripts/build-schemas.mk

Modified: branches/gnome-2-26/plugins/sourceview/sourceview-print.c
==============================================================================
--- branches/gnome-2-26/plugins/sourceview/sourceview-print.c	(original)
+++ branches/gnome-2-26/plugins/sourceview/sourceview-print.c	Fri Mar 20 12:23:55 2009
@@ -118,7 +118,7 @@
 																																						PRINT_HEADER));
 	gtk_source_print_compositor_set_print_footer (compositor,
 																								anjuta_preferences_get_int (sv->priv->prefs,
-																																						PRINT_HEADER));
+																																						PRINT_FOOTER));
 	
 	
 	gtk_source_print_compositor_set_highlight_syntax (compositor,

Modified: branches/gnome-2-26/plugins/symbol-db/plugin.c
==============================================================================
--- branches/gnome-2-26/plugins/symbol-db/plugin.c	(original)
+++ branches/gnome-2-26/plugins/symbol-db/plugin.c	Fri Mar 20 12:23:55 2009
@@ -22,8 +22,6 @@
  * 	Boston, MA  02110-1301, USA.
  */
 
-
-
 #include <config.h>
 #include <gio/gio.h>
 #include <libanjuta/anjuta-shell.h>

Modified: branches/gnome-2-26/plugins/symbol-db/symbol-db-prefs.c
==============================================================================
--- branches/gnome-2-26/plugins/symbol-db/symbol-db-prefs.c	(original)
+++ branches/gnome-2-26/plugins/symbol-db/symbol-db-prefs.c	Fri Mar 20 12:23:55 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,
@@ -119,10 +119,10 @@
 }
 
 static void
-on_gconf_notify_prefs (GConfClient *gclient, guint cnxn_id,
-					   GConfEntry *entry, gpointer user_data)
+on_notify_prefs (AnjutaPreferences* prefs, const gchar* key,
+                 const gchar* value, gpointer user_data)
 {
-	DEBUG_PRINT ("%s", "on_gconf_notify_prefs ()");
+	DEBUG_PRINT ("%s", "on_notify_prefs ()");
 }
 
 static void
@@ -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);*/
 			
@@ -447,29 +397,10 @@
 					  G_CALLBACK (on_prefs_executable_changed), sdbp);	
 	
 
-	priv->prefs_notify_id = anjuta_preferences_notify_add (priv->prefs, 
-												CTAGS_PREFS_KEY, 
-											   on_gconf_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);
+	priv->prefs_notify_id = anjuta_preferences_notify_add_string (priv->prefs, 
+	                                                              CTAGS_PREFS_KEY, 
+	                                                              on_notify_prefs, 
+	                                                              priv->prefs, NULL);
 	
 	g_free (ctags_value);
 }

Modified: branches/gnome-2-26/plugins/symbol-db/symbol-db-prefs.h
==============================================================================
--- branches/gnome-2-26/plugins/symbol-db/symbol-db-prefs.h	(original)
+++ branches/gnome-2-26/plugins/symbol-db/symbol-db-prefs.h	Fri Mar 20 12:23:55 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/gnome-2-26/scripts/build-schemas.mk
==============================================================================
--- branches/gnome-2-26/scripts/build-schemas.mk	(original)
+++ branches/gnome-2-26/scripts/build-schemas.mk	Fri Mar 20 12:23:55 2009
@@ -2,6 +2,7 @@
 
 prefs_glade_schemasdir = @GCONF_SCHEMA_FILE_DIR@
 prefs_glade_schemas = $(prefs_glade_files:.glade=.schemas)
+prefs_glade_schemas_DATA = $(prefs_glade_schemas)
 
 %.schemas: %.glade
 	$(top_srcdir)/scripts/glade2schema.pl $(srcdir)/$(?) > $(@)



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