Clean up remove dialog handling a bit more

This commit is contained in:
Chase Sterling 2014-08-03 21:15:32 -04:00
commit 231c17f6a9
2 changed files with 3 additions and 9 deletions

View file

@ -185,8 +185,8 @@
</object>
</child>
<action-widgets>
<action-widget response="0">cancel_button</action-widget>
<action-widget response="1">ok_button</action-widget>
<action-widget response="-6">cancel_button</action-widget>
<action-widget response="-5">ok_button</action-widget>
</action-widgets>
</object>
</interface>

View file

@ -99,12 +99,6 @@ class RemoveTorrentDialog(object):
Shows the dialog and awaits for user input. The user can select to
remove the torrent(s) from the session with or without their data.
"""
# Response IDs from the buttons
RESPONSE_CANCEL = 0
RESPONSE_OK = 1
response = self.__dialog.run()
if response == RESPONSE_OK:
if self.__dialog.run() == gtk.RESPONSE_OK:
self.__remove_torrents(self.builder.get_object("delete_files").get_active())
self.__dialog.destroy()