Closed Marukesu closed 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:
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.
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:
Hidden
or X-GNOME-Autostart-enabled
key, that should show as enabled in the plug, disabling it should add a Hidden=false
key to it.Hidden=false
, that should show as disabled and activating should change the key value.X-GNOME-Autostart-enabled=false
, also disabled from the start, but enabling this should change the X-GNOME-Autostart key instead of adding a Hidden key.to test the show part you need to have others 3 files, and modify the XDG_CURRENT_DESKTOP environment value:
NoDisplay=true
, that shouldn't be shown in the plug independent of the XDG_CURRENT_DESKTOP
environment. OnlyShowIn=GNOME:Pantheon
, this one should be shown when any of GNOME, Pantheon, or both are specified in XDG_CURRENT_DESKTOP
, but not otherwise.NotShowIn=Pantheon
, this one shouldn't be show when XDG_CURRENT_DESKTOP
have Pantheon specified, but should otherwise.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.
this make the plug work correctly with files created by the background portal.