elementary / switchboard-plug-applications

Switchboard Applications Plug
https://elementary.io
GNU General Public License v3.0
14 stars 12 forks source link

KeyFile: Make show and active Follow the Autostart Spec #184

Closed Marukesu closed 1 year ago

Marukesu commented 1 year ago

this make the plug work correctly with files created by the background portal.

tintou commented 1 year ago

I would recommend using DesktopAppInfo as the get_show_in (null) method would do all the work for you :slightly_smiling_face:

Marukesu commented 1 year ago

I would recommend using DesktopAppInfo as the get_show_in (null) method would do all the work for you :slightly_smiling_face:

That is what i done first, but it ended up causing segfaults.

Marukesu commented 1 year ago

Code looks good to me. Not sure if there is an ideal way to test but it doesn't appear to break anything that I can see.

Thanks for the code review, you can test the active part with 3 files in the ~/.config/autostart directory:

to test the show part you need to have others 3 files, and modify the XDG_CURRENT_DESKTOP environment value:

In fact on my main machine I see Music as an option for File Browser but in my test that seems to be gone which feels more appropriate?

Well, this doesn't change anything outside of the startup page so i doubt this happened because of the changes here. Maybe you have a old version of music in you test machine, i see that it include inode/directory in they MimeType key. In my machine, i got music there with and without this PR.