#include "processlist.h"
#include "drawitem.h"
+#define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format)
+#define g_debug(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format)
+
+
/*****************************************************************************
* Methods to synchronize process list *
*****************************************************************************/
process_list->process_list_widget =
gtk_tree_view_new_with_model
(GTK_TREE_MODEL (process_list->list_store));
-
g_object_unref (G_OBJECT (process_list->list_store));
gtk_tree_sortable_set_sort_func(
}
void processlist_destroy(ProcessList *process_list)
{
+ g_info("processlist_destroy %p", process_list);
g_hash_table_destroy(process_list->process_hash);
process_list->process_hash = NULL;
g_free(process_list);
+ g_info("processlist_destroy end");
}
GtkWidget *processlist_get_widget(ProcessList *process_list)
guint pid,
LttTime *birth,
guint trace_num,
- gchar *name,
+ const gchar *name,
guint *height,
HashedProcessData **pm_hashed_process_data)
{
process_list->process_hash,
&Process_Info))
{
+ GtkTreePath *tree_path;
+
+ tree_path = gtk_tree_row_reference_get_path(
+ hashed_process_data->row_ref);
+
gtk_tree_model_get_iter (
GTK_TREE_MODEL(process_list->list_store),
- &iter,
- gtk_tree_row_reference_get_path(
- (GtkTreeRowReference*)hashed_process_data->row_ref)
- );
+ &iter, tree_path);
+
+ gtk_tree_path_free(tree_path);
gtk_list_store_remove (process_list->list_store, &iter);
GTK_TREE_VIEW(process_list->process_list_widget));
*y = *height * path_indices[0];
*pm_hashed_process_data = hashed_process_data;
+ gtk_tree_path_free(tree_path);
+
return 0;
} else {
*pm_hashed_process_data = hashed_process_data;
*height = get_cell_height(
GTK_TREE_VIEW(process_list->process_list_widget));
*y = *height * path_indices[0];
+ gtk_tree_path_free(tree_path);
return 0;