From c1360de469d8c1eeb1446e25119e7566e153243e Mon Sep 17 00:00:00 2001 From: thilo Date: Wed, 23 Mar 2011 10:57:14 +0000 Subject: [PATCH] *neutrino menu: member sortOptions() for CMenuOptionStringChooser() use this member e.g. for sorting string options after use of addOption('') git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1325 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/widget/menue.cpp | 5 +++++ src/gui/widget/menue.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index eae747711..106c2e1ba 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -1176,6 +1176,11 @@ void CMenuOptionStringChooser::addOption(const char * const value) options.push_back(std::string(value)); } +void CMenuOptionStringChooser::sortOptions() +{ + sort(options.begin(), options.end()); +} + int CMenuOptionStringChooser::exec(CMenuTarget* parent) { bool wantsRepaint = false; diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index c80d304cb..0350afeae 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -331,7 +331,7 @@ class CMenuOptionStringChooser : public CMenuItem { return active; } - + void sortOptions(); int exec(CMenuTarget* parent); };