From 9e42b3a4edee724033766982c633e70bc621be87 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 3 Jul 2000 08:36:52 +0000 Subject: Remove the progress bar from the status line, and, instead, for any potentially long-running operation that has a progress indicator, pop up a modal dialog box with an indication of what is being done; a progress bar; a "Cancel" button to stop the operation. This: leaves more room on the status line for a filter expression; provides a mechanism to allow the user to cancel long-running operations (although the way we do so may not back out of them as nicely as the user might like, if it's not obvious what the "right" way is or if the "right" way is difficult to implement or involves doing as much work as letting the operation continue); means that, because the dialog box is modal, we don't have to worry about the user performing arbitrary UI operations out from under the operation and changing arbitrary bits of state being used by that operation. svn path=/trunk/; revision=2103 --- ui_util.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'ui_util.h') diff --git a/ui_util.h b/ui_util.h index 01c4957304..2b4585e014 100644 --- a/ui_util.h +++ b/ui_util.h @@ -1,7 +1,7 @@ /* ui_util.h * Definitions for UI utility routines * - * $Id: ui_util.h,v 1.4 2000/02/29 06:24:16 guy Exp $ + * $Id: ui_util.h,v 1.5 2000/07/03 08:35:42 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -43,6 +43,31 @@ void reactivate_window(GtkWidget *); /* Destroy all popup packet windows. */ void destroy_packet_wins(void); +/* + * Progress (modal) dialog box routines. + */ + +/* + * Create and pop up the progress dialog; return a pointer to it, as + * a "void *", so that our caller doesn't have to know the GUI + * implementation. + * + * The first argument is the title to give the dialog box; the second + * argument is a pointer to a Boolean variable that will be set to + * TRUE if the user hits the "Cancel" button. + */ +void *create_progress_dlg(gchar *title, gboolean *stop_flag); + +/* + * Set the percentage value of the progress bar. + */ +void update_progress_dlg(void *dlg, gfloat percentage); + +/* + * Destroy the progress bar. + */ +void destroy_progress_dlg(void *dlg); + #ifdef __cplusplus } #endif /* __cplusplus */ -- cgit v1.2.3