aboutsummaryrefslogtreecommitdiffstats
path: root/column.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>1999-06-19 03:14:32 +0000
committerGuy Harris <guy@alum.mit.edu>1999-06-19 03:14:32 +0000
commitbecbefffcb9b460cc572a62b6ecf0920a5c47408 (patch)
treec5135b9685b259bb0a3c26730cf3c9a8533125d5 /column.c
parentfe725bec8cb78d9fbcb1fb9133b1c3ad65e0e400 (diff)
Use "gtk_toggle_button_set_state()" rather than
"gtk_toggle_button_set_active()" to set the state of radio buttions; "gtk_toggle_button_set_active()" doesn't exist in GTK+ 1.0[.x], and "gtk_toggle_button_set_state()" is an alias for it in GTK+ 1.2[.x]. Compute the column widths in the summary display based on the longest string in the column; recompute it whenever we update the columns. svn path=/trunk/; revision=319
Diffstat (limited to 'column.c')
-rw-r--r--column.c64
1 files changed, 1 insertions, 63 deletions
diff --git a/column.c b/column.c
index 60b43cdce6..b4bd10a753 100644
--- a/column.c
+++ b/column.c
@@ -1,7 +1,7 @@
/* column.c
* Routines for handling column preferences
*
- * $Id: column.c,v 1.12 1999/06/19 01:47:43 guy Exp $
+ * $Id: column.c,v 1.13 1999/06/19 03:14:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -166,68 +166,6 @@ get_column_format_matches(gboolean *fmt_list, gint format) {
}
}
-/* Returns the longest possible width for a particular column type */
-/* XXX - this is somewhat fragile; we should probably generate */
-/* the summary lines for all the packets first, and compute the */
-/* maximum column width as the maximum string width of all the */
-/* values in that column. */
-gint
-get_column_width(gint format, GdkFont *font) {
- switch (format) {
- case COL_NUMBER:
- return (gdk_string_width(font, "0") * 7);
- break;
- case COL_CLS_TIME:
- if (timestamp_type == ABSOLUTE)
- return (gdk_string_width(font, "00:00:00.000000"));
- else
- return (gdk_string_width(font, "0000.000000"));
- break;
- case COL_ABS_TIME:
- return (gdk_string_width(font, "00:00:00.000000"));
- break;
- case COL_REL_TIME:
- case COL_DELTA_TIME:
- return (gdk_string_width(font, "0000.000000"));
- break;
- case COL_DEF_SRC:
- case COL_RES_SRC:
- case COL_UNRES_SRC:
- case COL_DEF_DL_SRC:
- case COL_RES_DL_SRC:
- case COL_UNRES_DL_SRC:
- case COL_DEF_NET_SRC:
- case COL_RES_NET_SRC:
- case COL_UNRES_NET_SRC:
- case COL_DEF_DST:
- case COL_RES_DST:
- case COL_UNRES_DST:
- case COL_DEF_DL_DST:
- case COL_RES_DL_DST:
- case COL_UNRES_DL_DST:
- case COL_DEF_NET_DST:
- case COL_RES_NET_DST:
- case COL_UNRES_NET_DST:
- return (gdk_string_width(font, "00000000.000000000000")); /* IPX-style */
- break;
- case COL_DEF_SRC_PORT:
- case COL_RES_SRC_PORT:
- case COL_UNRES_SRC_PORT:
- case COL_DEF_DST_PORT:
- case COL_RES_DST_PORT:
- case COL_UNRES_DST_PORT:
- return (gdk_string_width(font, "0") * 6);
- break;
- case COL_PROTOCOL:
- return (gdk_string_width(font, "NBNS (UDP)"));
- break;
- default: /* COL_INFO */
- return (gdk_string_width(font, "Source port: kerberos-master "
- "Destination port: kerberos-master"));
- break;
- }
-}
-
#define TIME_DEF 0
#define TIME_REL 1
#define TIME_ABS 2