aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/proto_hier_stats_dlg.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2007-11-30 15:37:21 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2007-11-30 15:37:21 +0000
commit44145c21ed0988462a8ff2264eb6d2a79fb73d8e (patch)
tree38002925551e334b824a64757b0cf0cf168ccf62 /gtk/proto_hier_stats_dlg.c
parentfacb4b5d50a823d68c370e50c82cdb2746817620 (diff)
Show the Display filter in Protocol Hierarchy Statistics.
svn path=/trunk/; revision=23686
Diffstat (limited to 'gtk/proto_hier_stats_dlg.c')
-rw-r--r--gtk/proto_hier_stats_dlg.c32
1 files changed, 21 insertions, 11 deletions
diff --git a/gtk/proto_hier_stats_dlg.c b/gtk/proto_hier_stats_dlg.c
index 747139bee6..7a7d1037ff 100644
--- a/gtk/proto_hier_stats_dlg.c
+++ b/gtk/proto_hier_stats_dlg.c
@@ -315,6 +315,8 @@ proto_hier_stats_cb(GtkWidget *w _U_, gpointer d _U_)
{
ph_stats_t *ps;
GtkWidget *dlg, *ok_bt, *help_bt, *vbox, *bbox;
+ GtkWidget *label;
+ char title[256];
/* Get the statistics. */
ps = ph_stats_new();
@@ -330,31 +332,39 @@ proto_hier_stats_cb(GtkWidget *w _U_, gpointer d _U_)
gtk_container_border_width(GTK_CONTAINER(vbox), 5);
gtk_container_add(GTK_CONTAINER(dlg), vbox);
+ if (ps->dfilter) {
+ g_snprintf(title, 255, "Display filter: %s", ps->dfilter);
+ } else {
+ g_snprintf(title, 255, "Display filter: none");
+ }
+ label = gtk_label_new(title);
+ gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
+
/* Data section */
create_tree(vbox, ps);
ph_stats_free(ps);
/* Button row. */
- if(topic_available(HELP_STATS_PROTO_HIERARCHY_DIALOG)) {
- bbox = dlg_button_row_new(GTK_STOCK_OK, GTK_STOCK_HELP, NULL);
- } else {
- bbox = dlg_button_row_new(GTK_STOCK_OK, NULL);
- }
+ if(topic_available(HELP_STATS_PROTO_HIERARCHY_DIALOG)) {
+ bbox = dlg_button_row_new(GTK_STOCK_OK, GTK_STOCK_HELP, NULL);
+ } else {
+ bbox = dlg_button_row_new(GTK_STOCK_OK, NULL);
+ }
gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
gtk_widget_show(bbox);
ok_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_OK);
- window_set_cancel_button(dlg, ok_bt, window_cancel_button_cb);
+ window_set_cancel_button(dlg, ok_bt, window_cancel_button_cb);
- if(topic_available(HELP_STATS_PROTO_HIERARCHY_DIALOG)) {
- help_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_HELP);
- SIGNAL_CONNECT(help_bt, "clicked", topic_cb, HELP_STATS_PROTO_HIERARCHY_DIALOG);
- }
+ if(topic_available(HELP_STATS_PROTO_HIERARCHY_DIALOG)) {
+ help_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_HELP);
+ SIGNAL_CONNECT(help_bt, "clicked", topic_cb, HELP_STATS_PROTO_HIERARCHY_DIALOG);
+ }
SIGNAL_CONNECT(dlg, "delete_event", window_delete_event_cb, NULL);
gtk_widget_show_all(dlg);
- window_present(dlg);
+ window_present(dlg);
}