Get rid of tabs list
This commit is contained in:
parent
ff938fc0d5
commit
d500c8b9dd
@ -5,7 +5,6 @@ from qutebrowser.widgets.tabbar import TabWidget
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
class TabbedBrowser(TabWidget):
|
class TabbedBrowser(TabWidget):
|
||||||
tabs = []
|
|
||||||
cur_progress = pyqtSignal(int)
|
cur_progress = pyqtSignal(int)
|
||||||
url_stack = []
|
url_stack = []
|
||||||
|
|
||||||
@ -18,7 +17,6 @@ class TabbedBrowser(TabWidget):
|
|||||||
def tabopen(self, url):
|
def tabopen(self, url):
|
||||||
tab = BrowserTab(self)
|
tab = BrowserTab(self)
|
||||||
tab.openurl(url)
|
tab.openurl(url)
|
||||||
self.tabs.append(tab)
|
|
||||||
self.addTab(tab, url)
|
self.addTab(tab, url)
|
||||||
self.setCurrentWidget(tab)
|
self.setCurrentWidget(tab)
|
||||||
self.progress_changed(tab.progress)
|
self.progress_changed(tab.progress)
|
||||||
@ -27,7 +25,7 @@ class TabbedBrowser(TabWidget):
|
|||||||
|
|
||||||
@pyqtSlot(str)
|
@pyqtSlot(str)
|
||||||
def openurl(self, url):
|
def openurl(self, url):
|
||||||
tab = self.tabs[self.currentIndex()]
|
tab = self.currentWidget()
|
||||||
tab.openurl(url)
|
tab.openurl(url)
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
@ -37,12 +35,12 @@ class TabbedBrowser(TabWidget):
|
|||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def close_act(self):
|
def close_act(self):
|
||||||
if len(self.tabs) > 1:
|
if self.count() > 1:
|
||||||
idx = self.currentIndex()
|
idx = self.currentIndex()
|
||||||
|
tab = self.currentWidget()
|
||||||
# FIXME maybe we should add the QUrl object here and deal with QUrls everywhere
|
# FIXME maybe we should add the QUrl object here and deal with QUrls everywhere
|
||||||
# FIXME maybe we actually should store the webview objects here
|
# FIXME maybe we actually should store the webview objects here
|
||||||
self.url_stack.append(self.tabs[idx].url().url())
|
self.url_stack.append(tab.url().url())
|
||||||
self.tabs.pop(idx)
|
|
||||||
self.removeTab(idx)
|
self.removeTab(idx)
|
||||||
else:
|
else:
|
||||||
# FIXME
|
# FIXME
|
||||||
|
Loading…
Reference in New Issue
Block a user