Add custom action and check all Appearance Conditions, ok, close... - right click on desktop - expected result; you should see the new custom action, but it doesn't appear.
Reboot computer - right click desktop - custom action appears.
In the past I was able to run a command to rebuild the cache but I can't remember what that was.
currently 3.18.27-1-MANJARO 64bit with Thunar 1.6.10 but I've had this issue since the beginning. Been using Manjaro for about 2 years now with regular updates.
I guess I need to be a little more specific, narrowed down the issue to the desktop specifically. Here is a reproduction from ToZ at xfce forums:
1. Create a file on the desktop called test.txt.
2. Create a file called test2.txt in thunar in your home directory.
3. Create a new Thunar Custom action "Edit in Mousepad". command = "mousepad %N" and appearance conditions checked are "Text Files"
4. Right-click the file in Thunar and notice the "Edit in Mousepad" action.
5. Right-click the file on the desktop and notice that the action is missing.
6. Reload the desktop via "xfdesktop -R"
7. Right-click the file on the desktop and notice that the action is now visible.[/quote]
It seems xfdesktop gets all custom actions once, while Thunar checks every time the context menu is called. Moving to this bug to xfdesktop.
Moving the initialization part so that it is run every time the menu is opened seems like an easy fix. Should it be done?
Created attachment 9476
I did a quick test with the attached diff. However, when I trigger a custom action (and close the associated application afterwards) I will get the following warning:
GLib-GObject-WARNING **: 16:45:05.000: invalid uninstantiatable type '(null)' in cast to 'ThunarUcaProvider'
Not freeing the 'thunarx_menu_providers' list eliminates the warning.
Created attachment 9635
(In reply to Theo Linkspfeifer from comment #3)
> Moving the initialization part so that it is run every time the menu is
> opened seems like an easy fix. Should it be done?
Yes, I agree, Thunar already does this.
I have updated your patch by making the provider factory an attribute of XfdesktopFileIconManagerPrivate, so it's created and free'd only once. This makes sense IMO and is the pattern used in Thunar's code.
This fixes the warning message, but now custom actions are not updated, which makes no sense at all.
> Not freeing the 'thunarx_menu_providers' list eliminates the warning.
I think you meant no unref'ing items of that list.
-- GitLab Migration Automatic Message --
This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfdesktop/-/issues/25.
Please create an account or use an existing account on one of our supported OAuth providers.
If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests
Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev