forked from osmocom/wireshark
Allow a progress dialog to have "Stop" or "Cancel" as the "terminate
button"; "Stop" should be used for operations that can only be stopped (meaning that what it's already done isn't undone), not cancelled (meaning that whatever it's already done *is* undone), for which "Cancel" is used. Allow the merging process to be cancelled. Clean up indentation. Update some comments. svn path=/trunk/; revision=16489
This commit is contained in:
parent
a78d2fbc63
commit
0dbf17b690
57
file.c
57
file.c
|
@ -411,7 +411,7 @@ cf_read(capture_file *cf)
|
||||||
time in order to get to the next progress bar step). */
|
time in order to get to the next progress bar step). */
|
||||||
if (progbar == NULL) {
|
if (progbar == NULL) {
|
||||||
progbar = delayed_create_progress_dlg("Loading", name_ptr,
|
progbar = delayed_create_progress_dlg("Loading", name_ptr,
|
||||||
&stop_flag, &start_time, progbar_val);
|
TRUE, &stop_flag, &start_time, progbar_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update the progress bar, but do it only N_PROGBAR_UPDATES times;
|
/* Update the progress bar, but do it only N_PROGBAR_UPDATES times;
|
||||||
|
@ -447,7 +447,8 @@ cf_read(capture_file *cf)
|
||||||
|
|
||||||
if (stop_flag) {
|
if (stop_flag) {
|
||||||
/* Well, the user decided to abort the read. He/She will be warned and
|
/* Well, the user decided to abort the read. He/She will be warned and
|
||||||
it might be enough for him/her to work with the already loaded packets.
|
it might be enough for him/her to work with the already loaded
|
||||||
|
packets.
|
||||||
This is especially true for very large capture files, where you don't
|
This is especially true for very large capture files, where you don't
|
||||||
want to wait loading the whole file (which may last minutes or even
|
want to wait loading the whole file (which may last minutes or even
|
||||||
hours even on fast machines) just to see that it was the wrong file. */
|
hours even on fast machines) just to see that it was the wrong file. */
|
||||||
|
@ -1063,7 +1064,7 @@ cf_merge_files(char **out_filenamep, int in_file_count,
|
||||||
time in order to get to the next progress bar step). */
|
time in order to get to the next progress bar step). */
|
||||||
if (progbar == NULL) {
|
if (progbar == NULL) {
|
||||||
progbar = delayed_create_progress_dlg("Merging", "files",
|
progbar = delayed_create_progress_dlg("Merging", "files",
|
||||||
&stop_flag, &start_time, progbar_val);
|
FALSE, &stop_flag, &start_time, progbar_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update the progress bar, but do it only N_PROGBAR_UPDATES times;
|
/* Update the progress bar, but do it only N_PROGBAR_UPDATES times;
|
||||||
|
@ -1092,6 +1093,11 @@ cf_merge_files(char **out_filenamep, int in_file_count,
|
||||||
progbar_nextstep += progbar_quantum;
|
progbar_nextstep += progbar_quantum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (stop_flag) {
|
||||||
|
/* Well, the user decided to abort the merge. */
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (!wtap_dump(pdh, wtap_phdr(wth), wtap_pseudoheader(wth),
|
if (!wtap_dump(pdh, wtap_phdr(wth), wtap_pseudoheader(wth),
|
||||||
wtap_buf_ptr(wth), &write_err)) {
|
wtap_buf_ptr(wth), &write_err)) {
|
||||||
got_write_error = TRUE;
|
got_write_error = TRUE;
|
||||||
|
@ -1164,7 +1170,13 @@ cf_merge_files(char **out_filenamep, int in_file_count,
|
||||||
cf_write_failure_alert_box(out_filename, write_err);
|
cf_write_failure_alert_box(out_filename, write_err);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (!got_read_error && !got_write_error) ? CF_OK : CF_ERROR;
|
if (got_read_error || got_write_error || stop_flag) {
|
||||||
|
/* Callers aren't expected to treat an error or an explicit abort
|
||||||
|
differently - we put up error dialogs ourselves, so they don't
|
||||||
|
have to. */
|
||||||
|
return CF_ERROR;
|
||||||
|
} else
|
||||||
|
return CF_READ_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
cf_status_t
|
cf_status_t
|
||||||
|
@ -1357,8 +1369,9 @@ rescan_packets(capture_file *cf, const char *action, const char *action_item,
|
||||||
large file, we might take considerably longer than that standard
|
large file, we might take considerably longer than that standard
|
||||||
time in order to get to the next progress bar step). */
|
time in order to get to the next progress bar step). */
|
||||||
if (progbar == NULL)
|
if (progbar == NULL)
|
||||||
progbar = delayed_create_progress_dlg(action, action_item, &stop_flag,
|
progbar = delayed_create_progress_dlg(action, action_item, TRUE,
|
||||||
&start_time, progbar_val);
|
&stop_flag, &start_time,
|
||||||
|
progbar_val);
|
||||||
|
|
||||||
/* Update the progress bar, but do it only N_PROGBAR_UPDATES times;
|
/* Update the progress bar, but do it only N_PROGBAR_UPDATES times;
|
||||||
when we update it, we have to run the GTK+ main loop to get it
|
when we update it, we have to run the GTK+ main loop to get it
|
||||||
|
@ -1535,7 +1548,7 @@ typedef enum {
|
||||||
|
|
||||||
static psp_return_t
|
static psp_return_t
|
||||||
process_specified_packets(capture_file *cf, packet_range_t *range,
|
process_specified_packets(capture_file *cf, packet_range_t *range,
|
||||||
const char *string1, const char *string2,
|
const char *string1, const char *string2, gboolean terminate_is_stop,
|
||||||
gboolean (*callback)(capture_file *, frame_data *,
|
gboolean (*callback)(capture_file *, frame_data *,
|
||||||
union wtap_pseudo_header *, const guint8 *, void *),
|
union wtap_pseudo_header *, const guint8 *, void *),
|
||||||
void *callback_args)
|
void *callback_args)
|
||||||
|
@ -1582,6 +1595,7 @@ process_specified_packets(capture_file *cf, packet_range_t *range,
|
||||||
time in order to get to the next progress bar step). */
|
time in order to get to the next progress bar step). */
|
||||||
if (progbar == NULL)
|
if (progbar == NULL)
|
||||||
progbar = delayed_create_progress_dlg(string1, string2,
|
progbar = delayed_create_progress_dlg(string1, string2,
|
||||||
|
terminate_is_stop,
|
||||||
&progbar_stop_flag,
|
&progbar_stop_flag,
|
||||||
&progbar_start_time,
|
&progbar_start_time,
|
||||||
progbar_val);
|
progbar_val);
|
||||||
|
@ -1609,8 +1623,8 @@ process_specified_packets(capture_file *cf, packet_range_t *range,
|
||||||
|
|
||||||
if (progbar_stop_flag) {
|
if (progbar_stop_flag) {
|
||||||
/* Well, the user decided to abort the operation. Just stop,
|
/* Well, the user decided to abort the operation. Just stop,
|
||||||
and arrange to return TRUE to our caller, so they know it
|
and arrange to return PSP_STOPPED to our caller, so they know
|
||||||
was stopped explicitly. */
|
it was stopped explicitly. */
|
||||||
ret = PSP_STOPPED;
|
ret = PSP_STOPPED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1685,7 +1699,7 @@ cf_retap_packets(capture_file *cf, gboolean do_columns)
|
||||||
packet_range_init(&range);
|
packet_range_init(&range);
|
||||||
packet_range_process_init(&range);
|
packet_range_process_init(&range);
|
||||||
switch (process_specified_packets(cf, &range, "Refiltering statistics on",
|
switch (process_specified_packets(cf, &range, "Refiltering statistics on",
|
||||||
"all packets", retap_packet,
|
"all packets", TRUE, retap_packet,
|
||||||
do_columns ? &cf->cinfo : NULL)) {
|
do_columns ? &cf->cinfo : NULL)) {
|
||||||
case PSP_FINISHED:
|
case PSP_FINISHED:
|
||||||
/* Completed successfully. */
|
/* Completed successfully. */
|
||||||
|
@ -1948,7 +1962,7 @@ cf_print_packets(capture_file *cf, print_args_t *print_args)
|
||||||
/* Iterate through the list of packets, printing the packets we were
|
/* Iterate through the list of packets, printing the packets we were
|
||||||
told to print. */
|
told to print. */
|
||||||
ret = process_specified_packets(cf, &print_args->range, "Printing",
|
ret = process_specified_packets(cf, &print_args->range, "Printing",
|
||||||
"selected packets", print_packet,
|
"selected packets", TRUE, print_packet,
|
||||||
&callback_args);
|
&callback_args);
|
||||||
|
|
||||||
if (callback_args.header_line_buf != NULL)
|
if (callback_args.header_line_buf != NULL)
|
||||||
|
@ -2034,8 +2048,8 @@ cf_write_pdml_packets(capture_file *cf, print_args_t *print_args)
|
||||||
/* Iterate through the list of packets, printing the packets we were
|
/* Iterate through the list of packets, printing the packets we were
|
||||||
told to print. */
|
told to print. */
|
||||||
ret = process_specified_packets(cf, &print_args->range, "Writing PDML",
|
ret = process_specified_packets(cf, &print_args->range, "Writing PDML",
|
||||||
"selected packets", write_pdml_packet,
|
"selected packets", TRUE,
|
||||||
fh);
|
write_pdml_packet, fh);
|
||||||
|
|
||||||
switch (ret) {
|
switch (ret) {
|
||||||
|
|
||||||
|
@ -2105,8 +2119,8 @@ cf_write_psml_packets(capture_file *cf, print_args_t *print_args)
|
||||||
/* Iterate through the list of packets, printing the packets we were
|
/* Iterate through the list of packets, printing the packets we were
|
||||||
told to print. */
|
told to print. */
|
||||||
ret = process_specified_packets(cf, &print_args->range, "Writing PSML",
|
ret = process_specified_packets(cf, &print_args->range, "Writing PSML",
|
||||||
"selected packets", write_psml_packet,
|
"selected packets", TRUE,
|
||||||
fh);
|
write_psml_packet, fh);
|
||||||
|
|
||||||
switch (ret) {
|
switch (ret) {
|
||||||
|
|
||||||
|
@ -2176,8 +2190,8 @@ cf_write_csv_packets(capture_file *cf, print_args_t *print_args)
|
||||||
/* Iterate through the list of packets, printing the packets we were
|
/* Iterate through the list of packets, printing the packets we were
|
||||||
told to print. */
|
told to print. */
|
||||||
ret = process_specified_packets(cf, &print_args->range, "Writing CSV",
|
ret = process_specified_packets(cf, &print_args->range, "Writing CSV",
|
||||||
"selected packets", write_csv_packet,
|
"selected packets", TRUE,
|
||||||
fh);
|
write_csv_packet, fh);
|
||||||
|
|
||||||
switch (ret) {
|
switch (ret) {
|
||||||
|
|
||||||
|
@ -2296,7 +2310,7 @@ cf_change_time_formats(capture_file *cf)
|
||||||
time in order to get to the next progress bar step). */
|
time in order to get to the next progress bar step). */
|
||||||
if (progbar == NULL)
|
if (progbar == NULL)
|
||||||
progbar = delayed_create_progress_dlg("Changing", "time display",
|
progbar = delayed_create_progress_dlg("Changing", "time display",
|
||||||
&stop_flag, &start_time, progbar_val);
|
TRUE, &stop_flag, &start_time, progbar_val);
|
||||||
|
|
||||||
/* Update the progress bar, but do it only N_PROGBAR_UPDATES times;
|
/* Update the progress bar, but do it only N_PROGBAR_UPDATES times;
|
||||||
when we update it, we have to run the GTK+ main loop to get it
|
when we update it, we have to run the GTK+ main loop to get it
|
||||||
|
@ -2749,7 +2763,7 @@ find_packet(capture_file *cf,
|
||||||
time in order to get to the next progress bar step). */
|
time in order to get to the next progress bar step). */
|
||||||
if (progbar == NULL)
|
if (progbar == NULL)
|
||||||
progbar = delayed_create_progress_dlg("Searching", cf->sfilter,
|
progbar = delayed_create_progress_dlg("Searching", cf->sfilter,
|
||||||
&stop_flag, &start_time, progbar_val);
|
FALSE, &stop_flag, &start_time, progbar_val);
|
||||||
|
|
||||||
/* Update the progress bar, but do it only N_PROGBAR_UPDATES times;
|
/* Update the progress bar, but do it only N_PROGBAR_UPDATES times;
|
||||||
when we update it, we have to run the GTK+ main loop to get it
|
when we update it, we have to run the GTK+ main loop to get it
|
||||||
|
@ -3243,9 +3257,8 @@ cf_save(capture_file *cf, const char *fname, packet_range_t *range, guint save_f
|
||||||
"range" since we initialized it. */
|
"range" since we initialized it. */
|
||||||
callback_args.pdh = pdh;
|
callback_args.pdh = pdh;
|
||||||
callback_args.fname = fname;
|
callback_args.fname = fname;
|
||||||
switch (process_specified_packets(cf, range, "Saving",
|
switch (process_specified_packets(cf, range, "Saving", "selected packets",
|
||||||
"selected packets", save_packet,
|
TRUE, save_packet, &callback_args)) {
|
||||||
&callback_args)) {
|
|
||||||
|
|
||||||
case PSP_FINISHED:
|
case PSP_FINISHED:
|
||||||
/* Completed successfully. */
|
/* Completed successfully. */
|
||||||
|
|
|
@ -642,7 +642,7 @@ packet_list_resize_columns(void) {
|
||||||
time in order to get to the next progress bar step). */
|
time in order to get to the next progress bar step). */
|
||||||
if (progbar == NULL)
|
if (progbar == NULL)
|
||||||
progbar = delayed_create_progress_dlg("Resizing", "Resize Columns",
|
progbar = delayed_create_progress_dlg("Resizing", "Resize Columns",
|
||||||
&progbar_stop_flag, &progbar_start_time, progbar_val);
|
TRUE, &progbar_stop_flag, &progbar_start_time, progbar_val);
|
||||||
|
|
||||||
if (i >= progbar_nextstep) {
|
if (i >= progbar_nextstep) {
|
||||||
/* let's not divide by zero. I should never be started
|
/* let's not divide by zero. I should never be started
|
||||||
|
|
|
@ -63,7 +63,10 @@ struct progdlg {
|
||||||
*
|
*
|
||||||
* The first argument is the task to do, e.g. "Loading".
|
* The first argument is the task to do, e.g. "Loading".
|
||||||
* The second argument is the item to do, e.g. "capture.cap".
|
* The second argument is the item to do, e.g. "capture.cap".
|
||||||
* The third argument is the string to put in the "stop this operation" button.
|
* The third argument is TRUE if the "terminate this operation" button should
|
||||||
|
* be a "Stop" button (meaning that the operation is stopped, but not undone),
|
||||||
|
* and FALSE if it should be a "Cancel" button (meaning that it's stopped
|
||||||
|
* and anything it's done would be undone)
|
||||||
* The fourth argument is a pointer to a Boolean variable that will be
|
* The fourth argument is a pointer to a Boolean variable that will be
|
||||||
* set to TRUE if the user hits that button.
|
* set to TRUE if the user hits that button.
|
||||||
*
|
*
|
||||||
|
@ -79,7 +82,7 @@ struct progdlg {
|
||||||
*/
|
*/
|
||||||
progdlg_t *
|
progdlg_t *
|
||||||
create_progress_dlg(const gchar *task_title, const gchar *item_title,
|
create_progress_dlg(const gchar *task_title, const gchar *item_title,
|
||||||
gboolean *stop_flag)
|
gboolean terminate_is_stop, gboolean *stop_flag)
|
||||||
{
|
{
|
||||||
progdlg_t *dlg;
|
progdlg_t *dlg;
|
||||||
GtkWidget *dlg_w, *main_vb, *title_lb, *status_lb, *elapsed_lb, *time_left_lb, *percentage_lb;
|
GtkWidget *dlg_w, *main_vb, *title_lb, *status_lb, *elapsed_lb, *time_left_lb, *percentage_lb;
|
||||||
|
@ -181,8 +184,7 @@ create_progress_dlg(const gchar *task_title, const gchar *item_title,
|
||||||
|
|
||||||
percentage_lb = gtk_label_new(" 0%");
|
percentage_lb = gtk_label_new(" 0%");
|
||||||
gtk_misc_set_alignment(GTK_MISC(percentage_lb), 0.0, 0.0);
|
gtk_misc_set_alignment(GTK_MISC(percentage_lb), 0.0, 0.0);
|
||||||
gtk_box_pack_start(GTK_BOX(percentage_hb), percentage_lb, FALSE, TRUE,
|
gtk_box_pack_start(GTK_BOX(percentage_hb), percentage_lb, FALSE, TRUE, 3);
|
||||||
3);
|
|
||||||
dlg->percentage_lb = (GtkLabel *) percentage_lb;
|
dlg->percentage_lb = (GtkLabel *) percentage_lb;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -199,15 +201,17 @@ create_progress_dlg(const gchar *task_title, const gchar *item_title,
|
||||||
gtk_box_pack_start(GTK_BOX(main_vb), main_hb, FALSE, TRUE, 3);
|
gtk_box_pack_start(GTK_BOX(main_vb), main_hb, FALSE, TRUE, 3);
|
||||||
|
|
||||||
/* Button row */
|
/* Button row */
|
||||||
bbox = dlg_button_row_new(GTK_STOCK_CANCEL, NULL);
|
bbox = dlg_button_row_new(terminate_is_stop ? GTK_STOCK_STOP :
|
||||||
|
GTK_STOCK_CANCEL, NULL);
|
||||||
gtk_container_add(GTK_CONTAINER(main_vb), bbox);
|
gtk_container_add(GTK_CONTAINER(main_vb), bbox);
|
||||||
gtk_widget_show(bbox);
|
gtk_widget_show(bbox);
|
||||||
|
|
||||||
cancel_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_CANCEL);
|
cancel_bt = OBJECT_GET_DATA(bbox, terminate_is_stop ? GTK_STOCK_STOP :
|
||||||
|
GTK_STOCK_CANCEL);
|
||||||
gtk_widget_grab_default(cancel_bt);
|
gtk_widget_grab_default(cancel_bt);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allow user to either click the "Cancel" button, or
|
* Allow user to either click the "Cancel"/"Stop" button, or
|
||||||
* the close button on the window, to stop an operation in
|
* the close button on the window, to stop an operation in
|
||||||
* progress.
|
* progress.
|
||||||
*/
|
*/
|
||||||
|
@ -229,7 +233,8 @@ create_progress_dlg(const gchar *task_title, const gchar *item_title,
|
||||||
|
|
||||||
progdlg_t *
|
progdlg_t *
|
||||||
delayed_create_progress_dlg(const gchar *task_title, const gchar *item_title,
|
delayed_create_progress_dlg(const gchar *task_title, const gchar *item_title,
|
||||||
gboolean *stop_flag, const GTimeVal *start_time, gfloat progress)
|
gboolean terminate_is_stop, gboolean *stop_flag,
|
||||||
|
const GTimeVal *start_time, gfloat progress)
|
||||||
{
|
{
|
||||||
GTimeVal time_now;
|
GTimeVal time_now;
|
||||||
gdouble delta_time;
|
gdouble delta_time;
|
||||||
|
@ -285,7 +290,8 @@ delayed_create_progress_dlg(const gchar *task_title, const gchar *item_title,
|
||||||
if (progress >= (delta_time / (delta_time + min_display)))
|
if (progress >= (delta_time / (delta_time + min_display)))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
dlg = create_progress_dlg(task_title, item_title, stop_flag);
|
dlg = create_progress_dlg(task_title, item_title, terminate_is_stop,
|
||||||
|
stop_flag);
|
||||||
|
|
||||||
/* set dialog start_time to the start of processing, not box creation */
|
/* set dialog start_time to the start of processing, not box creation */
|
||||||
dlg->start_time = *start_time;
|
dlg->start_time = *start_time;
|
||||||
|
|
|
@ -1081,6 +1081,7 @@ packet_hex_print_common(GtkTextView *bv, const guint8 *pd, int len, int bstart,
|
||||||
time in order to get to the next progress bar step). */
|
time in order to get to the next progress bar step). */
|
||||||
if (progbar == NULL)
|
if (progbar == NULL)
|
||||||
progbar = delayed_create_progress_dlg("Processing", "Packet Details",
|
progbar = delayed_create_progress_dlg("Processing", "Packet Details",
|
||||||
|
TRUE,
|
||||||
&progbar_stop_flag,
|
&progbar_stop_flag,
|
||||||
&progbar_start_time,
|
&progbar_start_time,
|
||||||
progbar_val);
|
progbar_val);
|
||||||
|
|
|
@ -2513,7 +2513,8 @@ static gboolean copy_file(gchar *dest, gint channels, gint format, user_data_t *
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
progbar = create_progress_dlg("Saving voice in a file", dest, &stop_flag);
|
progbar = create_progress_dlg("Saving voice in a file", dest, TRUE,
|
||||||
|
&stop_flag);
|
||||||
|
|
||||||
if (format == SAVE_AU_FORMAT) /* au format */
|
if (format == SAVE_AU_FORMAT) /* au format */
|
||||||
{
|
{
|
||||||
|
|
|
@ -44,12 +44,15 @@ typedef struct progdlg progdlg_t;
|
||||||
*
|
*
|
||||||
* @param task_title the task to do, e.g. "Loading"
|
* @param task_title the task to do, e.g. "Loading"
|
||||||
* @param item_title the item to do, e.g. "capture.cap"
|
* @param item_title the item to do, e.g. "capture.cap"
|
||||||
|
* @param terminate_is_stop TRUE if the operation can't be cancelled, just
|
||||||
|
* stopped (i.e., it has a "Stop" button and clicking it doesn't undo
|
||||||
|
* anything already done), FALSE if it can
|
||||||
* @param stop_flag a pointer to a Boolean variable that will be
|
* @param stop_flag a pointer to a Boolean variable that will be
|
||||||
* set to TRUE if the user hits that button
|
* set to TRUE if the user hits that button
|
||||||
* @return the newly created progress dialog
|
* @return the newly created progress dialog
|
||||||
*/
|
*/
|
||||||
progdlg_t *create_progress_dlg(const gchar *task_title, const gchar *item_title,
|
progdlg_t *create_progress_dlg(const gchar *task_title, const gchar *item_title,
|
||||||
gboolean *stop_flag);
|
gboolean terminate_is_stop, gboolean *stop_flag);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a progress dialog, but only if it's not likely to disappear
|
* Create a progress dialog, but only if it's not likely to disappear
|
||||||
|
@ -57,6 +60,9 @@ progdlg_t *create_progress_dlg(const gchar *task_title, const gchar *item_title,
|
||||||
*
|
*
|
||||||
* @param task_title the task to do, e.g. "Loading"
|
* @param task_title the task to do, e.g. "Loading"
|
||||||
* @param item_title the item to do, e.g. "capture.cap"
|
* @param item_title the item to do, e.g. "capture.cap"
|
||||||
|
* @param terminate_is_stop TRUE if the operation can't be cancelled, just
|
||||||
|
* stopped (i.e., it has a "Stop" button and clicking it doesn't undo
|
||||||
|
* anything already done), FALSE if it can
|
||||||
* @param stop_flag a pointer to a Boolean variable that will be
|
* @param stop_flag a pointer to a Boolean variable that will be
|
||||||
* set to TRUE if the user hits that button
|
* set to TRUE if the user hits that button
|
||||||
* @param start_time a pointer to a GTimeVal structure which holds
|
* @param start_time a pointer to a GTimeVal structure which holds
|
||||||
|
@ -66,7 +72,8 @@ progdlg_t *create_progress_dlg(const gchar *task_title, const gchar *item_title,
|
||||||
*/
|
*/
|
||||||
progdlg_t *
|
progdlg_t *
|
||||||
delayed_create_progress_dlg(const gchar *task_title, const gchar *item_title,
|
delayed_create_progress_dlg(const gchar *task_title, const gchar *item_title,
|
||||||
gboolean *stop_flag, const GTimeVal *start_time, gfloat progress);
|
gboolean terminate_is_stop, gboolean *stop_flag,
|
||||||
|
const GTimeVal *start_time, gfloat progress);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the progress information of the progress dialog box.
|
* Update the progress information of the progress dialog box.
|
||||||
|
|
|
@ -219,7 +219,7 @@ ph_stats_new(void)
|
||||||
if (progbar == NULL)
|
if (progbar == NULL)
|
||||||
progbar = delayed_create_progress_dlg(
|
progbar = delayed_create_progress_dlg(
|
||||||
"Computing", "protocol hierarchy statistics",
|
"Computing", "protocol hierarchy statistics",
|
||||||
&stop_flag, &start_time, progbar_val);
|
TRUE, &stop_flag, &start_time, progbar_val);
|
||||||
|
|
||||||
/* Update the progress bar, but do it only N_PROGBAR_UPDATES
|
/* Update the progress bar, but do it only N_PROGBAR_UPDATES
|
||||||
times; when we update it, we have to run the GTK+ main
|
times; when we update it, we have to run the GTK+ main
|
||||||
|
|
Loading…
Reference in New Issue