[anjuta-extras/gnome-2-30: 6/6] profiler: Fix bgo 615412



commit 715745a36413591037c205b4bde086b94034e6d3
Author: James Liggett <jrliggett cox net>
Date:   Mon Apr 12 18:11:48 2010 -0700

    profiler: Fix bgo 615412
    
    Change the select target list population code to reflect changes in the
    IAnjutaProjectManager interface, specifically that it now works with
    GFiles and not strings.

 plugins/profiler/plugin.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/plugins/profiler/plugin.c b/plugins/profiler/plugin.c
index 1d8a094..27e58a3 100644
--- a/plugins/profiler/plugin.c
+++ b/plugins/profiler/plugin.c
@@ -586,13 +586,15 @@ on_profiler_select_target (GtkAction *action, Profiler *profiler)
 			
 			while (current_target)
 			{
-				relative_path = (gchar *) current_target->data + project_root_uri_length;
+				target = g_file_get_uri (G_FILE (current_target->data));
+				relative_path = (gchar *) target + project_root_uri_length;
 				
 				gtk_list_store_append (targets_list_store, &iter);
 				gtk_list_store_set (targets_list_store, &iter, 0, relative_path, 1,
-									current_target->data, -1);
+									target, -1);
 									
-				g_free (current_target->data);
+				g_free (target);
+				g_object_unref (current_target->data);
 				current_target = g_list_next (current_target);
 			}
 			g_list_free (exec_targets);



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