aboutsummaryrefslogtreecommitdiffstats
path: root/display.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 /display.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 'display.c')
-rw-r--r--display.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/display.c b/display.c
index 1f9c9ac920..49e0fa0576 100644
--- a/display.c
+++ b/display.c
@@ -1,7 +1,7 @@
/* display.c
* Routines for packet display windows
*
- * $Id: display.c,v 1.2 1999/06/19 01:47:43 guy Exp $
+ * $Id: display.c,v 1.3 1999/06/19 03:14:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -60,7 +60,6 @@
#endif
#include "timestamp.h"
-#include "column.h"
#include "packet.h"
#include "file.h"
#include "display.h"
@@ -90,7 +89,7 @@ display_opt_cb(GtkWidget *w, gpointer d) {
gtk_widget_show(main_vb);
button = gtk_radio_button_new_with_label(NULL, "Time of day");
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button),
+ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button),
(timestamp_type == ABSOLUTE));
gtk_object_set_data(GTK_OBJECT(display_opt_w), E_DISPLAY_TIME_ABS_KEY,
button);
@@ -100,7 +99,7 @@ display_opt_cb(GtkWidget *w, gpointer d) {
button = gtk_radio_button_new_with_label(
gtk_radio_button_group(GTK_RADIO_BUTTON(button)),
"Seconds since beginning of capture");
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button),
+ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button),
(timestamp_type == RELATIVE));
gtk_object_set_data(GTK_OBJECT(display_opt_w), E_DISPLAY_TIME_REL_KEY,
button);
@@ -110,7 +109,7 @@ display_opt_cb(GtkWidget *w, gpointer d) {
button = gtk_radio_button_new_with_label(
gtk_radio_button_group(GTK_RADIO_BUTTON(button)),
"Seconds since previous frame");
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button),
+ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button),
(timestamp_type == DELTA));
gtk_object_set_data(GTK_OBJECT(display_opt_w), E_DISPLAY_TIME_DELTA_KEY,
button);
@@ -145,9 +144,6 @@ display_opt_cb(GtkWidget *w, gpointer d) {
static void
display_opt_ok_cb(GtkWidget *w, gpointer data) {
GtkWidget *button;
- GtkStyle *pl_style;
- int i;
- gint col_fmt;
#ifdef GTK_HAVE_FEATURES_1_1_0
data = w;
@@ -170,18 +166,6 @@ display_opt_ok_cb(GtkWidget *w, gpointer data) {
gtk_widget_destroy(GTK_WIDGET(data));
- /* Recompute the column widths; we may have changed the format of the
- time stamp column. */
- pl_style = gtk_widget_get_style(packet_list);
- for (i = 0; i < cf.cinfo.num_cols; i++) {
- col_fmt = get_column_format(i);
- gtk_clist_set_column_width(GTK_CLIST(packet_list), i,
- get_column_width(col_fmt, pl_style->font));
- if (col_fmt == COL_NUMBER)
- gtk_clist_set_column_justification(GTK_CLIST(packet_list), i,
- GTK_JUSTIFY_RIGHT);
- }
-
redisplay_packets(&cf);
}