Skip to content

Commit

Permalink
App name filter shall consider the command line too
Browse files Browse the repository at this point in the history
  • Loading branch information
Code7R committed Oct 13, 2024
1 parent af75ac2 commit 6890eea
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/fdomenu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,12 @@ class DesktopFile {
static DesktopFilePtr load_visible(string &&path, const string &lang) {
try {
auto ret = new DesktopFile(path, lang);
if (ret->NoDisplay || !userFilter(ret->Name.c_str(), false) ||
!userFilter(ret->GetTranslatedName().c_str(), false)) {
// matched conditions to hide the desktop entry?
// matched conditions to hide the desktop entry?
if (ret->NoDisplay)
ret = nullptr;
else if (!userFilter(ret->Name.c_str(), false) &&
!userFilter(ret->GetTranslatedName().c_str(), false) &&
!userFilter(ret->GetCommand().c_str(), false)) {
ret = nullptr;
} else {
if (add_comments) {
Expand Down

0 comments on commit 6890eea

Please sign in to comment.