summaryrefslogtreecommitdiff
path: root/qutebrowser/mainwindow/tabbedbrowser.py
diff options
context:
space:
mode:
Diffstat (limited to 'qutebrowser/mainwindow/tabbedbrowser.py')
-rw-r--r--qutebrowser/mainwindow/tabbedbrowser.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py
index 741123ed9..cbc1bac78 100644
--- a/qutebrowser/mainwindow/tabbedbrowser.py
+++ b/qutebrowser/mainwindow/tabbedbrowser.py
@@ -281,9 +281,11 @@ class TabbedBrowser(QWidget):
raise TabDeletedError("index is -1!")
return idx
- def widgets(self):
+ def widgets(self) -> List[browsertab.AbstractTab]:
"""Get a list of open tab widgets.
+ Consider using `tabs()` instead of this method.
+
We don't implement this as generator so we can delete tabs while
iterating over the list.
"""
@@ -296,6 +298,18 @@ class TabbedBrowser(QWidget):
widgets.append(widget)
return widgets
+ def tabs(
+ self,
+ include_hidden: bool = False, # pylint: disable=unused-argument
+ ) -> List[browsertab.AbstractTab]:
+ """Get a list of tabs in this browser.
+
+ Args:
+ include_hidden: Include child tabs which are not currently in the
+ tab bar.
+ """
+ return self.widgets()
+
def _update_window_title(self, field=None):
"""Change the window title to match the current tab.