aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/capture_dlg.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-10-05 23:34:53 +0000
committerGuy Harris <guy@alum.mit.edu>2004-10-05 23:34:53 +0000
commit51dd2ac334d71b6cb06e3d15d3e8c079ecafee08 (patch)
tree4e9285836b8cfb10ea980764161ddc8e8e5072ae /gtk/capture_dlg.c
parent96fb56728996481e469d4a690f6aa4270b6c3ae8 (diff)
Make the default capture filter be the last one used, as it was before -
it's a pain to have to keep typing the same filter over and over again if you're trying multiple captures of the same type of traffic. At least with GTK+ 2.x, the text of the filter is selected, so if you start typing a new filter it'll replace the default filter. svn path=/trunk/; revision=12212
Diffstat (limited to 'gtk/capture_dlg.c')
-rw-r--r--gtk/capture_dlg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/capture_dlg.c b/gtk/capture_dlg.c
index 94a4d4dc53..369e16ca07 100644
--- a/gtk/capture_dlg.c
+++ b/gtk/capture_dlg.c
@@ -737,7 +737,8 @@ capture_prep(void)
filter_te = GTK_COMBO(filter_cm)->entry;
gtk_combo_set_popdown_strings(GTK_COMBO(filter_cm), filter_list);
- gtk_entry_set_text(GTK_ENTRY(filter_te), ""); /* Default capture filter is empty */
+ if (cfile.cfilter)
+ gtk_entry_set_text(GTK_ENTRY(filter_te), cfile.cfilter);
gtk_tooltips_set_tip(tooltips, filter_te,
"Enter a capture filter to reduce the amount of packets to be captured. "
"See \"Capture Filters\" in the online help for further information how to use it.",