summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-07-07 21:34:10 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-07-07 21:34:10 +0100
commitd19f53c3e9c5c02773b9fb3cdfe68a3cb245c833 (patch)
treee8f5d38b71fcb8ca903cc9b14d5c27665e2eab86
parent968ed665f6d0ab8f6e2392f4b9cfd612c14707c5 (diff)
downloadpoezio-d19f53c3e9c5c02773b9fb3cdfe68a3cb245c833.tar.gz
poezio-d19f53c3e9c5c02773b9fb3cdfe68a3cb245c833.tar.bz2
poezio-d19f53c3e9c5c02773b9fb3cdfe68a3cb245c833.tar.xz
poezio-d19f53c3e9c5c02773b9fb3cdfe68a3cb245c833.zip
Remove unused SizeManager argument, and simplify its import.
-rw-r--r--poezio/core/core.py2
-rw-r--r--poezio/size_manager.py9
2 files changed, 5 insertions, 6 deletions
diff --git a/poezio/core/core.py b/poezio/core/core.py
index 0918be86..3cc02979 100644
--- a/poezio/core/core.py
+++ b/poezio/core/core.py
@@ -104,7 +104,7 @@ class Core(object):
self.plugin_manager = PluginManager(self)
self.events = events.EventHandler()
- self.size = SizeManager(self, windows.Win)
+ self.size = SizeManager(self)
# Set to True whenever we consider that we have been disconnected
# from the server because of a legitimate reason (bad credentials,
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