mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-07-21 05:24:22 -04:00
Fixed options crashes and cleared its structure. All options returns points to proper list indexes.
38 lines
924 B
C++
38 lines
924 B
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#include "BaseSettingsWindow.hpp"
|
|
#include <i18n/i18n.hpp>
|
|
|
|
namespace gui
|
|
{
|
|
BaseSettingsWindow::BaseSettingsWindow(app::Application *app, std::string name) : OptionWindow(app, name)
|
|
{}
|
|
|
|
void BaseSettingsWindow::rebuild()
|
|
{
|
|
destroyInterface();
|
|
buildInterface();
|
|
}
|
|
|
|
void BaseSettingsWindow::onBeforeShow(ShowMode mode, SwitchData *data)
|
|
{
|
|
refreshOptionsList();
|
|
}
|
|
|
|
void BaseSettingsWindow::rebuildOptionList()
|
|
{
|
|
changeOptions(buildOptionsList());
|
|
}
|
|
|
|
void BaseSettingsWindow::refreshOptionsList()
|
|
{
|
|
refreshOptions(buildOptionsList());
|
|
}
|
|
|
|
void BaseSettingsWindow::refreshOptionsList(unsigned int pageIndex)
|
|
{
|
|
refreshOptions(buildOptionsList(), pageIndex);
|
|
}
|
|
} // namespace gui
|