[GTKUI] Make Add Dialog torrent name editable

* Allows copying of name and future feature of changing the torrent
display name.
This commit is contained in:
Calum Lind 2015-08-27 19:32:05 +01:00
parent 438d49be85
commit 9e13f671ee
1 changed files with 6 additions and 0 deletions

View File

@ -86,6 +86,8 @@ class AddTorrentDialog(component.Component):
self.listview_files = self.builder.get_object("listview_files")
render = gtk.CellRendererText()
render.connect('edited', self._on_torrent_name_edit)
render.set_property('editable', True)
column = gtk.TreeViewColumn(_("Torrent"), render, text=1)
self.listview_torrents.append_column(column)
@ -267,6 +269,10 @@ class AddTorrentDialog(component.Component):
self.previous_selected_torrent = row
def _on_torrent_name_edit(self, w, row, new_name):
# TODO: Update torrent name
pass
def _on_switch_page(self, widget, page, page_num):
# Save the torrent options when switching notebook pages
self.save_torrent_options()