X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Ftutorial%2Ftutorial.c;h=46ab96aa4e679bd3bebc29b113f8094ec9e63398;hb=e433e6d6da2cc572a3d14257abe18bc3afd5c7e6;hp=f113355f3e62dcc4102dade39ef659df91f60702;hpb=d9ba814de610e2d38a49e8daf71b185242102c00;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/gui/tutorial/tutorial.c b/ltt/branches/poly/lttv/modules/gui/tutorial/tutorial.c index f113355f..46ab96aa 100644 --- a/ltt/branches/poly/lttv/modules/gui/tutorial/tutorial.c +++ b/ltt/branches/poly/lttv/modules/gui/tutorial/tutorial.c @@ -52,6 +52,7 @@ #include #include #include +#include #include #include "hTutorialInsert.xpm" @@ -98,6 +99,7 @@ typedef struct _InterruptEventData GtkTreeSelection *SelectionTree; Tab * tab; /* tab that contains this plug-in*/ + LttvPluginTab * ptab; LttvHooks * event_hooks; LttvHooks * hooks_trace_after; LttvHooks * hooks_trace_before; @@ -111,8 +113,8 @@ typedef struct _InterruptEventData /* Function prototypes */ static gboolean interrupt_update_time_window(void * hook_data, void * call_data); -static GtkWidget *interrupts(Tab *tab); -static InterruptEventData *system_info(Tab *tab); +static GtkWidget *interrupts(LttvPlugin *plugin); +static InterruptEventData *system_info(LttvPluginTab *ptab); void interrupt_destructor(InterruptEventData *event_viewer_data); static void request_event(InterruptEventData *event_data ); static guint64 get_interrupt_id(LttEvent *e); @@ -159,10 +161,10 @@ static void init() * Constructor hook * */ -static GtkWidget *interrupts(Tab * tab) +static GtkWidget *interrupts(LttvPlugin *plugin) { - - InterruptEventData* event_data = system_info(tab) ; + LttvPluginTab *ptab = LTTV_PLUGIN_TAB(plugin); + InterruptEventData* event_data = system_info(ptab) ; if(event_data) return event_data->Hbox; else @@ -173,15 +175,16 @@ static GtkWidget *interrupts(Tab * tab) * This function initializes the Event Viewer functionnality through the * GTK API. */ -InterruptEventData *system_info(Tab *tab) +InterruptEventData *system_info(LttvPluginTab *ptab) { LttTime end; GtkTreeViewColumn *column; GtkCellRenderer *renderer; InterruptEventData* event_viewer_data = g_new(InterruptEventData,1) ; - + Tab *tab = ptab->tab; event_viewer_data->tab = tab; + event_viewer_data->ptab = ptab; /*Get the current time frame from the main window */ event_viewer_data->time_window = lttvwindow_get_time_window(tab);