-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
draft add config options to hide applications and games #41
base: master
Are you sure you want to change the base?
draft add config options to hide applications and games #41
Conversation
0d5bca3
to
ecae073
Compare
Hi @stevenhoving, To show all in filebrowser and menu it just requies to disable part of code: commit cdd089b4eaf4cdab2f3c8dfe11852dde41636b7f
Author: Apaczer <[email protected]>
Date: Sat Nov 4 20:42:12 2023 +0100
show hidden files in Explorer and Menu
diff --git a/src/filelister.cpp b/src/filelister.cpp
index 173c406..9daa11a 100644
--- a/src/filelister.cpp
+++ b/src/filelister.cpp
@@ -57,7 +57,7 @@ void FileLister::browse() {
while (++i < n) {
string file = dptr[i]->d_name;
- if (file[0] == '.' || (find(excludes.begin(), excludes.end(), file) != excludes.end()))
+ if (/*file[0] == '.' || */(find(excludes.begin(), excludes.end(), file) != excludes.end()))
continue;
if (!((dptr[i]->d_type & DT_REG) || (dptr[i]->d_type & DT_DIR))) {
diff --git a/src/menu.cpp b/src/menu.cpp
index 9ba4b03..7383f3a 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -62,9 +62,9 @@ void Menu::readSections() {
links.clear();
while ((dptr = readdir(dirp))) {
- if (dptr->d_name[0] == '.') {
+ /*if (dptr->d_name[0] == '.') {
continue;
- }
+ }*/
string filepath = (string)"sections/" + dptr->d_name;
if (dir_exists(filepath)) {
@@ -99,9 +99,9 @@ void Menu::readLinks() {
}
while ((dptr = readdir(dirp))) {
- if (dptr->d_name[0] == '.') {
+ /*if (dptr->d_name[0] == '.') {
continue;
- }
+ }*/
string filepath = sectionPath(i) + dptr->d_name;
if (filepath.substr(filepath.size() - 5, 5) == "-opkg") {
continue; |
/* To keep things simple, we will always create the applications section */ | ||
if (gmenu2x->hideSectionApplications) | ||
{ | ||
auto itr = std::find(sections.begin(), sections.end(), "applications"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are within std
namespace, so I think no need for std::
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I don't want to go into a theological discussion about using namespace std;
. It has been my personal style to never omit std::
. Of course I have to adjust my personal coding style to the coding style of the project I contribute to. So I will of course remove std::
there.
sections.erase(itr); | ||
} | ||
|
||
if (gmenu2x->hideSectionGames) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see now that section Apps\Settings is always created if nonexistent, so maybe we could add simply a setting to hide them if requested (still I see no reason to hide Games). On a second look we could check if it's prefixed with dot (.) and then hide - would be useful in the long run
This is just a prototype for #40, do not merge