aboutsummaryrefslogtreecommitdiffstats
path: root/trace-graph-main.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-02-17 20:33:39 -0500
committerSteven Rostedt <rostedt@goodmis.org>2010-02-17 20:33:39 -0500
commitd1416b81130c27f35bf79e7a84c9d3c2a79d3174 (patch)
tree5738082f8479d0d33a7bbdfbb0d948df2177483d /trace-graph-main.c
parent667fae1868c7d94c290e74aaaeed1a0f265f830e (diff)
trace-graph: Add advanced event filter
Add the menu and implementation to perform advance event filtering on the trace-graph. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'trace-graph-main.c')
-rw-r--r--trace-graph-main.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/trace-graph-main.c b/trace-graph-main.c
index e6fca6b..987a80d 100644
--- a/trace-graph-main.c
+++ b/trace-graph-main.c
@@ -110,6 +110,16 @@ events_clicked (gpointer data)
110 trace_graph_event_filter_callback, ginfo); 110 trace_graph_event_filter_callback, ginfo);
111} 111}
112 112
113/* Callback for the clicked signal of the Advanced filter button */
114static void
115adv_filter_clicked (gpointer data)
116{
117 struct graph_info *ginfo = data;
118
119 trace_adv_filter_dialog(ginfo->handle, ginfo->event_filter,
120 trace_graph_adv_filter_callback, ginfo);
121}
122
113void trace_graph(int argc, char **argv) 123void trace_graph(int argc, char **argv)
114{ 124{
115 struct tracecmd_input *handle = NULL; 125 struct tracecmd_input *handle = NULL;
@@ -246,6 +256,22 @@ void trace_graph(int argc, char **argv)
246 gtk_widget_show(sub_item); 256 gtk_widget_show(sub_item);
247 257
248 258
259 /* --- Filter - Advanced Events Option --- */
260
261 sub_item = gtk_menu_item_new_with_label("advanced event filter");
262
263 /* Add them to the menu */
264 gtk_menu_shell_append(GTK_MENU_SHELL (menu), sub_item);
265
266 /* We can attach the Quit menu item to our exit function */
267 g_signal_connect_swapped (G_OBJECT (sub_item), "activate",
268 G_CALLBACK (adv_filter_clicked),
269 (gpointer) ginfo);
270
271 /* We do need to show menu items */
272 gtk_widget_show(sub_item);
273
274
249 /* --- End Filter Options --- */ 275 /* --- End Filter Options --- */
250 gtk_menu_item_set_submenu(GTK_MENU_ITEM (menu_item), menu); 276 gtk_menu_item_set_submenu(GTK_MENU_ITEM (menu_item), menu);
251 277