aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/capture_dlg.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-01-13 20:35:12 +0000
committerGuy Harris <guy@alum.mit.edu>2002-01-13 20:35:12 +0000
commit0a03b0f73ef7595d7281097c94cccefa13059f7e (patch)
treec255fb8cb7e40c899ad998c9846d1dabb5bb9562 /gtk/capture_dlg.c
parent649cc279d6dad12744f67a23fa335e9ee2f55627 (diff)
Add a preferences page for the name resolution flags.
Separate the preferences value for those flags and the name resolution code's value into separate variables; this means that the resolution code no longer depends on the preferences code, and may let us eventually have the current setting and the preference setting differ (so that a user can temporarily override the preference setting without causing subsequent saves of the preferences to save the temporary value). Add routines to create various types of widgets for preferences, and to fetch the values for "enumerated" preferences, and use them both in the code to handle hardwired preference pages and table-driven preference pages. svn path=/trunk/; revision=4536
Diffstat (limited to 'gtk/capture_dlg.c')
-rw-r--r--gtk/capture_dlg.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gtk/capture_dlg.c b/gtk/capture_dlg.c
index 7c62def83d..8bf437d433 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.55 2002/01/11 08:55:02 guy Exp $
+ * $Id: capture_dlg.c,v 1.56 2002/01/13 20:35:11 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -386,21 +386,21 @@ capture_prep_cb(GtkWidget *w, gpointer d)
m_resolv_cb = dlg_check_button_new_with_label_with_mnemonic(
"Enable _MAC name resolution", accel_group);
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(m_resolv_cb),
- prefs.name_resolve & PREFS_RESOLV_MAC);
+ g_resolv_flags & RESOLV_MAC);
gtk_container_add(GTK_CONTAINER(main_vb), m_resolv_cb);
gtk_widget_show(m_resolv_cb);
n_resolv_cb = dlg_check_button_new_with_label_with_mnemonic(
"Enable _network name resolution", accel_group);
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(n_resolv_cb),
- prefs.name_resolve & PREFS_RESOLV_NETWORK);
+ g_resolv_flags & RESOLV_NETWORK);
gtk_container_add(GTK_CONTAINER(main_vb), n_resolv_cb);
gtk_widget_show(n_resolv_cb);
t_resolv_cb = dlg_check_button_new_with_label_with_mnemonic(
"Enable _transport name resolution", accel_group);
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(t_resolv_cb),
- prefs.name_resolve & PREFS_RESOLV_TRANSPORT);
+ g_resolv_flags & RESOLV_TRANSPORT);
gtk_container_add(GTK_CONTAINER(main_vb), t_resolv_cb);
gtk_widget_show(t_resolv_cb);
@@ -688,10 +688,10 @@ capture_prep_ok_cb(GtkWidget *ok_bt, gpointer parent_w) {
auto_scroll_live = GTK_TOGGLE_BUTTON (auto_scroll_cb)->active;
- prefs.name_resolve = PREFS_RESOLV_NONE;
- prefs.name_resolve |= (GTK_TOGGLE_BUTTON (m_resolv_cb)->active ? PREFS_RESOLV_MAC : PREFS_RESOLV_NONE);
- prefs.name_resolve |= (GTK_TOGGLE_BUTTON (n_resolv_cb)->active ? PREFS_RESOLV_NETWORK : PREFS_RESOLV_NONE);
- prefs.name_resolve |= (GTK_TOGGLE_BUTTON (t_resolv_cb)->active ? PREFS_RESOLV_TRANSPORT : PREFS_RESOLV_NONE);
+ g_resolv_flags = RESOLV_NONE;
+ g_resolv_flags |= (GTK_TOGGLE_BUTTON (m_resolv_cb)->active ? RESOLV_MAC : RESOLV_NONE);
+ g_resolv_flags |= (GTK_TOGGLE_BUTTON (n_resolv_cb)->active ? RESOLV_NETWORK : RESOLV_NONE);
+ g_resolv_flags |= (GTK_TOGGLE_BUTTON (t_resolv_cb)->active ? RESOLV_TRANSPORT : RESOLV_NONE);
cfile.ringbuffer_on = GTK_TOGGLE_BUTTON (ringbuffer_on_tb)->active && !(sync_mode);
if (cfile.ringbuffer_on == TRUE) {