X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fwx%2Ftimeline_dialog.cc;h=34706d6207c16fd223fae072119c38394654c0c1;hb=aaaa51f6d9eda60ab3b3d182c6d2a7a5bda375aa;hp=dd28f9c234cfbd08af6ede7506b5d6dce6a8eef9;hpb=beddaeab9011e745dcac9732f4e8de3f91bd81a5;p=dcpomatic.git diff --git a/src/wx/timeline_dialog.cc b/src/wx/timeline_dialog.cc index dd28f9c23..34706d620 100644 --- a/src/wx/timeline_dialog.cc +++ b/src/wx/timeline_dialog.cc @@ -54,20 +54,23 @@ TimelineDialog::TimelineDialog (ContentPanel* cp, shared_ptr film) wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL); wxBoxSizer* controls = new wxBoxSizer (wxHORIZONTAL); - _snap = new wxCheckBox (this, wxID_ANY, _("Snap")); - controls->Add (_snap); - _sequence = new wxCheckBox (this, wxID_ANY, _("Keep video and subtitles in sequence")); - controls->Add (_sequence, 1, wxLEFT, 12); - wxToolBar* toolbar = new wxToolBar (this, wxID_ANY); #ifdef DCPOMATIC_LINUX wxBitmap select (wxString::Format (wxT ("%s/select.png"), std_to_wx (shared_path().string())), wxBITMAP_TYPE_PNG); wxBitmap zoom (wxString::Format (wxT ("%s/zoom.png"), std_to_wx (shared_path().string())), wxBITMAP_TYPE_PNG); + wxBitmap zoom_all (wxString::Format (wxT ("%s/zoom_all.png"), std_to_wx (shared_path().string())), wxBITMAP_TYPE_PNG); #endif + wxToolBar* toolbar = new wxToolBar (this, wxID_ANY); toolbar->AddRadioTool ((int) Timeline::SELECT, _("Select"), select); toolbar->AddRadioTool ((int) Timeline::ZOOM, _("Zoom"), zoom); + toolbar->AddTool ((int) Timeline::ZOOM_ALL, _("Zoom to whole project"), zoom_all); controls->Add (toolbar); - toolbar->Bind (wxEVT_TOOL, bind (&TimelineDialog::tool_changed, this, _1)); + toolbar->Bind (wxEVT_TOOL, bind (&TimelineDialog::tool_clicked, this, _1)); + + _snap = new wxCheckBox (this, wxID_ANY, _("Snap")); + controls->Add (_snap); + _sequence = new wxCheckBox (this, wxID_ANY, _("Keep video and subtitles in sequence")); + controls->Add (_sequence, 1, wxLEFT, 12); sizer->Add (controls, 0, wxALL, 12); sizer->Add (&_timeline, 1, wxEXPAND | wxALL, 12); @@ -128,7 +131,7 @@ TimelineDialog::set_selection (ContentList selection) } void -TimelineDialog::tool_changed (wxCommandEvent& ev) +TimelineDialog::tool_clicked (wxCommandEvent& ev) { - _timeline.set_tool ((Timeline::Tool) ev.GetId()); + _timeline.tool_clicked ((Timeline::Tool) ev.GetId()); }