From 2373eda462bb764bcb196c3a72cc750c9d415d00 Mon Sep 17 00:00:00 2001 From: Asmageddon Date: Tue, 13 Mar 2012 20:58:46 +0100 Subject: [PATCH] Add config option to change amount of torrents to list per tab press --- deluge/ui/console/modes/alltorrents.py | 3 ++- deluge/ui/console/modes/legacy.py | 2 -- deluge/ui/console/modes/preference_panes.py | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deluge/ui/console/modes/alltorrents.py b/deluge/ui/console/modes/alltorrents.py index 5ded8404a..2b2c6f506 100644 --- a/deluge/ui/console/modes/alltorrents.py +++ b/deluge/ui/console/modes/alltorrents.py @@ -172,7 +172,8 @@ DEFAULT_PREFS = { "owner_width":10, "ignore_duplicate_lines": False, "move_selection": True, - "third_tab_lists_all": False + "third_tab_lists_all": False, + "torrents_per_tab_press": 15 } column_pref_names = ["queue","name","size","state", diff --git a/deluge/ui/console/modes/legacy.py b/deluge/ui/console/modes/legacy.py index 46b5842ae..2eaa3d412 100644 --- a/deluge/ui/console/modes/legacy.py +++ b/deluge/ui/console/modes/legacy.py @@ -57,8 +57,6 @@ import re LINES_BUFFER_SIZE = 5000 INPUT_HISTORY_SIZE = 500 -AUTOCOMPLETE_MAX_TORRENTS = 15 - class Legacy(BaseMode): def __init__(self, stdscr, console_config, encoding=None): diff --git a/deluge/ui/console/modes/preference_panes.py b/deluge/ui/console/modes/preference_panes.py index fa3c30586..5df5602b3 100644 --- a/deluge/ui/console/modes/preference_panes.py +++ b/deluge/ui/console/modes/preference_panes.py @@ -314,6 +314,7 @@ class InterfacePane(BasePane): self.add_checked_input("ignore_duplicate_lines","Do not store duplicate input in history",parent.console_config["ignore_duplicate_lines"]) self.add_checked_input("move_selection","Move selection when moving torrents in the queue",parent.console_config["move_selection"]) self.add_checked_input("third_tab_lists_all","Third tab lists all remaining torrents in legacy mode",parent.console_config["third_tab_lists_all"]) + self.add_int_spin_input("torrents_per_tab_press","Torrents per tab press",parent.console_config["torrents_per_tab_press"], 5, 100) self.add_header("Columns To Display", True) for cpn in deluge.ui.console.modes.alltorrents.column_pref_names: