diff --git a/common/utils/itti_analyzer/libui/ui_callbacks.c b/common/utils/itti_analyzer/libui/ui_callbacks.c index c54766030d45336b3de7dd8d457a207a631b5687..4693ab570b8242968b5c508e4060c3d59b5544d1 100644 --- a/common/utils/itti_analyzer/libui/ui_callbacks.c +++ b/common/utils/itti_analyzer/libui/ui_callbacks.c @@ -50,12 +50,12 @@ gboolean ui_callback_on_save_messages(GtkWidget *widget, gpointer data) return TRUE; } -gboolean ui_callback_on_filters_enabled(GtkWidget *widget, gpointer data) +gboolean ui_callback_on_filters_enabled(GtkToolButton *button, gpointer data) { gboolean enabled; gboolean changed; - enabled = gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON(widget)); + enabled = gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON(button)); g_message("Filters enabled event occurred %d", enabled); @@ -63,19 +63,27 @@ gboolean ui_callback_on_filters_enabled(GtkWidget *widget, gpointer data) if (changed) { - /* Set the tooltip text */ + /* Set the tool tip text */ if (enabled) { - gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM(widget), "Disable messages filtering"); - } - else + gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(button), "Disable messages filtering"); + } else { - gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM(widget), "Enable messages filtering"); + gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(button), "Enable messages filtering"); } ui_tree_view_refilter(); + + if (ui_main_data.signalslist != NULL) + { + GtkTreePath *path_row; + + /* Select the message in requested row */ + gtk_tree_view_get_cursor(GTK_TREE_VIEW(ui_main_data.signalslist), &path_row, NULL); + /* Center the message in the middle of the list if possible */ + gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(ui_main_data.signalslist), path_row, NULL, TRUE, 0.5, 0.0); + } } - // CHECK_FCT(ui_filters_open_file_chooser()); return TRUE; } diff --git a/common/utils/itti_analyzer/libui/ui_callbacks.h b/common/utils/itti_analyzer/libui/ui_callbacks.h index 2a087fc2131d27a66eadfd0608ef98248d8d0076..6f111c3861ba37d70029e297cbb2160972bdaf1d 100644 --- a/common/utils/itti_analyzer/libui/ui_callbacks.h +++ b/common/utils/itti_analyzer/libui/ui_callbacks.h @@ -9,7 +9,7 @@ gboolean ui_callback_on_open_messages(GtkWidget *widget, gboolean ui_callback_on_save_messages(GtkWidget *widget, gpointer data); -gboolean ui_callback_on_filters_enabled(GtkWidget *widget, +gboolean ui_callback_on_filters_enabled(GtkToolButton *button, gpointer data); gboolean ui_callback_on_open_filters(GtkWidget *widget,