Hi all,
while working with Tryton the last days I noticed one missing feature I use very often in other apps:
If you open a lot of tabs you can get lost after a while.
As an example thunderbird has the option to close all other or current tab by right click on one tab:
because all the checks are implemented in the Main class I triggered the click on the close buttons. This runs the checks but I donât know if this is good style.
This should probably not a great design. It is probably better to call a method on Main. Maybe using a signal.
It is a default behavior of GTK. It is probably lost because you catch the button press event. Normally you should be able to extend the default popup menu and insert your actions.
I was searching a way to access methods defined in Main from notebook but did not find a quick solution. If community is interested in this patch the simplest way would be to move this methods from main to a custom notebook class since they are related to the notebook.
Didnât find that accessible from pyGtk - and all apps I was reviewing implementing it by own methods. But Iterating the tabs and adding to menu is simple - so no problem âŠ
no - its explicitly enabled with popup_enable() and I think is a convenience method if you donât want to implement your own.
I moved the behavior to the tab itself, since the notebook context menu is a general menu and not related to the tabs. I also added a âClose tabs rightâ because sometimes I open a lot of relates to check something and after this I want to return to my âdefault opened tabsâ (I think it works more or less to illustrate the idea)
Maybe instead of adding the action on the popup menu of the notebook, it will be simpler to have application shortcuts like we already have âNext tabâ, âPrevious tabâ etc. So you could add âClose other tabsâ and âClose tabs to the rightâ. I think this will result in less custom code and a more practical usage as there will be shortcuts.
Personally I donât have seen a lot of people using the Next/Previous-Tab-shortcuts. If they are going to switch the tabs the mouse follows the eyes searching the tab by reading the title. I think people expects (if expecting something like this in general) by right clicking on the tabs. But accelerators should be added for completeness.
Possibly nobody is missing this feature - Iâm a tab hoarder and I need this from time to time in both firefox and thunderbird and would like to have it in tryton as well.