mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-27 11:45:44 +00:00
Make move completed field sensitive only when check box is enabled on add torrent dialog.
This commit is contained in:
parent
ad8b757387
commit
b8b27bdaf2
@ -78,7 +78,8 @@ class AddTorrentDialog(component.Component):
|
||||
"on_button_cancel_clicked": self._on_button_cancel_clicked,
|
||||
"on_button_add_clicked": self._on_button_add_clicked,
|
||||
"on_button_apply_clicked": self._on_button_apply_clicked,
|
||||
"on_button_revert_clicked": self._on_button_revert_clicked
|
||||
"on_button_revert_clicked": self._on_button_revert_clicked,
|
||||
"on_chk_move_completed_toggled": self._on_chk_move_completed_toggled
|
||||
})
|
||||
|
||||
self.torrent_liststore = gtk.ListStore(str, str, str)
|
||||
@ -168,6 +169,8 @@ class AddTorrentDialog(component.Component):
|
||||
self.glade.get_widget("button_move_completed_location").hide()
|
||||
self.glade.get_widget("entry_move_completed_path").show()
|
||||
|
||||
self._on_chk_move_completed_toggled(self.glade.get_widget("chk_move_completed"))
|
||||
|
||||
self.dialog.set_transient_for(component.get("MainWindow").window)
|
||||
self.dialog.present()
|
||||
if focus:
|
||||
@ -819,6 +822,11 @@ class AddTorrentDialog(component.Component):
|
||||
del self.options[model.get_value(row, 0)]
|
||||
self.set_default_options()
|
||||
|
||||
def _on_chk_move_completed_toggled(self, widget):
|
||||
value = widget.get_active()
|
||||
self.glade.get_widget("button_move_completed_location").set_sensitive(value)
|
||||
self.glade.get_widget("entry_move_completed_path").set_sensitive(value)
|
||||
|
||||
def _on_delete_event(self, widget, event):
|
||||
self.hide()
|
||||
return True
|
||||
|
@ -427,6 +427,7 @@
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_chk_move_completed_toggled"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
Loading…
x
Reference in New Issue
Block a user