diff --git a/ChangeLog b/ChangeLog index 2b2ca8de3..3c08a1be9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-02-27 Moritz Bunkus + * mmg: bug fix: Improved the word wrapping of the tooltips on + Windows. + * mmg: bug fix: It was possible to select a file for appending even though no file was added first. diff --git a/src/mmg/mmg.cpp b/src/mmg/mmg.cpp index f77ead550..407c4efa4 100644 --- a/src/mmg/mmg.cpp +++ b/src/mmg/mmg.cpp @@ -501,14 +501,21 @@ 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; - for (i = 30; i < tooltip.length(); ++i) - if (wxT(' ') == tooltip[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]) + } else if (wxT('(') == tooltip[i]) { + first = false; return tooltip.Left(i) + nl + tooltip.Right(tooltip.length() - i); + } return tooltip; }