Author: andar
Revision: 5804
Log:
Fix #1018 issue with 2nd level folder rename in the gtkui and save
resume data on file/folder renamed
Diff:
Modified: trunk/deluge/core/torrentmanager.py
===================================================================
--- trunk/deluge/core/torrentmanager.py 2009-10-03 20:44:19 UTC (rev 5803)
+++ trunk/deluge/core/torrentmanager.py 2009-10-03 22:10:38 UTC (rev 5804)
@@ -962,6 +962,7 @@
# This is the last alert we were waiting for, time to send
signal
component.get("EventManager").emit(TorrentFolderRenamedEvent(torrent_id,
wait_on_folder[0], wait_on_folder[1]))
del torrent.waiting_on_folder_rename[i]
+ self.save_resume_data((torrent_id,))
break
# This isn't the last file to be renamed in this folder, so
just
# remove the index and continue
@@ -970,6 +971,7 @@
if not folder_rename:
# This is just a regular file rename so send the signal
component.get("EventManager").emit(TorrentFileRenamedEvent(torrent_id,
alert.index, alert.name))
+ self.save_resume_data((torrent_id,))
def on_alert_metadata_received(self, alert):
log.debug("on_alert_metadata_received")
Modified: trunk/deluge/ui/gtkui/files_tab.py
===================================================================
--- trunk/deluge/ui/gtkui/files_tab.py 2009-10-03 20:44:19 UTC (rev 5803)
+++ trunk/deluge/ui/gtkui/files_tab.py 2009-10-03 22:10:38 UTC (rev 5804)
@@ -741,7 +741,7 @@
new_folder_iter = self.get_iter_at_path(new_folder)
if len(new_split) == len(old_split):
# These are at the same tree depth, so it's a simple rename
- self.treestore[old_folder_iter][0] = new_folder
+ self.treestore[old_folder_iter][0] = new_split[-1] + "/"
return
if new_folder_iter:
# This means that a folder by this name already exists
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---