diff --git a/escher/include/escher/button_row_controller.h b/escher/include/escher/button_row_controller.h index 879c1b5d7..dcba3c98f 100644 --- a/escher/include/escher/button_row_controller.h +++ b/escher/include/escher/button_row_controller.h @@ -6,7 +6,6 @@ #include #include #include -#include #include class ButtonRowDelegate; @@ -48,7 +47,7 @@ private: View * subviewAtIndex(int index) override; void layoutSubviews() override; void drawRect(KDContext * ctx, KDRect rect) const override; - bool setSelectedButton(int selectedButton, App * app); + bool setSelectedButton(int selectedButton); int selectedButton() const { return m_selectedButton; } ViewController * mainViewController() const { return m_mainViewController; } ButtonRowDelegate * buttonRowDelegate() const { return m_delegate; } diff --git a/escher/src/button_row_controller.cpp b/escher/src/button_row_controller.cpp index 941415889..a010d054d 100644 --- a/escher/src/button_row_controller.cpp +++ b/escher/src/button_row_controller.cpp @@ -1,4 +1,5 @@ #include +#include #include #include @@ -141,7 +142,7 @@ void ButtonRowController::ContentView::drawRect(KDContext * ctx, KDRect rect) co } } -bool ButtonRowController::ContentView::setSelectedButton(int selectedButton, App * application) { +bool ButtonRowController::ContentView::setSelectedButton(int selectedButton) { if (selectedButton < -1 || selectedButton >= numberOfButtons() || selectedButton == m_selectedButton) { return false; } @@ -153,7 +154,7 @@ bool ButtonRowController::ContentView::setSelectedButton(int selectedButton, App if (m_selectedButton >= 0) { Button * button = buttonAtIndex(selectedButton); button->setHighlighted(true); - application->setFirstResponder(button); + app()->setFirstResponder(button); return true; } return false; @@ -178,8 +179,7 @@ int ButtonRowController::selectedButton() { } bool ButtonRowController::setSelectedButton(int selectedButton) { - App * application = app(); - return m_contentView.setSelectedButton(selectedButton, application); + return m_contentView.setSelectedButton(selectedButton); } void ButtonRowController::setMessageOfButtonAtIndex(I18n::Message message, int index) {