#include <lttvwindow/lttvwindow.h>
#include <lttvwindow/lttvwindowtraces.h>
+#include <lttvwindow/lttv_plugin_tab.h>
#include "hGuiStatisticInsert.xpm"
GtkWidget *guistatistic_get_widget(StatisticViewerData *svd);
//! Statistic Viewer's constructor hook
-GtkWidget *h_gui_statistic(Tab *tab);
+GtkWidget *h_gui_statistic(LttvPlugin *plugin);
//! Statistic Viewer's constructor
-StatisticViewerData *gui_statistic(Tab *tab);
+StatisticViewerData *gui_statistic(LttvPluginTab *ptab);
//! Statistic Viewer's destructor
void gui_statistic_destructor(StatisticViewerData *statistic_viewer_data);
struct _StatisticViewerData{
Tab *tab;
+ LttvPluginTab *ptab;
//LttvTracesetStats * stats;
int size;
* @return The widget created.
*/
GtkWidget *
-h_gui_statistic(Tab *tab)
+h_gui_statistic(LttvPlugin *plugin)
{
- StatisticViewerData* statistic_viewer_data = gui_statistic(tab) ;
+ LttvPluginTab *ptab = LTTV_PLUGIN_TAB(plugin);
+ StatisticViewerData* statistic_viewer_data = gui_statistic(ptab) ;
if(statistic_viewer_data)
return guistatistic_get_widget(statistic_viewer_data);
* @return The Statistic viewer data created.
*/
StatisticViewerData *
-gui_statistic(Tab *tab)
+gui_statistic(LttvPluginTab *ptab)
{
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
StatisticViewerData* statistic_viewer_data = g_new(StatisticViewerData,1);
-
+ Tab *tab = ptab->tab;
statistic_viewer_data->tab = tab;
+ statistic_viewer_data->ptab = ptab;
// statistic_viewer_data->stats =
// lttvwindow_get_traceset_stats(statistic_viewer_data->tab);
// statistic_viewer_data->calculate_stats =
case LTTV_GOBJECT:
if(LTTV_IS_ATTRIBUTE(*(value.v_gobject))) {
subtree = (LttvAttribute *)*(value.v_gobject);
- if(is_named)
- sprintf(dir_str, "%s", g_quark_to_string(name));
- else
- sprintf(dir_str, "%lu", name);
- gtk_tree_store_append (store, &iter, parent);
- gtk_tree_store_set (store, &iter,NAME_COLUMN,dir_str,-1);
- path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
- str = gtk_tree_path_to_string (path);
- g_hash_table_insert(statistic_viewer_data->statistic_hash,
+ if(is_named)
+ sprintf(dir_str, "%s", g_quark_to_string(name));
+ else
+ sprintf(dir_str, "%u", name);
+ gtk_tree_store_append (store, &iter, parent);
+ gtk_tree_store_set (store, &iter,NAME_COLUMN,dir_str,-1);
+ path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
+ str = gtk_tree_path_to_string (path);
+ g_hash_table_insert(statistic_viewer_data->statistic_hash,
(gpointer)str, subtree);
show_tree(statistic_viewer_data, subtree, &iter);
}
if(is_named)
sprintf(type_name,"%s", g_quark_to_string(name));
else
- sprintf(type_name,"%lu", name);
+ sprintf(type_name,"%u", name);
type_value[0] = '\0';
switch(type) {
case LTTV_INT: