From d19f53c3e9c5c02773b9fb3cdfe68a3cb245c833 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Thu, 7 Jul 2016 21:34:10 +0100 Subject: Remove unused SizeManager argument, and simplify its import. --- poezio/size_manager.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'poezio/size_manager.py') diff --git a/poezio/size_manager.py b/poezio/size_manager.py index 7e445042..4dfa6f76 100644 --- a/poezio/size_manager.py +++ b/poezio/size_manager.py @@ -4,7 +4,7 @@ Size Manager: specific tabs """ -from poezio import windows +from poezio.windows import base_wins THRESHOLD_WIDTH_DEGRADE = 45 THRESHOLD_HEIGHT_DEGRADE = 10 @@ -14,18 +14,17 @@ FULL_HEIGHT_DEGRADE = 10 class SizeManager(object): - def __init__(self, core, win_cls): - self._win_class = win_cls + def __init__(self, core): self._core = core @property def tab_degrade_x(self): - _, x = windows.base_wins.TAB_WIN.getmaxyx() + _, x = base_wins.TAB_WIN.getmaxyx() return x < THRESHOLD_WIDTH_DEGRADE @property def tab_degrade_y(self): - y, x = windows.base_wins.TAB_WIN.getmaxyx() + y, x = base_wins.TAB_WIN.getmaxyx() return y < THRESHOLD_HEIGHT_DEGRADE @property -- cgit v1.2.3