[WIP] Fix settings

This commit is contained in:
Quentin Guidée
2020-02-16 13:47:28 +01:00
parent 9de231ba64
commit 1a35ca891e
3 changed files with 10 additions and 8 deletions

View File

@@ -14,8 +14,8 @@ namespace Settings {
AboutController::AboutController(Responder * parentResponder) :
GenericSubController(parentResponder),
m_contributorsController(this),
m_contributorsCell(KDFont::LargeFont, KDFont::SmallFont),
m_view(&m_selectableTableView)
m_contributorsCell(KDFont::LargeFont, KDFont::SmallFont)
//m_view(&m_selectableTableView)
{
for (int i = 0; i < k_totalNumberOfCell; i++) {
m_cells[i].setMessageFont(KDFont::LargeFont);
@@ -33,13 +33,13 @@ bool AboutController::handleEvent(Ion::Events::Event event) {
return true;
}
if (event == Ion::Events::OK || event == Ion::Events::EXE || event == Ion::Events::Right) {
/* if (childLabel == I18n::Message::Contributors) {
if (childLabel == I18n::Message::Contributors) {
GenericSubController * subController = &m_contributorsController;
subController->setMessageTreeModel(m_messageTreeModel->children(selectedRow()));
StackViewController * stack = stackController();
stack->push(subController);
return true;
} */
}
if (!(event == Ion::Events::Right)) {
if (childLabel == I18n::Message::SoftwareVersion) {
MessageTableCellWithBuffer * myCell = (MessageTableCellWithBuffer *)m_selectableTableView.selectedCell();
@@ -99,7 +99,7 @@ HighlightCell * AboutController::reusableCell(int index, int type) {
return &m_cells[index];
}
assert(index == 0);
return &m_contributorsCell; //E13HELP
return &m_contributorsCell;
}
int AboutController::typeAtLocation(int i, int j) {

View File

@@ -11,7 +11,8 @@ namespace Settings {
class AboutController : public GenericSubController {
public:
AboutController(Responder * parentResponder);
View * view() override { return &m_view; }
//View * view() override { return &m_view; }
View * view() override { return &m_selectableTableView; }
void viewWillAppear() override;
bool handleEvent(Ion::Events::Event event) override;
HighlightCell * reusableCell(int index, int type) override;
@@ -26,7 +27,7 @@ private:
#endif
ContributorsController m_contributorsController;
MessageTableCellWithChevronAndMessage m_contributorsCell;
SelectableViewWithMessages m_view;
//SelectableViewWithMessages m_view;
MessageTableCellWithBuffer m_cells[k_totalNumberOfCell];
HardwareTest::PopUpController m_hardwareTestPopUpController;
};

View File

@@ -5,9 +5,10 @@ namespace Settings {
void AboutController::viewWillAppear() {
GenericSubController::viewWillAppear();
// IN OMEGA, THE FOLLOWING LINES ARE ADDED IN A SUBMENU "LEGAL INFORMATION", BECAUSE MESSAGES DELETE THE SCROLLBAR.
// --------------------- Please don't edit these lines ----------------------
I18n::Message cautionMessages[] = {I18n::Message::AboutWarning1, I18n::Message::AboutWarning2, I18n::Message::AboutWarning3, I18n::Message::AboutWarning4};
m_view.setMessages(cautionMessages, sizeof(cautionMessages)/sizeof(I18n::Message));
// m_view.setMessages(cautionMessages, sizeof(cautionMessages)/sizeof(I18n::Message));
// --------------------------------------------------------------------------
}