mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-08 09:28:41 +00:00
Select a torrent in the list if none are selected on torrent add.
This commit is contained in:
parent
4036ff4310
commit
4ba32dc4bf
1 changed files with 6 additions and 1 deletions
|
@ -170,11 +170,16 @@ class AddTorrentDialog:
|
||||||
})
|
})
|
||||||
|
|
||||||
name = "%s (%s)" % (info.name(), os.path.split(filename)[-1])
|
name = "%s (%s)" % (info.name(), os.path.split(filename)[-1])
|
||||||
self.torrent_liststore.append(
|
new_row = self.torrent_liststore.append(
|
||||||
[str(info.info_hash()), name, filename])
|
[str(info.info_hash()), name, filename])
|
||||||
self.files[str(info.info_hash())] = files
|
self.files[str(info.info_hash())] = files
|
||||||
self.infos[str(info.info_hash())] = info
|
self.infos[str(info.info_hash())] = info
|
||||||
|
|
||||||
|
(model, row) = self.listview_torrents.get_selection().get_selected()
|
||||||
|
if row == None:
|
||||||
|
self.listview_torrents.get_selection().select_iter(new_row)
|
||||||
|
|
||||||
|
|
||||||
def _on_torrent_changed(self, treeselection):
|
def _on_torrent_changed(self, treeselection):
|
||||||
(model, row) = treeselection.get_selected()
|
(model, row) = treeselection.get_selected()
|
||||||
self.files_liststore.clear()
|
self.files_liststore.clear()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue