From 231c17f6a9b2f34a3a25399b500ce256ab69bea2 Mon Sep 17 00:00:00 2001 From: Chase Sterling Date: Sun, 3 Aug 2014 21:15:32 -0400 Subject: [PATCH] Clean up remove dialog handling a bit more --- deluge/ui/gtkui/glade/remove_torrent_dialog.ui | 4 ++-- deluge/ui/gtkui/removetorrentdialog.py | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/deluge/ui/gtkui/glade/remove_torrent_dialog.ui b/deluge/ui/gtkui/glade/remove_torrent_dialog.ui index 1dabe5d8e..e4036814d 100644 --- a/deluge/ui/gtkui/glade/remove_torrent_dialog.ui +++ b/deluge/ui/gtkui/glade/remove_torrent_dialog.ui @@ -185,8 +185,8 @@ - cancel_button - ok_button + cancel_button + ok_button diff --git a/deluge/ui/gtkui/removetorrentdialog.py b/deluge/ui/gtkui/removetorrentdialog.py index 00e1c59f5..6742220db 100644 --- a/deluge/ui/gtkui/removetorrentdialog.py +++ b/deluge/ui/gtkui/removetorrentdialog.py @@ -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()