EGD-2180 Issue with gui::ShowMode

This commit is contained in:
Alek
2019-10-15 23:11:02 +02:00
parent d430ca6b14
commit 006bc3d129
34 changed files with 82 additions and 75 deletions

View File

@@ -112,7 +112,7 @@ void DesktopMainWindow::setVisibleState() {
}
}
void DesktopMainWindow::onBeforeShow( ShowMode mode, uint32_t command, SwitchData* data ) {
void DesktopMainWindow::onBeforeShow( ShowMode mode, SwitchData* data ) {
//update time
time->setText( topBar->getTimeString() );
@@ -155,13 +155,13 @@ bool DesktopMainWindow::onInput( const InputEvent& inputEvent ) {
if( app->getPinLocked())
//if there was no application on to before closing proceed normally to pin protection window.
if( lockTimeoutApplilcation.empty()) {
application->switchWindow( "PinLockWindow", 0, nullptr );
application->switchWindow( "PinLockWindow" );
}
else {
std::unique_ptr<LockPhoneData> data = std::make_unique<LockPhoneData>();
data->setPrevApplication( lockTimeoutApplilcation );
lockTimeoutApplilcation = "";
application->switchWindow( "PinLockWindow", 0, std::move(data) );
application->switchWindow( "PinLockWindow", std::move(data) );
}
else {
@@ -189,7 +189,7 @@ bool DesktopMainWindow::onInput( const InputEvent& inputEvent ) {
else {
//pressing enter moves user to menu screen
if( inputEvent.keyCode == KeyCode::KEY_ENTER ) {
application->switchWindow( "MenuWindow", 0, nullptr );
application->switchWindow( "MenuWindow" );
}
//if numeric key was pressed record that key and send it to call application with a switch command
else if(( inputEvent.keyChar >= '0') && ( inputEvent.keyChar <= '9') ) {
@@ -215,7 +215,7 @@ bool DesktopMainWindow::onInput( const InputEvent& inputEvent ) {
}
//long press of right function button move user to power off window
else if (inputEvent.keyCode == KeyCode::KEY_RF) {
application->switchWindow( "PowerOffWindow", 0, nullptr );
application->switchWindow( "PowerOffWindow" );
}
}
return false;