summaryrefslogtreecommitdiff
path: root/poezio/tabs/confirmtab.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2017-11-12 15:03:09 +0100
committermathieui <mathieui@mathieui.net>2017-11-12 15:03:09 +0100
commitd55cc5872503567775f0d7a7731d6f489bf2299b (patch)
tree725f9e7b8144d36054447b3c82edfb45bda8df1d /poezio/tabs/confirmtab.py
parent92496db823db34f7f7fb1ab31eaef093a707c3e8 (diff)
downloadpoezio-d55cc5872503567775f0d7a7731d6f489bf2299b.tar.gz
poezio-d55cc5872503567775f0d7a7731d6f489bf2299b.tar.bz2
poezio-d55cc5872503567775f0d7a7731d6f489bf2299b.tar.xz
poezio-d55cc5872503567775f0d7a7731d6f489bf2299b.zip
yapf -ir
Diffstat (limited to 'poezio/tabs/confirmtab.py')
-rw-r--r--poezio/tabs/confirmtab.py27
1 files changed, 19 insertions, 8 deletions
diff --git a/poezio/tabs/confirmtab.py b/poezio/tabs/confirmtab.py
index 39f630cb..28c26122 100644
--- a/poezio/tabs/confirmtab.py
+++ b/poezio/tabs/confirmtab.py
@@ -13,7 +13,13 @@ class ConfirmTab(Tab):
plugin_commands = {}
plugin_keys = {}
- def __init__(self, core, name, text, short_message, callback, critical=False):
+ def __init__(self,
+ core,
+ name,
+ text,
+ short_message,
+ callback,
+ critical=False):
"""Parameters:
name: The name of the tab
text: the text shown in the tab
@@ -26,7 +32,8 @@ class ConfirmTab(Tab):
Tab.__init__(self, core)
self.state = 'highlight'
self.name = name
- self.default_help_message = windows.HelpText("Choose with arrow keys and press enter")
+ self.default_help_message = windows.HelpText(
+ "Choose with arrow keys and press enter")
self.input = self.default_help_message
self.infowin_top = windows.ConfirmStatusWin(short_message, critical)
self.infowin_bottom = windows.ConfirmStatusWin(short_message, critical)
@@ -76,10 +83,12 @@ class ConfirmTab(Tab):
tab_win_height = Tab.tab_win_height()
self.infowin_top.resize(1, self.width, 0, 0)
- self.infowin_bottom.resize(1, self.width, self.height - 2 - info_win_height - tab_win_height, 0)
+ self.infowin_bottom.resize(
+ 1, self.width, self.height - 2 - info_win_height - tab_win_height,
+ 0)
self.dialog.resize(self.height - 3 - info_win_height - tab_win_height,
self.width, 1, 0)
- self.input.resize(1, self.width, self.height-1, 0)
+ self.input.resize(1, self.width, self.height - 1, 0)
def close(self, arg=None):
self.done = True
@@ -95,8 +104,10 @@ class ConfirmTab(Tab):
return self.key_func[key]()
def on_info_win_size_changed(self):
- if self.core.information_win_size >= self.height-3:
+ if self.core.information_win_size >= self.height - 3:
return
- self.dialog.resize(self.height-3-self.core.information_win_size - Tab.tab_win_height(), self.width, 1, 0)
- self.infowin_bottom.resize(1, self.width, self.height-2-self.core.information_win_size - Tab.tab_win_height(), 0)
-
+ self.dialog.resize(self.height - 3 - self.core.information_win_size -
+ Tab.tab_win_height(), self.width, 1, 0)
+ self.infowin_bottom.resize(
+ 1, self.width, self.height - 2 - self.core.information_win_size -
+ Tab.tab_win_height(), 0)