From 297f7a4845fabb98cc7bcf3598cfa7555b820236 Mon Sep 17 00:00:00 2001 From: compudj Date: Wed, 5 May 2004 21:11:26 +0000 Subject: [PATCH] The GUI and viewers start git-svn-id: http://ltt.polymtl.ca/svn@519 04897980-b3bd-0310-b5e0-8ef037075253 --- .../poly/lttv/modules/gui/controlflow/module.c | 10 +++++----- .../modules/gui/lttvwindow/lttvwindow/callbacks.c | 12 ++++++------ .../gui/lttvwindow/lttvwindow/gtkmultivpaned.c | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/module.c b/ltt/branches/poly/lttv/modules/gui/controlflow/module.c index f4031974..1c399179 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/module.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/module.c @@ -70,11 +70,11 @@ static void init() { g_info("GUI ControlFlow Viewer init()"); /* Register the toolbar insert button */ - toolbar_item_reg(hGuiControlFlowInsert_xpm, "Insert Control Flow Viewer", - h_guicontrolflow); + lttvwindow_register_toolbar(hGuiControlFlowInsert_xpm, + "Insert Control Flow Viewer", h_guicontrolflow); /* Register the menu item insert entry */ - menu_item_reg("/", "Insert Control Flow Viewer", h_guicontrolflow); + lttvwindow_register_menu("/", "Insert Control Flow Viewer", h_guicontrolflow); } @@ -101,10 +101,10 @@ static void destroy() { g_slist_free(g_control_flow_data_list); /* Unregister the toolbar insert button */ - toolbar_item_unreg(h_guicontrolflow); + lttvwindow_unregister_toolbar(h_guicontrolflow); /* Unregister the menu item insert entry */ - menu_item_unreg(h_guicontrolflow); + lttvwindow_unregister_menu(h_guicontrolflow); } diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c index fac0c00f..59c98371 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c @@ -189,7 +189,7 @@ void insert_viewer(GtkWidget* widget, lttvwindow_viewer_constructor constructor) } redraw_viewer(mw_data,&time_window); - set_current_time(mw_data,&(mw_data->current_tab->current_time)); + lttvwindow_report_current_time(mw_data,&(mw_data->current_tab->current_time)); if(time_interval){ lttvwindow_report_time_window(mw_data,&t); } @@ -534,7 +534,7 @@ void add_trace(GtkWidget * widget, gpointer user_data) //update current tab update_traceset(mw_data); - get_traceset_time_span(mw_data,LTTV_TRACESET_CONTEXT(mw_data->current_tab->traceset_info->traceset_context)->Time_Span); + //get_traceset_time_span(mw_data,LTTV_TRACESET_CONTEXT(mw_data->current_tab->traceset_info->traceset_context)->Time_Span); if(lttv_traceset_number(mw_data->current_tab->traceset_info->traceset) == 1 || ltt_time_compare(mw_data->current_tab->current_time, LTTV_TRACESET_CONTEXT(mw_data->current_tab->traceset_info->traceset_context)->Time_Span->startTime)<0){ @@ -546,7 +546,7 @@ void add_trace(GtkWidget * widget, gpointer user_data) } redraw_viewer(mw_data, &(mw_data->current_tab->time_window)); - set_current_time(mw_data,&(mw_data->current_tab->current_time)); + lttvwindow_report_current_time(mw_data,&(mw_data->current_tab->current_time)); break; case GTK_RESPONSE_REJECT: case GTK_RESPONSE_CANCEL: @@ -672,7 +672,7 @@ void remove_trace(GtkWidget * widget, gpointer user_data) update_traceset(mw_data); if(nb_trace > 1){ redraw_viewer(mw_data, &(mw_data->current_tab->time_window)); - set_current_time(mw_data,&(mw_data->current_tab->current_time)); + lttvwindow_report_current_time(mw_data,&(mw_data->current_tab->current_time)); }else{ if(mw_data->current_tab){ while(mw_data->current_tab->multi_vpaned->num_children){ @@ -749,7 +749,7 @@ void zoom(GtkWidget * widget, double size) time_window.start_time = time_s; } redraw_viewer(mw_data, &time_window); - set_current_time(mw_data,&(mw_data->current_tab->current_time)); + lttvwindow_report_current_time(mw_data,&(mw_data->current_tab->current_time)); gtk_multi_vpaned_set_adjust(mw_data->current_tab->multi_vpaned, FALSE); } @@ -1028,7 +1028,7 @@ on_trace_filter_activate (GtkMenuItem *menuitem, if(get_filter_selection(s, "Configure trace and tracefile filter", "Select traces and tracefiles")){ update_traceset(mw_data); redraw_viewer(mw_data, &(mw_data->current_tab->time_window)); - set_current_time(mw_data,&(mw_data->current_tab->current_time)); + lttvwindow_report_current_time(mw_data,&(mw_data->current_tab->current_time)); } } diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/gtkmultivpaned.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/gtkmultivpaned.c index 962807c8..f0dc2cfe 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/gtkmultivpaned.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/gtkmultivpaned.c @@ -170,12 +170,12 @@ void gtk_multi_vpaned_set_focus (GtkWidget * widget, gpointer user_data) void gtk_multi_vpaned_set_adjust(GtkMultiVPaned * multi_vpaned, gboolean first_time) { - TimeWindow time_window; + TimeWindow time_window = multi_vpaned->mw->current_tab->time_window; TimeInterval *time_span; double tmp, start; double range = 0; - get_time_window(multi_vpaned->mw,&time_window); + if(first_time){ time_span = LTTV_TRACESET_CONTEXT(multi_vpaned->mw->current_tab->traceset_info-> traceset_context)->Time_Span ; -- 2.34.1