diff options
author | Stephen Fisher <steve@stephen-fisher.com> | 2007-03-23 18:08:17 +0000 |
---|---|---|
committer | Stephen Fisher <steve@stephen-fisher.com> | 2007-03-23 18:08:17 +0000 |
commit | 6d8d2854c8cf998605e041987610986d09375c6a (patch) | |
tree | 49c7db39b4c44d02429daa16149f2ba63678af4e /gtk/menu.c | |
parent | 62f88a4a04d8e300ff108f6164e9016e8cdcc9c3 (diff) | |
download | wireshark-6d8d2854c8cf998605e041987610986d09375c6a.tar.gz wireshark-6d8d2854c8cf998605e041987610986d09375c6a.tar.bz2 wireshark-6d8d2854c8cf998605e041987610986d09375c6a.zip |
From Sake Blok:
Fix for bug #491: Unexpected frame.time_delta behavior
This patch ... fixes bug 491. It does this by changing the
behaviour of the frame.time_delta field so it reflects the delta
time between captured packets (tshark already did this). To keep
the delta time between displayed packets, the field
frame.time_delta_displayed is created.
svn path=/trunk/; revision=21154
Diffstat (limited to 'gtk/menu.c')
-rw-r--r-- | gtk/menu.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/gtk/menu.c b/gtk/menu.c index b8c5ee1241..0cbf1075f4 100644 --- a/gtk/menu.c +++ b/gtk/menu.c @@ -126,6 +126,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_delta_dis_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_); @@ -487,7 +488,9 @@ 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 Beginning of Capture: 123.123456", NULL, timestamp_relative_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 Previous Packet: 1.123456", NULL, timestamp_delta_cb, + ITEM_FACTORY_ENTRY("/View/Time Display Format/Seconds Since Previous Captured 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 Previous Displayed Packet: 1.123456", NULL, timestamp_delta_dis_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 (1970-01-01): 1234567890.123456", NULL, timestamp_epoch_cb, 0, "/View/Time Display Format/Date and Time of Day: 1970-01-01 01:02:03.123456", NULL), @@ -1689,6 +1692,16 @@ timestamp_delta_cb(GtkWidget *w _U_, gpointer d _U_) } static void +timestamp_delta_dis_cb(GtkWidget *w _U_, gpointer d _U_) +{ + if (recent.gui_time_format != TS_DELTA_DIS) { + timestamp_set_type(TS_DELTA_DIS); + recent.gui_time_format = TS_DELTA_DIS; + cf_change_time_formats(&cfile); + } +} + +static void timestamp_epoch_cb(GtkWidget *w _U_, gpointer d _U_) { if (recent.gui_time_format != TS_EPOCH) { @@ -1942,7 +1955,13 @@ menu_recent_read_finished(void) { break; case(TS_DELTA): menu = gtk_item_factory_get_widget(main_menu_factory, - "/View/Time Display Format/Seconds Since Previous Packet: 1.123456"); + "/View/Time Display Format/Seconds Since Previous Captured Packet: 1.123456"); + recent.gui_time_format = -1; + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), TRUE); + break; + case(TS_DELTA_DIS): + menu = gtk_item_factory_get_widget(main_menu_factory, + "/View/Time Display Format/Seconds Since Previous Displayed Packet: 1.123456"); recent.gui_time_format = -1; gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), TRUE); break; |