[anjuta-extras] valgrind: fixed crash and parameters.



commit 6f09ac7aab05fbed00d907c0c2e5ce8839e7e728
Author: Massimo Corà <mcora src gnome org>
Date:   Sat Feb 20 02:11:01 2010 +0100

    valgrind: fixed crash and parameters.
    
    Crash was due to project-manager GFile transition. Before gchars were used.

 plugins/valgrind/plugin.c         |   14 +++++++++++---
 plugins/valgrind/vggeneralprefs.c |    4 ++--
 2 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/plugins/valgrind/plugin.c b/plugins/valgrind/plugin.c
index 1e1fdac..e412b1e 100644
--- a/plugins/valgrind/plugin.c
+++ b/plugins/valgrind/plugin.c
@@ -233,12 +233,20 @@ on_menu_run_activate (GtkAction *action, AnjutaValgrindPlugin *plugin)
 		project_root_uri_len = strlen(project_root_uri) + 1;
 	
 		while (node) {
+			GFile *gfile;
 			const gchar *rel_path;
-			rel_path = (gchar*)node->data + project_root_uri_len;
+			gchar *local_path;
+			gfile = node->data;
+
+			local_path = g_file_get_uri (gfile);
+			
+			rel_path = local_path + project_root_uri_len;
 			gtk_list_store_append (store, &iter);
 			gtk_list_store_set (store, &iter, 0, rel_path, 1,
-								node->data, -1);
-			g_free (node->data);
+								local_path, -1);
+			g_free (local_path);
+			g_object_unref (gfile);
+			
 			node = g_list_next (node);
 		}
 		g_list_free (exec_targets);
diff --git a/plugins/valgrind/vggeneralprefs.c b/plugins/valgrind/vggeneralprefs.c
index 5c675db..fcb69fe 100644
--- a/plugins/valgrind/vggeneralprefs.c
+++ b/plugins/valgrind/vggeneralprefs.c
@@ -191,7 +191,7 @@ vg_general_prefs_init (VgGeneralPrefs *prefs)
 	widget = gtk_spin_button_new_with_range (0, (gdouble) 1024, 1);
 	gtk_widget_show (widget);
 	prefs->num_callers = GTK_SPIN_BUTTON (widget);
-	gtk_spin_button_set_digits (prefs->num_callers, 0);
+	gtk_spin_button_set_digits (prefs->num_callers, 1);
 	gtk_spin_button_set_numeric (prefs->num_callers, TRUE);
 	gtk_spin_button_set_value (prefs->num_callers, (gdouble) num);
 	g_signal_connect (widget, "focus-out-event", G_CALLBACK (spin_focus_out), NUM_CALLERS_KEY);
@@ -342,7 +342,7 @@ general_prefs_get_argv (VgToolPrefs *prefs, const char *tool, GPtrArray *argv)
 	
 	gconf = gconf_client_get_default ();
 	
-	g_ptr_array_add (argv, "--alignment=8");
+	g_ptr_array_add (argv, "--alignment=16");
 	
 	for (i = 0; i < G_N_ELEMENTS (general_args); i++) {
 		const char *arg = general_args[i].arg;



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