diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-01-10 07:43:39 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-01-10 07:43:39 +0000 |
commit | 9357047df5a9833fc350cd316bc3aeee4c198b10 (patch) | |
tree | 774bd024ae92e6bcff95ab64f30b7153fcdc4f6f /gtk/capture_dlg.c | |
parent | f7265ba975b079f97d3837ba91cb371f63059c5b (diff) | |
download | wireshark-9357047df5a9833fc350cd316bc3aeee4c198b10.tar.gz |
Add a preferences page for capture preferences, so that the user can
directly edit the capture preferences, rather than only being able to
set them implicitly from the values for the most recent capture.
Add a preferences item for the interface on which to capture.
Get rid of some unused variables.
svn path=/trunk/; revision=4510
Diffstat (limited to 'gtk/capture_dlg.c')
-rw-r--r-- | gtk/capture_dlg.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gtk/capture_dlg.c b/gtk/capture_dlg.c index 5a6eb0429a..c96ccb1f75 100644 --- a/gtk/capture_dlg.c +++ b/gtk/capture_dlg.c @@ -1,7 +1,7 @@ /* capture_dlg.c * Routines for packet capture windows * - * $Id: capture_dlg.c,v 1.52 2001/12/09 03:20:19 guy Exp $ + * $Id: capture_dlg.c,v 1.53 2002/01/10 07:43:39 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -211,9 +211,15 @@ capture_prep_cb(GtkWidget *w, gpointer d) if_cb = gtk_combo_new(); if (if_list != NULL) gtk_combo_set_popdown_strings(GTK_COMBO(if_cb), if_list); - if (cfile.iface) + if (cfile.iface == NULL && prefs.capture_device != NULL) { + /* No interface was specified on the command line or in a previous + capture, but there is one specified in the preferences file; + make the one from the preferences file the default */ + cfile.iface = g_strdup(prefs.capture_device); + } + if (cfile.iface != NULL) gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(if_cb)->entry), cfile.iface); - else if (if_list) + else if (if_list != NULL) gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(if_cb)->entry), if_list->data); gtk_table_attach_defaults(GTK_TABLE(table), if_cb, 1, 2, 0, 1); gtk_widget_show(if_cb); |