/* timestamp.h
* Defines for packet timestamps
*
- * $Id: timestamp.h,v 1.3 2004/01/19 03:46:42 ulfl Exp $
+ * $Id: timestamp.h,v 1.4 2004/01/19 23:03:19 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
#ifndef __TIMESTAMP_H__
#define __TIMESTAMP_H__
-
/*
* Type of time-stamp shown in the summary display.
*/
TS_DELTA
} ts_type;
-extern ts_type timestamp_type;
-
-static char *ts_type_text[] =
- { "RELATIVE", "ABSOLUTE", "ABSOLUTE_WITH_DATE", "DELTA", NULL };
+/*
+ * Special value used for the command-line setting in Ethereal, to indicate
+ * that no value has been set from the command line.
+ */
+#define TS_NOT_SET ((ts_type)-1)
+extern ts_type timestamp_type;
#endif /* timestamp.h */
/* main.c
*
- * $Id: main.c,v 1.360 2004/01/19 18:21:18 jmayer Exp $
+ * $Id: main.c,v 1.361 2004/01/19 23:03:20 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
/* init with an invalid value, so that "recent" can detect this and */
/* distinguish it from a command line value */
-ts_type timestamp_type = -1;
+ts_type timestamp_type = TS_NOT_SET;
#if GTK_MAJOR_VERSION < 2
GtkStyle *item_style;
/* menu.c
* Menu routines
*
- * $Id: menu.c,v 1.138 2004/01/19 03:46:42 ulfl Exp $
+ * $Id: menu.c,v 1.139 2004/01/19 23:03:20 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
/* the recent file read has finished, update the menu corresponding */
void
menu_recent_read_finished(void) {
- GtkWidget *menu = NULL;
+ GtkWidget *menu = NULL;
- menu = gtk_item_factory_get_widget(main_menu_factory, "/View/Show/Main Toolbar");
+ menu = gtk_item_factory_get_widget(main_menu_factory, "/View/Show/Main Toolbar");
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), recent.main_toolbar_show);
- menu = gtk_item_factory_get_widget(main_menu_factory, "/View/Show/Filter Toolbar");
+ menu = gtk_item_factory_get_widget(main_menu_factory, "/View/Show/Filter Toolbar");
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), recent.filter_toolbar_show);
- menu = gtk_item_factory_get_widget(main_menu_factory, "/View/Show/Packet List");
+ menu = gtk_item_factory_get_widget(main_menu_factory, "/View/Show/Packet List");
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), recent.packet_list_show);
- menu = gtk_item_factory_get_widget(main_menu_factory, "/View/Show/Packet Dissection");
+ menu = gtk_item_factory_get_widget(main_menu_factory, "/View/Show/Packet Dissection");
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), recent.tree_view_show);
menu = gtk_item_factory_get_widget(main_menu_factory, "/View/Show/Packet Data");
main_widgets_rearrange();
/* don't change the time format, if we had a command line value */
- if (timestamp_type != -1) {
+ if (timestamp_type != TS_NOT_SET) {
recent.gui_time_format = timestamp_type;
}
* Recent "preference" handling routines
* Copyright 2004, Ulf Lamping <ulf.lamping@web.de>
*
- * $Id: recent.c,v 1.3 2004/01/19 03:46:43 ulfl Exp $
+ * $Id: recent.c,v 1.4 2004/01/19 23:03:20 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
extern void add_menu_recent_capture_file(gchar *file);
extern void menu_recent_read_finished(void);
-
recent_settings_t recent;
-
-
+static char *ts_type_text[] =
+ { "RELATIVE", "ABSOLUTE", "ABSOLUTE_WITH_DATE", "DELTA", NULL };
/* Takes an string and a pointer to an array of strings, and a default int value.
* The array must be terminated by a NULL string. If the string is found in the array
return default_value;
}
-
-
/* Write out "recent" to the user's recent file, and return 0.
If we got an error, stuff a pointer to the path of the recent file
into "*pf_path_return", and return the errno. */