From 89e231c73c3d1f4fa9a598a395b46db7f1e18aa9 Mon Sep 17 00:00:00 2001 From: Blake DeMarcy Date: Mon, 17 Apr 2017 04:00:12 -0500 Subject: [PATCH] [UNTESTED PUSH FOR DEVICE SYNC] add no_clobber param for footers --- clients/urwid/main.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/clients/urwid/main.py b/clients/urwid/main.py index 68be6b0..a346a98 100644 --- a/clients/urwid/main.py +++ b/clients/urwid/main.py @@ -282,23 +282,29 @@ class App(object): self.set_header("{} threads", len(self.walker)) - def set_default_footer(self): + def set_default_footer(self, clobber_composer=False): """ Sets the footer to the default for the current screen. """ - if self.mode == "thread": + if not clobber_composer and self.window_split: + return + + elif self.mode == "thread": footer = bars["thread"] % self.prefs["jump_count"] - else: footer = bars["index"] + + else: + footer = bars["index"] + self.set_footer(footer) - def set_bars(self): + def set_bars(self, clobber_composer=False): """ Sets both the footer and header to their default values for the current mode. """ self.set_default_header() - self.set_default_footer() + self.set_default_footer(clobber_composer) def close_editor(self): @@ -662,8 +668,7 @@ class App(object): for message in thread["messages"]: self.walker += self.make_message_body(message) self.set_default_header() - if not self.window_split: - self.set_default_footer() + self.set_default_footer() self.goto_post(mark(thread_id)) @@ -985,8 +990,7 @@ class App(object): value = 1 self.prefs["jump_count"] = value - if not self.window_split: - self.set_default_footer() + self.set_default_footer() bbjrc("update", **self.prefs) @@ -999,8 +1003,7 @@ class App(object): value = 64 self.prefs["jump_count"] = value - if not self.window_split: - self.set_default_footer() + self.set_default_footer() bbjrc("update", **self.prefs)