aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-05-05 07:31:05 +0000
committerGuy Harris <guy@alum.mit.edu>2004-05-05 07:31:05 +0000
commitacb752726d1822dfbdc04435c6320d1654313abb (patch)
treec7711b5b389d9435b07a0a13900eeace52a17aaa
parent659ac78357caef4ed2fd990b5e3347579ad0ef89 (diff)
downloadwireshark-acb752726d1822dfbdc04435c6320d1654313abb.tar.gz
wireshark-acb752726d1822dfbdc04435c6320d1654313abb.tar.bz2
wireshark-acb752726d1822dfbdc04435c6320d1654313abb.zip
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
-rw-r--r--gtk/layout_prefs.c4
-rw-r--r--prefs.c4
-rw-r--r--prefs.h5
3 files changed, 7 insertions, 6 deletions
diff --git a/gtk/layout_prefs.c b/gtk/layout_prefs.c
index d784c3756e..66b229581e 100644
--- a/gtk/layout_prefs.c
+++ b/gtk/layout_prefs.c
@@ -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);
diff --git a/prefs.c b/prefs.c
index cc004929df..55136474e4 100644
--- a/prefs.c
+++ b/prefs.c
@@ -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;
diff --git a/prefs.h b/prefs.h
index 34515f546b..f882b5c72b 100644
--- a/prefs.h
+++ b/prefs.h
@@ -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;
/*