From: compudj Date: Thu, 22 Jun 2006 18:31:57 +0000 (+0000) Subject: add properties button and tab fixes X-Git-Tag: v0.12.20~1530 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=eb1fcbb75ba8323a5b6bbbcdfe570e4a5f46a184;p=lttv.git add properties button and tab fixes git-svn-id: http://ltt.polymtl.ca/svn@1959 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/cfv.c b/ltt/branches/poly/lttv/modules/gui/controlflow/cfv.c index 33bcdd2a..6f033bd1 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/cfv.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/cfv.c @@ -49,35 +49,35 @@ header_size_allocate(GtkWidget *widget, } gboolean cfv_scroll_event(GtkWidget *widget, GdkEventScroll *event, - gpointer data) + gpointer data) { ControlFlowData *control_flow_data = (ControlFlowData*)data; - unsigned int cell_height = - get_cell_height( - GTK_TREE_VIEW(control_flow_data->process_list->process_list_widget)); - gdouble new; + unsigned int cell_height = + get_cell_height( + GTK_TREE_VIEW(control_flow_data->process_list->process_list_widget)); + gdouble new; switch(event->direction) { case GDK_SCROLL_UP: - { - new = gtk_adjustment_get_value(control_flow_data->v_adjust) - - cell_height; - } + { + new = gtk_adjustment_get_value(control_flow_data->v_adjust) + - cell_height; + } break; case GDK_SCROLL_DOWN: - { - new = gtk_adjustment_get_value(control_flow_data->v_adjust) - + cell_height; - } + { + new = gtk_adjustment_get_value(control_flow_data->v_adjust) + + cell_height; + } break; - default: - return FALSE; + default: + return FALSE; } - if(new >= control_flow_data->v_adjust->lower && - new <= control_flow_data->v_adjust->upper - - control_flow_data->v_adjust->page_size) - gtk_adjustment_set_value(control_flow_data->v_adjust, new); - return TRUE; + if(new >= control_flow_data->v_adjust->lower && + new <= control_flow_data->v_adjust->upper + - control_flow_data->v_adjust->page_size) + gtk_adjustment_set_value(control_flow_data->v_adjust, new); + return TRUE; } @@ -135,11 +135,11 @@ guicontrolflow(Tab *tab) "scroll-event", G_CALLBACK (cfv_scroll_event), (gpointer)control_flow_data); - g_signal_connect (G_OBJECT(drawing_area), + g_signal_connect (G_OBJECT(drawing_area), "scroll-event", G_CALLBACK (cfv_scroll_event), (gpointer)control_flow_data); - + g_signal_connect (G_OBJECT(control_flow_data->process_list->button), "size-allocate", G_CALLBACK(header_size_allocate), @@ -191,6 +191,8 @@ guicontrolflow(Tab *tab) g_control_flow_data_list = g_slist_append( g_control_flow_data_list, control_flow_data); + + control_flow_data->filter = NULL; //WARNING : The widget must be //inserted in the main window before the drawing area @@ -224,6 +226,7 @@ guicontrolflow_destructor(ControlFlowData *control_flow_data) if(GTK_IS_WIDGET(guicontrolflow_get_widget(control_flow_data))) g_info("widget still exists"); + lttv_filter_destroy(control_flow_data->filter); /* Process List is removed with it's widget */ //ProcessList_destroy(control_flow_data->process_list); if(tab != NULL) diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/cfv.h b/ltt/branches/poly/lttv/modules/gui/controlflow/cfv.h index 31c42fdf..d5410caf 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/cfv.h +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/cfv.h @@ -23,6 +23,7 @@ #include #include +#include #include "processlist.h" extern GQuark LTT_NAME_CPU; @@ -44,6 +45,8 @@ struct _ControlFlowData { Tab *tab; GtkWidget *box; /* box that contains the hpaned. necessary for it to work */ + GtkWidget *toolbar; /* Vbox that contains the viewer's toolbar */ + GtkWidget *button_prop; /* Properties button. */ GtkWidget *h_paned; ProcessList *process_list; @@ -60,6 +63,8 @@ struct _ControlFlowData { guint background_info_waiting; /* Number of background requests waited for in order to have all the info ready. */ + LttvFilter *filter; + } ; /* Control Flow Data constructor */