mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
Merge pull request #446 from RedGl0w/omegaE15
Fix home external apps display and accessibility
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user