aboutsummaryrefslogtreecommitdiffstats
path: root/transmission-remote-cli.py
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-04-29 18:46:58 +0100
committerJonathan McCrohan <jmccrohan@gmail.com>2012-04-29 18:46:58 +0100
commit7d643413d37ee3e47b9913c515187cfde4703d4e (patch)
tree158bd7e661c478611778de0366f3f9b2db076704 /transmission-remote-cli.py
parent5eb978c182f909fe65efd32bc7e9afe31d00ee4d (diff)
parent564a401bc42ecfc10406e1f406c8f5ea2b4d5959 (diff)
downloadtransmission-remote-cli-7d643413d37ee3e47b9913c515187cfde4703d4e.tar.gz
Merge tag 'upstream/1.2.1'
Upstream version 1.2.1
Diffstat (limited to '')
-rwxr-xr-xtransmission-remote-cli.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/transmission-remote-cli.py b/transmission-remote-cli.py
index 8a2497b..948d966 100755
--- a/transmission-remote-cli.py
+++ b/transmission-remote-cli.py
@@ -16,7 +16,7 @@
# http://www.gnu.org/licenses/gpl-3.0.txt #
########################################################################
-VERSION = '1.2'
+VERSION = '1.2.1'
TRNSM_VERSION_MIN = '1.90'
TRNSM_VERSION_MAX = '2.51'
@@ -889,11 +889,9 @@ class Interface:
self.manage_layout()
def manage_layout(self):
- self.tlist_item_height = 3 if not self.compact_list else 1
+ self.recalculate_torrents_per_page()
self.pad_height = max((len(self.torrents)+1) * self.tlist_item_height, self.height)
self.pad = curses.newpad(self.pad_height, self.width)
- self.mainview_height = self.height - 2
- self.torrents_per_page = self.mainview_height / self.tlist_item_height
self.detaillistitems_per_page = self.height - 8
if self.selected_torrent > -1:
@@ -930,6 +928,10 @@ class Interface:
new_width = max(self.rateUpload_width, new_width) # don't shrink
return new_width
+ def recalculate_torrents_per_page(self):
+ self.tlist_item_height = 3 if not self.compact_list else 1
+ self.mainview_height = self.height - 2
+ self.torrents_per_page = self.mainview_height / self.tlist_item_height
def run(self):
self.draw_title_bar()
@@ -1387,6 +1389,8 @@ class Interface:
def toggle_compact_torrentlist(self, c):
self.compact_list = not self.compact_list
+ self.recalculate_torrents_per_page()
+ self.follow_list_focus()
def move_torrent(self, c):
if self.focus > -1: