aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-12-19 02:58:53 +0000
committerGuy Harris <guy@alum.mit.edu>2002-12-19 02:58:53 +0000
commita97b83a7f4f846335337e8c2dac7f34590cb0fc4 (patch)
tree0f3097bf7c97fdbdf89e2d1da7a03d008a8d1bf0 /gtk
parentc9c414c03b1e9ee87382cc93db6dcad1f8d081d6 (diff)
Add a new field type FT_FRAMENUM; an FT_FRAMENUM is a 32-bit unsigned
frame number, which is always decimal. If you select an FT_FRAMENUM field, there are menu items that let you go to the frame whose frame number appears in that field. Add FT_FRAMENUM fields for the ONC RPC "matching request is in this frame" and "matching reply is in this frame" protocol tree items. svn path=/trunk/; revision=6802
Diffstat (limited to 'gtk')
-rw-r--r--gtk/main.c22
-rw-r--r--gtk/main.h3
-rw-r--r--gtk/menu.c5
3 files changed, 26 insertions, 4 deletions
diff --git a/gtk/main.c b/gtk/main.c
index 4bc4180e36..d472919398 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -1,6 +1,6 @@
/* main.c
*
- * $Id: main.c,v 1.278 2002/11/28 02:04:23 guy Exp $
+ * $Id: main.c,v 1.279 2002/12/19 02:58:53 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -126,6 +126,7 @@
#include "register.h"
#include "ringbuffer.h"
#include "ui_util.h"
+#include "../ui_util.h"
#include "image/clist_ascend.xpm"
#include "image/clist_descend.xpm"
#include "../tap.h"
@@ -215,6 +216,25 @@ set_fonts(PangoFontDescription *regular, PangoFontDescription *bold)
#endif
}
+/*
+ * Go to frame specified by currently selected protocol tree item.
+ */
+void
+goto_framenum_cb(GtkWidget *w _U_, gpointer data _U_)
+{
+ if (finfo_selected) {
+ header_field_info *hfinfo;
+ guint32 framenum;
+
+ hfinfo = finfo_selected->hfinfo;
+ g_assert(hfinfo);
+ if (hfinfo->type == FT_FRAMENUM) {
+ framenum = fvalue_get_integer(finfo_selected->value);
+ if (framenum != 0)
+ packet_list_set_selected_row(framenum - 1);
+ }
+ }
+}
/* Match selected byte pattern */
static void
diff --git a/gtk/main.h b/gtk/main.h
index 6a81c7114d..302af398e8 100644
--- a/gtk/main.h
+++ b/gtk/main.h
@@ -1,7 +1,7 @@
/* main.h
* Global defines, etc.
*
- * $Id: main.h,v 1.29 2002/11/03 17:38:33 oabad Exp $
+ * $Id: main.h,v 1.30 2002/12/19 02:58:53 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -63,6 +63,7 @@ extern GtkStyle *item_style;
#endif
void about_ethereal( GtkWidget *, gpointer);
+void goto_framenum_cb(GtkWidget *, gpointer);
void match_selected_cb_replace_ptree( GtkWidget *, gpointer);
void match_selected_cb_and_ptree( GtkWidget *, gpointer);
void match_selected_cb_or_ptree( GtkWidget *, gpointer);
diff --git a/gtk/menu.c b/gtk/menu.c
index 6c0624fbb0..1dc68fea01 100644
--- a/gtk/menu.c
+++ b/gtk/menu.c
@@ -1,7 +1,7 @@
/* menu.c
* Menu routines
*
- * $Id: menu.c,v 1.79 2002/11/17 11:43:40 sahlberg Exp $
+ * $Id: menu.c,v 1.80 2002/12/19 02:58:53 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -311,7 +311,8 @@ static GtkItemFactoryEntry tree_view_menu_items[] =
ITEM_FACTORY_ENTRY("/Display Filters...", NULL, dfilter_dialog_cb,
0, NULL, NULL),
ITEM_FACTORY_ENTRY("/<separator>", NULL, NULL, 0, "<Separator>", NULL),
- ITEM_FACTORY_ENTRY("/Resolve Name", NULL, resolve_name_cb, 0, NULL, NULL),
+ ITEM_FACTORY_ENTRY("/_Resolve Name", NULL, resolve_name_cb, 0, NULL, NULL),
+ ITEM_FACTORY_ENTRY("/_Go To Specified Frame", NULL, goto_framenum_cb, 0, NULL, NULL),
ITEM_FACTORY_ENTRY("/Protocol Properties...", NULL, properties_cb,
0, NULL, NULL),
ITEM_FACTORY_ENTRY("/Match", NULL, NULL, 0, "<Branch>", NULL),