! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
New Custom Actions require xfdesktop restart to appear


Description SimpleTechGuy 2016-04-01 16:07:59 CEST
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.
Comment 1 SimpleTechGuy 2016-04-01 17:13:18 CEST
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]
Comment 2 Andre Miranda editbugs 2018-02-12 23:14:24 CET
It seems xfdesktop gets all custom actions once, while Thunar checks every time the context menu is called. Moving to this bug to xfdesktop.
Comment 3 Theo Linkspfeifer editbugs 2020-02-19 13:55:56 CET
Moving the initialization part so that it is run every time the menu is opened seems like an easy fix. Should it be done?
Comment 4 Theo Linkspfeifer editbugs 2020-02-20 17:12:07 CET
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.
Comment 5 Andre Miranda editbugs 2020-03-24 02:55:45 CET
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.
Comment 6 Git Bot editbugs 2020-05-26 00:29:22 CEST
-- 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

Bug #12524

Reported by:
Reported on: 2016-04-01
Last modified on: 2020-05-26


Eric Koegel
CC List:
5 users




diff (4.96 KB, patch)
2020-02-20 17:12 CET , Theo Linkspfeifer
no flags
diff2 (4.52 KB, patch)
2020-03-24 02:55 CET , Andre Miranda
no flags

Additional information