diff --git a/ChangeLog b/ChangeLog index 81a4c507..8f56d089 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ (Format: Year/Month/Day) Changes for 1.0.0: *07/08/05: + * Fix menu heading encoding (Simon) + sf.net bug #1712583: NLS:Non-latin characters displayed incorrectly in menu title + MenuCreator.cc * Fix error passing --with-locale path in ./configure (Simon) sf.net bug #1708859 configure.in diff --git a/src/MenuCreator.cc b/src/MenuCreator.cc index ef97b63d..85073885 100644 --- a/src/MenuCreator.cc +++ b/src/MenuCreator.cc @@ -451,16 +451,18 @@ FbTk::Menu *MenuCreator::createFromFile(const string &filename, int screen_numbe if (!parser.isLoaded()) return 0; + startFile(); string label; - if (require_begin && !getStart(parser, label, m_stringconvertor)) + if (require_begin && !getStart(parser, label, m_stringconvertor)) { + endFile(); return 0; + } FbTk::Menu *menu = createMenu(label, screen_number); - if (menu != 0) { - startFile(); + if (menu != 0) parseMenu(parser, *menu, m_stringconvertor); - endFile(); - } + + endFile(); return menu; } @@ -474,14 +476,16 @@ bool MenuCreator::createFromFile(const string &filename, if (!parser.isLoaded()) return false; + startFile(); string label; - if (require_begin && !getStart(parser, label, m_stringconvertor)) + if (require_begin && !getStart(parser, label, m_stringconvertor)) { + endFile(); return false; + } // save menu filename, so we can check if it changes Fluxbox::instance()->saveMenuFilename(real_filename.c_str()); - startFile(); parseMenu(parser, inject_into, m_stringconvertor); endFile(); @@ -499,10 +503,12 @@ bool MenuCreator::createWindowMenuFromFile(const string &filename, string label; - if (require_begin && !getStart(parser, label, m_stringconvertor)) - return false; - startFile(); + if (require_begin && !getStart(parser, label, m_stringconvertor)) { + endFile(); + return false; + } + parseWindowMenu(parser, inject_into, m_stringconvertor); endFile();