Process_List.h attribute name change
[lttv.git] / ltt / branches / poly / lttv / modules / guiControlFlow / Process_List.c
index d86c2ddff443c874feb694aa1d864974f51f0f75..c695fb15f4e07c8a1bdcab8e2aa9e9015f4ad88c 100644 (file)
@@ -170,39 +170,39 @@ ProcessList *processlist_construct(void)
   process_list->number_of_process = 0;
 
   /* Create the Process list */
-  process_list->Store_M = gtk_list_store_new (  N_COLUMNS,
+  process_list->list_store = gtk_list_store_new (  N_COLUMNS,
               G_TYPE_STRING,
               G_TYPE_UINT,
               G_TYPE_ULONG,
               G_TYPE_ULONG);
 
 
-  process_list->process_list_VC = 
+  process_list->process_list_widget = 
     gtk_tree_view_new_with_model
-    (GTK_TREE_MODEL (process_list->Store_M));
+    (GTK_TREE_MODEL (process_list->list_store));
 
-  g_object_unref (G_OBJECT (process_list->Store_M));
+  g_object_unref (G_OBJECT (process_list->list_store));
 
   gtk_tree_sortable_set_sort_func(
-      GTK_TREE_SORTABLE(process_list->Store_M),
+      GTK_TREE_SORTABLE(process_list->list_store),
       PID_COLUMN,
       process_sort_func,
       NULL,
       NULL);
   
   gtk_tree_sortable_set_sort_column_id(
-      GTK_TREE_SORTABLE(process_list->Store_M),
+      GTK_TREE_SORTABLE(process_list->list_store),
       PID_COLUMN,
       GTK_SORT_ASCENDING);
   
-  process_list->Process_Hash = g_hash_table_new_full(
+  process_list->process_hash = g_hash_table_new_full(
       hash_fct, equ_fct,
       destroy_hash_key, destroy_hash_data
       );
   
   
   gtk_tree_view_set_headers_visible(
-    GTK_TREE_VIEW(process_list->process_list_VC), FALSE);
+    GTK_TREE_VIEW(process_list->process_list_widget), FALSE);
 
   /* Create a column, associating the "text" attribute of the
    * cell_renderer to the first column of the model */
@@ -216,7 +216,7 @@ ProcessList *processlist_construct(void)
   gtk_tree_view_column_set_alignment (column, 0.0);
   gtk_tree_view_column_set_fixed_width (column, 45);
   gtk_tree_view_append_column (
-    GTK_TREE_VIEW (process_list->process_list_VC), column);
+    GTK_TREE_VIEW (process_list->process_list_widget), column);
 
   column = gtk_tree_view_column_new_with_attributes ( "PID",
                 renderer,
@@ -224,7 +224,7 @@ ProcessList *processlist_construct(void)
                 PID_COLUMN,
                 NULL);
   gtk_tree_view_append_column (
-    GTK_TREE_VIEW (process_list->process_list_VC), column);
+    GTK_TREE_VIEW (process_list->process_list_widget), column);
 
 
   column = gtk_tree_view_column_new_with_attributes ( "Birth sec",
@@ -233,7 +233,7 @@ ProcessList *processlist_construct(void)
                 BIRTH_S_COLUMN,
                 NULL);
   gtk_tree_view_append_column (
-    GTK_TREE_VIEW (process_list->process_list_VC), column);
+    GTK_TREE_VIEW (process_list->process_list_widget), column);
 
   //gtk_tree_view_column_set_visible(column, 0);
   //
@@ -243,39 +243,37 @@ ProcessList *processlist_construct(void)
                 BIRTH_NS_COLUMN,
                 NULL);
   gtk_tree_view_append_column (
-    GTK_TREE_VIEW (process_list->process_list_VC), column);
+    GTK_TREE_VIEW (process_list->process_list_widget), column);
 
   //gtk_tree_view_column_set_visible(column, 0);
   
   g_object_set_data_full(
-      G_OBJECT(process_list->process_list_VC),
+      G_OBJECT(process_list->process_list_widget),
       "process_list_Data",
       process_list,
       (GDestroyNotify)processlist_destroy);
 
-  process_list->Test_Process_Sent = 0;
-  
   return process_list;
 }
 void processlist_destroy(ProcessList *process_list)
 {
-  g_hash_table_destroy(process_list->Process_Hash);
-  process_list->Process_Hash = NULL;
+  g_hash_table_destroy(process_list->process_hash);
+  process_list->process_hash = NULL;
 
   g_free(process_list);
 }
 
 GtkWidget *processlist_get_widget(ProcessList *process_list)
 {
-  return process_list->process_list_VC;
+  return process_list->process_list_widget;
 }
 
 
 
-gint get_cell_height(GtkTreeView *TreeView)
+gint get_cell_height(GtkTreeView *tree_view)
 {
   gint height;
-  GtkTreeViewColumn *Column = gtk_tree_view_get_column(TreeView, 0);
+  GtkTreeViewColumn *Column = gtk_tree_view_get_column(tree_view, 0);
   //GList *Render_List = gtk_tree_view_column_get_cell_renderers(Column);
   //GtkCellRenderer *Renderer = g_list_first(Render_List)->data;
   
@@ -301,89 +299,89 @@ int processlist_add(  ProcessList *process_list,
       LttTime *birth,
       gchar *name,
       guint *height,
-      HashedProcessData **pmHashed_Process_Data)
+      HashedProcessData **pm_hashed_process_data)
 {
   GtkTreeIter iter ;
   ProcessInfo *Process_Info = g_new(ProcessInfo, 1);
-  HashedProcessData *Hashed_Process_Data = g_new(HashedProcessData, 1);
-  *pmHashed_Process_Data = Hashed_Process_Data;
+  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;
+  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->Store_M, &iter);
+  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->Store_M),
+  //        GTK_TREE_MODEL(process_list->list_store),
   //        &iter)));
-  gtk_list_store_set (  process_list->Store_M, &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->RowRef = gtk_tree_row_reference_new (
-      GTK_TREE_MODEL(process_list->Store_M),
+  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->Store_M),
+        GTK_TREE_MODEL(process_list->list_store),
         &iter));
-  g_hash_table_insert(  process_list->Process_Hash,
+  g_hash_table_insert(  process_list->process_hash,
         (gpointer)Process_Info,
-        (gpointer)Hashed_Process_Data);
+        (gpointer)hashed_process_data);
   
   //g_critical ( "iter after : %s", gtk_tree_path_to_string (
   //    gtk_tree_model_get_path (
-  //        GTK_TREE_MODEL(process_list->Store_M),
+  //        GTK_TREE_MODEL(process_list->list_store),
   //        &iter)));
   process_list->number_of_process++;
 
-  *height = get_cell_height(GTK_TREE_VIEW(process_list->process_list_VC))
+  *height = get_cell_height(GTK_TREE_VIEW(process_list->process_list_widget))
         * process_list->number_of_process ;
   
   
@@ -397,45 +395,45 @@ int processlist_remove( ProcessList *process_list,
 {
   ProcessInfo Process_Info;
   gint *path_indices;
-  HashedProcessData *Hashed_Process_Data;
+  HashedProcessData *hashed_process_data;
   GtkTreeIter iter;
   
   Process_Info.pid = pid;
   Process_Info.birth = *birth;
 
 
-  if(Hashed_Process_Data = 
+  if(hashed_process_data = 
     (HashedProcessData*)g_hash_table_lookup(
-          process_list->Process_Hash,
+          process_list->process_hash,
           &Process_Info))
   {
     gtk_tree_model_get_iter (
-        GTK_TREE_MODEL(process_list->Store_M),
+        GTK_TREE_MODEL(process_list->list_store),
         &iter,
         gtk_tree_row_reference_get_path(
-          (GtkTreeRowReference*)Hashed_Process_Data->RowRef)
+          (GtkTreeRowReference*)hashed_process_data->row_ref)
         );
 
-    gtk_list_store_remove (process_list->Store_M, &iter);
+    gtk_list_store_remove (process_list->list_store, &iter);
     
-    g_free(Hashed_Process_Data->draw_context->previous->modify_under);
-    g_free(Hashed_Process_Data->draw_context->previous->modify_middle);
-    g_free(Hashed_Process_Data->draw_context->previous->modify_over);
-    g_free(Hashed_Process_Data->draw_context->previous->under);
-    g_free(Hashed_Process_Data->draw_context->previous->middle);
-    g_free(Hashed_Process_Data->draw_context->previous->over);
-    g_free(Hashed_Process_Data->draw_context->previous);
-    g_free(Hashed_Process_Data->draw_context->current->modify_under);
-    g_free(Hashed_Process_Data->draw_context->current->modify_middle);
-    g_free(Hashed_Process_Data->draw_context->current->modify_over);
-    g_free(Hashed_Process_Data->draw_context->current->under);
-    g_free(Hashed_Process_Data->draw_context->current->middle);
-    g_free(Hashed_Process_Data->draw_context->current->over);
-    g_free(Hashed_Process_Data->draw_context->current);
-    g_free(Hashed_Process_Data->draw_context);
-    g_free(Hashed_Process_Data);
-
-    g_hash_table_remove(process_list->Process_Hash,
+    g_free(hashed_process_data->draw_context->previous->modify_under);
+    g_free(hashed_process_data->draw_context->previous->modify_middle);
+    g_free(hashed_process_data->draw_context->previous->modify_over);
+    g_free(hashed_process_data->draw_context->previous->under);
+    g_free(hashed_process_data->draw_context->previous->middle);
+    g_free(hashed_process_data->draw_context->previous->over);
+    g_free(hashed_process_data->draw_context->previous);
+    g_free(hashed_process_data->draw_context->current->modify_under);
+    g_free(hashed_process_data->draw_context->current->modify_middle);
+    g_free(hashed_process_data->draw_context->current->modify_over);
+    g_free(hashed_process_data->draw_context->current->under);
+    g_free(hashed_process_data->draw_context->current->middle);
+    g_free(hashed_process_data->draw_context->current->over);
+    g_free(hashed_process_data->draw_context->current);
+    g_free(hashed_process_data->draw_context);
+    g_free(hashed_process_data);
+
+    g_hash_table_remove(process_list->process_hash,
         &Process_Info);
     
     process_list->number_of_process--;
@@ -449,7 +447,7 @@ int processlist_remove( ProcessList *process_list,
 
 guint processlist_get_height(ProcessList *process_list)
 {
-  return get_cell_height(GTK_TREE_VIEW(process_list->process_list_VC))
+  return get_cell_height(GTK_TREE_VIEW(process_list->process_list_widget))
         * process_list->number_of_process ;
 }
 
@@ -458,32 +456,32 @@ gint processlist_get_process_pixels(  ProcessList *process_list,
           guint pid, LttTime *birth,
           guint *y,
           guint *height,
-          HashedProcessData **pmHashed_Process_Data)
+          HashedProcessData **pm_hashed_process_data)
 {
   ProcessInfo Process_Info;
   gint *path_indices;
   GtkTreePath *tree_path;
-  HashedProcessData *Hashed_Process_Data = NULL;
+  HashedProcessData *hashed_process_data = NULL;
 
   Process_Info.pid = pid;
   Process_Info.birth = *birth;
 
-  if(Hashed_Process_Data = 
+  if(hashed_process_data = 
     (HashedProcessData*)g_hash_table_lookup(
-          process_list->Process_Hash,
+          process_list->process_hash,
           &Process_Info))
   {
     tree_path = gtk_tree_row_reference_get_path(
-                    Hashed_Process_Data->RowRef);
+                    hashed_process_data->row_ref);
     path_indices =  gtk_tree_path_get_indices (tree_path);
 
     *height = get_cell_height(
-        GTK_TREE_VIEW(process_list->process_list_VC));
+        GTK_TREE_VIEW(process_list->process_list_widget));
     *y = *height * path_indices[0];
-    *pmHashed_Process_Data = Hashed_Process_Data;
+    *pm_hashed_process_data = hashed_process_data;
     return 0; 
   } else {
-    *pmHashed_Process_Data = Hashed_Process_Data;
+    *pm_hashed_process_data = hashed_process_data;
     return 1;
   }
 
@@ -492,7 +490,7 @@ gint processlist_get_process_pixels(  ProcessList *process_list,
 
 gint processlist_get_pixels_from_data(  ProcessList *process_list,
           ProcessInfo *process_info,
-          HashedProcessData *Hashed_Process_Data,
+          HashedProcessData *hashed_process_data,
           guint *y,
           guint *height)
 {
@@ -500,11 +498,11 @@ gint processlist_get_pixels_from_data(  ProcessList *process_list,
   GtkTreePath *tree_path;
 
   tree_path = gtk_tree_row_reference_get_path(
-                  Hashed_Process_Data->RowRef);
+                  hashed_process_data->row_ref);
   path_indices =  gtk_tree_path_get_indices (tree_path);
 
   *height = get_cell_height(
-      GTK_TREE_VIEW(process_list->process_list_VC));
+      GTK_TREE_VIEW(process_list->process_list_widget));
   *y = *height * path_indices[0];
 
   return 0; 
This page took 0.032957 seconds and 4 git commands to generate.