Some fixes for the pylint
This commit is contained in:
parent
4ed046d5e7
commit
ec50d39578
@ -247,7 +247,8 @@ class CommandDispatcher:
|
|||||||
self._tabbed_browser.close_tab(tab)
|
self._tabbed_browser.close_tab(tab)
|
||||||
tabbar.setSelectionBehaviorOnRemove(old_selection_behavior)
|
tabbar.setSelectionBehaviorOnRemove(old_selection_behavior)
|
||||||
|
|
||||||
@cmdutils.register(instance='command-dispatcher', scope='window', name='tab-pin')
|
@cmdutils.register(instance='command-dispatcher', scope='window',
|
||||||
|
name='tab-pin')
|
||||||
@cmdutils.argument('index')
|
@cmdutils.argument('index')
|
||||||
@cmdutils.argument('count', count=True)
|
@cmdutils.argument('count', count=True)
|
||||||
def tab_pin(self, index=None, count=None):
|
def tab_pin(self, index=None, count=None):
|
||||||
@ -267,7 +268,7 @@ class CommandDispatcher:
|
|||||||
index = 1 if index is None else int(index)
|
index = 1 if index is None else int(index)
|
||||||
else:
|
else:
|
||||||
index = self._count() if index is None else int(index)
|
index = self._count() if index is None else int(index)
|
||||||
|
|
||||||
self.tab_move(index)
|
self.tab_move(index)
|
||||||
|
|
||||||
@cmdutils.register(instance='command-dispatcher', name='open',
|
@cmdutils.register(instance='command-dispatcher', name='open',
|
||||||
|
@ -447,7 +447,8 @@ class TabBar(QTabBar):
|
|||||||
else:
|
else:
|
||||||
#TODO: relative size and/or configured one
|
#TODO: relative size and/or configured one
|
||||||
try:
|
try:
|
||||||
tab = objreg.get('tab', scope='tab', window=self._win_id, tab=index)
|
tab = objreg.get('tab', scope='tab',
|
||||||
|
window=self._win_id, tab=index)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
@ -460,7 +461,9 @@ class TabBar(QTabBar):
|
|||||||
# width.
|
# width.
|
||||||
#looks like this generates high cpu usage
|
#looks like this generates high cpu usage
|
||||||
#need to register the number of pin tabs in advance
|
#need to register the number of pin tabs in advance
|
||||||
#nb_of_pins = len([None for item in range(self.count()) if objreg.get('tab', scope='tab', window=self._win_id, tab=item).pin is True])
|
#nb_of_pins = len([None for item in range(self.count())
|
||||||
|
# if objreg.get('tab', scope='tab',
|
||||||
|
# window=self._win_id, tab=item).pin is True])
|
||||||
#width = (self.width() + 40*nb_of_pins) / self.count()
|
#width = (self.width() + 40*nb_of_pins) / self.count()
|
||||||
width = self.width() / self.count()
|
width = self.width() / self.count()
|
||||||
## If width is not divisible by count, add a pixel to some tabs so
|
## If width is not divisible by count, add a pixel to some tabs so
|
||||||
|
Loading…
Reference in New Issue
Block a user