No-op; rename a whole load of wx constants to their shorter equivalents.
[dcpomatic.git] / src / wx / job_view.cc
index 798e353a9b443b3e99bb1056d7b4977dca8f7c95..8e7040c3b855cb1d0f3ae87db05da65b7b7b5d6e 100644 (file)
@@ -47,7 +47,7 @@ JobView::setup ()
        /* This seems to be required to allow the gauge to shrink under OS X */
        _gauge->SetMinSize (wxSize (0, -1));
        _gauge_message->Add (_gauge, 0, wxEXPAND | wxLEFT | wxRIGHT);
-       _message = new wxStaticText (_container, wxID_ANY, wxT (" \n "));
+       _message = new wxStaticText (_container, wxID_ANY, wxT (" \n "), wxDefaultPosition, wxDefaultSize, wxST_ELLIPSIZE_MIDDLE);
        _gauge_message->Add (_message, 1, wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL, 6);
        _table->Insert (n, _gauge_message, 1, wxEXPAND | wxLEFT | wxRIGHT);
        ++n;
@@ -55,11 +55,11 @@ JobView::setup ()
        wxBoxSizer* buttons = new wxBoxSizer (wxHORIZONTAL);
 
        _cancel = new wxButton (_container, wxID_ANY, _("Cancel"));
-       _cancel->Bind (wxEVT_COMMAND_BUTTON_CLICKED, &JobView::cancel_clicked, this);
+       _cancel->Bind (wxEVT_BUTTON, &JobView::cancel_clicked, this);
        buttons->Add (_cancel, 1, wxALIGN_CENTER_VERTICAL);
 
        _details = new wxButton (_container, wxID_ANY, _("Details..."));
-       _details->Bind (wxEVT_COMMAND_BUTTON_CLICKED, &JobView::details_clicked, this);
+       _details->Bind (wxEVT_BUTTON, &JobView::details_clicked, this);
        _details->Enable (false);
        buttons->Add (_details, 1, wxALIGN_CENTER_VERTICAL);
 
@@ -93,6 +93,9 @@ JobView::progress ()
        whole += _job->status ();
        if (whole != _last_message) {
                _message->SetLabelMarkup (std_to_wx (whole));
+               /* This hack fixes the size of _message on OS X */
+               _message->InvalidateBestSize ();
+               _message->SetSize (_message->GetBestSize ());
                _gauge_message->Layout ();
                _last_message = whole;
        }