Fix uninitialised variable caught by the macOS compiler.
[dcpomatic.git] / src / wx / wx_util.cc
index d264f8b20b761cea3c3a335a016112e0cbc33cc9..6803a8f6c1603245bed7be8aefad8cacdaf1d9fd 100644 (file)
@@ -125,14 +125,14 @@ add_label_to_sizer (wxSizer* s, wxStaticText* t, bool, int prop, int flags)
 
 
 wxStaticText *
-add_label_to_sizer (wxGridBagSizer* s, wxWindow* p, wxString t, bool left, wxGBPosition pos, wxGBSpan span)
+add_label_to_sizer(wxGridBagSizer* s, wxWindow* p, wxString t, bool left, wxGBPosition pos, wxGBSpan span, bool indent)
 {
-       int flags = wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT;
+       int flags = wxALIGN_CENTER_VERTICAL | wxLEFT;
 #ifdef __WXOSX__
        setup_osx_flags (s, left, flags);
 #endif
        auto m = create_label (p, t, left);
-       s->Add (m, pos, span, flags);
+       s->Add(m, pos, span, flags, indent ? DCPOMATIC_SIZER_X_GAP : 0);
        return m;
 }
 
@@ -537,10 +537,11 @@ setup_audio_channels_choice (wxChoice* choice, int minimum)
 }
 
 
-wxSplashScreen *
+wxSplashScreen*
 maybe_show_splash ()
 {
        wxSplashScreen* splash = nullptr;
+
        try {
                wxBitmap bitmap;
                if (bitmap.LoadFile(bitmap_path("splash.png"), wxBITMAP_TYPE_PNG)) {
@@ -554,9 +555,9 @@ maybe_show_splash ()
                        }
 #ifdef DCPOMATIC_WINDOWS
                        /* Having wxSTAY_ON_TOP means error dialogues hide behind the splash screen on Windows, no matter what I try */
-                       splash = new wxSplashScreen (bitmap, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_NO_TIMEOUT, 0, 0, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE | wxFRAME_NO_TASKBAR);
+                       splash = new wxSplashScreen(bitmap, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_NO_TIMEOUT, 0, nullptr, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE | wxFRAME_NO_TASKBAR);
 #else
-                       splash = new wxSplashScreen (bitmap, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_NO_TIMEOUT, 0, 0, -1);
+                       splash = new wxSplashScreen(bitmap, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_NO_TIMEOUT, 0, nullptr, -1);
 #endif
                        wxYield ();
                }