aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2012-07-19 21:49:52 +0000
committerGerald Combs <gerald@wireshark.org>2012-07-19 21:49:52 +0000
commit0da59a005829eb5daf49c6477219a35ac4e73ab3 (patch)
tree0890e6704f36a03fa1d444d4ad8e25411ec36f34 /file.c
parentbdb0898ff8fccc3a7fba48bd36c8a13899745177 (diff)
Pass {delayed_}create_progress_dlg a pointer the top level window
so that we can properly associate a widget with create, update, and destroy events. Only used by Qt so far but it should be easy enough to add to GTK+. Rename ui/qt/progress_dialog.{h,cpp} to progress_bar.{h,cpp}. Show a progress bar in the status bar of the main window instead of creating a separate dialog. Note that we still need to add a "cancel" mechanism and display the task and item titles somewhere. Thus began the War Against Gratuitous Dialogs. svn path=/trunk/; revision=43833
Diffstat (limited to 'file.c')
-rw-r--r--file.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/file.c b/file.c
index 091f68c40a..0091ae08d9 100644
--- a/file.c
+++ b/file.c
@@ -580,10 +580,10 @@ cf_read(capture_file *cf, gboolean reloading)
if ((progbar == NULL) && !(count % MIN_NUMBER_OF_PACKET)){
progbar_val = calc_progbar_val(cf, size, file_pos, status_str, sizeof(status_str));
if (reloading)
- progbar = delayed_create_progress_dlg("Reloading", name_ptr,
+ progbar = delayed_create_progress_dlg(cf->window, "Reloading", name_ptr,
TRUE, &stop_flag, &start_time, progbar_val);
else
- progbar = delayed_create_progress_dlg("Loading", name_ptr,
+ progbar = delayed_create_progress_dlg(cf->window, "Loading", name_ptr,
TRUE, &stop_flag, &start_time, progbar_val);
}
@@ -1193,7 +1193,7 @@ read_packet(capture_file *cf, dfilter_t *dfcode,
/* Add this packet's link-layer encapsulation type to cf->linktypes, if
it's not already there.
- XXX - yes, this is O(N), so if every packet had a different
+ XXX - yes, this is O(N), so if every packet had a different
link-layer encapsulation type, it'd be O(N^2) to read the file, but
there are probably going to be a small number of encapsulation types
in a file. */
@@ -1347,7 +1347,7 @@ cf_merge_files(char **out_filenamep, int in_file_count,
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",
+ progbar = delayed_create_progress_dlg(NULL, "Merging", "files",
FALSE, &stop_flag, &start_time, progbar_val);
}
@@ -1771,7 +1771,7 @@ rescan_packets(capture_file *cf, const char *action, const char *action_item,
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, TRUE,
+ progbar = delayed_create_progress_dlg(cf->window, action, action_item, TRUE,
&stop_flag, &start_time,
progbar_val);
@@ -1824,7 +1824,7 @@ rescan_packets(capture_file *cf, const char *action, const char *action_item,
}
if (redissect || refilter) {
- /* If we're redissecting or refiltering then any frame dependencies
+ /* If we're redissecting or refiltering then any frame dependencies
* from the previous dissection/filtering are no longer valid.
*/
fdata->flags.dependent_of_displayed = 0;
@@ -2101,7 +2101,7 @@ process_specified_packets(capture_file *cf, packet_range_t *range,
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 = delayed_create_progress_dlg(cf->window, string1, string2,
terminate_is_stop,
&progbar_stop_flag,
&progbar_start_time,
@@ -3358,7 +3358,7 @@ find_packet(capture_file *cf,
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", title,
+ progbar = delayed_create_progress_dlg(cf->window, "Searching", title,
FALSE, &stop_flag, &start_time, progbar_val);
/* Update the progress bar, but do it only N_PROGBAR_UPDATES times;
@@ -3995,7 +3995,7 @@ rescan_file(capture_file *cf, const char *fname, gboolean is_tempfile, int *err)
*/
if ((progbar == NULL) && !(count % MIN_NUMBER_OF_PACKET)){
progbar_val = calc_progbar_val(cf, size, file_pos, status_str, sizeof(status_str));
- progbar = delayed_create_progress_dlg("Rescanning", name_ptr,
+ progbar = delayed_create_progress_dlg(cf->window, "Rescanning", name_ptr,
TRUE, &stop_flag, &start_time, progbar_val);
}
@@ -4031,7 +4031,7 @@ rescan_file(capture_file *cf, const char *fname, gboolean is_tempfile, int *err)
/* Add this packet's link-layer encapsulation type to cf->linktypes, if
it's not already there.
- XXX - yes, this is O(N), so if every packet had a different
+ XXX - yes, this is O(N), so if every packet had a different
link-layer encapsulation type, it'd be O(N^2) to read the file, but
there are probably going to be a small number of encapsulation types
in a file. */
@@ -4404,7 +4404,7 @@ cf_save_packets(capture_file *cf, const char *fname, guint save_format,
cf->packet_comment_count--;
}
}
- }
+ }
}
return CF_WRITE_OK;