while ((wtap_read(cf->wth, &err, &err_info, &data_offset))) {
if (size >= 0) {
+ /* Create the progress bar if necessary.
+ We check on every iteration of the loop, so that it takes no
+ longer than the standard time to create it (otherwise, for a
+ large file, we might take considerably longer than that standard
+ time in order to get to the next progress bar step). */
+ if (progbar == NULL) {
+ progbar = delayed_create_progress_dlg("Loading", name_ptr,
+ &stop_flag, &start_time, prog_val);
+ }
+
/* 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
to repaint what's pending, and doing so may involve an "ioctl()"
if (prog_val > 1.0)
prog_val = 1.0;
}
- if (progbar == NULL) {
- /* Create the progress bar if necessary */
- progbar = delayed_create_progress_dlg("Loading", name_ptr,
- &stop_flag, &start_time, prog_val);
- }
if (progbar != NULL) {
g_snprintf(status_str, sizeof(status_str),
"%" PRId64 "KB of %" PRId64 "KB",
for (i = 0; i < in_file_count; i++)
data_offset += in_files[i].data_offset;
+ /* Create the progress bar if necessary.
+ We check on every iteration of the loop, so that it takes no
+ longer than the standard time to create it (otherwise, for a
+ large file, we might take considerably longer than that standard
+ time in order to get to the next progress bar step). */
+ if (progbar == NULL) {
+ progbar = delayed_create_progress_dlg("Merging", "files",
+ &stop_flag, &start_time, prog_val);
+ }
+
+ /* 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
+ to repaint what's pending, and doing so may involve an "ioctl()"
+ to see if there's any pending input from an X server, and doing
+ that for every packet can be costly, especially on a big file. */
if (data_offset >= progbar_nextstep) {
/* Get the sum of the seek positions in all of the files. */
file_pos = 0;
value at 1.0. */
prog_val = 1.0;
}
- if (progbar == NULL) {
- /* Create the progress bar if necessary */
- progbar = delayed_create_progress_dlg("Merging", "files",
- &stop_flag, &start_time, prog_val);
- }
if (progbar != NULL) {
g_snprintf(status_str, sizeof(status_str),
"%" PRId64 "KB of %" PRId64 "KB",
selected_frame_seen = FALSE;
for (fdata = cf->plist; fdata != NULL; fdata = fdata->next) {
+ /* Create the progress bar if necessary.
+ We check on every iteration of the loop, so that it takes no
+ longer than the standard time to create it (otherwise, for a
+ large file, we might take considerably longer than that standard
+ time in order to get to the next progress bar step). */
+ if (progbar == NULL)
+ progbar = delayed_create_progress_dlg(action, action_item, &stop_flag,
+ &start_time, prog_val);
+
/* 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
to repaint what's pending, and doing so may involve an "ioctl()"
g_assert(cf->count > 0);
prog_val = (gfloat) count / cf->count;
- if (progbar == NULL)
- /* Create the progress bar if necessary */
- progbar = delayed_create_progress_dlg(action, action_item, &stop_flag,
- &start_time, prog_val);
-
if (progbar != NULL) {
g_snprintf(status_str, sizeof(status_str),
"%4u of %u frames", count, cf->count);
/* Iterate through the list of packets, printing the packets that
were selected by the current display filter. */
for (fdata = cf->plist; fdata != NULL; fdata = fdata->next) {
+ /* Create the progress bar if necessary.
+ We check on every iteration of the loop, so that it takes no
+ longer than the standard time to create it (otherwise, for a
+ large file, we might take considerably longer than that standard
+ time in order to get to the next progress bar step). */
+ if (progbar == NULL)
+ progbar = delayed_create_progress_dlg(string1, string2,
+ &progbar_stop_flag,
+ &progbar_start_time,
+ progbar_val);
+
/* 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
to repaint what's pending, and doing so may involve an "ioctl()"
g_assert(cf->count > 0);
progbar_val = (gfloat) progbar_count / cf->count;
- if (progbar == NULL)
- /* Create the progress bar if necessary */
- progbar = delayed_create_progress_dlg(string1, string2,
- &progbar_stop_flag,
- &progbar_start_time,
- progbar_val);
-
if (progbar != NULL) {
g_snprintf(progbar_status_str, sizeof(progbar_status_str),
"%4u of %u packets", progbar_count, cf->count);
any columns that show the time in the "command-line-specified"
format and, if so, update that row. */
for (fdata = cf->plist, row = -1; fdata != NULL; fdata = fdata->next) {
+ /* Create the progress bar if necessary.
+ We check on every iteration of the loop, so that it takes no
+ longer than the standard time to create it (otherwise, for a
+ large file, we might take considerably longer than that standard
+ time in order to get to the next progress bar step). */
+ if (progbar == NULL)
+ progbar = delayed_create_progress_dlg("Changing", "time display",
+ &stop_flag, &start_time, prog_val);
+
/* 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
to repaint what's pending, and doing so may involve an "ioctl()"
prog_val = (gfloat) count / cf->count;
- if (progbar == NULL)
- /* Create the progress bar if necessary */
- progbar = delayed_create_progress_dlg("Changing", "time display",
- &stop_flag, &start_time, prog_val);
-
if (progbar != NULL) {
g_snprintf(status_str, sizeof(status_str),
"%4u of %u packets", count, cf->count);
fdata = start_fd;
for (;;) {
+ /* Create the progress bar if necessary.
+ We check on every iteration of the loop, so that it takes no
+ longer than the standard time to create it (otherwise, for a
+ large file, we might take considerably longer than that standard
+ time in order to get to the next progress bar step). */
+ if (progbar == NULL)
+ progbar = delayed_create_progress_dlg("Searching", cf->sfilter,
+ &stop_flag, &start_time, prog_val);
+
/* 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
to repaint what's pending, and doing so may involve an "ioctl()"
prog_val = (gfloat) count / cf->count;
- /* Create the progress bar if necessary */
- if (progbar == NULL)
- progbar = delayed_create_progress_dlg("Searching", cf->sfilter,
- &stop_flag, &start_time, prog_val);
-
if (progbar != NULL) {
g_snprintf(status_str, sizeof(status_str),
"%4u of %u packets", count, cf->count);
main_window_update();
for (i = 0; i < cfile.cinfo.num_cols; i++) {
+ /* Create the progress bar if necessary.
+ We check on every iteration of the loop, so that it takes no
+ longer than the standard time to create it (otherwise, for a
+ large file, we might take considerably longer than that standard
+ time in order to get to the next progress bar step). */
+ if (progbar == NULL)
+ progbar = delayed_create_progress_dlg("Resizing", "Resize Columns",
+ &stop_flag, &start_time, prog_val);
+
if (i >= progbar_nextstep) {
/* let's not divide by zero. I should never be started
* with count == 0, so let's assert that
prog_val = (gfloat) i / cfile.cinfo.num_cols;
- /* Create the progress bar if necessary */
- if (progbar == NULL)
- progbar = delayed_create_progress_dlg("Resizing", "Resize Columns",
- &stop_flag, &start_time, prog_val);
-
if (progbar != NULL) {
g_snprintf(status_str, sizeof(status_str),
"%u of %u columns (%s)", i+1, cfile.cinfo.num_cols, cfile.cinfo.col_title[i]);
break;
}
- /* auto resize the current column */
- eth_clist_set_column_auto_resize(ETH_CLIST(packet_list), i, TRUE);
+ /* auto resize the current column */
+ eth_clist_set_column_auto_resize(ETH_CLIST(packet_list), i, TRUE);
- /* the current column should be resizeable by the user again */
- /* (will turn off auto resize again) */
- eth_clist_set_column_resizeable(ETH_CLIST(packet_list), i, TRUE);
+ /* the current column should be resizeable by the user again */
+ /* (will turn off auto resize again) */
+ eth_clist_set_column_resizeable(ETH_CLIST(packet_list), i, TRUE);
}
/* We're done resizing the columns; destroy the progress bar if it