diff options
author | sfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-11-16 07:04:02 +0000 |
---|---|---|
committer | sfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-11-16 07:04:02 +0000 |
commit | 5fd9bebe2cbb246d0247e33a226231ac72821592 (patch) | |
tree | 3eca0ad58a90d2ecc6a7b2736c78719650f03983 /gtk/main.c | |
parent | 015e0707fbe2013f3a8bb5cef73ef750e6e38c94 (diff) |
Fix for bug 948, "Apply capture preferences not applying." Now when the user
changes a capture option in the preferences, it will show up right away in
the capture options dialog.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19908 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'gtk/main.c')
-rw-r--r-- | gtk/main.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/gtk/main.c b/gtk/main.c index 3782fecff8..d931848e7c 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -2428,17 +2428,8 @@ main(int argc, char *argv[]) } #endif -#ifdef HAVE_LIBPCAP - /* Set promiscuous mode from the preferences setting. */ - /* the same applies to other preferences settings as well. */ - capture_opts->promisc_mode = prefs->capture_prom_mode; - capture_opts->show_info = prefs->capture_show_info; - capture_opts->real_time_mode = prefs->capture_real_time; - auto_scroll_live = prefs->capture_auto_scroll; -#endif /* HAVE_LIBPCAP */ - - /* Set the name resolution code's flags from the preferences. */ - g_resolv_flags = prefs->name_resolve; + /* Fill in capture options with values from the preferences */ + prefs_to_capture_opts(); /* Read the capture filter file. */ read_filter_list(CFILTER_LIST, &cf_path, &cf_open_errno); @@ -4333,3 +4324,20 @@ show_main_window(gboolean doing_work) } #endif /* HAVE_AIRPCAP */ } + +/* Fill in capture options with values from the preferences */ +void +prefs_to_capture_opts(void) +{ +#ifdef HAVE_LIBPCAP + /* Set promiscuous mode from the preferences setting. */ + /* the same applies to other preferences settings as well. */ + capture_opts->promisc_mode = prefs.capture_prom_mode; + capture_opts->show_info = prefs.capture_show_info; + capture_opts->real_time_mode = prefs.capture_real_time; + auto_scroll_live = prefs.capture_auto_scroll; +#endif /* HAVE_LIBPCAP */ + + /* Set the name resolution code's flags from the preferences. */ + g_resolv_flags = prefs.name_resolve; +} |