mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[Escher] Remove App::runningApp
Change-Id: I4953bae09391079b77c93ee482c6e9cd8202c2d4
This commit is contained in:
@@ -34,7 +34,7 @@ void ListController::setActiveCell(int index) {
|
||||
m_tableView.scrollToRow(index);
|
||||
FunctionCell * cell = (FunctionCell *)(m_tableView.cellAtIndex(index));
|
||||
cell->setParentResponder(this);
|
||||
App::runningApp()->focus(cell);
|
||||
app()->focus(cell);
|
||||
}
|
||||
|
||||
bool ListController::handleEvent(ion_event_t event) {
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
class App : public Responder {
|
||||
public:
|
||||
App();
|
||||
static App * runningApp();
|
||||
void run();
|
||||
void focus(Responder * responder);
|
||||
protected:
|
||||
|
||||
@@ -4,8 +4,6 @@ extern "C" {
|
||||
#include <ion.h>
|
||||
}
|
||||
|
||||
static App * sRunningApp = nullptr;
|
||||
|
||||
App::App() :
|
||||
Responder(nullptr),
|
||||
m_focusedResponder(nullptr)
|
||||
@@ -13,8 +11,6 @@ App::App() :
|
||||
}
|
||||
|
||||
void App::run() {
|
||||
sRunningApp = this;
|
||||
|
||||
Window window;
|
||||
window.setFrame(KDRect(0, 0, ION_SCREEN_WIDTH, ION_SCREEN_HEIGHT));
|
||||
View * rootView = rootViewController()->view();
|
||||
@@ -31,12 +27,6 @@ void App::run() {
|
||||
dispatchEvent(event);
|
||||
window.redraw();
|
||||
}
|
||||
|
||||
sRunningApp = nullptr;
|
||||
}
|
||||
|
||||
App * App::runningApp() {
|
||||
return sRunningApp;
|
||||
}
|
||||
|
||||
void App::dispatchEvent(ion_event_t event) {
|
||||
|
||||
@@ -110,7 +110,7 @@ void TabViewController::setActiveTab(uint8_t i) {
|
||||
m_view.m_tabView.setActiveIndex(i);
|
||||
m_activeChildIndex = i;
|
||||
|
||||
App::runningApp()->focus(activeVC);
|
||||
app()->focus(activeVC);
|
||||
}
|
||||
|
||||
View * TabViewController::view() {
|
||||
|
||||
Reference in New Issue
Block a user