Remove unused variable.
[dcpomatic.git] / src / wx / properties_dialog.cc
index 0a997bc41ce73fb1caf5bd3e1566558277e4fc39..67f1fc91bef2bd5e5b245ddd8464ee38e9c79155 100644 (file)
@@ -47,7 +47,7 @@ PropertiesDialog::PropertiesDialog (wxWindow* parent, Film* film)
        table->Add (_total_disk, 1, wxALIGN_CENTER_VERTICAL);
 
        add_label_to_sizer (table, this, "Frames already encoded");
-       _encoded = new ThreadedStaticText (this, "calculating...", boost::bind (&PropertiesDialog::frames_already_encoded, this));
+       _encoded = new ThreadedStaticText (this, "counting...", boost::bind (&PropertiesDialog::frames_already_encoded, this));
        table->Add (_encoded, 1, wxALIGN_CENTER_VERTICAL);
        
        _frames->SetLabel (std_to_wx (lexical_cast<string> (_film->length ())));
@@ -61,7 +61,7 @@ PropertiesDialog::PropertiesDialog (wxWindow* parent, Film* film)
        _total_disk->SetLabel (std_to_wx (t.str ()));
 
        wxBoxSizer* overall_sizer = new wxBoxSizer (wxVERTICAL);
-       overall_sizer->Add (table, 0, wxALL, 8);
+       overall_sizer->Add (table, 0, wxALL, 6);
        
        wxSizer* buttons = CreateSeparatedButtonSizer (wxOK);
        if (buttons) {
@@ -76,7 +76,12 @@ string
 PropertiesDialog::frames_already_encoded () const
 {
        stringstream u;
-       u << _film->encoded_frames();
+       try {
+               u << _film->encoded_frames ();
+       } catch (thread_interrupted &) {
+               return "";
+       }
+       
        if (_film->length()) {
                u << " (" << (_film->encoded_frames() * 100 / _film->length()) << "%)";
        }