- g_ptr_array_add(Event_Viewer_Data->raw_trace_data, tmpRawTraceData);
-
- g_string_free(detailEvent, TRUE);
-
- return FALSE;
-}
-
-
-
-
-/* Imported code from LTT 0.9.6pre2 tracevisualizer */
-#ifdef DEBUG
-
-/******************************************************************
- * Function :
- * WDI_gtk_clist_set_last_row_data_full()
- * Description :
- * Appends data to the last row of a GtkClist.
- * Parameters :
- * Return values :
- * NONE.
- * History :
- * J.H.D., 27/08/99, Initial typing.
- * Note :
- * Based on gtk_clist_set_row_data_full() version 1.2.3.
- * Much faster than using gtk_clist_set_row_data_full().
- ******************************************************************/
-static void WDI_gtk_clist_set_last_row_data_full(GtkCList* pmClist,
- gpointer pmData,
- GtkDestroyNotify pmDestroy)
-{
- GtkCListRow *pClistRow;
-
- g_return_if_fail (pmClist != NULL);
- g_return_if_fail (GTK_IS_CLIST (pmClist));
- g_return_if_fail (pmClist->row_list_end != NULL);
-
- pClistRow = pmClist->row_list_end->data;
- pClistRow->data = pmData;
- pClistRow->destroy = pmDestroy;
-}
-
-
-/******************************************************************
- * Function :
- * SHRTEventSelect()
- * Description :
- * Parameters :
- * Return values :
- * History :
- * Note :
- ******************************************************************/
-static void SHRTEventSelect(GtkWidget* pmCList,
- gint pmRow,
- gint pmColumn,
- GdkEventButton* pmEvent,
- gpointer pmData)
-{
- systemView* pSysView; /* The system being displayed */
-
- /* Do we have anything meaningfull */
- if((pSysView = (systemView*) pmData) == NULL)
- return;
-
- /* Store the selected event */
- pSysView->Window->LastSelectedEvent = *(event*) gtk_clist_get_row_data(GTK_CLIST(pmCList), pmRow);
- pSysView->Window->EventSelected = TRUE;
-}
-
-/******************************************************************
- * Function :
- * SHRTEventButtonPress()
- * Description :
- * Parameters :
- * Return values :
- * History :
- * Note :
- ******************************************************************/
-static void SHRTEventButtonPress(GtkWidget* pmCList,
- GdkEventButton* pmEvent,
- gpointer pmData)
-{
- systemView* pSysView; /* The system being displayed */
- gint row, column; /* The clicked row and column */
-
- /* Do we have anything meaningfull */
- if((pSysView = (systemView*) pmData) == NULL)
- return;
-
- /* if we have a right-click event */
- if(pmEvent->button == 3)
- /* If we clicked on an item, get its row and column values */
- if(gtk_clist_get_selection_info(GTK_CLIST(pmCList), pmEvent->x, pmEvent->y, &row, &column))
- {
- /* Highlight the selected row */
- gtk_clist_select_row(GTK_CLIST(pmCList), row, column);
-
- /* Store the selected event */
- pSysView->Window->LastSelectedEvent = *(event*) gtk_clist_get_row_data(GTK_CLIST(pmCList), row);
- pSysView->Window->EventSelected = TRUE;
-
- /* Display the popup menu */
- gtk_menu_popup(GTK_MENU(pSysView->Window->RawEventPopup),
- NULL, NULL, NULL, NULL,
- pmEvent->button, GDK_CURRENT_TIME);
- }
-}
-
-
-/******************************************************************
- * Function :
- * SHRTVAdjustValueChanged()
- * Description :
- * Parameters :
- * Return values :
- * History :
- * Note :
- ******************************************************************/
-static void SHRTVAdjustValueChanged(GtkAdjustment* pmVAdjust,
- gpointer pmData)
-{
- event lEvent; /* Event used for searching */
- guint32 lPosition; /* The position to scroll to */
- systemView* pSysView; /* The system being displayed */
-
- /* Do we have anything meaningfull */
- if((pSysView = (systemView*) pmData) == NULL)
- return;
-
- /* Is there an event database? */
- if(pSysView->EventDB == NULL)
- return;
-
- /* Set the pointer to the first event */
- if(pSysView->EventDB->TraceStart == NULL)
- return;
-
- /* Are we closer to the beginning? */
- if((pmVAdjust->value - (pmVAdjust->upper / 2)) < 0)
- {
- /* Set the navigation pointer to the beginning of the list */
- lEvent = pSysView->EventDB->FirstEvent;
-
- /* Calculate distance from beginning */
- lPosition = (guint32) pmVAdjust->value;
-
- /* Find the event in the event database */
- while(lPosition > 0)
- {
- lPosition--;
- if(DBEventNext(pSysView->EventDB, &lEvent) != TRUE)
- break;
- }
- }
- else
- {
- /* Set the navigation pointer to the end of the list */
- lEvent = pSysView->EventDB->LastEvent;
-
- /* Calculate distance from end */
- lPosition = (guint32) (pmVAdjust->upper - pmVAdjust->value);
-
- /* Find the event in the event database */
- while(lPosition > 0)
- {
- lPosition--;
- if(DBEventPrev(pSysView->EventDB, &lEvent) != TRUE)
- break;