Use a tooltip for long DCP names (#50).
authorCarl Hetherington <cth@carlh.net>
Wed, 13 Feb 2013 00:34:29 +0000 (00:34 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 13 Feb 2013 00:34:29 +0000 (00:34 +0000)
src/wx/film_editor.cc

index 9560842617433afccb9b4d4eaf4eb00ff7ed92b7..3ccdac7137555c71d2e323aa6f1464a81977047a 100644 (file)
@@ -1174,5 +1174,11 @@ FilmEditor::external_audio_changed (wxCommandEvent &)
 void
 FilmEditor::setup_dcp_name ()
 {
-       _dcp_name->SetLabel (std_to_wx (_film->dcp_name (true)));
+       string s = _film->dcp_name (true);
+       if (s.length() > 28) {
+               _dcp_name->SetLabel (std_to_wx (s.substr (0, 28) + "..."));
+               _dcp_name->SetToolTip (std_to_wx (s));
+       } else {
+               _dcp_name->SetLabel (std_to_wx (s));
+       }
 }