- add_label_to_sizer (table, this, "Disk space required for frames");
- _disk_for_frames = new wxStaticText (this, wxID_ANY, std_to_wx (""));
- table->Add (_disk_for_frames, 1, wxALIGN_CENTER_VERTICAL);
-
- add_label_to_sizer (table, this, "Total disk space required");
- _total_disk = new wxStaticText (this, wxID_ANY, std_to_wx (""));
- table->Add (_total_disk, 1, wxALIGN_CENTER_VERTICAL);
-
- add_label_to_sizer (table, this, "Frames already encoded");
- _encoded = new wxStaticText (this, wxID_ANY, std_to_wx (""));
- table->Add (_encoded, 1, wxALIGN_CENTER_VERTICAL);
-
- _frames->SetLabel (std_to_wx (lexical_cast<string> (film->length ())));
- double const disk = ((double) Config::instance()->j2k_bandwidth() / 8) * film->length() / (film->frames_per_second () * 1073741824);
+ add (_("Frames already encoded"), true);
+ _encoded = add (new ThreadedStaticText (this, _("counting..."), boost::bind (&PropertiesDialog::frames_already_encoded, this)));
+ _encoded->Finished.connect (boost::bind (&PropertiesDialog::layout, this));
+ _frames->SetLabel (std_to_wx (lexical_cast<string> (_film->length().frames (_film->video_frame_rate ()))));
+ double const disk = double (_film->required_disk_space()) / 1073741824.0f;