Tidy up ScreensPanel code a bit.
[dcpomatic.git] / src / wx / content_panel.cc
index 8ca0d5b29854bc9ba58611fda2db3f61098027eb..59886229c9be06892c6e646e70e8be2d7b722985 100644 (file)
@@ -245,7 +245,7 @@ ContentPanel::add_file_clicked ()
        /* The wxFD_CHANGE_DIR here prevents a `could not set working directory' error 123 on Windows when using
           non-Latin filenames or paths.
        */
-       wxFileDialog* d = new wxFileDialog (_panel, _("Choose a file or files"), wxT (""), wxT (""), wxT ("*.*"), wxFD_MULTIPLE | wxFD_CHANGE_DIR);
+       wxFileDialog* d = new wxFileDialog (_panel, _("Choose a file or files"), wxT (""), wxT (""), wxT ("All files|*.*|Subtitle files|*.srt;*.xml|Audio files|*.wav;*.w64;*.flac;*.aif;*.aiff"), wxFD_MULTIPLE | wxFD_CHANGE_DIR);
        int const r = d->ShowModal ();
 
        if (r != wxID_OK) {
@@ -526,11 +526,6 @@ ContentPanel::add_files (list<boost::filesystem::path> paths)
        /* XXX: check for lots of files here and do something */
 
        for (list<boost::filesystem::path>::const_iterator i = paths.begin(); i != paths.end(); ++i) {
-               shared_ptr<Content> c = content_factory (_film, *i);
-               shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (c);
-               if (ic) {
-                       ic->set_video_frame_rate (24);
-               }
-               _film->examine_and_add_content (c);
+               _film->examine_and_add_content (content_factory (_film, *i));
        }
 }