-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,21 @@ void Menu::readSections() { | |
addSection("settings"); | ||
addSection("applications"); | ||
|
||
/* To keep things simple, we will always create the applications section */ | ||
if (gmenu2x->hideSectionApplications) | ||
{ | ||
auto itr = std::find(sections.begin(), sections.end(), "applications"); | ||
if (itr != sections.end()) | ||
sections.erase(itr); | ||
} | ||
|
||
if (gmenu2x->hideSectionGames) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
{ | ||
auto itr = std::find(sections.begin(), sections.end(), "games"); | ||
if (itr != sections.end()) | ||
sections.erase(itr); | ||
} | ||
|
||
closedir(dirp); | ||
sort(sections.begin(),sections.end(), case_less()); | ||
} | ||
|
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 forstd::
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 omitstd::
. 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 removestd::
there.