! 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 !
Merge all file-context-menus into one


Description alexxcons editbugs 2018-05-20 19:03:37 CEST
Currently there are at least 4 different context-menus implemented in thunar. All of them look almost the same +/- 1 or 2 extra items.
The following methods implement the functionality for different classes:

This issue is about adding an additional class "thunar-file-context-menu" which provides the context-menu service for all other classes, and which implements the logic only once, instead of 4x
The gain will be:
- simpler to add/remove/modify context menu items
- same items on each context menu (user expectation)
- less maintenance / less duplicated code

Fixing this issue as well would fix Bug #2068
Comment 1 alexxcons editbugs 2018-08-05 22:23:08 CEST
*** Bug 14579 has been marked as a duplicate of this bug. ***
Comment 2 alexxcons editbugs 2018-12-06 12:28:48 CET
*** Bug 14947 has been marked as a duplicate of this bug. ***
Comment 3 alexxcons editbugs 2019-09-11 23:57:43 CEST
A first step:
- new widget "thunar-context-menu"
- Remove context menu code in "thunar-location-buttons" and make use of the new context menu.
- Dont use GtkAction any more to create the menu items

Here my WIP branch: https://github.com/alexxcons/thunar/commits/MergeAllContextMenus
So far things run fine.

- Support for GList of FIles instead of single file
- Support for UCAs
- What about Hotkeys?
- Use new widget in tree-view
- Use new widget in shortcut-view
- Use new widget instead of launcher stuff
- Add Tooltips?
Comment 4 alexxcons editbugs 2019-10-17 11:53:51 CEST
Doh, much more work than I initially expected:
- Rewrite of mayor parts of "thunar-launcher" was required
- Completely dumped "thunar-template-action" which just was there to provide the "create File" submenu and iherited from GtkAction.  Moved relevant stuff into thunar-context-menu

If you are interested, here another working WIP snapshot:
(Better dont look at the code .. I need to tidy up. Commits to be squashed / reflogged)

Nice sideeffect: This will fix the slowness on mutli-file-selection (Bug #14026), since no file/folder monitors are used on the "selected files" any more.
Comment 5 alexxcons editbugs 2019-10-20 22:08:46 CEST
*** Bug 2946 has been marked as a duplicate of this bug. ***
Comment 6 brunoaiss+xfce 2019-10-28 22:59:52 CET
Does this include the context menu for the right click drag?
One of the things I'd like is to order a compression from one directory to another.
In other words, 
I'd like custom actions to be applicable while dragging and dropping (would also mean 2 new % replacements)
Comment 7 alexxcons editbugs 2019-10-28 23:29:59 CET
So far I did not think about the right-click-drag menu .. that's a bit special, since it has nothing in common with the other context menus.
I did not plan to provide UCA's for that menu. Best open a seperate bug for it.
Comment 8 brunoaiss+xfce 2019-10-29 08:28:34 CET
Opened a separate bug https://bugzilla.xfce.org/show_bug.cgi?id=16100
Comment 9 alexxcons editbugs 2019-12-07 20:57:09 CET
The patch for this bug most likely will as well fix bug #16256
.. .still working on it, currently I dont have much time.
Comment 10 brunoaiss+xfce 2019-12-07 21:03:42 CET
alexxcons, did you comment on the right bug?
Comment 11 alexxcons editbugs 2019-12-07 21:07:42 CET
Yes, pretty sure that a static context menu will not be able to flicker in some way. 

The current (context) menu runs a file-monitor on the selection, so if the selection is changed by some other source (e.g. opera) , the context menu entries as well may change.
Comment 12 alexxcons editbugs 2020-03-19 09:04:05 CET
*** Bug 7621 has been marked as a duplicate of this bug. ***
Comment 13 alexxcons editbugs 2020-05-09 01:06:44 CEST
*** Bug 2068 has been marked as a duplicate of this bug. ***
Comment 14 Git Bot editbugs 2020-05-17 23:51:01 CEST
Alexander Schwinn referenced this bugreport in commit f3fa22fdda964b3c42ec99cbc0ab65f24939d436

Merge all file-context-menus into one (Bug #14410) Make use of new widget "thunar-menu" for location buttons instead of providing a foreign menu

Comment 15 Git Bot editbugs 2020-05-26 23:35:57 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/198.

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

Reported by:
Reported on: 2018-05-20
Last modified on: 2020-05-26
Duplicates (4):
  • 2068 UCA actions in pathbar buttons
  • 2946 Location buttons: copy path and open terminal here
  • 7621 Can't mount/unmount/eject volumes at computer://
  • 14579 Usability: Unify context menus


CC List:
11 users



Additional information