Make the default capture filter be the last one used, as it was before -
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 5 Oct 2004 23:34:53 +0000 (23:34 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 5 Oct 2004 23:34:53 +0000 (23:34 +0000)
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12212 f5534014-38df-0310-8fa8-9805f1628bb7

gtk/capture_dlg.c

index 94a4d4dc53605f92331be842fc92623f1a298f24..369e16ca07676f3b91eb8070632753a1d64d62dc 100644 (file)
@@ -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.",