From: compudj Date: Fri, 28 May 2004 14:11:46 +0000 (+0000) Subject: some compilation fixes X-Git-Tag: v0.12.20~2919 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=7afc14aa328665480b57e91234740392c8a236b1;p=lttv.git some compilation fixes git-svn-id: http://ltt.polymtl.ca/svn@570 04897980-b3bd-0310-b5e0-8ef037075253 --- 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 ac52a1c9..1762798c 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/gtkmultivpaned.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/gtkmultivpaned.c @@ -156,7 +156,7 @@ void gtk_multi_vpaned_set_focus (GtkWidget * widget, GtkPaned* paned) pane = multi_vpaned->first_pane; while(1){ - if((GtkWidget*)pane == (GtkWidget*)user_data){ + if((GtkWidget*)pane == GTK_WIDGET(paned)){ multi_vpaned->focused_pane = pane; break; } @@ -176,13 +176,13 @@ void gtk_multi_vpaned_set_adjust(GtkMultiVPaned * multi_vpaned, const TimeWindow if(first_time){ - time_span = LTTV_TRACESET_CONTEXT(multi_vpaned->mw->current_tab->traceset_info-> - traceset_context)->Time_Span ; + time_span = <TV_TRACESET_CONTEXT(multi_vpaned->mw->current_tab-> + traceset_info->traceset_context)->time_span ; - multi_vpaned->hadjust->lower = ltt_time_to_double(time_span->startTime) * + multi_vpaned->hadjust->lower = ltt_time_to_double(time_span->start_time) * NANOSECONDS_PER_SECOND; multi_vpaned->hadjust->value = multi_vpaned->hadjust->lower; - multi_vpaned->hadjust->upper = ltt_time_to_double(time_span->endTime) * + multi_vpaned->hadjust->upper = ltt_time_to_double(time_span->end_time) * NANOSECONDS_PER_SECOND; } @@ -419,19 +419,19 @@ void gtk_multi_vpaned_scroll_value_changed(GtkAdjustment *adjust, gpointer multi time_window = multi_vpaned->mw->current_tab->time_window; - time_span = LTTV_TRACESET_CONTEXT(multi_vpaned->mw->current_tab->traceset_info-> - traceset_context)->Time_Span ; + time_span = <TV_TRACESET_CONTEXT(multi_vpaned->mw->current_tab->traceset_info-> + traceset_context)->time_span ; lower = multi_vpaned->hadjust->lower; upper = multi_vpaned->hadjust->upper; ratio = (value - lower) / (upper - lower); - time = ltt_time_sub(time_span->endTime, time_span->startTime); + time = ltt_time_sub(time_span->end_time, time_span->start_time); time = ltt_time_mul(time, (float)ratio); - time = ltt_time_add(time_span->startTime, time); + time = ltt_time_add(time_span->start_time, time); time_window.start_time = time; - time = ltt_time_sub(time_span->endTime, time); + time = ltt_time_sub(time_span->end_time, time); if(ltt_time_compare(time,time_window.time_width) < 0){ time_window.time_width = time; } diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c index a6d63cb3..7faf99ed 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c @@ -119,37 +119,13 @@ static void init() { } -void -main_window_free(MainWindow * mw) -{ - if(mw){ - while(mw->tab){ - lttv_state_remove_event_hooks( - (LttvTracesetState*)mw->tab->traceset_info->traceset_context); - mw->tab = mw->tab->next; - } - g_object_unref(mw->attributes); - g_main_window_list = g_slist_remove(g_main_window_list, mw); - - g_hash_table_destroy(mw->hash_menu_item); - g_hash_table_destroy(mw->hash_toolbar_item); - - g_free(mw); - mw = NULL; - } -} - void main_window_destructor(MainWindow * mw) { if(GTK_IS_WIDGET(mw->mwindow)){ gtk_widget_destroy(mw->mwindow); - // gtk_widget_destroy(mw->HelpContents); - // gtk_widget_destroy(mw->AboutBox); mw = NULL; } - //main_window_free called when the object mw in the widget is unref. - //main_window_free(mw); } diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/mainwindow.h b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/mainwindow.h index afda2ff5..74857c79 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/mainwindow.h +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/mainwindow.h @@ -63,8 +63,6 @@ struct _MainWindow{ Tab * tab; Tab * current_tab; - GHashTable * hash_menu_item; - GHashTable * hash_toolbar_item; }; @@ -93,12 +91,6 @@ struct _Tab{ gboolean time_request_pending; }; -/** - * Remove menu and toolbar item when a module unloaded - */ -void main_window_remove_menu_item(lttvwindow_viewer_constructor view_constructor); -void main_window_remove_toolbar_item(lttvwindow_viewer_constructor view_constructor); - #endif /* _MAIN_WINDOW_ */ diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.h b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.h index fe94847d..a2f10ffa 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.h +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.h @@ -19,8 +19,9 @@ #ifndef MENU_H #define MENU_H -#include #include +#include +#include typedef GArray LttvMenus; diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/toolbar.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/toolbar.c index 7cff5680..618cc412 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/toolbar.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/toolbar.c @@ -32,7 +32,7 @@ inline void lttv_toolbars_destroy(LttvToolbars *h) { g_array_free(h, TRUE); } -inline LttvToolbarClosure void lttv_toolbars_add(LttvToolbars *h, lttvwindow_viewer_constructor f, char* tooltip, char ** pixmap, GtkWidget *widget) +inline LttvToolbarClosure lttv_toolbars_add(LttvToolbars *h, lttvwindow_viewer_constructor f, char* tooltip, char ** pixmap, GtkWidget *widget) { LttvToolbarClosure c; diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.h b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.h index 8b48ebe7..c193fbed 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.h +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.h @@ -559,25 +559,23 @@ void lttvwindow_report_dividor(MainWindow *main_win, gint position); void lttvwindow_report_focus(MainWindow *main_win, GtkWidget *top_widget); - - /* Structure sent to the time request hook */ /* Value considered as empty */ typedef struct _EventsRequest { - LttTime start_time, /* Unset : { 0, 0 } */ - LttvTracesetContextPosition start_position, /* Unset : num_traces = 0 */ - gboolean stop_flag, /* Continue:TRUE Stop:FALSE */ - LttTime end_time, /* Unset : { 0, 0 } */ - guint num_events, /* Unset : G_MAXUINT */ - LttvTracesetContextPosition end_position, /* Unset : num_traces = 0 */ - LttvHooks *before_traceset, /* Unset : NULL */ - LttvHooks *before_trace, /* Unset : NULL */ - LttvHooks *before_tracefile, /* Unset : NULL */ - LttvHooks *event, /* Unset : NULL */ - LttvHooksById *event_by_id, /* Unset : NULL */ - LttvHooks *after_tracefile, /* Unset : NULL */ - LttvHooks *after_trace, /* Unset : NULL */ - LttvHooks *after_traceset /* Unset : NULL */ + LttTime start_time; /* Unset : { 0, 0 } */ + LttvTracesetContextPosition *start_position; /* Unset : num_traces = 0 */ + gboolean stop_flag; /* Continue:TRUE Stop:FALSE */ + LttTime end_time; /* Unset : { 0, 0 } */ + guint num_events; /* Unset : G_MAXUINT */ + LttvTracesetContextPosition *end_position; /* Unset : num_traces = 0 */ + LttvHooks *before_traceset; /* Unset : NULL */ + LttvHooks *before_trace; /* Unset : NULL */ + LttvHooks *before_tracefile; /* Unset : NULL */ + LttvHooks *event; /* Unset : NULL */ + LttvHooksById *event_by_id; /* Unset : NULL */ + LttvHooks *after_tracefile; /* Unset : NULL */ + LttvHooks *after_trace; /* Unset : NULL */ + LttvHooks *after_traceset; /* Unset : NULL */ } EventsRequest;