Fix for bug 848. Make a scrollable window when more than 10 interfaces are listed.
[obnox/wireshark/wip.git] / file.c
diff --git a/file.c b/file.c
index e7e5d83a3d70e6baa48f2b48b673e75424f52681..2f6d741bba0a5c8d05e48e62659626e2ad5456d7 100644 (file)
--- a/file.c
+++ b/file.c
@@ -58,7 +58,7 @@
 #include "print.h"
 #include "file.h"
 #include "fileset.h"
-#include "util.h"
+#include "tempfile.h"
 #include "merge.h"
 #include "alert_box.h"
 #include "simple_dialog.h"
@@ -696,11 +696,18 @@ cf_get_display_name(capture_file *cf)
 
 /* XXX - use a macro instead? */
 int
-cf_packet_count(capture_file *cf)
+cf_get_packet_count(capture_file *cf)
 {
     return cf->count;
 }
 
+/* XXX - use a macro instead? */
+void
+cf_set_packet_count(capture_file *cf, int packet_count)
+{
+    cf->count = packet_count;
+}
+
 /* XXX - use a macro instead? */
 gboolean
 cf_is_tempfile(capture_file *cf)
@@ -915,6 +922,7 @@ read_packet(capture_file *cf, long offset)
   fdata->flags.visited = 0;
   fdata->flags.marked = 0;
   fdata->flags.ref_time = 0;
+  fdata->color_filter = NULL;
 
   fdata->abs_ts  = *((nstime_t *) &phdr->ts);
 
@@ -2734,6 +2742,7 @@ find_packet(capture_file *cf,
   gchar       status_str[100];
   int         progbar_nextstep;
   int         progbar_quantum;
+  char       *title;
 
   start_fd = cf->current_frame;
   if (start_fd != NULL)  {
@@ -2755,6 +2764,7 @@ find_packet(capture_file *cf,
     g_get_current_time(&start_time);
 
     fdata = start_fd;
+    title = cf->sfilter?cf->sfilter:"";
     for (;;) {
       /* Create the progress bar if necessary.
          We check on every iteration of the loop, so that it takes no
@@ -2762,7 +2772,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", cf->sfilter
+         progbar = delayed_create_progress_dlg("Searching", title
            FALSE, &stop_flag, &start_time, progbar_val);
 
       /* Update the progress bar, but do it only N_PROGBAR_UPDATES times;