handle resize in torrentdetail

This commit is contained in:
Nick 2011-02-02 13:11:15 +01:00
parent f6f3a8e084
commit 5f888faceb
1 changed files with 8 additions and 0 deletions

View File

@ -63,6 +63,7 @@ class TorrentDetail(BaseMode, component.Component):
self.alltorrentmode = alltorrentmode self.alltorrentmode = alltorrentmode
self.torrentid = torrentid self.torrentid = torrentid
self.torrent_state = None self.torrent_state = None
self.popup = None
self._status_keys = ["files", "name","state","download_payload_rate","upload_payload_rate", self._status_keys = ["files", "name","state","download_payload_rate","upload_payload_rate",
"progress","eta","all_time_download","total_uploaded", "ratio", "progress","eta","all_time_download","total_uploaded", "ratio",
"num_seeds","total_seeds","num_peers","total_peers", "active_time", "num_seeds","total_seeds","num_peers","total_peers", "active_time",
@ -263,6 +264,13 @@ class TorrentDetail(BaseMode, component.Component):
return (off,idx) return (off,idx)
def on_resize(self, *args):
BaseMode.on_resize_norefresh(self, *args)
self._update_columns()
if self.popup:
self.popup.handle_resize()
self.refresh()
def refresh(self,lines=None): def refresh(self,lines=None):
# Update the status bars # Update the status bars
self.stdscr.clear() self.stdscr.clear()