From 917e753426f2a9891bb8900be4ddf5d50b6444f9 Mon Sep 17 00:00:00 2001 From: Joachim LF Date: Fri, 22 Jan 2021 17:56:58 +0100 Subject: [PATCH 1/2] Fix display issue --- apps/apps_container.cpp | 4 ++-- apps/apps_container.h | 2 +- apps/settings/sub_menu/accessibility_controller.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/apps_container.cpp b/apps/apps_container.cpp index dd1bbb1eb..e486e0e60 100644 --- a/apps/apps_container.cpp +++ b/apps/apps_container.cpp @@ -387,8 +387,8 @@ OnBoarding::PromptController * AppsContainer::promptController() { return &m_promptController; } -void AppsContainer::redrawWindow() { - m_window.redraw(); +void AppsContainer::redrawWindow(bool force) { + m_window.redraw(force); } void AppsContainer::activateExamMode(GlobalPreferences::ExamMode examMode) { diff --git a/apps/apps_container.h b/apps/apps_container.h index d9263c0a9..ab945b6ef 100644 --- a/apps/apps_container.h +++ b/apps/apps_container.h @@ -48,7 +48,7 @@ public: void shutdownDueToLowBattery(); void setShiftAlphaStatus(Ion::Events::ShiftAlphaStatus newStatus); OnBoarding::PromptController * promptController(); - void redrawWindow(); + void redrawWindow(bool force = false); void activateExamMode(GlobalPreferences::ExamMode examMode); // Exam pop-up controller delegate void examDeactivatingPopUpIsDismissed() override; diff --git a/apps/settings/sub_menu/accessibility_controller.cpp b/apps/settings/sub_menu/accessibility_controller.cpp index 3fdf2e4e8..1df981f37 100644 --- a/apps/settings/sub_menu/accessibility_controller.cpp +++ b/apps/settings/sub_menu/accessibility_controller.cpp @@ -63,7 +63,7 @@ bool AccessibilityController::handleEvent(Ion::Events::Event event) { KDIonContext::sharedContext()->gamma.setGamma(redGamma, greenGamma, blueGamma); KDIonContext::sharedContext()->updatePostProcessingEffects(); m_selectableTableView.reloadCellAtLocation(m_selectableTableView.selectedColumn(), m_selectableTableView.selectedRow()); - AppsContainer::sharedAppsContainer()->redrawWindow(); + AppsContainer::sharedAppsContainer()->redrawWindow(true); return true; } From 71449239c8b5a46d4a9c3d27544e35207be9b18e Mon Sep 17 00:00:00 2001 From: Joachim LF Date: Fri, 22 Jan 2021 18:28:15 +0100 Subject: [PATCH 2/2] Fix external apps display --- apps/home/controller.cpp | 17 +++++++++-------- build/config.mak | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/apps/home/controller.cpp b/apps/home/controller.cpp index 59691c15e..e6eafb691 100644 --- a/apps/home/controller.cpp +++ b/apps/home/controller.cpp @@ -68,7 +68,8 @@ Controller::Controller(Responder * parentResponder, SelectableTableViewDataSourc bool Controller::handleEvent(Ion::Events::Event event) { if (event == Ion::Events::OK || event == Ion::Events::EXE) { AppsContainer * container = AppsContainer::sharedAppsContainer(); - + + int index = selectionDataSource()->selectedRow()*k_numberOfColumns+selectionDataSource()->selectedColumn()+1; #ifdef HOME_DISPLAY_EXTERNALS if (index >= container->numberOfApps()) { if (GlobalPreferences::sharedGlobalPreferences()->examMode() == GlobalPreferences::ExamMode::Dutch || GlobalPreferences::sharedGlobalPreferences()->examMode() == GlobalPreferences::ExamMode::NoSymNoText || GlobalPreferences::sharedGlobalPreferences()->examMode() == GlobalPreferences::ExamMode::NoSym) { @@ -96,7 +97,7 @@ bool Controller::handleEvent(Ion::Events::Event event) { } } else { #endif - ::App::Snapshot * selectedSnapshot = container->appSnapshotAtIndex(PermutedAppSnapshotIndex(selectionDataSource()->selectedRow() * k_numberOfColumns + selectionDataSource()->selectedColumn() + 1)); + ::App::Snapshot * selectedSnapshot = container->appSnapshotAtIndex(index); if (ExamModeConfiguration::appIsForbiddenInExamMode(selectedSnapshot->descriptor()->name(), GlobalPreferences::sharedGlobalPreferences()->examMode())) { } else { bool switched = container->switchTo(selectedSnapshot); @@ -176,30 +177,30 @@ void Controller::willDisplayCellAtLocation(HighlightCell * cell, int i, int j) { #ifdef HOME_DISPLAY_EXTERNALS External::Archive::File app_file; - + if (External::Archive::executableAtIndex(appIndex - container->numberOfApps(), app_file)) { char temp_name_buffer[100]; strlcpy(temp_name_buffer, app_file.name, 94); strlcat(temp_name_buffer, ".icon", 99); - + int img_index = External::Archive::indexFromName(temp_name_buffer); - + if (img_index != -1) { External::Archive::File image_file; if (External::Archive::fileAtIndex(img_index, image_file)) { const Image* img = new Image(55, 56, image_file.data, image_file.dataLength); appCell->setExtAppDescriptor(app_file.name, img); - + } else { appCell->setExtAppDescriptor(app_file.name, ImageStore::ExternalIcon); } } else { appCell->setExtAppDescriptor(app_file.name, ImageStore::ExternalIcon); } - + appCell->setVisible(true); } else { - appCell->setVisible(false); + appCell->setVisible(false); } #else appCell->setVisible(false); diff --git a/build/config.mak b/build/config.mak index 3e0541763..97f801dc9 100644 --- a/build/config.mak +++ b/build/config.mak @@ -7,7 +7,7 @@ HOME_DISPLAY_EXTERNALS ?= 1 EPSILON_VERSION ?= 15.3.1 OMEGA_VERSION ?= 1.21.0 # OMEGA_USERNAME ?= N/A -EPSILON_APPS ?= calculation rpn graph code statistics probability solver atom sequence regression settings +EPSILON_APPS ?= calculation rpn graph code statistics probability solver atom sequence regression settings external EPSILON_I18N ?= en fr EPSILON_COUNTRIES ?= WW CA DE ES FR GB IT NL PT US EPSILON_GETOPT ?= 0