aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/goto_dlg.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-03-02 22:07:25 +0000
committerGuy Harris <guy@alum.mit.edu>2003-03-02 22:07:25 +0000
commit6c9deead35287fda4d7d8297aab2cc1ce9a53b93 (patch)
tree66c278c6ea06c491919bdb367830815f56b2b48e /gtk/goto_dlg.c
parent3b37905e24b6a081e3538fc387a3febe7098fa67 (diff)
Have "goto_frame()" put up error dialog boxes itself, rather than having
its callers put up the same error dialog boxes. Have it just return a success vs. failure Boolean. svn path=/trunk/; revision=7254
Diffstat (limited to 'gtk/goto_dlg.c')
-rw-r--r--gtk/goto_dlg.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/gtk/goto_dlg.c b/gtk/goto_dlg.c
index a07b00ab1e..2d8e64b508 100644
--- a/gtk/goto_dlg.c
+++ b/gtk/goto_dlg.c
@@ -1,7 +1,7 @@
/* goto_dlg.c
* Routines for "go to frame" window
*
- * $Id: goto_dlg.c,v 1.19 2002/11/11 15:39:05 oabad Exp $
+ * $Id: goto_dlg.c,v 1.20 2003/03/02 22:07:25 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -143,20 +143,9 @@ goto_frame_ok_cb(GtkWidget *ok_bt _U_, gpointer parent_w)
return;
}
- switch (goto_frame(&cfile, fnumber)) {
-
- case NO_SUCH_FRAME:
- simple_dialog(ESD_TYPE_CRIT, NULL, "There is no frame with that frame number.");
- return;
-
- case FRAME_NOT_DISPLAYED:
- /* XXX - add it to the display filter? */
- simple_dialog(ESD_TYPE_CRIT, NULL, "The frame with that frame number is not currently being displayed.");
- return;
-
- case FOUND_FRAME:
+ if (goto_frame(&cfile, fnumber)) {
+ /* We succeeded in going to that frame; we're done. */
gtk_widget_destroy(GTK_WIDGET(parent_w));
- break;
}
}