-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
[applications] Fix XDG Desktop Entries shadowing behavior #135
[applications] Fix XDG Desktop Entries shadowing behavior #135
Conversation
try { | ||
return s.at(key); | ||
} catch (const out_of_range&) { | ||
throw KeyDoesNotExist(QString("Section '%1' does not contain a key '%2'.") |
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.
Note: Here, the KeyDoesNotExist
exception was necessarily caught by the encapsulating block and therefore always replaced by a SectionDoesNotExist
exception.
This only caused incorrect log messages, but I corrected it anyway since it's related to this PR.
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.
Pourquoi ne plus travailler sur Pactify ?
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.
Pactify? Je ne comprend pas
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.
It seems that spadeau is a player of my Minecraft server named "Pactify" and that he is commenting here for no good reason. Sorry about that... 🤦
3027c83
to
1675c86
Compare
fa36f15
to
e34a086
Compare
1675c86
to
24823b0
Compare
@nathan818fr i am sorry to say that, because i see you invested a good amount of time, but there is a much simpler solution and it is pretty easy to implement for me, because i just have to revert 9803142. I dont know what i thought while writing this , but obviously it is not spec conformant. the algo is simple (put desktop file ids into a map) and I can easily revert it. thank you for pointing that out. |
On my system, google-chrome is installed from the official debian package.
This creates a Desktop Entry in
/usr/share/applications/google-chrome.desktop
.But I don't want to see google-chrome appear in my launchers, so I created a file
~/.local/share/applications/google-chrome.desktop
withNoDisplay=true
.This configuration works perfectly with other launchers (and this is the expected behavior, according to the spec.), but not with Albert.
The problem is that Albert treats excluded XDG Desktop Entry (with NoDisplay, NotShowIn, etc.) the same way as invalid entries.
And in this case, the entry is simply skipped and does not override/shadow later entries with the same ID.
So this PR fixes this behavior and makes Albert conform to the XDG Desktop Entry Specification.
When iterating desktop entry files, the old logic was:
The new logic is: