Replace GtkAction, GtkActionEntry and Remove GtkUiManager
Finally here the review for that never-ending WIP branch.
Thanks alot to Reuben and AndreLDM, for early testing ! You helped me alot to find and fix the worst regressions. (Though I am almost sure there still are some hidden ones here and there)
If you have the time to review and/or test, I would be very happy!
My main mission was: Replace the deprecated GtkAction, GtkActionEntry and the strongly coupled GtkUiManager
Here a rough overview on what I did:
thunar-launcherin a way so that it uses XfceGtkActionEntry instead of the deprectaed GtkActionEntry. I extended the responsibility of that widget to manage most MenuItems which are used in multiple places to follow DRY ( E.g. copy/paste/trash/delete/..). I introduced a simple API to activate files and open folders
- I completely dumped the usage of GtkUiManager and all *ui.xml files which were used for menu-creation. I dont see any advantage in porting that to GtkBuilder. IMO GtkBuilder makes sense for whole GUI's, but not to define the order of tiny menu fragments. That is done in the code now. I think that removes alot of complexity.
- The creation and show/hide of menu-item is not done on selection any more, but whenever the menu is displayed. That solves some flickering menu bug and improves the performance on rubberbanding
- Added the widget
thunar-menu-item, which simplifies and unifies the creation of menu-fragments, which are re-used on different places with slightly different parameters
- Dumped all widgets which implemented a GtkAction, like thunar-history-action, thunar-trash-action, etc. and moved the logic to thunar-launcher or thunar-window
- Usage of thunar-menu / thunar-launcher as well for the window menu. XfceGtkActionEntries which are only used in thunar-window are defined there. Some internal logic was changed accordingly.
- Make use of new widget "thunar-menu" for location buttons instead of providing a foreign menu (Thats actually not part of Bug #16654, though it directly relies on the previous work)
thunar runs on each commit of this branch, though apperently it spits alot of Gtk CRITICALS on some commits. As well functionallity is cropped between commits.
libxfce4ui master will be required to build this branch ( I guess that's the reason why the pipeline fails) So I anyhow will have to wait for the next libxfce4ui release before merging.
The git history is now okish I think .. if you insists, here and there I possibly could do more granular commits.
Suggestion and critic would be very welcome !