mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
*neutrino menu: fix 'memory ' of selected items in submenues
Add small helper class to manage missing values e.g. needed for deallocated widget objects. This class we can also use for other things in future! In this context I added a vector for 'selected' values needed for deeper and deallocated submenues. The identification of widgets working now with a new widget parameter named 'w_index'. setSelected() and getSelected() functions are still working, but are not needed, if we use an index -add define for default widget index -add new header file for enums -adapted many menu classes for this parameter Hope it' works fine. If you find any menu without a 'memory', please add an index. git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1908 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include <global.h>
|
||||
#include <neutrino.h>
|
||||
#include <mymenu.h>
|
||||
#include <neutrino_menue.h>
|
||||
|
||||
#include <gui/widget/icons.h>
|
||||
#include <gui/widget/stringinput.h>
|
||||
@@ -51,11 +52,9 @@
|
||||
#include <system/debug.h>
|
||||
|
||||
|
||||
|
||||
CAudioPlayerSetup::CAudioPlayerSetup()
|
||||
{
|
||||
width = w_max (40, 10);
|
||||
selected = -1;
|
||||
}
|
||||
|
||||
CAudioPlayerSetup::~CAudioPlayerSetup()
|
||||
@@ -99,8 +98,7 @@ const CMenuOptionChooser::keyval AUDIOPLAYER_DISPLAY_ORDER_OPTIONS[AUDIOPLAYER_D
|
||||
/*shows the audio setup menue*/
|
||||
int CAudioPlayerSetup::showAudioPlayerSetup()
|
||||
{
|
||||
CMenuWidget* audioplayerSetup = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width);
|
||||
audioplayerSetup->setSelected(selected);
|
||||
CMenuWidget* audioplayerSetup = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, 576, MN_WIDGET_ID_AUDIOSETUP);
|
||||
|
||||
audioplayerSetup->addIntroItems(LOCALE_AUDIOPLAYER_NAME);
|
||||
|
||||
@@ -122,7 +120,6 @@ int CAudioPlayerSetup::showAudioPlayerSetup()
|
||||
|
||||
int res = audioplayerSetup->exec (NULL, "");
|
||||
audioplayerSetup->hide ();
|
||||
selected = audioplayerSetup->getSelected();
|
||||
delete audioplayerSetup;
|
||||
return res;
|
||||
}
|
||||
|
Reference in New Issue
Block a user