diff options
Diffstat (limited to 'epan/prefs.c')
-rw-r--r-- | epan/prefs.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/epan/prefs.c b/epan/prefs.c index c948588587..2f1fa9accb 100644 --- a/epan/prefs.c +++ b/epan/prefs.c @@ -1215,9 +1215,14 @@ init_prefs(void) { prefs.capture_real_time = TRUE; prefs.capture_auto_scroll = TRUE; prefs.capture_show_info = FALSE; + +/* set the default values for the name resolution dialog box */ prefs.name_resolve = RESOLV_ALL ^ RESOLV_NETWORK; prefs.name_resolve_concurrency = 500; +/* set the default values for the rtp player dialog box */ + prefs.rtp_player_max_visible = RTP_PLAYER_DEFAULT_VISIBLE; + prefs_initialized = TRUE; } @@ -1596,6 +1601,9 @@ prefs_set_pref(char *prefarg) #define GREEN_COMPONENT(x) (guint16) (((((x) >> 8) & 0xff) * 65535 / 255)) #define BLUE_COMPONENT(x) (guint16) ( (((x) & 0xff) * 65535 / 255)) +/* values for the rtp player preferences dialog box */ +#define PRS_RTP_PLAYER_MAX_VISIBLE "rtp_player.max_visible" + static const gchar *pr_formats[] = { "text", "postscript" }; static const gchar *pr_dests[] = { "command", "file" }; @@ -1983,6 +1991,8 @@ set_pref(gchar *pref_name, gchar *value, void *private_data _U_) } } else if (strcmp(pref_name, PRS_NAME_RESOLVE_CONCURRENCY) == 0) { prefs.name_resolve_concurrency = strtol(value, NULL, 10); + } else if (strcmp(pref_name, PRS_RTP_PLAYER_MAX_VISIBLE) == 0) { + prefs.rtp_player_max_visible = strtol(value, NULL, 10); } else { /* To which module does this preference belong? */ module = NULL; @@ -2737,6 +2747,13 @@ write_prefs(char **pf_path_return) fprintf(pf, PRS_NAME_RESOLVE_CONCURRENCY ": %d\n", prefs.name_resolve_concurrency); + fprintf(pf, "\n####### RTP Player ########\n"); + + fprintf(pf, "\n# Maximum visible channels in RTP Player window.\n"); + fprintf(pf, "# An integer value greater than 0.\n"); + fprintf(pf, PRS_RTP_PLAYER_MAX_VISIBLE ": %d\n", + prefs.rtp_player_max_visible); + fprintf(pf, "\n####### Protocols ########\n"); pe_tree_foreach(prefs_modules, write_module_prefs, pf); |