diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 1999-06-19 03:14:32 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 1999-06-19 03:14:32 +0000 |
commit | d9a59a909d28a18964a692bcfac82a67b4e19268 (patch) | |
tree | c5135b9685b259bb0a3c26730cf3c9a8533125d5 /column.c | |
parent | 50e7cba1d95dabd339e8fa4b10053f4ca7537f84 (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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@319 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'column.c')
-rw-r--r-- | column.c | 64 |
1 files changed, 1 insertions, 63 deletions
@@ -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 |