Everything is pinned instead of pin, and one if corrected

This commit is contained in:
thuck 2016-11-07 21:12:34 +01:00
parent 20eae4d671
commit 4ed046d5e7
2 changed files with 3 additions and 3 deletions

View File

@ -255,7 +255,7 @@ class CommandDispatcher:
Args:
index: Location where the tab should be pinned/unpinned.
count: The tab index to pin or unpin
count: The tab index to pin or unpin, or None
"""
tab = self._cntwidget(count)
if tab is None:

View File

@ -108,7 +108,7 @@ class TabWidget(QTabWidget):
fmt = config.get('tabs', 'title-format')
if fields['pin'] is True:
if fields['pinned']:
title = '{index}'.format(**fields)
else:
title = '' if fmt is None else fmt.format(**fields)
@ -125,7 +125,7 @@ class TabWidget(QTabWidget):
fields['title'] = page_title
fields['title_sep'] = ' - ' if page_title else ''
fields['perc_raw'] = tab.progress()
fields['pin'] = tab.data.pinned
fields['pinned'] = tab.data.pinned
if tab.load_status() == usertypes.LoadStatus.loading:
fields['perc'] = '[{}%] '.format(tab.progress())