Use an enum when initializing "prefs.gui_layout_type".

Add an entry to that enum at the end and use that to generate the value
of LAYOUT_QTY.

svn path=/trunk/; revision=10800
This commit is contained in:
Guy Harris 2004-05-05 07:31:05 +00:00
parent 659ac78357
commit acb752726d
3 changed files with 7 additions and 6 deletions

View File

@ -1,7 +1,7 @@
/* layout_prefs.c
* Dialog box for layout preferences
*
* $Id: layout_prefs.c,v 1.7 2004/05/02 08:54:32 ulfl Exp $
* $Id: layout_prefs.c,v 1.8 2004/05/05 07:31:05 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -46,7 +46,7 @@
#include "../image/icon_layout_5.xpm"
#include "../image/icon_layout_6.xpm"
#define LAYOUT_QTY 6
#define LAYOUT_QTY (layout_type_max - 1)
static void layout_validate_cb(GtkWidget *w _U_, gpointer data);

View File

@ -1,7 +1,7 @@
/* prefs.c
* Routines for handling preferences
*
* $Id: prefs.c,v 1.130 2004/04/30 00:40:44 guy Exp $
* $Id: prefs.c,v 1.131 2004/05/05 07:31:05 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -993,7 +993,7 @@ read_prefs(int *gpf_errno_return, int *gpf_read_errno_return,
prefs.gui_fileopen_style = FO_STYLE_LAST_OPENED;
prefs.gui_recent_files_count_max = 10;
prefs.gui_fileopen_dir = g_strdup("");
prefs.gui_layout_type = 1;
prefs.gui_layout_type = layout_type_5;
prefs.gui_layout_content_1 = layout_pane_content_plist;
prefs.gui_layout_content_2 = layout_pane_content_pdetails;
prefs.gui_layout_content_3 = layout_pane_content_pbytes;

View File

@ -1,7 +1,7 @@
/* prefs.h
* Definitions for preference handling routines
*
* $Id: prefs.h,v 1.59 2004/04/30 00:40:44 guy Exp $
* $Id: prefs.h,v 1.60 2004/05/05 07:31:05 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -76,7 +76,8 @@ typedef enum {
layout_type_1,
layout_type_4,
layout_type_3,
layout_type_6
layout_type_6,
layout_type_max
} layout_type_e;
/*