diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-11-10 23:02:42 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-11-10 23:02:42 +0000 |
commit | 6b1284fa7c5bbf4df75cfbd8a2b93a244a038d89 (patch) | |
tree | c2cb5f4c3857a7ecc160f2219261f1e77ada2b38 | |
parent | ec8806bc8ec5631037d38e0fa627f005b3e56247 (diff) |
Get rid of the last remnants of the "check the syntax of capture
filters" preference; now that we always build with threads, we do the
syntax checking in a separate thread, so it doesn't hang the UI, and we
no longer have UI to change it but we were still trying to fetch the
value of the non-existent checkbox for it and getting a warning printed.
(We still check for it when reading, so that we don't print warnings if
it's present.)
svn path=/trunk/; revision=39788
-rw-r--r-- | epan/prefs.c | 6 | ||||
-rw-r--r-- | epan/prefs.h | 1 | ||||
-rw-r--r-- | gtk/capture_dlg.c | 6 | ||||
-rw-r--r-- | gtk/prefs_capture.c | 5 |
4 files changed, 5 insertions, 13 deletions
diff --git a/epan/prefs.c b/epan/prefs.c index e630b3eab8..b70cc29787 100644 --- a/epan/prefs.c +++ b/epan/prefs.c @@ -1321,7 +1321,6 @@ init_prefs(void) { prefs.capture_real_time = TRUE; prefs.capture_auto_scroll = TRUE; prefs.capture_show_info = FALSE; - prefs.capture_syntax_check_filter = TRUE; /* set the default values for the name resolution dialog box */ prefs.name_resolve = RESOLV_ALL ^ RESOLV_NETWORK; @@ -1980,6 +1979,8 @@ prefs_capture_device_monitor_mode(const char *name) #define PRS_CAP_REAL_TIME "capture.real_time_update" #define PRS_CAP_AUTO_SCROLL "capture.auto_scroll" #define PRS_CAP_SHOW_INFO "capture.show_info" + +/* obsolete preference */ #define PRS_CAP_SYNTAX_CHECK_FILTER "capture.syntax_check_filter" #define RED_COMPONENT(x) (guint16) (((((x) >> 16) & 0xff) * 65535 / 255)) @@ -2504,6 +2505,8 @@ set_pref(gchar *pref_name, gchar *value, void *private_data _U_, } else if (strcmp(pref_name, PRS_CAP_SHOW_INFO) == 0) { prefs.capture_show_info = ((g_ascii_strcasecmp(value, "true") == 0)?TRUE:FALSE); } else if (strcmp(pref_name, PRS_CAP_SYNTAX_CHECK_FILTER) == 0) { + /* Obsolete preference. */ + ; /* handle the global options */ } else if (strcmp(pref_name, PRS_NAME_RESOLVE) == 0 || strcmp(pref_name, PRS_CAP_NAME_RESOLVE) == 0) { @@ -3615,7 +3618,6 @@ copy_prefs(e_prefs *dest, e_prefs *src) dest->capture_real_time = src->capture_real_time; dest->capture_auto_scroll = src->capture_auto_scroll; dest->capture_show_info = src->capture_show_info; - dest->capture_syntax_check_filter = src->capture_syntax_check_filter; dest->name_resolve = src->name_resolve; dest->name_resolve_concurrency = src->name_resolve_concurrency; dest->display_hidden_proto_items = src->display_hidden_proto_items; diff --git a/epan/prefs.h b/epan/prefs.h index 395119c636..cec0a4af46 100644 --- a/epan/prefs.h +++ b/epan/prefs.h @@ -163,7 +163,6 @@ typedef struct _e_prefs { gboolean capture_real_time; gboolean capture_auto_scroll; gboolean capture_show_info; - gboolean capture_syntax_check_filter; guint rtp_player_max_visible; guint tap_update_interval; gboolean display_hidden_proto_items; diff --git a/gtk/capture_dlg.c b/gtk/capture_dlg.c index 1a14417793..3febfba565 100644 --- a/gtk/capture_dlg.c +++ b/gtk/capture_dlg.c @@ -345,9 +345,6 @@ check_capture_filter_syntax(void *data _U_) { static gboolean update_capture_filter_te(gpointer data _U_) { - if (!prefs.capture_syntax_check_filter) - return TRUE; - g_mutex_lock(cfc_data_mtx); if (cfc_data.filter_text && cfc_data.filter_te) { @@ -405,9 +402,6 @@ capture_filter_check_syntax_cb(GtkWidget *w _U_, gpointer user_data _U_) gchar *filter_text; gpointer dlt_ptr; - if (!prefs.capture_syntax_check_filter) - return; - linktype_combo_box = (GtkWidget *) g_object_get_data(G_OBJECT(opt_edit_w), E_CAP_LT_CBX_KEY); if (! ws_combo_box_get_active_pointer(GTK_COMBO_BOX(linktype_combo_box), &dlt_ptr)) { diff --git a/gtk/prefs_capture.c b/gtk/prefs_capture.c index 8ea8aa6e3c..c82d0414b0 100644 --- a/gtk/prefs_capture.c +++ b/gtk/prefs_capture.c @@ -55,7 +55,6 @@ #define CAPTURE_REAL_TIME_KEY "capture_real_time" #define AUTO_SCROLL_KEY "auto_scroll" #define SHOW_INFO_KEY "show_info" -#define SYNTAX_CHECK_FILTER_KEY "syntax_check_filter" #define CAPTURE_TABLE_ROWS 6 @@ -215,7 +214,7 @@ capture_prefs_show(void) void capture_prefs_fetch(GtkWidget *w) { - GtkWidget *if_cbxe, *promisc_cb, *pcap_ng_cb, *sync_cb, *auto_scroll_cb, *show_info_cb, *syntax_check_filter_cb; + GtkWidget *if_cbxe, *promisc_cb, *pcap_ng_cb, *sync_cb, *auto_scroll_cb, *show_info_cb; gchar *if_text; if_cbxe = (GtkWidget *)g_object_get_data(G_OBJECT(w), DEVICE_KEY); @@ -224,7 +223,6 @@ capture_prefs_fetch(GtkWidget *w) sync_cb = (GtkWidget *)g_object_get_data(G_OBJECT(w), CAPTURE_REAL_TIME_KEY); auto_scroll_cb = (GtkWidget *)g_object_get_data(G_OBJECT(w), AUTO_SCROLL_KEY); show_info_cb = (GtkWidget *)g_object_get_data(G_OBJECT(w), SHOW_INFO_KEY); - syntax_check_filter_cb = (GtkWidget *)g_object_get_data(G_OBJECT(w), SYNTAX_CHECK_FILTER_KEY); if (prefs.capture_device != NULL) { g_free(prefs.capture_device); @@ -251,7 +249,6 @@ capture_prefs_fetch(GtkWidget *w) prefs.capture_auto_scroll = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(auto_scroll_cb)); prefs.capture_show_info = !(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(show_info_cb))); - prefs.capture_syntax_check_filter = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(syntax_check_filter_cb)); } void |