summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-02-13 00:34:29 +0000
committerCarl Hetherington <cth@carlh.net>2013-02-13 00:34:29 +0000
commit5b4861e0e255ecf411542cf32865fb90317f9c62 (patch)
tree101a17f4c962a9ddd170043ace26c767d0e589cb /src
parentba079aaab20805d743c49f7a43bf6ce0170db231 (diff)
Use a tooltip for long DCP names (#50).
Diffstat (limited to 'src')
-rw-r--r--src/wx/film_editor.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc
index 956084261..3ccdac713 100644
--- a/src/wx/film_editor.cc
+++ b/src/wx/film_editor.cc
@@ -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));
+ }
}