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: thunar_tree_view_context_menu thunar_location_buttons_context_menu thunar_shortcuts_view_context_menu thunar_tree_view_context_menu 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
*** Bug 14579 has been marked as a duplicate of this bug. ***
*** Bug 14947 has been marked as a duplicate of this bug. ***
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. TODO: - 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?
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: https://github.com/alexxcons/thunar/commits/MergeAllContextMenus3 (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.
*** Bug 2946 has been marked as a duplicate of this bug. ***
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)
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.
Opened a separate bug https://bugzilla.xfce.org/show_bug.cgi?id=16100
The patch for this bug most likely will as well fix bug #16256 .. .still working on it, currently I dont have much time.
alexxcons, did you comment on the right bug?
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.
*** Bug 7621 has been marked as a duplicate of this bug. ***
*** Bug 2068 has been marked as a duplicate of this bug. ***
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 https://gitlab.xfce.org/xfce/thunar/commit/f3fa22fdda964b3c42ec99cbc0ab65f24939d436
-- 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