mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 04:24:27 +00:00
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.
This commit is contained in:
parent
711962da84
commit
a1bc11ec09
@ -48,7 +48,7 @@ strwidth = format_utils.strwidth
|
|||||||
from os.path import sep as dirsep
|
from os.path import sep as dirsep
|
||||||
|
|
||||||
STATUS_KEYS = ["state",
|
STATUS_KEYS = ["state",
|
||||||
"save_path",
|
"download_location",
|
||||||
"tracker",
|
"tracker",
|
||||||
"next_announce",
|
"next_announce",
|
||||||
"name",
|
"name",
|
||||||
@ -320,7 +320,7 @@ class Command(BaseCommand):
|
|||||||
s = "{!info!}Progress: {!input!}%.2f%% %s" % (status["progress"], pbar)
|
s = "{!info!}Progress: {!input!}%.2f%% %s" % (status["progress"], pbar)
|
||||||
self.console.write(s)
|
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)
|
self.console.write(s)
|
||||||
|
|
||||||
if detailed:
|
if detailed:
|
||||||
|
@ -54,7 +54,7 @@ class Command(BaseCommand):
|
|||||||
path = args[-1]
|
path = args[-1]
|
||||||
|
|
||||||
if os.path.exists(path) and not os.path.isdir(path):
|
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
|
return
|
||||||
|
|
||||||
ids = []
|
ids = []
|
||||||
|
@ -241,7 +241,7 @@ prefs_to_names = {
|
|||||||
"avail": "Avail",
|
"avail": "Avail",
|
||||||
"added": "Added",
|
"added": "Added",
|
||||||
"tracker": "Tracker",
|
"tracker": "Tracker",
|
||||||
"savepath": "Save Path",
|
"savepath": "Download Folder",
|
||||||
"downloaded": "Downloaded",
|
"downloaded": "Downloaded",
|
||||||
"uploaded": "Uploaded",
|
"uploaded": "Uploaded",
|
||||||
"remaining": "Remaining",
|
"remaining": "Remaining",
|
||||||
@ -265,7 +265,7 @@ column_names_to_state_keys = {
|
|||||||
"avail": "distributed_copies",
|
"avail": "distributed_copies",
|
||||||
"added": "time_added",
|
"added": "time_added",
|
||||||
"tracker": "tracker_host",
|
"tracker": "tracker_host",
|
||||||
"savepath": "save_path",
|
"savepath": "download_location",
|
||||||
"uploaded": "total_uploaded",
|
"uploaded": "total_uploaded",
|
||||||
"downloaded": "all_time_download",
|
"downloaded": "all_time_download",
|
||||||
"remaining": "total_remaining",
|
"remaining": "total_remaining",
|
||||||
@ -345,7 +345,7 @@ class AllTorrents(BaseMode, component.Component):
|
|||||||
("Up Speed", format_utils.format_speed, ("upload_payload_rate",)),
|
("Up Speed", format_utils.format_speed, ("upload_payload_rate",)),
|
||||||
("Progress", format_utils.format_progress, ("progress",)),
|
("Progress", format_utils.format_progress, ("progress",)),
|
||||||
("ETA", deluge.common.ftime, ("eta",)),
|
("ETA", deluge.common.ftime, ("eta",)),
|
||||||
("Path", None, ("save_path",)),
|
("Download Folder", None, ("download_location",)),
|
||||||
("Downloaded", deluge.common.fsize, ("all_time_download",)),
|
("Downloaded", deluge.common.fsize, ("all_time_download",)),
|
||||||
("Uploaded", deluge.common.fsize, ("total_uploaded",)),
|
("Uploaded", deluge.common.fsize, ("total_uploaded",)),
|
||||||
("Share Ratio", format_utils.format_float, ("ratio",)),
|
("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",
|
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",
|
"ratio", "num_seeds", "total_seeds", "num_peers", "total_peers",
|
||||||
"active_time", "seeding_time", "last_seen_complete", "time_added",
|
"active_time", "seeding_time", "last_seen_complete", "time_added",
|
||||||
"completed_time", "distributed_copies", "num_pieces", "piece_length",
|
"completed_time", "distributed_copies", "num_pieces", "piece_length",
|
||||||
|
@ -62,7 +62,7 @@ columns = {
|
|||||||
"Avail": (("distributed_copies",), format_utils.format_float),
|
"Avail": (("distributed_copies",), format_utils.format_float),
|
||||||
"Added": (("time_added",), deluge.common.fdate),
|
"Added": (("time_added",), deluge.common.fdate),
|
||||||
"Tracker": (("tracker_host",), None),
|
"Tracker": (("tracker_host",), None),
|
||||||
"Save Path": (("save_path",), None),
|
"Download Folder": (("download_location",), None),
|
||||||
"Downloaded": (("all_time_download",), deluge.common.fsize),
|
"Downloaded": (("all_time_download",), deluge.common.fsize),
|
||||||
"Uploaded": (("total_uploaded",), deluge.common.fsize),
|
"Uploaded": (("total_uploaded",), deluge.common.fsize),
|
||||||
"Remaining": (("total_remaining",), deluge.common.fsize),
|
"Remaining": (("total_remaining",), deluge.common.fsize),
|
||||||
@ -77,6 +77,7 @@ columns = {
|
|||||||
"Up Limit": (("max_upload_speed",), format_utils.format_speed),
|
"Up Limit": (("max_upload_speed",), format_utils.format_speed),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def get_column_value(name, state):
|
def get_column_value(name, state):
|
||||||
try:
|
try:
|
||||||
col = columns[name]
|
col = columns[name]
|
||||||
@ -95,11 +96,9 @@ def get_column_value(name,state):
|
|||||||
except:
|
except:
|
||||||
return "Please Wait"
|
return "Please Wait"
|
||||||
|
|
||||||
|
|
||||||
def get_required_fields(cols):
|
def get_required_fields(cols):
|
||||||
fields = []
|
fields = []
|
||||||
for col in cols:
|
for col in cols:
|
||||||
fields.extend(columns.get(col)[0])
|
fields.extend(columns.get(col)[0])
|
||||||
return fields
|
return fields
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ torrent_options_to_names = {
|
|||||||
"stop_ratio": "Seeding ratio limit",
|
"stop_ratio": "Seeding ratio limit",
|
||||||
"remove_at_ratio": "Remove after reaching ratio",
|
"remove_at_ratio": "Remove after reaching ratio",
|
||||||
"move_on_completed": "Move torrent after completion",
|
"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:
|
class ACTION:
|
||||||
@ -209,14 +209,14 @@ def torrent_action(idx, data, mode, ids):
|
|||||||
def do_move(res):
|
def do_move(res):
|
||||||
import os.path
|
import os.path
|
||||||
if os.path.exists(res["path"]) and not os.path.isdir(res["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:
|
else:
|
||||||
log.debug("Moving %s to: %s",ids,res["path"])
|
log.debug("Moving %s to: %s",ids,res["path"])
|
||||||
client.core.move_storage(ids,res["path"]).addErrback(action_error,mode)
|
client.core.move_storage(ids,res["path"]).addErrback(action_error,mode)
|
||||||
if len(ids) == 1:
|
if len(ids) == 1:
|
||||||
mode.clear_marks()
|
mode.clear_marks()
|
||||||
return True
|
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")
|
popup.add_text_input("Enter path to move to:","path")
|
||||||
mode.set_popup(popup)
|
mode.set_popup(popup)
|
||||||
return False
|
return False
|
||||||
@ -330,7 +330,7 @@ def torrent_actions_popup(mode,tids,details=False, action = None):
|
|||||||
popup.add_divider()
|
popup.add_divider()
|
||||||
popup.add_line("Remo_ve Torrent",data=ACTION.REMOVE)
|
popup.add_line("Remo_ve Torrent",data=ACTION.REMOVE)
|
||||||
popup.add_line("_Force Recheck",data=ACTION.RECHECK)
|
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()
|
popup.add_divider()
|
||||||
if details:
|
if details:
|
||||||
popup.add_line("Torrent _Details",data=ACTION.DETAILS)
|
popup.add_line("Torrent _Details",data=ACTION.DETAILS)
|
||||||
|
@ -107,7 +107,7 @@ class TorrentDetail(BaseMode, component.Component):
|
|||||||
"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",
|
||||||
"seeding_time", "time_added", "distributed_copies", "num_pieces",
|
"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"]
|
"total_wanted", "tracker_host", "owner"]
|
||||||
|
|
||||||
self.file_list = None
|
self.file_list = None
|
||||||
@ -505,8 +505,8 @@ class TorrentDetail(BaseMode, component.Component):
|
|||||||
s+= ", {!cyan!}%s{!input!} seeding" % ( common.ftime(status["seeding_time"]) )
|
s+= ", {!cyan!}%s{!input!} seeding" % ( common.ftime(status["seeding_time"]) )
|
||||||
self.add_string(off, s); off += 1
|
self.add_string(off, s); off += 1
|
||||||
|
|
||||||
#Save Path
|
#Download Folder
|
||||||
s = "{!info!}Save path: {!input!}%s" % status["save_path"]
|
s = "{!info!}Download Folder: {!input!}%s" % status["download_location"]
|
||||||
self.add_string(off, s); off += 1
|
self.add_string(off, s); off += 1
|
||||||
|
|
||||||
#Owner
|
#Owner
|
||||||
|
@ -1,38 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# aboutdialog.py
|
|
||||||
#
|
#
|
||||||
# Copyright (C) 2007 Marcos Pinto ('markybob') <markybob@gmail.com>
|
# Copyright (C) 2007 Marcos Pinto ('markybob') <markybob@gmail.com>
|
||||||
#
|
#
|
||||||
# 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
|
import pygtk
|
||||||
pygtk.require('2.0')
|
pygtk.require('2.0')
|
||||||
@ -42,6 +15,7 @@ from deluge.ui.client import client
|
|||||||
import deluge.common
|
import deluge.common
|
||||||
import common
|
import common
|
||||||
|
|
||||||
|
|
||||||
class AboutDialog:
|
class AboutDialog:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
def url_hook(dialog, url):
|
def url_hook(dialog, url):
|
||||||
|
@ -1,36 +1,10 @@
|
|||||||
#
|
# -*- coding: utf-8 -*-
|
||||||
# details_tab.py
|
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008 Andrew Resch <andrewresch@gmail.com>
|
# Copyright (C) 2008 Andrew Resch <andrewresch@gmail.com>
|
||||||
#
|
#
|
||||||
# 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.
|
||||||
# You may redistribute it and/or modify it under the terms of the
|
# See LICENSE for more details.
|
||||||
# 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 logging
|
import logging
|
||||||
@ -77,7 +51,7 @@ class DetailsTab(Tab):
|
|||||||
(builder.get_object("summary_completed"), fdate_blank, ("completed_time",)),
|
(builder.get_object("summary_completed"), fdate_blank, ("completed_time",)),
|
||||||
(builder.get_object("summary_date_added"), fdate, ("time_added",)),
|
(builder.get_object("summary_date_added"), fdate, ("time_added",)),
|
||||||
(builder.get_object("summary_private"), str_yes_no, ("private",)),
|
(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_hash"), str, ("hash",)),
|
||||||
(builder.get_object("summary_comments"), str, ("comment",)),
|
(builder.get_object("summary_comments"), str, ("comment",)),
|
||||||
(builder.get_object("summary_owner"), str, ("owner",)),
|
(builder.get_object("summary_owner"), str, ("owner",)),
|
||||||
@ -99,7 +73,7 @@ class DetailsTab(Tab):
|
|||||||
|
|
||||||
# Get the torrent status
|
# Get the torrent status
|
||||||
status_keys = ["name", "total_size", "num_files", "time_added", "completed_time",
|
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"]
|
"shared", "private"]
|
||||||
|
|
||||||
session = component.get("SessionProxy")
|
session = component.get("SessionProxy")
|
||||||
|
@ -320,7 +320,7 @@ class FilesTab(Tab):
|
|||||||
|
|
||||||
for select in selected:
|
for select in selected:
|
||||||
path = self.get_file_path(select).split("/")
|
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)
|
log.debug("Open file '%s'", filepath)
|
||||||
timestamp = gtk.get_current_event_time()
|
timestamp = gtk.get_current_event_time()
|
||||||
deluge.common.open_file(filepath, timestamp=timestamp)
|
deluge.common.open_file(filepath, timestamp=timestamp)
|
||||||
@ -333,7 +333,7 @@ class FilesTab(Tab):
|
|||||||
|
|
||||||
for select in selected:
|
for select in selected:
|
||||||
path = self.get_file_path(select).split("/")
|
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)
|
log.debug("Show file '%s'", filepath)
|
||||||
timestamp = gtk.get_current_event_time()
|
timestamp = gtk.get_current_event_time()
|
||||||
deluge.common.show_file(filepath, timestamp=timestamp)
|
deluge.common.show_file(filepath, timestamp=timestamp)
|
||||||
@ -522,12 +522,12 @@ class FilesTab(Tab):
|
|||||||
def _on_menuitem_open_file_activate(self, menuitem):
|
def _on_menuitem_open_file_activate(self, menuitem):
|
||||||
if client.is_localhost:
|
if client.is_localhost:
|
||||||
component.get("SessionProxy").get_torrent_status(
|
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):
|
def _on_menuitem_show_file_activate(self, menuitem):
|
||||||
if client.is_localhost:
|
if client.is_localhost:
|
||||||
component.get("SessionProxy").get_torrent_status(
|
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):
|
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'"""
|
"""Sets the file priorities in the core. It will change the selected with the 'priority'"""
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImageMenuItem" id="menuitem_show_file">
|
<object class="GtkImageMenuItem" id="menuitem_show_file">
|
||||||
<property name="label" translatable="yes">_Show</property>
|
<property name="label" translatable="yes">_Show In Folder</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="use_action_appearance">False</property>
|
<property name="use_action_appearance">False</property>
|
||||||
|
@ -1239,7 +1239,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<property name="label" translatable="yes">Path:</property>
|
<property name="label" translatable="yes">Download Folder:</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<property name="width_request">500</property>
|
<property name="width_request">500</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="border_width">5</property>
|
<property name="border_width">5</property>
|
||||||
<property name="title" translatable="yes">Move Storage</property>
|
<property name="title" translatable="yes">Move Download Folder</property>
|
||||||
<property name="window_position">center-on-parent</property>
|
<property name="window_position">center-on-parent</property>
|
||||||
<property name="destroy_with_parent">True</property>
|
<property name="destroy_with_parent">True</property>
|
||||||
<property name="type_hint">dialog</property>
|
<property name="type_hint">dialog</property>
|
||||||
@ -86,7 +86,7 @@
|
|||||||
<object class="GtkLabel" id="label1">
|
<object class="GtkLabel" id="label1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="label" translatable="yes">Move Storage</property>
|
<property name="label" translatable="yes">Move the torrent(s) download folder.</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImageMenuItem" id="menuitem_open_folder">
|
<object class="GtkImageMenuItem" id="menuitem_open_folder">
|
||||||
<property name="label" translatable="yes">_Open Folder</property>
|
<property name="label" translatable="yes">_Open Download Folder</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="use_action_appearance">False</property>
|
<property name="use_action_appearance">False</property>
|
||||||
@ -210,7 +210,7 @@
|
|||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImageMenuItem" id="menuitem_move">
|
<object class="GtkImageMenuItem" id="menuitem_move">
|
||||||
<property name="label" translatable="yes">Move _Storage</property>
|
<property name="label" translatable="yes">_Move Download Folder</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="use_action_appearance">False</property>
|
<property name="use_action_appearance">False</property>
|
||||||
|
@ -327,17 +327,17 @@ class MenuBar(component.Component):
|
|||||||
|
|
||||||
def _on_torrent_status(status):
|
def _on_torrent_status(status):
|
||||||
timestamp = gtk.get_current_event_time()
|
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)
|
deluge.common.show_file(path, timestamp=timestamp)
|
||||||
for torrent_id in component.get("TorrentView").get_selected_torrents():
|
for torrent_id in component.get("TorrentView").get_selected_torrents():
|
||||||
component.get("SessionProxy").get_torrent_status(
|
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):
|
def on_menuitem_move_activate(self, data=None):
|
||||||
log.debug("on_menuitem_move_activate")
|
log.debug("on_menuitem_move_activate")
|
||||||
component.get("SessionProxy").get_torrent_status(
|
component.get("SessionProxy").get_torrent_status(
|
||||||
component.get("TorrentView").get_selected_torrent(),
|
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):
|
def show_move_storage_dialog(self, status):
|
||||||
log.debug("show_move_storage_dialog")
|
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_path_chooser = PathChooser("move_completed_paths_list")
|
||||||
self.move_storage_dialog_hbox.add(self.move_storage_path_chooser)
|
self.move_storage_dialog_hbox.add(self.move_storage_path_chooser)
|
||||||
self.move_storage_dialog_hbox.show_all()
|
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_dialog_response_event(widget, response_id):
|
||||||
def on_core_result(result):
|
def on_core_result(result):
|
||||||
|
@ -1,36 +1,10 @@
|
|||||||
#
|
# -*- coding: utf-8 -*-
|
||||||
# torrentview.py
|
|
||||||
#
|
#
|
||||||
# Copyright (C) 2007, 2008 Andrew Resch <andrewresch@gmail.com>
|
# Copyright (C) 2007, 2008 Andrew Resch <andrewresch@gmail.com>
|
||||||
#
|
#
|
||||||
# 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.
|
||||||
# You may redistribute it and/or modify it under the terms of the
|
# See LICENSE for more details.
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
@ -301,7 +275,7 @@ class TorrentView(listview.ListView, component.Component):
|
|||||||
status_field=["last_seen_complete"], default=False)
|
status_field=["last_seen_complete"], default=False)
|
||||||
self.add_texticon_column(_("Tracker"), function=funcs.cell_data_trackericon,
|
self.add_texticon_column(_("Tracker"), function=funcs.cell_data_trackericon,
|
||||||
status_field=["tracker_host", "tracker_host"], default=False)
|
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_text_column(_("Owner"), status_field=["owner"], default=False)
|
||||||
self.add_bool_column(_("Shared"), status_field=["shared"], default=False,
|
self.add_bool_column(_("Shared"), status_field=["shared"], default=False,
|
||||||
tooltip=_("Torrent is shared between other Deluge users or not."))
|
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):
|
def on_key_press_event(self, widget, event):
|
||||||
keyname = gtk.gdk.keyval_name(event.keyval)
|
keyname = gtk.gdk.keyval_name(event.keyval)
|
||||||
if keyname is not None:
|
if keyname is not None:
|
||||||
func = getattr(self, 'keypress_' + keyname, None)
|
func = getattr(self, 'keypress_' + keyname.lower(), None)
|
||||||
if func:
|
if func:
|
||||||
return func(event)
|
return func(event)
|
||||||
|
|
||||||
def keypress_Delete(self, event):
|
def keypress_delete(self, event):
|
||||||
log.debug("keypress_Delete")
|
log.debug("keypress_delete")
|
||||||
torrents = self.get_selected_torrents()
|
torrents = self.get_selected_torrents()
|
||||||
if torrents:
|
if torrents:
|
||||||
if event.state & gtk.gdk.SHIFT_MASK:
|
if event.state & gtk.gdk.SHIFT_MASK:
|
||||||
@ -718,8 +692,8 @@ class TorrentView(listview.ListView, component.Component):
|
|||||||
else:
|
else:
|
||||||
RemoveTorrentDialog(torrents).run()
|
RemoveTorrentDialog(torrents).run()
|
||||||
|
|
||||||
def keypress_Menu(self, event):
|
def keypress_menu(self, event):
|
||||||
log.debug("keypress_Menu")
|
log.debug("keypress_menu")
|
||||||
if not self.get_selected_torrent():
|
if not self.get_selected_torrent():
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ Deluge.Keys = {
|
|||||||
* <pre>['queue', 'name', 'total_size', 'total_wanted', 'state', 'progress', 'num_seeds',
|
* <pre>['queue', 'name', 'total_size', 'total_wanted', 'state', 'progress', 'num_seeds',
|
||||||
* 'total_seeds', 'num_peers', 'total_peers', 'download_payload_rate',
|
* 'total_seeds', 'num_peers', 'total_peers', 'download_payload_rate',
|
||||||
* 'upload_payload_rate', 'eta', 'ratio', 'distributed_copies',
|
* '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',
|
* 'total_done', 'total_uploaded', 'max_download_speed', 'max_upload_speed',
|
||||||
* 'seeds_peers_ratio', 'total_remaining', 'completed_time']</pre>
|
* 'seeds_peers_ratio', 'total_remaining', 'completed_time']</pre>
|
||||||
*/
|
*/
|
||||||
@ -50,7 +50,7 @@ Deluge.Keys = {
|
|||||||
'queue', 'name', 'total_size', 'total_wanted', 'state', 'progress', 'num_seeds',
|
'queue', 'name', 'total_size', 'total_wanted', 'state', 'progress', 'num_seeds',
|
||||||
'total_seeds', 'num_peers', 'total_peers', 'download_payload_rate',
|
'total_seeds', 'num_peers', 'total_peers', 'download_payload_rate',
|
||||||
'upload_payload_rate', 'eta', 'ratio', 'distributed_copies',
|
'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',
|
'total_done', 'total_uploaded', 'max_download_speed', 'max_upload_speed',
|
||||||
'seeds_peers_ratio', 'total_remaining', 'completed_time'
|
'seeds_peers_ratio', 'total_remaining', 'completed_time'
|
||||||
],
|
],
|
||||||
@ -90,7 +90,7 @@ Deluge.Keys = {
|
|||||||
* Keys used in the details tab of the statistics panel.
|
* Keys used in the details tab of the statistics panel.
|
||||||
*/
|
*/
|
||||||
Details: [
|
Details: [
|
||||||
'name', 'save_path', 'total_size', 'num_files', 'message',
|
'name', 'download_location', 'total_size', 'num_files', 'message',
|
||||||
'tracker', 'comment'
|
'tracker', 'comment'
|
||||||
],
|
],
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@ deluge.menus.torrent = new Ext.menu.Menu({
|
|||||||
scope: deluge.menus
|
scope: deluge.menus
|
||||||
}, {
|
}, {
|
||||||
torrentAction: 'move',
|
torrentAction: 'move',
|
||||||
text: _('Move Storage'),
|
text: _('Move Download Folder'),
|
||||||
iconCls: 'icon-move',
|
iconCls: 'icon-move',
|
||||||
handler: deluge.menus.onTorrentAction,
|
handler: deluge.menus.onTorrentAction,
|
||||||
scope: deluge.menus
|
scope: deluge.menus
|
||||||
|
@ -35,7 +35,7 @@ Deluge.MoveStorage = Ext.extend(Ext.Window, {
|
|||||||
|
|
||||||
constructor: function(config) {
|
constructor: function(config) {
|
||||||
config = Ext.apply({
|
config = Ext.apply({
|
||||||
title: _('Move Storage'),
|
title: _('Move Download Folder'),
|
||||||
width: 375,
|
width: 375,
|
||||||
height: 110,
|
height: 110,
|
||||||
layout: 'fit',
|
layout: 'fit',
|
||||||
|
@ -205,12 +205,12 @@
|
|||||||
renderer: trackerRenderer,
|
renderer: trackerRenderer,
|
||||||
dataIndex: 'tracker_host'
|
dataIndex: 'tracker_host'
|
||||||
}, {
|
}, {
|
||||||
header: _('Save Path'),
|
header: _('Download Folder'),
|
||||||
hidden: true,
|
hidden: true,
|
||||||
width: 120,
|
width: 120,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
renderer: fplain,
|
renderer: fplain,
|
||||||
dataIndex: 'save_path'
|
dataIndex: 'download_location'
|
||||||
}, {
|
}, {
|
||||||
header: _('Owner'),
|
header: _('Owner'),
|
||||||
width: 80,
|
width: 80,
|
||||||
@ -296,7 +296,7 @@
|
|||||||
{name: 'distributed_copies', type: 'float'},
|
{name: 'distributed_copies', type: 'float'},
|
||||||
{name: 'time_added', type: 'int'},
|
{name: 'time_added', type: 'int'},
|
||||||
{name: 'tracker_host'},
|
{name: 'tracker_host'},
|
||||||
{name: 'save_path'},
|
{name: 'download_location'},
|
||||||
{name: 'total_done', type: 'int'},
|
{name: 'total_done', type: 'int'},
|
||||||
{name: 'total_uploaded', type: 'int'},
|
{name: 'total_uploaded', type: 'int'},
|
||||||
{name: 'total_remaining', type: 'int'},
|
{name: 'total_remaining', type: 'int'},
|
||||||
|
@ -45,9 +45,9 @@ Deluge.details.DetailsTab = Ext.extend(Ext.Panel, {
|
|||||||
Deluge.details.DetailsTab.superclass.initComponent.call(this);
|
Deluge.details.DetailsTab.superclass.initComponent.call(this);
|
||||||
this.addItem('torrent_name', _('Name'));
|
this.addItem('torrent_name', _('Name'));
|
||||||
this.addItem('hash', _('Hash'));
|
this.addItem('hash', _('Hash'));
|
||||||
this.addItem('path', _('Path'));
|
this.addItem('path', _('Download Folder'));
|
||||||
this.addItem('size', _('Total Size'));
|
this.addItem('size', _('Total Size'));
|
||||||
this.addItem('files', _('# of files'));
|
this.addItem('files', _('Total Files'));
|
||||||
this.addItem('comment', _('Comment'));
|
this.addItem('comment', _('Comment'));
|
||||||
this.addItem('status', _('Status'));
|
this.addItem('status', _('Status'));
|
||||||
this.addItem('tracker', _('Tracker'));
|
this.addItem('tracker', _('Tracker'));
|
||||||
@ -97,7 +97,7 @@ Deluge.details.DetailsTab = Ext.extend(Ext.Panel, {
|
|||||||
var data = {
|
var data = {
|
||||||
torrent_name: torrent.name,
|
torrent_name: torrent.name,
|
||||||
hash: options.options.torrentId,
|
hash: options.options.torrentId,
|
||||||
path: torrent.save_path,
|
path: torrent.download_location,
|
||||||
size: fsize(torrent.total_size),
|
size: fsize(torrent.total_size),
|
||||||
files: torrent.num_files,
|
files: torrent.num_files,
|
||||||
status: torrent.message,
|
status: torrent.message,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user