Fix several bits of bad i18n markup and add start of checking script.
[dcpomatic.git] / src / wx / content_panel.cc
index b1dfc16f4e0d6f2ccf3de3454feae56c44d7bf03..82caaf1ff01d4199cf08a62311c78426f11dc676 100644 (file)
@@ -66,7 +66,7 @@ class LimitedSplitter : public wxSplitterWindow
 {
 public:
        LimitedSplitter (wxWindow* parent)
-               : wxSplitterWindow (parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D | wxSP_LIVE_UPDATE)
+               : wxSplitterWindow (parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_NOBORDER | wxSP_3DSASH | wxSP_LIVE_UPDATE)
        {
 
        }
@@ -94,8 +94,11 @@ ContentPanel::ContentPanel (wxNotebook* n, shared_ptr<Film> film, weak_ptr<FilmV
        }
 
        _splitter = new LimitedSplitter (n);
-       wxDisplay display (wxDisplay::GetFromWindow(_splitter));
-       wxRect screen = display.GetClientArea();
+       optional<wxRect> screen;
+       int const sn = wxDisplay::GetFromWindow(_splitter);
+       if (sn >= 0) {
+               screen = wxDisplay(sn).GetClientArea();
+       }
        wxPanel* top = new wxPanel (_splitter);
 
        _menu = new ContentMenu (_splitter);
@@ -150,7 +153,9 @@ ContentPanel::ContentPanel (wxNotebook* n, shared_ptr<Film> film, weak_ptr<FilmV
        /* This is a hack to try and make the content notebook a sensible size; large on big displays but small
           enough on small displays to leave space for the content area.
        */
-       _splitter->SplitHorizontally (top, _notebook, screen.height > 800 ? -600 : -150);
+       if (screen) {
+               _splitter->SplitHorizontally (top, _notebook, screen->height > 800 ? -600 : -150);
+       }
 
        _timing_panel = new TimingPanel (this, _film_viewer);
        _notebook->AddPage (_timing_panel, _("Timing"), false);