From d7e1892eb2483b1fef105eb41057c0ac52553cbf Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 22 Jan 2010 22:18:13 +0100 Subject: [PATCH] Always word-wrap tooltips on Windows. --- ChangeLog | 4 ++++ src/mmg/helpers.cpp | 18 +----------------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 242ae7588..97a505708 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-01-22 Moritz Bunkus + + * mmg: bug fix: Tooltips were not word-wrapped on Windows. + 2010-01-20 Moritz Bunkus * mmg: new feature: Added a control for mkvmerge's "--cropping" diff --git a/src/mmg/helpers.cpp b/src/mmg/helpers.cpp index 2efd1fd5c..753db1f62 100644 --- a/src/mmg/helpers.cpp +++ b/src/mmg/helpers.cpp @@ -265,23 +265,7 @@ format_date_time(time_t date_time) { #if defined(SYS_WINDOWS) wxString format_tooltip(const wxString &s) { - static bool first = true; - wxString tooltip(s), nl(wxT("\n")); - unsigned int i; - - if (!first) - return s; - - for (i = 60; i < tooltip.length(); ++i) - if (wxT(' ') == tooltip[i]) { - first = false; - return tooltip.Left(i) + nl + tooltip.Right(tooltip.length() - i - 1); - } else if (wxT('(') == tooltip[i]) { - first = false; - return tooltip.Left(i) + nl + tooltip.Right(tooltip.length() - i); - } - - return tooltip; + return format_paragraph(s.c_str(), 0, L"", L"", 80); } #endif