Fix a pointer error in find_stat_node.

Define a default width and maximum height for the stats dialog.

svn path=/trunk/; revision=4463
This commit is contained in:
Gerald Combs 2001-12-31 20:40:34 +00:00
parent 30c5551caa
commit e8839785ad
2 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,6 @@
/* proto_hier_stats_dlg.c
*
* $Id: proto_hier_stats_dlg.c,v 1.6 2001/12/31 04:41:50 gerald Exp $
* $Id: proto_hier_stats_dlg.c,v 1.7 2001/12/31 20:40:34 gerald Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -113,6 +113,8 @@ fill_in_ctree(GtkWidget *tree, ph_stats_t *ps)
fill_in_ctree_node, &di);
}
#define MAX_DLG_HEIGHT 450
#define DEF_DLG_WIDTH 600
static void
create_tree(GtkWidget *container, ph_stats_t *ps)
{
@ -158,7 +160,8 @@ create_tree(GtkWidget *container, ph_stats_t *ps)
fill_in_ctree(tree, ps);
height = GTK_CLIST(tree)->rows * (GTK_CLIST(tree)->row_height + 5);
gtk_widget_set_usize(tree, 500, height);
height = MIN(height, MAX_DLG_HEIGHT);
gtk_widget_set_usize(tree, DEF_DLG_WIDTH, height);
gtk_container_add(GTK_CONTAINER(sw), tree);

View File

@ -1,7 +1,7 @@
/* proto_hier_stats.c
* Routines for calculating statistics based on protocol.
*
* $Id: proto_hier_stats.c,v 1.8 2001/12/18 19:09:02 gram Exp $
* $Id: proto_hier_stats.c,v 1.9 2001/12/31 20:40:32 gerald Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -49,7 +49,7 @@ find_stat_node(GNode *parent_node, header_field_info *needle_hfinfo)
needle_node = g_node_first_child(parent_node);
while (needle_node) {
finfo = PITEM_FINFO(needle_node);
finfo = GNODE_PNODE(needle_node);
if (finfo && finfo->hfinfo && finfo->hfinfo->id == needle_hfinfo->id) {
return needle_node;
}