! 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 !
Thunar custom actions submenu
Status:
RESOLVED: MOVED

Comments

Description crocodocodile 2017-12-08 23:13:14 CET
I would like to build a bunch of little custom actions in Thunar, but I can't get to organise them properly since I don't know how to make 'child menus' (like that Create Document and in the screenshot below). Anyway, if I were to right-click somewhere empty in a folder in Thunar, a little menu pops up:

https://i.stack.imgur.com/Auj6M.png

It would be nice if I could add there something like:

Create new:
    - Python script
    - bash script
    - ...
git:
    - some_automated_process
    - another_automated_process
    - ...

...etc. I'm sure you can see what I mean. Since I could not find the way to do that, I decided to go with Templates (~/Templates), but for some reason Thunar is displaying some generic icon instead of (in this case) Python's icon (I'm referring to Script):

https://i.stack.imgur.com/JAP2T.png

so, can I have submenus?
Comment 1 Andre Miranda editbugs 2017-12-14 00:57:43 CET
As we have talked on #xfce-dev, in order to accomplish what you ask, thunar-custom-actions plugin needs to be updated to make use of ThunarxMenu to nest ThunarxMenuItems (not that hard). Also its dialog needs to somehow allow users to create/edit/move submenus, perhaps using GtkTreeView or a custom widget (this is the tricky part).
It's not a simple feature, don't expect me on it soon, on the other hand, patches will be reviewed/merged ASAP.
Comment 2 alexxcons editbugs 2017-12-15 20:28:53 CET
*** Bug 12274 has been marked as a duplicate of this bug. ***
Comment 3 alexxcons editbugs 2017-12-15 20:29:22 CET
*** Bug 10850 has been marked as a duplicate of this bug. ***
Comment 4 alexxcons editbugs 2017-12-15 20:30:18 CET
*** Bug 1688 has been marked as a duplicate of this bug. ***
Comment 5 alexxcons editbugs 2017-12-15 20:31:22 CET
Link to old thunar-plugin which provided this functionallirty: 
https://goodies.xfce.org/projects/thunar-plugins/thunar-actions-plugin

This issue is either about resurrection  thunar-actions-plugin ( port to gtk3, support most recent thunarx, prettify )

Or adding the functionallity to the existing UCA plugin.

Personally I would go rather for modifications in UCA, since IMO it's not good to have 2 plugins for almost the same purpose.
Comment 6 Andre Miranda editbugs 2017-12-17 21:52:59 CET
I'm not sure thunar-actions-plugin is in good shape, it targets thunarx-1, depends on thunar-vfs (superseded by gfvs a long time ago) and it's been 8 years since it was touched, for those reasons I asked to be archived. I also suspect it doesn't works, taking a quick look it seems the code is too short to accomplish what it advertises.

And I agree, it's preferable to introduce its features in UCA than resurrect it.
Comment 7 mg979 2017-12-30 01:29:07 CET
There is the sendto plugin that does this. A simple copy of it, with another name for the submenu, and its own folder for custom actions(sendto uses ~/.local/share/Thunar/sendto/), and removal of default actions, imo it should be enough.
Comment 8 Andre Miranda editbugs 2017-12-30 05:45:53 CET
@mg979 not exactly. sendto-email plugin just installs a desktop file in <prefix>/share/Thunar that runs an executable (i.e. /usr/lib/Thunar/thunar-sendto-email). Thunar loads files from this folder and insert their entries in Send To context menu, it's hard coded and does not use the Thunar Extension Framework (thunarx) in any way. What you propose is similar but not as good as to what bug 14114 and bug 14024 ask IMHO.

Still there's the question of how the user tells to Thunar to nest actions into submenus, what first comes to my mind is to update UCA's dialog as I explained in comment 1, but now that we're talking about actions into separated desktop files instead of uca.xml, using folders to nest desktop files and then create submenus based on those folder could be a simpler approach.
Comment 9 alexxcons editbugs 2018-01-05 17:15:22 CET
*** Bug 10803 has been marked as a duplicate of this bug. ***
Comment 10 Git Bot editbugs 2020-05-26 23:33:43 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/thunar/-/issues/184.

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 #14072

Reported by:
crocodocodile
Reported on: 2017-12-08
Last modified on: 2020-05-26
Duplicates (4):
  • 1688 Put extension actions into a menu if more than a certain limit
  • 10803 Allow Group Personalized Actions
  • 10850 action groups
  • 12274 [Feature request] Please add an option to add a submenu to Thunar Custom Actions

People

Assignee:
Xfce Bug Triage
CC List:
9 users

Version

Attachments

Additional information