aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2004-09-02 19:52:39 +0000
committerGerald Combs <gerald@wireshark.org>2004-09-02 19:52:39 +0000
commit16c708571ae1ce3c3ece8558039b715e37d8f8b7 (patch)
treea8645726e10594c225c2ab54a960daf5fcb14940 /file.c
parent6594b60b99e287d14557ed2aeb64bd33f59b4ded (diff)
Move the guts of gtk/file_dlg.c:goto_framenum_cb() to
file.c:goto_framenum(), where all of the other goto_ routines live. svn path=/trunk/; revision=11887
Diffstat (limited to 'file.c')
-rw-r--r--file.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/file.c b/file.c
index ec865db851..0524cf3a5e 100644
--- a/file.c
+++ b/file.c
@@ -2667,6 +2667,26 @@ goto_bottom_frame(capture_file *cf)
return TRUE; /* we got to that packet */
}
+/*
+ * Go to frame specified by currently selected protocol tree item.
+ */
+void
+goto_framenum(capture_file *cf)
+{
+ header_field_info *hfinfo;
+ guint32 framenum;
+
+ if (cf->finfo_selected) {
+ hfinfo = cf->finfo_selected->hfinfo;
+ g_assert(hfinfo);
+ if (hfinfo->type == FT_FRAMENUM) {
+ framenum = fvalue_get_integer(&cf->finfo_selected->value);
+ if (framenum != 0)
+ goto_frame(cf, framenum);
+ }
+ }
+}
+
/* Select the packet on a given row. */
void
select_packet(capture_file *cf, int row)
@@ -3253,6 +3273,7 @@ cf_close_failure_alert_box(const char *filename, int err)
}
}
+/* Reload the current capture file. */
void
cf_reload() {
gchar *filename;