aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/capture_prefs.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-01-12 11:02:47 +0000
committerGuy Harris <guy@alum.mit.edu>2002-01-12 11:02:47 +0000
commit6437001da675c0c6f893791ecc163af7b6c09168 (patch)
tree8ff4dfffe922144b53860599565b069add726395 /gtk/capture_prefs.c
parent354b4b74d08fbafe23c7929f1f68eb4c84df4e2f (diff)
Get rid of unused variables.
Put the labels of check boxes to the left of the checkboxes, right-aligned, and give all of them a colon at the end, to match the style of module preferences. svn path=/trunk/; revision=4534
Diffstat (limited to 'gtk/capture_prefs.c')
-rw-r--r--gtk/capture_prefs.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/gtk/capture_prefs.c b/gtk/capture_prefs.c
index b17efb2f2c..d7b85eda63 100644
--- a/gtk/capture_prefs.c
+++ b/gtk/capture_prefs.c
@@ -1,7 +1,7 @@
/* capture_prefs.c
* Dialog box for capture preferences
*
- * $Id: capture_prefs.c,v 1.5 2002/01/12 09:19:59 guy Exp $
+ * $Id: capture_prefs.c,v 1.6 2002/01/12 11:02:47 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -60,7 +60,6 @@ capture_prefs_show(void)
{
GtkWidget *main_tb, *main_vb;
GtkWidget *if_cb, *if_lb;
- GtkWidget *promisc_cb, *sync_cb, *auto_scroll_cb;
GList *if_list;
int err;
char err_str[PCAP_ERRBUF_SIZE];
@@ -70,7 +69,7 @@ capture_prefs_show(void)
gtk_container_border_width(GTK_CONTAINER(main_vb), 5);
/* Main table */
- main_tb = gtk_table_new(CAPTURE_TABLE_ROWS, 3, FALSE);
+ main_tb = gtk_table_new(CAPTURE_TABLE_ROWS, 2, FALSE);
gtk_box_pack_start(GTK_BOX(main_vb), main_tb, FALSE, FALSE, 0);
gtk_table_set_row_spacings(GTK_TABLE(main_tb), 10);
gtk_table_set_col_spacings(GTK_TABLE(main_tb), 15);
@@ -79,6 +78,7 @@ capture_prefs_show(void)
/* Default device */
if_lb = gtk_label_new("Interface:");
gtk_table_attach_defaults(GTK_TABLE(main_tb), if_lb, 0, 1, 0, 1);
+ gtk_misc_set_alignment(GTK_MISC(if_lb), 1.0, 0.5);
gtk_widget_show(if_lb);
if_cb = gtk_combo_new();
@@ -103,11 +103,11 @@ capture_prefs_show(void)
/* Real-time capture */
create_option_check_button(main_vb, CAPTURE_REAL_TIME_KEY, main_tb, 2,
- "Update list of packets in real time", prefs.capture_real_time);
+ "Update list of packets in real time:", prefs.capture_real_time);
/* Auto-scroll real-time capture */
create_option_check_button(main_vb, AUTO_SCROLL_KEY, main_tb, 3,
- "Automatic scrolling in live capture", prefs.capture_auto_scroll);
+ "Automatic scrolling in live capture:", prefs.capture_auto_scroll);
/* Show 'em what we got */
gtk_widget_show_all(main_vb);
@@ -120,16 +120,18 @@ create_option_check_button(GtkWidget *main_vb, const gchar *key,
GtkWidget *main_tb, int table_position, const gchar *label_text,
gboolean active)
{
- GtkWidget *hbox, *check_box;
+ GtkWidget *label, *check_box;
- hbox = gtk_hbox_new(FALSE, 0);
- gtk_table_attach_defaults(GTK_TABLE(main_tb), hbox, 1, 3,
+ label = gtk_label_new(label_text);
+ gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
+ gtk_table_attach_defaults(GTK_TABLE(main_tb), label, 0, 1,
table_position, table_position + 1);
- check_box = gtk_check_button_new_with_label(label_text);
+ check_box = gtk_check_button_new();
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_box), active);
+ gtk_table_attach_defaults(GTK_TABLE(main_tb), check_box, 1, 2,
+ table_position, table_position + 1);
- gtk_box_pack_start( GTK_BOX(hbox), check_box, FALSE, FALSE, 0 );
gtk_object_set_data(GTK_OBJECT(main_vb), key, check_box);
}