/*
- Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
public:
Frame (wxString const & title)
: wxFrame (NULL, -1, title)
+ , _sizer (new wxBoxSizer (wxVERTICAL))
{
wxMenuBar* bar = new wxMenuBar;
setup_menu (bar);
s->Add (panel, 1, wxEXPAND);
SetSizer (s);
- wxSizer* sizer = new wxBoxSizer (wxVERTICAL);
-
- JobManagerView* job_manager_view = new JobManagerView (panel, JobManagerView::PAUSE);
- sizer->Add (job_manager_view, 1, wxALL | wxEXPAND, 6);
+ JobManagerView* job_manager_view = new JobManagerView (panel);
+ _sizer->Add (job_manager_view, 1, wxALL | wxEXPAND, 6);
wxSizer* buttons = new wxBoxSizer (wxHORIZONTAL);
wxButton* add = new wxButton (panel, wxID_ANY, _("Add Film..."));
add->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&Frame::add_film, this));
buttons->Add (add, 1, wxALL, 6);
- sizer->Add (buttons, 0, wxALL, 6);
+ _sizer->Add (buttons, 0, wxALL, 6);
- panel->SetSizer (sizer);
+ panel->SetSizer (_sizer);
Bind (wxEVT_CLOSE_WINDOW, boost::bind (&Frame::close, this, _1));
+ Bind (wxEVT_SIZE, boost::bind (&Frame::sized, this, _1));
}
private:
+ void sized (wxSizeEvent& ev)
+ {
+ _sizer->Layout ();
+ ev.Skip ();
+ }
+
bool should_close ()
{
if (!JobManager::instance()->work_to_do ()) {
}
boost::optional<boost::filesystem::path> _last_parent;
+ wxSizer* _sizer;
};
static const wxCmdLineEntryDesc command_line_description[] = {
/* Enable i18n; this will create a Config object
to look for a force-configured language. This Config
object will be wrong, however, because dcpomatic_setup
- hasn't yet been called and there aren't any scalers, filters etc.
+ hasn't yet been called and there aren't any filters etc.
set up yet.
*/
dcpomatic_setup_i18n ();
- /* Set things up, including scalers / filters etc.
+ /* Set things up, including filters etc.
which will now be internationalised correctly.
*/
dcpomatic_setup ();