diff options
author | Guy Harris <guy@alum.mit.edu> | 2005-08-21 09:48:27 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2005-08-21 09:48:27 +0000 |
commit | a0e68da9180d65493a42f892fc298eefc9b1d17d (patch) | |
tree | d7b146739aeaeeadc557498ee810da7b71f3d8b9 /gtk/stats_tree_stat.c | |
parent | e88b3ccb323aa7df6f1c89ff56c28cdfb4b1265a (diff) | |
download | wireshark-a0e68da9180d65493a42f892fc298eefc9b1d17d.tar.gz |
Add a "register_dfilter_stat()", to register stats that take a display
filter as an argument on the command line and have a dialog box to enter
the display filter through the GUI. Use it for all stats using
"gtk_tap_dfilter_dlg_cb()".
Add a top-level "stat_menu.h" file to declare "REGISTER_STAT_GROUP_E"
for the benefit of the declaration of "register_dfilter_stat()" in the
top-level "tap_dfilter_dlg.h". Rename the "stat_menu.h" in the gtk
directory to "gtk_stat_menu.h", so as not to have two headers with the
same name.
Get rid of headers not declaring any functions not being used in the
module.
svn path=/trunk/; revision=15493
Diffstat (limited to 'gtk/stats_tree_stat.c')
-rw-r--r-- | gtk/stats_tree_stat.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/gtk/stats_tree_stat.c b/gtk/stats_tree_stat.c index babd2048c1..34c5552790 100644 --- a/gtk/stats_tree_stat.c +++ b/gtk/stats_tree_stat.c @@ -34,11 +34,10 @@ #include "simple_dialog.h" #include "globals.h" -#include <epan/stat_cmd_args.h> -#include "stat_menu.h" #include "gui_utils.h" #include "dlg_utils.h" #include "compat_macros.h" +#include "../stat_menu.h" #include "tap_dfilter_dlg.h" #include "../tap_dfilter_dlg.h" @@ -367,12 +366,7 @@ static void init_gtk_tree(const char* optarg) { static void register_gtk_stats_tree_tap (gpointer k _U_, gpointer v, gpointer p _U_) { stats_tree_cfg* cfg = v; - guint8* s; - s = g_strdup_printf("%s,tree",cfg->abbr); - - register_stat_cmd_arg(s, init_gtk_tree); - cfg->pr = g_malloc(sizeof(tree_pres)); cfg->pr->stat_dlg = g_malloc(sizeof(tap_dfilter_dlg)); @@ -382,8 +376,8 @@ static void register_gtk_stats_tree_tap (gpointer k _U_, gpointer v, gpointer p cfg->pr->stat_dlg->tap_init_cb = init_gtk_tree; cfg->pr->stat_dlg->index = -1; - register_stat_menu_item(cfg->name, REGISTER_STAT_GROUP_NONE, - gtk_tap_dfilter_dlg_cb, NULL, NULL, cfg->pr->stat_dlg); + register_dfilter_stat(cfg->pr->stat_dlg, cfg->name, + REGISTER_STAT_GROUP_NONE); } static void free_tree_presentation(stats_tree* st) { |