- GtkTreeIter iter ;
- ProcessInfo *Process_Info = g_new(ProcessInfo, 1);
- GtkTreeRowReference *RowRef;
-
- Process_Info->pid = pid;
- Process_Info->birth = *birth;
-
- /* Add a new row to the model */
- gtk_list_store_append ( Process_List->Store_M, &iter);
- g_critical ( "iter before : %s", gtk_tree_path_to_string (
- gtk_tree_model_get_path (
- GTK_TREE_MODEL(Process_List->Store_M),
- &iter)));
- gtk_list_store_set ( Process_List->Store_M, &iter,
- PROCESS_COLUMN, "name",
- PID_COLUMN, pid,
- BIRTH_S_COLUMN, birth->tv_sec,
- BIRTH_NS_COLUMN, birth->tv_nsec,
- -1);
- RowRef = gtk_tree_row_reference_new (
- GTK_TREE_MODEL(Process_List->Store_M),
- gtk_tree_model_get_path(
- GTK_TREE_MODEL(Process_List->Store_M),
- &iter));
-
- g_hash_table_insert( Process_List->Process_Hash,
- (gpointer)Process_Info,
- (gpointer)RowRef);
-
- g_critical ( "iter after : %s", gtk_tree_path_to_string (
- gtk_tree_model_get_path (
- GTK_TREE_MODEL(Process_List->Store_M),
- &iter)));
- Process_List->Number_Of_Process++;
-
- *height = get_cell_height(GTK_TREE_VIEW(Process_List->Process_List_VC))
- * Process_List->Number_Of_Process ;
-
-
- return 0;
-
+ GtkTreeIter iter ;
+ ProcessInfo *Process_Info = g_new(ProcessInfo, 1);
+ HashedProcessData *hashed_process_data = g_new(HashedProcessData, 1);
+ *pm_hashed_process_data = hashed_process_data;
+
+ Process_Info->pid = pid;
+ Process_Info->birth = *birth;
+
+ hashed_process_data->draw_context = g_new(DrawContext, 1);
+ hashed_process_data->draw_context->drawable = NULL;
+ hashed_process_data->draw_context->gc = NULL;
+ hashed_process_data->draw_context->pango_layout = NULL;
+ hashed_process_data->draw_context->current = g_new(DrawInfo,1);
+ hashed_process_data->draw_context->current->over = g_new(ItemInfo,1);
+ hashed_process_data->draw_context->current->over->x = -1;
+ hashed_process_data->draw_context->current->over->y = -1;
+ hashed_process_data->draw_context->current->middle = g_new(ItemInfo,1);
+ hashed_process_data->draw_context->current->middle->x = -1;
+ hashed_process_data->draw_context->current->middle->y = -1;
+ hashed_process_data->draw_context->current->under = g_new(ItemInfo,1);
+ hashed_process_data->draw_context->current->under->x = -1;
+ hashed_process_data->draw_context->current->under->y = -1;
+ hashed_process_data->draw_context->current->modify_over = g_new(ItemInfo,1);
+ hashed_process_data->draw_context->current->modify_over->x = -1;
+ hashed_process_data->draw_context->current->modify_over->y = -1;
+ hashed_process_data->draw_context->current->modify_middle = g_new(ItemInfo,1);
+ hashed_process_data->draw_context->current->modify_middle->x = -1;
+ hashed_process_data->draw_context->current->modify_middle->y = -1;
+ hashed_process_data->draw_context->current->modify_under = g_new(ItemInfo,1);
+ hashed_process_data->draw_context->current->modify_under->x = -1;
+ hashed_process_data->draw_context->current->modify_under->y = -1;
+ hashed_process_data->draw_context->current->status = LTTV_STATE_UNNAMED;
+ hashed_process_data->draw_context->previous = g_new(DrawInfo,1);
+ hashed_process_data->draw_context->previous->over = g_new(ItemInfo,1);
+ hashed_process_data->draw_context->previous->over->x = -1;
+ hashed_process_data->draw_context->previous->over->y = -1;
+ hashed_process_data->draw_context->previous->middle = g_new(ItemInfo,1);
+ hashed_process_data->draw_context->previous->middle->x = -1;
+ hashed_process_data->draw_context->previous->middle->y = -1;
+ hashed_process_data->draw_context->previous->under = g_new(ItemInfo,1);
+ hashed_process_data->draw_context->previous->under->x = -1;
+ hashed_process_data->draw_context->previous->under->y = -1;
+ hashed_process_data->draw_context->previous->modify_over = g_new(ItemInfo,1);
+ hashed_process_data->draw_context->previous->modify_over->x = -1;
+ hashed_process_data->draw_context->previous->modify_over->y = -1;
+ hashed_process_data->draw_context->previous->modify_middle = g_new(ItemInfo,1);
+ hashed_process_data->draw_context->previous->modify_middle->x = -1;
+ hashed_process_data->draw_context->previous->modify_middle->y = -1;
+ hashed_process_data->draw_context->previous->modify_under = g_new(ItemInfo,1);
+ hashed_process_data->draw_context->previous->modify_under->x = -1;
+ hashed_process_data->draw_context->previous->modify_under->y = -1;
+ hashed_process_data->draw_context->previous->status = LTTV_STATE_UNNAMED;
+
+ /* Add a new row to the model */
+ gtk_list_store_append ( process_list->list_store, &iter);
+ //g_critical ( "iter before : %s", gtk_tree_path_to_string (
+ // gtk_tree_model_get_path (
+ // GTK_TREE_MODEL(process_list->list_store),
+ // &iter)));
+ gtk_list_store_set ( process_list->list_store, &iter,
+ PROCESS_COLUMN, name,
+ PID_COLUMN, pid,
+ BIRTH_S_COLUMN, birth->tv_sec,
+ BIRTH_NS_COLUMN, birth->tv_nsec,
+ -1);
+ hashed_process_data->row_ref = gtk_tree_row_reference_new (
+ GTK_TREE_MODEL(process_list->list_store),
+ gtk_tree_model_get_path(
+ GTK_TREE_MODEL(process_list->list_store),
+ &iter));
+ g_hash_table_insert( process_list->process_hash,
+ (gpointer)Process_Info,
+ (gpointer)hashed_process_data);
+
+ //g_critical ( "iter after : %s", gtk_tree_path_to_string (
+ // gtk_tree_model_get_path (
+ // GTK_TREE_MODEL(process_list->list_store),
+ // &iter)));
+ process_list->number_of_process++;
+
+ *height = get_cell_height(GTK_TREE_VIEW(process_list->process_list_widget))
+ * process_list->number_of_process ;
+
+
+ return 0;
+