X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ffilter_dialog.cc;fp=src%2Fwx%2Ffilter_dialog.cc;h=bd844845298bcdd3012eed9308ea732c33b4e765;hb=5fa99824e1bf31f569245e5f2640aeecd84de42d;hp=e52efb68b0e54d323ff0a2a228626407859aeb58;hpb=02d9138d94899fa16b4a16ebc730fd929bf72b1d;p=dcpomatic.git diff --git a/src/wx/filter_dialog.cc b/src/wx/filter_dialog.cc index e52efb68b..bd8448452 100644 --- a/src/wx/filter_dialog.cc +++ b/src/wx/filter_dialog.cc @@ -23,25 +23,32 @@ #include "lib/film.h" #include "filter_dialog.h" +#include "filter_view.h" using namespace std; -FilterDialog::FilterDialog (vector const & f) - : Gtk::Dialog ("Filters") - , _filters (f) +FilterDialog::FilterDialog (wxWindow* parent, vector const & f) + : wxDialog (parent, wxID_ANY, _("Filters")) + , _filters (new FilterView (this, f)) { - get_vbox()->pack_start (_filters.widget ()); + wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL); + sizer->Add (_filters, 1, wxEXPAND); - _filters.ActiveChanged.connect (sigc::mem_fun (*this, &FilterDialog::active_changed)); + _filters->ActiveChanged.connect (sigc::mem_fun (*this, &FilterDialog::active_changed)); - add_button ("Close", Gtk::RESPONSE_CLOSE); + wxSizer* buttons = CreateSeparatedButtonSizer (wxOK); + if (buttons) { + sizer->Add (buttons, wxSizerFlags().Expand().DoubleBorder()); + } - show_all (); + SetSizer (sizer); + sizer->Layout (); + sizer->SetSizeHints (this); } void FilterDialog::active_changed () { - ActiveChanged (_filters.active ()); + ActiveChanged (_filters->active ()); }