Connect the recent_file_count_max variable to the prefs.gui_recent_file_count_max variable entry, and fix a small spelling/grammar mistake.

Now all we need is some enterprising individual to write the small amount of
preferences code to actually allow it to be changed etc, but I have to go to
Costco, so, later...

svn path=/trunk/; revision=9463
This commit is contained in:
Richard Sharpe 2003-12-28 21:10:26 +00:00
parent 0a44e7c145
commit 015681b24e
3 changed files with 7 additions and 6 deletions

View File

@ -1,7 +1,7 @@
/* menu.c
* Menu routines
*
* $Id: menu.c,v 1.128 2003/12/17 22:13:07 guy Exp $
* $Id: menu.c,v 1.129 2003/12/28 21:10:26 sharpe Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -741,7 +741,7 @@ add_menu_recent_capture_file_absolute(gchar *cf_name) {
/* if this element string is already in the list, or
* this element is above maximum count (too old), remove it */
if (strncmp(widget_cf_name, cf_name, 1000) == 0 ||
cnt >= recent_files_count_max) {
cnt >= prefs.gui_recent_files_count_max) {
remove_menu_recent_capture_file(li->data);
cnt--;
}

View File

@ -1,7 +1,7 @@
/* prefs.c
* Routines for handling preferences
*
* $Id: prefs.c,v 1.115 2003/12/23 21:29:25 guy Exp $
* $Id: prefs.c,v 1.116 2003/12/28 21:10:26 sharpe Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -883,7 +883,7 @@ read_prefs(int *gpf_errno_return, int *gpf_read_errno_return,
if (init_prefs) {
/* Initialize preferences to wired-in default values.
They may be overridded by the global preferences file or the
They may be overridden by the global preferences file or the
user's preferences file. */
init_prefs = FALSE;
prefs.pr_format = PR_FMT_TEXT;
@ -988,6 +988,7 @@ read_prefs(int *gpf_errno_return, int *gpf_read_errno_return,
prefs.gui_geometry_main_width = DEF_WIDTH;
prefs.gui_geometry_main_height = -1;
prefs.gui_fileopen_style = FO_STYLE_LAST_OPENED;
prefs.gui_recent_files_count_max = 10;
prefs.gui_fileopen_dir = g_strdup("");
prefs.gui_fileopen_remembered_dir = NULL;

View File

@ -1,7 +1,7 @@
/* prefs.h
* Definitions for preference handling routines
*
* $Id: prefs.h,v 1.51 2003/12/28 20:36:59 sharpe Exp $
* $Id: prefs.h,v 1.52 2003/12/28 21:10:26 sharpe Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -85,7 +85,7 @@ typedef struct _e_prefs {
gint gui_geometry_main_y;
gint gui_geometry_main_width;
gint gui_geometry_main_height;
gint gui_fileopen_style;
guint gui_fileopen_style;
gint gui_recent_files_count_max;
gchar *gui_fileopen_dir;
gchar *gui_fileopen_remembered_dir;