X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fcontent_panel.cc;h=e42413d9dceb83d780e01014529af248873c7eff;hb=b9a1ad3df5f9d85fb7439efd93fede72b9b078af;hp=bcc6999139f248255b1ad2f61ca3697ddc1e87ef;hpb=df79d429bf1663a0053844b7e98690d2fdfb790d;p=dcpomatic.git diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc index bcc699913..e42413d9d 100644 --- a/src/wx/content_panel.cc +++ b/src/wx/content_panel.cc @@ -45,20 +45,20 @@ #include "lib/string_text_file_content.h" #include "lib/text_content.h" #include "lib/video_content.h" -#include -#include -#include +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +#include +#include +#include +DCPOMATIC_ENABLE_WARNINGS #include -#include -using std::cout; using std::dynamic_pointer_cast; using std::exception; using std::list; using std::make_shared; -using std::max; using std::shared_ptr; using std::string; using std::vector; @@ -105,11 +105,11 @@ ContentPanel::ContentPanel (wxNotebook* n, shared_ptr film, weak_ptrSetToolTip (_("Add a folder of image files (which will be used as a moving image sequence) or a folder of sound files.")); - b->Add (_add_folder, 1, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP); + b->Add (_add_folder, 0, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP); _add_dcp = new Button (_top_panel, _("Add DCP...")); _add_dcp->SetToolTip (_("Add a DCP.")); - b->Add (_add_dcp, 1, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP); + b->Add (_add_dcp, 0, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP); _remove = new Button (_top_panel, _("Remove")); _remove->SetToolTip (_("Remove the selected piece of content from the film.")); @@ -135,6 +135,7 @@ ContentPanel::ContentPanel (wxNotebook* n, shared_ptr film, weak_ptrAddPage (_timing_panel, _("Timing"), false); + _timing_panel->create (); _content->Bind (wxEVT_LIST_ITEM_SELECTED, boost::bind (&ContentPanel::item_selected, this)); _content->Bind (wxEVT_LIST_ITEM_DESELECTED, boost::bind (&ContentPanel::item_deselected, this)); @@ -358,6 +359,7 @@ ContentPanel::check_selection () if (have_video && !_video_panel) { _video_panel = new VideoPanel (this); _notebook->InsertPage (off, _video_panel, _video_panel->name()); + _video_panel->create (); } else if (!have_video && _video_panel) { _notebook->DeletePage (off); _video_panel = 0; @@ -370,6 +372,7 @@ ContentPanel::check_selection () if (have_audio && !_audio_panel) { _audio_panel = new AudioPanel (this); _notebook->InsertPage (off, _audio_panel, _audio_panel->name()); + _audio_panel->create (); } else if (!have_audio && _audio_panel) { _notebook->DeletePage (off); _audio_panel = 0; @@ -383,6 +386,7 @@ ContentPanel::check_selection () if (have_text[i] && !_text_panel[i]) { _text_panel[i] = new TextPanel (this, static_cast(i)); _notebook->InsertPage (off, _text_panel[i], _text_panel[i]->name()); + _text_panel[i]->create (); } else if (!have_text[i] && _text_panel[i]) { _notebook->DeletePage (off); _text_panel[i] = 0;