Implemented the .clear() -> .erase() change which supposedly fixes a lot of flicker issues
This commit is contained in:
parent
8d1e4297ec
commit
506a98aee2
|
@ -551,7 +551,7 @@ class AllTorrents(BaseMode, component.Component):
|
|||
def show_torrent_details(self,tid):
|
||||
def dodeets(arg):
|
||||
if arg and True in arg[0]:
|
||||
self.stdscr.clear()
|
||||
self.stdscr.erase()
|
||||
component.get("ConsoleUI").set_mode(TorrentDetail(self,tid,self.stdscr, self.config, self.encoding))
|
||||
else:
|
||||
self.messages.append(("Error","An error occured trying to display torrent details"))
|
||||
|
@ -588,7 +588,7 @@ class AllTorrents(BaseMode, component.Component):
|
|||
def __legacy_mode(self):
|
||||
def dolegacy(arg):
|
||||
if arg and True in arg[0]:
|
||||
self.stdscr.clear()
|
||||
self.stdscr.erase()
|
||||
component.get("ConsoleUI").set_mode(self.legacy_mode)
|
||||
self.legacy_mode.refresh()
|
||||
curses.curs_set(2)
|
||||
|
|
|
@ -121,7 +121,7 @@ class ConnectionManager(BaseMode):
|
|||
|
||||
def __on_connected(self,result):
|
||||
component.start()
|
||||
self.stdscr.clear()
|
||||
self.stdscr.erase()
|
||||
at = AllTorrents(self.stdscr, self.encoding)
|
||||
component.get("ConsoleUI").set_mode(at)
|
||||
at.resume()
|
||||
|
@ -144,7 +144,7 @@ class ConnectionManager(BaseMode):
|
|||
for host in self.config["hosts"]:
|
||||
if (host[1],host[2],host[3]) == (hostname, port, username):
|
||||
self.report_message("Can't add host","Host already in list")
|
||||
return
|
||||
return
|
||||
newid = hashlib.sha1(str(time.time())).hexdigest()
|
||||
self.config["hosts"].append((newid, hostname, port, username, password))
|
||||
self.config.save()
|
||||
|
@ -186,7 +186,7 @@ class ConnectionManager(BaseMode):
|
|||
self.popup.refresh()
|
||||
curses.doupdate()
|
||||
|
||||
|
||||
|
||||
def _doRead(self):
|
||||
# Read the character
|
||||
c = self.stdscr.getch()
|
||||
|
@ -200,7 +200,7 @@ class ConnectionManager(BaseMode):
|
|||
reactor.stop()
|
||||
client.disconnect().addCallback(on_disconnect)
|
||||
else:
|
||||
reactor.stop()
|
||||
reactor.stop()
|
||||
return
|
||||
if chr(c) == 'D' and self.inlist:
|
||||
self.__delete_current_host()
|
||||
|
|
|
@ -80,7 +80,7 @@ class EventView(BaseMode):
|
|||
curses.doupdate()
|
||||
|
||||
def back_to_overview(self):
|
||||
self.stdscr.clear()
|
||||
self.stdscr.erase()
|
||||
component.get("ConsoleUI").set_mode(self.parent_mode)
|
||||
self.parent_mode.resume()
|
||||
|
||||
|
|
|
@ -256,7 +256,7 @@ class Preferences(BaseMode):
|
|||
|
||||
|
||||
def back_to_parent(self):
|
||||
self.stdscr.clear()
|
||||
self.stdscr.erase()
|
||||
component.get("ConsoleUI").set_mode(self.parent_mode)
|
||||
self.parent_mode.resume()
|
||||
|
||||
|
|
|
@ -478,7 +478,7 @@ class TorrentDetail(BaseMode, component.Component):
|
|||
def back_to_overview(self):
|
||||
component.stop(["TorrentDetail"])
|
||||
component.deregister(self)
|
||||
self.stdscr.clear()
|
||||
self.stdscr.erase()
|
||||
component.get("ConsoleUI").set_mode(self.alltorrentmode)
|
||||
self.alltorrentmode._go_top = False
|
||||
self.alltorrentmode.resume()
|
||||
|
|
Loading…
Reference in New Issue