sort function desactivated during chunks
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 19 Aug 2004 05:27:32 +0000 (05:27 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 19 Aug 2004 05:27:32 +0000 (05:27 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@816 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c
ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c
ltt/branches/poly/lttv/modules/gui/controlflow/processlist.h

index e27ddf27982345062ab68444f458624887a36a3f..abb2fd262e8cda30cc175e86a1f9830e61fdbb6f 100644 (file)
@@ -3167,7 +3167,14 @@ int before_chunk(void *hook_data, void *call_data)
 {
   EventsRequest *events_request = (EventsRequest*)hook_data;
   LttvTracesetState *tss = (LttvTracesetState*)call_data;
-
+  ControlFlowData *cfd = (ControlFlowData*)events_request->viewer_data;
+  
+  /* Desactivate sort */
+  gtk_tree_sortable_set_sort_column_id(
+      GTK_TREE_SORTABLE(cfd->process_list->list_store),
+      TRACE_COLUMN,
+      GTK_SORT_ASCENDING);
   drawing_chunk_begin(events_request, tss);
 
   return 0;
@@ -3177,7 +3184,7 @@ int before_request(void *hook_data, void *call_data)
 {
   EventsRequest *events_request = (EventsRequest*)hook_data;
   LttvTracesetState *tss = (LttvTracesetState*)call_data;
-
   drawing_data_request_begin(events_request, tss);
 
   return 0;
@@ -3220,6 +3227,7 @@ int after_request(void *hook_data, void *call_data)
   /* Draw last items */
   g_hash_table_foreach(process_list->process_hash, draw_closure,
                         (void*)&closure_data);
+  
 
   /* Request expose */
   drawing_request_expose(events_request, tss, end_time);
@@ -3268,6 +3276,14 @@ int after_chunk(void *hook_data, void *call_data)
   g_hash_table_foreach(process_list->process_hash, draw_closure,
                         (void*)&closure_data);
 
+  /* Reactivate sort */
+  gtk_tree_sortable_set_sort_column_id(
+      GTK_TREE_SORTABLE(control_flow_data->process_list->list_store),
+      GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID,
+      GTK_SORT_ASCENDING);
+
+  update_index_to_pixmap(control_flow_data->process_list);
   /* Request expose */
   drawing_request_expose(events_request, tss, end_time);
 
index e04f208b9fc305299588331c3899cacb5f2b5bd1..67d565a82e949a5af2162fb364a8139c794e814c 100644 (file)
  *                       Methods to synchronize process list                 *
  *****************************************************************************/
 
-//static inline guint get_cpu_number_from_name(GQuark name);
-  
-/* Enumeration of the columns */
-enum
-{
-  PROCESS_COLUMN,
-  PID_COLUMN,
-  PPID_COLUMN,
-  CPU_COLUMN,
-  BIRTH_S_COLUMN,
-  BIRTH_NS_COLUMN,
-  TRACE_COLUMN,
-  N_COLUMNS
-};
-
 
 gint process_sort_func  ( GtkTreeModel *model,
         GtkTreeIter *it_a,
@@ -166,7 +151,7 @@ static void update_index_to_pixmap_each(ProcessInfo *key,
 }
 
 
-static void update_index_to_pixmap(ProcessList *process_list)
+void update_index_to_pixmap(ProcessList *process_list)
 {
   g_ptr_array_set_size(process_list->index_to_pixmap,
                        g_hash_table_size(process_list->process_hash));
index b8ad845366a8287f8805af7cae782f07791b2440..687ac407e7e58c2d111e679854161aa91bdb9d51 100644 (file)
  * provides helper function to convert a process unique identifier to
  *  pixels (in height).
  *
- * //FIXME : connect the scrolled window adjustment with the list.
  */
 
+
+/* Enumeration of the columns */
+enum
+{
+  PROCESS_COLUMN,
+  PID_COLUMN,
+  PPID_COLUMN,
+  CPU_COLUMN,
+  BIRTH_S_COLUMN,
+  BIRTH_NS_COLUMN,
+  TRACE_COLUMN,
+  N_COLUMNS
+};
+
+
 typedef struct _ProcessInfo {
   
   guint pid;
@@ -126,6 +140,10 @@ int processlist_add(ProcessList *process_list, Drawing_t * drawing,
 int processlist_remove(ProcessList *process_list, guint pid, guint cpu, 
     LttTime *birth, guint trace_num);
 
+
+/* Synchronize the list at the left and the drawing */
+void update_index_to_pixmap(ProcessList *process_list);
+
 /* Update the width of each pixmap buffer for each process */
 void update_pixmap_size(ProcessList *process_list, guint width);
 
This page took 0.028831 seconds and 4 git commands to generate.