HdyTabView should handle closing multiple tabs better
By now we have some pain points with the current API:
- Closing a series of tabs (close all to the left/right/close other tabs) closes tabs as it goes and stops if one tab need confirmation instead of asking all tabs first
- There's no good way to handle window closing so apps need to duplicate code
Now, we can change hdy_tab_view_close_after()
etc to first ask all tabs for closing, gather confirmations and then close all after all are confirmed/not close if not. The problem here is:
- If we ask all tabs at once, some of them may want confirmation. Possibly more than one. Each of them spawns a dialog + focuses that tab, so if we have 2 or more at once, they are stacked + it focuses the wrong tab
- If we ask them one by one, we avoid the stacked dialogs, but it can take a long time with apps like ephy, that do async checks that can take a while (e.g. if a tab has hanged)
One way to avoid that would be to show just one confirmation dialog for all tabs. This isn't a new thing, I've seen that a lot:
Question is, can we have some generic UI that will suit all of these apps so they don't have to have their own UI at all?
Edited by Alice Mikhaylenko