diff options
author | Stephen Fisher <steve@stephen-fisher.com> | 2006-12-05 03:19:51 +0000 |
---|---|---|
committer | Stephen Fisher <steve@stephen-fisher.com> | 2006-12-05 03:19:51 +0000 |
commit | 75acf34518617ddb64be049e13393f477a15d0dd (patch) | |
tree | 66912a037dc8a2b4910cfa0fdc8b9d85f01e1c2b /gtk/menu.c | |
parent | d11958ec6fdafc3305b9e3239783db00078e03ba (diff) | |
download | wireshark-75acf34518617ddb64be049e13393f477a15d0dd.tar.gz wireshark-75acf34518617ddb64be049e13393f477a15d0dd.tar.bz2 wireshark-75acf34518617ddb64be049e13393f477a15d0dd.zip |
From Douglas Pratley with trivial changes and documentation changes
by myself:
Corrected patch; epan/column.c and epan/column_utils.c were not included. This
one has now been properly tested against a clean checkout of today's code.
- New menu option available under view\time display format
- New sub-option (e) to -t switch for both wireshark and tshark
- Extended recent settings code to handle new value
- Did NOT add new explicit epoch time column
svn path=/trunk/; revision=20040
Diffstat (limited to 'gtk/menu.c')
-rw-r--r-- | gtk/menu.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gtk/menu.c b/gtk/menu.c index 86e0e5a2b6..9558836d94 100644 --- a/gtk/menu.c +++ b/gtk/menu.c @@ -120,6 +120,7 @@ static void timestamp_absolute_cb(GtkWidget *w _U_, gpointer d _U_); static void timestamp_absolute_date_cb(GtkWidget *w _U_, gpointer d _U_); static void timestamp_relative_cb(GtkWidget *w _U_, gpointer d _U_); static void timestamp_delta_cb(GtkWidget *w _U_, gpointer d _U_); +static void timestamp_epoch_cb(GtkWidget *w _U_, gpointer d _U_); static void timestamp_auto_cb(GtkWidget *w _U_, gpointer d _U_); static void timestamp_sec_cb(GtkWidget *w _U_, gpointer d _U_); static void timestamp_dsec_cb(GtkWidget *w _U_, gpointer d _U_); @@ -475,6 +476,8 @@ static GtkItemFactoryEntry menu_items[] = 0, "/View/Time Display Format/Date and Time of Day: 1970-01-01 01:02:03.123456", NULL), ITEM_FACTORY_ENTRY("/View/Time Display Format/Seconds Since Previous Packet: 1.123456", NULL, timestamp_delta_cb, 0, "/View/Time Display Format/Date and Time of Day: 1970-01-01 01:02:03.123456", NULL), + ITEM_FACTORY_ENTRY("/View/Time Display Format/Seconds Since Epoch Time: 123.123456", NULL, timestamp_epoch_cb, + 0, "/View/Time Display Format/Date and Time of Day: 1970-01-01 01:02:03.123456", NULL), ITEM_FACTORY_ENTRY("/View/Time Display Format/<separator>", NULL, NULL, 0, "<Separator>", NULL), ITEM_FACTORY_ENTRY("/View/Time Display Format/Automatic (File Format Precision)", NULL, timestamp_auto_cb, 0, "<RadioItem>", NULL), @@ -1646,6 +1649,16 @@ timestamp_delta_cb(GtkWidget *w _U_, gpointer d _U_) } static void +timestamp_epoch_cb(GtkWidget *w _U_, gpointer d _U_) +{ + if (recent.gui_time_format != TS_EPOCH) { + timestamp_set_type(TS_EPOCH); + recent.gui_time_format = TS_EPOCH; + cf_change_time_formats(&cfile); + } +} + +static void timestamp_auto_cb(GtkWidget *w _U_, gpointer d _U_) { if (recent.gui_time_precision != TS_PREC_AUTO) { @@ -1893,6 +1906,12 @@ menu_recent_read_finished(void) { recent.gui_time_format = -1; gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), TRUE); break; + case(TS_EPOCH): + menu = gtk_item_factory_get_widget(main_menu_factory, + "/View/Time Display Format/Seconds Since Epoch Time: 123.123456"); + recent.gui_time_format = -1; + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), TRUE); + break; default: g_assert_not_reached(); } |