From a1bc11ec0964fe8fb8b188cf856983bdeabf8fa5 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Fri, 8 Aug 2014 18:03:59 +0100 Subject: [PATCH] Consistent naming of torrent download location to Download Folder * Replaced the deprecated use of torrent status save_path with download_location. * UIs now use 'Download Folder', replaces 'Save Path', 'Download Path', '... Storage', etc. --- deluge/ui/console/commands/info.py | 4 +- deluge/ui/console/commands/move.py | 10 ++-- deluge/ui/console/modes/alltorrents.py | 8 ++-- deluge/ui/console/modes/column.py | 17 ++++--- deluge/ui/console/modes/torrent_actions.py | 8 ++-- deluge/ui/console/modes/torrentdetail.py | 6 +-- deluge/ui/gtkui/aboutdialog.py | 38 +++------------ deluge/ui/gtkui/details_tab.py | 38 +++------------ deluge/ui/gtkui/files_tab.py | 8 ++-- .../gtkui/glade/main_window.tabs.menu_file.ui | 2 +- deluge/ui/gtkui/glade/main_window.tabs.ui | 2 +- deluge/ui/gtkui/glade/move_storage_dialog.ui | 4 +- deluge/ui/gtkui/glade/torrent_menu.ui | 4 +- deluge/ui/gtkui/menubar.py | 8 ++-- deluge/ui/gtkui/torrentview.py | 46 ++++--------------- deluge/ui/web/js/deluge-all/Keys.js | 6 +-- deluge/ui/web/js/deluge-all/Menus.js | 2 +- deluge/ui/web/js/deluge-all/MoveStorage.js | 6 +-- deluge/ui/web/js/deluge-all/TorrentGrid.js | 6 +-- .../web/js/deluge-all/details/DetailsTab.js | 6 +-- 20 files changed, 75 insertions(+), 154 deletions(-) diff --git a/deluge/ui/console/commands/info.py b/deluge/ui/console/commands/info.py index dc8ec5f50..e395d2d60 100644 --- a/deluge/ui/console/commands/info.py +++ b/deluge/ui/console/commands/info.py @@ -48,7 +48,7 @@ strwidth = format_utils.strwidth from os.path import sep as dirsep STATUS_KEYS = ["state", - "save_path", + "download_location", "tracker", "next_announce", "name", @@ -320,7 +320,7 @@ class Command(BaseCommand): s = "{!info!}Progress: {!input!}%.2f%% %s" % (status["progress"], pbar) self.console.write(s) - s = "{!info!}Download location: {!input!}%s" % status["save_path"] + s = "{!info!}Download Folder: {!input!}%s" % status["download_location"] self.console.write(s) if detailed: diff --git a/deluge/ui/console/commands/move.py b/deluge/ui/console/commands/move.py index 011031417..90cca8584 100644 --- a/deluge/ui/console/commands/move.py +++ b/deluge/ui/console/commands/move.py @@ -52,9 +52,9 @@ class Command(BaseCommand): return path = args[-1] - + if os.path.exists(path) and not os.path.isdir(path): - self.console.write("{!error!}Cannot Move Storage: %s exists and is not a directory"%path) + self.console.write("{!error!}Cannot Move Download Folder: %s exists and is not a directory" % path) return ids = [] @@ -67,9 +67,9 @@ class Command(BaseCommand): namestr = ", ".join(names) def on_move(res): - self.console.write("Moved \"%s\" to %s"%(namestr,path)) + self.console.write("Moved \"%s\" to %s" % (namestr, path)) - d = client.core.move_storage(ids,path) + d = client.core.move_storage(ids, path) d.addCallback(on_move) return d @@ -94,7 +94,7 @@ class Command(BaseCommand): # shares a common prefix. for f in os.listdir(os.path.dirname(line)): if f.startswith(os.path.split(line)[1]): - ret.append(os.path.join( os.path.dirname(line), f)) + ret.append(os.path.join(os.path.dirname(line), f)) else: # This path does not exist, so lets do a listdir on it's parent # and find any matches. diff --git a/deluge/ui/console/modes/alltorrents.py b/deluge/ui/console/modes/alltorrents.py index 86fb6c332..22b82fea8 100644 --- a/deluge/ui/console/modes/alltorrents.py +++ b/deluge/ui/console/modes/alltorrents.py @@ -241,7 +241,7 @@ prefs_to_names = { "avail": "Avail", "added": "Added", "tracker": "Tracker", - "savepath": "Save Path", + "savepath": "Download Folder", "downloaded": "Downloaded", "uploaded": "Uploaded", "remaining": "Remaining", @@ -265,7 +265,7 @@ column_names_to_state_keys = { "avail": "distributed_copies", "added": "time_added", "tracker": "tracker_host", - "savepath": "save_path", + "savepath": "download_location", "uploaded": "total_uploaded", "downloaded": "all_time_download", "remaining": "total_remaining", @@ -345,7 +345,7 @@ class AllTorrents(BaseMode, component.Component): ("Up Speed", format_utils.format_speed, ("upload_payload_rate",)), ("Progress", format_utils.format_progress, ("progress",)), ("ETA", deluge.common.ftime, ("eta",)), - ("Path", None, ("save_path",)), + ("Download Folder", None, ("download_location",)), ("Downloaded", deluge.common.fsize, ("all_time_download",)), ("Uploaded", deluge.common.fsize, ("total_uploaded",)), ("Share Ratio", format_utils.format_float, ("ratio",)), @@ -362,7 +362,7 @@ class AllTorrents(BaseMode, component.Component): ] self.__status_keys = ["name", "state", "download_payload_rate", "upload_payload_rate", - "progress", "eta", "save_path", "all_time_download", "total_uploaded", + "progress", "eta", "download_location", "all_time_download", "total_uploaded", "ratio", "num_seeds", "total_seeds", "num_peers", "total_peers", "active_time", "seeding_time", "last_seen_complete", "time_added", "completed_time", "distributed_copies", "num_pieces", "piece_length", diff --git a/deluge/ui/console/modes/column.py b/deluge/ui/console/modes/column.py index bb3fbb538..da1b19287 100644 --- a/deluge/ui/console/modes/column.py +++ b/deluge/ui/console/modes/column.py @@ -43,7 +43,7 @@ log = logging.getLogger(__name__) def format_queue(qnum): if (qnum >= 0): - return "%d"%(qnum+1) + return "%d" % (qnum+1) else: return "" @@ -53,8 +53,8 @@ columns = { "Size": (("total_wanted",), deluge.common.fsize), "State": (("state",), None), "Progress": (("progress",), format_utils.format_progress), - "Seeds": (("num_seeds","total_seeds"), format_utils.format_seeds_peers), - "Peers": (("num_peers","total_peers"), format_utils.format_seeds_peers), + "Seeds": (("num_seeds", "total_seeds"), format_utils.format_seeds_peers), + "Peers": (("num_peers", "total_peers"), format_utils.format_seeds_peers), "Down Speed": (("download_payload_rate",), format_utils.format_speed), "Up Speed": (("upload_payload_rate",), format_utils.format_speed), "ETA": (("eta",), format_utils.format_time), @@ -62,7 +62,7 @@ columns = { "Avail": (("distributed_copies",), format_utils.format_float), "Added": (("time_added",), deluge.common.fdate), "Tracker": (("tracker_host",), None), - "Save Path": (("save_path",), None), + "Download Folder": (("download_location",), None), "Downloaded": (("all_time_download",), deluge.common.fsize), "Uploaded": (("total_uploaded",), deluge.common.fsize), "Remaining": (("total_remaining",), deluge.common.fsize), @@ -77,7 +77,8 @@ columns = { "Up Limit": (("max_upload_speed",), format_utils.format_speed), } -def get_column_value(name,state): + +def get_column_value(name, state): try: col = columns[name] except KeyError: @@ -85,7 +86,7 @@ def get_column_value(name,state): if col[1]: try: - args = [ state[key] for key in col[0] ] + args = [state[key] for key in col[0]] except: return "Please Wait" return col[1](*args) @@ -95,11 +96,9 @@ def get_column_value(name,state): except: return "Please Wait" + def get_required_fields(cols): fields = [] for col in cols: fields.extend(columns.get(col)[0]) return fields - - - diff --git a/deluge/ui/console/modes/torrent_actions.py b/deluge/ui/console/modes/torrent_actions.py index fb6a9f4cd..f26d74944 100644 --- a/deluge/ui/console/modes/torrent_actions.py +++ b/deluge/ui/console/modes/torrent_actions.py @@ -70,7 +70,7 @@ torrent_options_to_names = { "stop_ratio": "Seeding ratio limit", "remove_at_ratio": "Remove after reaching ratio", "move_on_completed": "Move torrent after completion", - "move_on_completed_path": "Path to move the torrent to" + "move_on_completed_path": "Folder to move the torrent to" } class ACTION: @@ -209,14 +209,14 @@ def torrent_action(idx, data, mode, ids): def do_move(res): import os.path if os.path.exists(res["path"]) and not os.path.isdir(res["path"]): - mode.report_message("Cannot Move Storage","{!error!}%s exists and is not a directory"%res["path"]) + mode.report_message("Cannot Move Download Folder","{!error!}%s exists and is not a directory"%res["path"]) else: log.debug("Moving %s to: %s",ids,res["path"]) client.core.move_storage(ids,res["path"]).addErrback(action_error,mode) if len(ids) == 1: mode.clear_marks() return True - popup = InputPopup(mode,"Move Storage (Esc to cancel)",close_cb=do_move) + popup = InputPopup(mode,"Move Download Folder (Esc to cancel)",close_cb=do_move) popup.add_text_input("Enter path to move to:","path") mode.set_popup(popup) return False @@ -330,7 +330,7 @@ def torrent_actions_popup(mode,tids,details=False, action = None): popup.add_divider() popup.add_line("Remo_ve Torrent",data=ACTION.REMOVE) popup.add_line("_Force Recheck",data=ACTION.RECHECK) - popup.add_line("_Move Storage",data=ACTION.MOVE_STORAGE) + popup.add_line("_Move Download Folder",data=ACTION.MOVE_STORAGE) popup.add_divider() if details: popup.add_line("Torrent _Details",data=ACTION.DETAILS) diff --git a/deluge/ui/console/modes/torrentdetail.py b/deluge/ui/console/modes/torrentdetail.py index 095fea478..3a3e7332c 100644 --- a/deluge/ui/console/modes/torrentdetail.py +++ b/deluge/ui/console/modes/torrentdetail.py @@ -107,7 +107,7 @@ class TorrentDetail(BaseMode, component.Component): "progress", "eta", "all_time_download", "total_uploaded", "ratio", "num_seeds", "total_seeds", "num_peers", "total_peers", "active_time", "seeding_time", "time_added", "distributed_copies", "num_pieces", - "piece_length", "save_path", "file_progress", "file_priorities", "message", + "piece_length", "download_location", "file_progress", "file_priorities", "message", "total_wanted", "tracker_host", "owner"] self.file_list = None @@ -505,8 +505,8 @@ class TorrentDetail(BaseMode, component.Component): s+= ", {!cyan!}%s{!input!} seeding" % ( common.ftime(status["seeding_time"]) ) self.add_string(off, s); off += 1 - #Save Path - s = "{!info!}Save path: {!input!}%s" % status["save_path"] + #Download Folder + s = "{!info!}Download Folder: {!input!}%s" % status["download_location"] self.add_string(off, s); off += 1 #Owner diff --git a/deluge/ui/gtkui/aboutdialog.py b/deluge/ui/gtkui/aboutdialog.py index 9fd2c81e5..252a571fd 100644 --- a/deluge/ui/gtkui/aboutdialog.py +++ b/deluge/ui/gtkui/aboutdialog.py @@ -1,38 +1,11 @@ # -*- coding: utf-8 -*- -# aboutdialog.py # # Copyright (C) 2007 Marcos Pinto ('markybob') # -# Deluge is free software. +# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with +# the additional special exception to link portions of this program with the OpenSSL library. +# See LICENSE for more details. # -# You may redistribute it and/or modify it under the terms of the -# GNU General Public License, as published by the Free Software -# Foundation; either version 3 of the License, or (at your option) -# any later version. -# -# deluge is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with deluge. If not, write to: -# The Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor -# Boston, MA 02110-1301, USA. -# -# In addition, as a special exception, the copyright holders give -# permission to link the code of portions of this program with the OpenSSL -# library. -# You must obey the GNU General Public License in all respects for all of -# the code used other than OpenSSL. If you modify file(s) with this -# exception, you may extend this exception to your version of the file(s), -# but you are not obligated to do so. If you do not wish to do so, delete -# this exception statement from your version. If you delete this exception -# statement from all source files in the program, then also delete it here. -# -# - import pygtk pygtk.require('2.0') @@ -42,6 +15,7 @@ from deluge.ui.client import client import deluge.common import common + class AboutDialog: def __init__(self): def url_hook(dialog, url): @@ -135,7 +109,7 @@ class AboutDialog: "ibear", "Id2ndR", "Igor Zubarev", "IKON (Ion)", "imen", "Ionuț Jula", "Isabelle STEVANT", "István Nyitrai", "Ivan Petrovic", "Ivan Prignano", "IvaSerge", "jackmc", "Jacks0nxD", "Jack Shen", - "Jacky Yeung","Jacques Stadler", "Janek Thomaschewski", "Jan Kaláb", + "Jacky Yeung", "Jacques Stadler", "Janek Thomaschewski", "Jan Kaláb", "Jan Niklas Hasse", "Jasper Groenewegen", "Javi Rodríguez", "Jayasimha (ಜಯಸಿಂಹ)", "jeannich", "Jeff Bailes", "Jesse Zilstorff", "Joan Duran", "João Santos", "Joar Bagge", "Joe Anderson", @@ -285,7 +259,7 @@ class AboutDialog: self.about.get_comments() + _("Server:") + " %coreversion%\n") self.about.set_comments( - self.about.get_comments() + "\n" + _("libtorrent:") + " %ltversion%\n") + self.about.get_comments() + "\n" + _("libtorrent:") + " %ltversion%\n") def on_lt_version(result): c = self.about.get_comments() diff --git a/deluge/ui/gtkui/details_tab.py b/deluge/ui/gtkui/details_tab.py index c31d04b44..9a5816974 100644 --- a/deluge/ui/gtkui/details_tab.py +++ b/deluge/ui/gtkui/details_tab.py @@ -1,36 +1,10 @@ -# -# details_tab.py +# -*- coding: utf-8 -*- # # Copyright (C) 2008 Andrew Resch # -# Deluge is free software. -# -# You may redistribute it and/or modify it under the terms of the -# GNU General Public License, as published by the Free Software -# Foundation; either version 3 of the License, or (at your option) -# any later version. -# -# deluge is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with deluge. If not, write to: -# The Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor -# Boston, MA 02110-1301, USA. -# -# In addition, as a special exception, the copyright holders give -# permission to link the code of portions of this program with the OpenSSL -# library. -# You must obey the GNU General Public License in all respects for all of -# the code used other than OpenSSL. If you modify file(s) with this -# exception, you may extend this exception to your version of the file(s), -# but you are not obligated to do so. If you do not wish to do so, delete -# this exception statement from your version. If you delete this exception -# statement from all source files in the program, then also delete it here. -# +# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with +# the additional special exception to link portions of this program with the OpenSSL library. +# See LICENSE for more details. # import logging @@ -77,7 +51,7 @@ class DetailsTab(Tab): (builder.get_object("summary_completed"), fdate_blank, ("completed_time",)), (builder.get_object("summary_date_added"), fdate, ("time_added",)), (builder.get_object("summary_private"), str_yes_no, ("private",)), - (builder.get_object("summary_torrent_path"), None, ("save_path",)), + (builder.get_object("summary_torrent_path"), None, ("download_location",)), (builder.get_object("summary_hash"), str, ("hash",)), (builder.get_object("summary_comments"), str, ("comment",)), (builder.get_object("summary_owner"), str, ("owner",)), @@ -99,7 +73,7 @@ class DetailsTab(Tab): # Get the torrent status status_keys = ["name", "total_size", "num_files", "time_added", "completed_time", - "save_path", "hash", "comment", "owner", "num_pieces", "piece_length", + "download_location", "hash", "comment", "owner", "num_pieces", "piece_length", "shared", "private"] session = component.get("SessionProxy") diff --git a/deluge/ui/gtkui/files_tab.py b/deluge/ui/gtkui/files_tab.py index 314b2015f..880b46837 100644 --- a/deluge/ui/gtkui/files_tab.py +++ b/deluge/ui/gtkui/files_tab.py @@ -320,7 +320,7 @@ class FilesTab(Tab): for select in selected: path = self.get_file_path(select).split("/") - filepath = os.path.join(status["save_path"], *path) + filepath = os.path.join(status["download_location"], *path) log.debug("Open file '%s'", filepath) timestamp = gtk.get_current_event_time() deluge.common.open_file(filepath, timestamp=timestamp) @@ -333,7 +333,7 @@ class FilesTab(Tab): for select in selected: path = self.get_file_path(select).split("/") - filepath = os.path.join(status["save_path"], *path) + filepath = os.path.join(status["download_location"], *path) log.debug("Show file '%s'", filepath) timestamp = gtk.get_current_event_time() deluge.common.show_file(filepath, timestamp=timestamp) @@ -522,12 +522,12 @@ class FilesTab(Tab): def _on_menuitem_open_file_activate(self, menuitem): if client.is_localhost: component.get("SessionProxy").get_torrent_status( - self.torrent_id, ["save_path", "files"]).addCallback(self._on_open_file) + self.torrent_id, ["download_location"]).addCallback(self._on_open_file) def _on_menuitem_show_file_activate(self, menuitem): if client.is_localhost: component.get("SessionProxy").get_torrent_status( - self.torrent_id, ["save_path", "files"]).addCallback(self._on_show_file) + self.torrent_id, ["download_location"]).addCallback(self._on_show_file) def _set_file_priorities_on_user_change(self, selected, priority): """Sets the file priorities in the core. It will change the selected with the 'priority'""" diff --git a/deluge/ui/gtkui/glade/main_window.tabs.menu_file.ui b/deluge/ui/gtkui/glade/main_window.tabs.menu_file.ui index 77edce787..b066dc442 100644 --- a/deluge/ui/gtkui/glade/main_window.tabs.menu_file.ui +++ b/deluge/ui/gtkui/glade/main_window.tabs.menu_file.ui @@ -48,7 +48,7 @@ - _Show + _Show In Folder True False False diff --git a/deluge/ui/gtkui/glade/main_window.tabs.ui b/deluge/ui/gtkui/glade/main_window.tabs.ui index ddc9ca1fb..caca91a8a 100644 --- a/deluge/ui/gtkui/glade/main_window.tabs.ui +++ b/deluge/ui/gtkui/glade/main_window.tabs.ui @@ -1239,7 +1239,7 @@ True False 0 - Path: + Download Folder: diff --git a/deluge/ui/gtkui/glade/move_storage_dialog.ui b/deluge/ui/gtkui/glade/move_storage_dialog.ui index 30d633751..2bcda5ccb 100644 --- a/deluge/ui/gtkui/glade/move_storage_dialog.ui +++ b/deluge/ui/gtkui/glade/move_storage_dialog.ui @@ -6,7 +6,7 @@ 500 False 5 - Move Storage + Move Download Folder center-on-parent True dialog @@ -86,7 +86,7 @@ True False - Move Storage + Move the torrent(s) download folder. diff --git a/deluge/ui/gtkui/glade/torrent_menu.ui b/deluge/ui/gtkui/glade/torrent_menu.ui index 926a1c83f..e4ba1e7d0 100644 --- a/deluge/ui/gtkui/glade/torrent_menu.ui +++ b/deluge/ui/gtkui/glade/torrent_menu.ui @@ -67,7 +67,7 @@ False - _Open Folder + _Open Download Folder True False False @@ -210,7 +210,7 @@ - Move _Storage + _Move Download Folder True False False diff --git a/deluge/ui/gtkui/menubar.py b/deluge/ui/gtkui/menubar.py index ccc29db00..6c219480a 100644 --- a/deluge/ui/gtkui/menubar.py +++ b/deluge/ui/gtkui/menubar.py @@ -327,17 +327,17 @@ class MenuBar(component.Component): def _on_torrent_status(status): timestamp = gtk.get_current_event_time() - path = os.path.join(status["save_path"], status["files"][0]["path"].split('/')[0]) + path = os.path.join(status["download_location"], status["files"][0]["path"].split('/')[0]) deluge.common.show_file(path, timestamp=timestamp) for torrent_id in component.get("TorrentView").get_selected_torrents(): component.get("SessionProxy").get_torrent_status( - torrent_id, ["save_path", "files"]).addCallback(_on_torrent_status) + torrent_id, ["download_location", "files"]).addCallback(_on_torrent_status) def on_menuitem_move_activate(self, data=None): log.debug("on_menuitem_move_activate") component.get("SessionProxy").get_torrent_status( component.get("TorrentView").get_selected_torrent(), - ["save_path"]).addCallback(self.show_move_storage_dialog) + ["download_location"]).addCallback(self.show_move_storage_dialog) def show_move_storage_dialog(self, status): log.debug("show_move_storage_dialog") @@ -353,7 +353,7 @@ class MenuBar(component.Component): self.move_storage_path_chooser = PathChooser("move_completed_paths_list") self.move_storage_dialog_hbox.add(self.move_storage_path_chooser) self.move_storage_dialog_hbox.show_all() - self.move_storage_path_chooser.set_text(status["save_path"]) + self.move_storage_path_chooser.set_text(status["download_location"]) def on_dialog_response_event(widget, response_id): def on_core_result(result): diff --git a/deluge/ui/gtkui/torrentview.py b/deluge/ui/gtkui/torrentview.py index fb8ba6d14..b5bc0133a 100644 --- a/deluge/ui/gtkui/torrentview.py +++ b/deluge/ui/gtkui/torrentview.py @@ -1,36 +1,10 @@ -# -# torrentview.py +# -*- coding: utf-8 -*- # # Copyright (C) 2007, 2008 Andrew Resch # -# Deluge is free software. -# -# You may redistribute it and/or modify it under the terms of the -# GNU General Public License, as published by the Free Software -# Foundation; either version 3 of the License, or (at your option) -# any later version. -# -# deluge is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with deluge. If not, write to: -# The Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor -# Boston, MA 02110-1301, USA. -# -# In addition, as a special exception, the copyright holders give -# permission to link the code of portions of this program with the OpenSSL -# library. -# You must obey the GNU General Public License in all respects for all of -# the code used other than OpenSSL. If you modify file(s) with this -# exception, you may extend this exception to your version of the file(s), -# but you are not obligated to do so. If you do not wish to do so, delete -# this exception statement from your version. If you delete this exception -# statement from all source files in the program, then also delete it here. -# +# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with +# the additional special exception to link portions of this program with the OpenSSL library. +# See LICENSE for more details. # @@ -301,7 +275,7 @@ class TorrentView(listview.ListView, component.Component): status_field=["last_seen_complete"], default=False) self.add_texticon_column(_("Tracker"), function=funcs.cell_data_trackericon, status_field=["tracker_host", "tracker_host"], default=False) - self.add_text_column(_("Save Path"), status_field=["save_path"], default=False) + self.add_text_column(_("Download Folder"), status_field=["download_location"], default=False) self.add_text_column(_("Owner"), status_field=["owner"], default=False) self.add_bool_column(_("Shared"), status_field=["shared"], default=False, tooltip=_("Torrent is shared between other Deluge users or not.")) @@ -705,12 +679,12 @@ class TorrentView(listview.ListView, component.Component): def on_key_press_event(self, widget, event): keyname = gtk.gdk.keyval_name(event.keyval) if keyname is not None: - func = getattr(self, 'keypress_' + keyname, None) + func = getattr(self, 'keypress_' + keyname.lower(), None) if func: return func(event) - def keypress_Delete(self, event): - log.debug("keypress_Delete") + def keypress_delete(self, event): + log.debug("keypress_delete") torrents = self.get_selected_torrents() if torrents: if event.state & gtk.gdk.SHIFT_MASK: @@ -718,8 +692,8 @@ class TorrentView(listview.ListView, component.Component): else: RemoveTorrentDialog(torrents).run() - def keypress_Menu(self, event): - log.debug("keypress_Menu") + def keypress_menu(self, event): + log.debug("keypress_menu") if not self.get_selected_torrent(): return diff --git a/deluge/ui/web/js/deluge-all/Keys.js b/deluge/ui/web/js/deluge-all/Keys.js index 9aa3a293c..7b1540082 100644 --- a/deluge/ui/web/js/deluge-all/Keys.js +++ b/deluge/ui/web/js/deluge-all/Keys.js @@ -42,7 +42,7 @@ Deluge.Keys = { *
['queue', 'name', 'total_size', 'total_wanted', 'state', 'progress', 'num_seeds',
      * 'total_seeds', 'num_peers', 'total_peers', 'download_payload_rate',
      * 'upload_payload_rate', 'eta', 'ratio', 'distributed_copies',
-     * 'is_auto_managed', 'time_added', 'tracker_host', 'save_path', 'last_seen_complete',
+     * 'is_auto_managed', 'time_added', 'tracker_host', 'download_location', 'last_seen_complete',
      * 'total_done', 'total_uploaded', 'max_download_speed', 'max_upload_speed',
      * 'seeds_peers_ratio', 'total_remaining', 'completed_time']
*/ @@ -50,7 +50,7 @@ Deluge.Keys = { 'queue', 'name', 'total_size', 'total_wanted', 'state', 'progress', 'num_seeds', 'total_seeds', 'num_peers', 'total_peers', 'download_payload_rate', 'upload_payload_rate', 'eta', 'ratio', 'distributed_copies', - 'is_auto_managed', 'time_added', 'tracker_host', 'save_path', 'last_seen_complete', + 'is_auto_managed', 'time_added', 'tracker_host', 'download_location', 'last_seen_complete', 'total_done', 'total_uploaded', 'max_download_speed', 'max_upload_speed', 'seeds_peers_ratio', 'total_remaining', 'completed_time' ], @@ -90,7 +90,7 @@ Deluge.Keys = { * Keys used in the details tab of the statistics panel. */ Details: [ - 'name', 'save_path', 'total_size', 'num_files', 'message', + 'name', 'download_location', 'total_size', 'num_files', 'message', 'tracker', 'comment' ], diff --git a/deluge/ui/web/js/deluge-all/Menus.js b/deluge/ui/web/js/deluge-all/Menus.js index 87fab1777..e84370631 100644 --- a/deluge/ui/web/js/deluge-all/Menus.js +++ b/deluge/ui/web/js/deluge-all/Menus.js @@ -239,7 +239,7 @@ deluge.menus.torrent = new Ext.menu.Menu({ scope: deluge.menus }, { torrentAction: 'move', - text: _('Move Storage'), + text: _('Move Download Folder'), iconCls: 'icon-move', handler: deluge.menus.onTorrentAction, scope: deluge.menus diff --git a/deluge/ui/web/js/deluge-all/MoveStorage.js b/deluge/ui/web/js/deluge-all/MoveStorage.js index f9342df38..7515083b9 100644 --- a/deluge/ui/web/js/deluge-all/MoveStorage.js +++ b/deluge/ui/web/js/deluge-all/MoveStorage.js @@ -1,6 +1,6 @@ /*! * Deluge.MoveStorage.js - * + * * Copyright (c) Damien Churchill 2009-2010 * * This program is free software; you can redistribute it and/or modify @@ -32,10 +32,10 @@ Ext.namespace('Deluge'); Deluge.MoveStorage = Ext.extend(Ext.Window, { - + constructor: function(config) { config = Ext.apply({ - title: _('Move Storage'), + title: _('Move Download Folder'), width: 375, height: 110, layout: 'fit', diff --git a/deluge/ui/web/js/deluge-all/TorrentGrid.js b/deluge/ui/web/js/deluge-all/TorrentGrid.js index 6645dfc09..374cea322 100644 --- a/deluge/ui/web/js/deluge-all/TorrentGrid.js +++ b/deluge/ui/web/js/deluge-all/TorrentGrid.js @@ -205,12 +205,12 @@ renderer: trackerRenderer, dataIndex: 'tracker_host' }, { - header: _('Save Path'), + header: _('Download Folder'), hidden: true, width: 120, sortable: true, renderer: fplain, - dataIndex: 'save_path' + dataIndex: 'download_location' }, { header: _('Owner'), width: 80, @@ -296,7 +296,7 @@ {name: 'distributed_copies', type: 'float'}, {name: 'time_added', type: 'int'}, {name: 'tracker_host'}, - {name: 'save_path'}, + {name: 'download_location'}, {name: 'total_done', type: 'int'}, {name: 'total_uploaded', type: 'int'}, {name: 'total_remaining', type: 'int'}, diff --git a/deluge/ui/web/js/deluge-all/details/DetailsTab.js b/deluge/ui/web/js/deluge-all/details/DetailsTab.js index 82d54f3bc..b9b5cfc92 100644 --- a/deluge/ui/web/js/deluge-all/details/DetailsTab.js +++ b/deluge/ui/web/js/deluge-all/details/DetailsTab.js @@ -45,9 +45,9 @@ Deluge.details.DetailsTab = Ext.extend(Ext.Panel, { Deluge.details.DetailsTab.superclass.initComponent.call(this); this.addItem('torrent_name', _('Name')); this.addItem('hash', _('Hash')); - this.addItem('path', _('Path')); + this.addItem('path', _('Download Folder')); this.addItem('size', _('Total Size')); - this.addItem('files', _('# of files')); + this.addItem('files', _('Total Files')); this.addItem('comment', _('Comment')); this.addItem('status', _('Status')); this.addItem('tracker', _('Tracker')); @@ -97,7 +97,7 @@ Deluge.details.DetailsTab = Ext.extend(Ext.Panel, { var data = { torrent_name: torrent.name, hash: options.options.torrentId, - path: torrent.save_path, + path: torrent.download_location, size: fsize(torrent.total_size), files: torrent.num_files, status: torrent.message,