From 1f73476dc3e9bdb1de819771613e1f6b284feb19 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sun, 22 May 2011 19:48:05 +0100 Subject: [PATCH] Fix Up/Down buttons in Edit Trackers Dialog This fix properly reflects the movement of the tracker in the dialog table rather than by the tracker index. --- deluge/ui/gtkui/edittrackersdialog.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/deluge/ui/gtkui/edittrackersdialog.py b/deluge/ui/gtkui/edittrackersdialog.py index d710cc6c6..6876aac89 100644 --- a/deluge/ui/gtkui/edittrackersdialog.py +++ b/deluge/ui/gtkui/edittrackersdialog.py @@ -113,16 +113,6 @@ class EditTrackersDialog: """Returns the selected tracker""" return self.treeview.get_selection().get_selected()[1] - def on_button_up_clicked(self, widget): - log.debug("on_button_up_clicked") - selected = self.get_selected() - num_rows = self.liststore.iter_n_children(None) - if selected != None and num_rows > 1: - tier = self.liststore.get_value(selected, 0) - new_tier = tier + 1 - # Now change the tier for this tracker - self.liststore.set_value(selected, 0, new_tier) - def on_button_add_clicked(self, widget): log.debug("on_button_add_clicked") # Show the add tracker dialog @@ -156,8 +146,8 @@ class EditTrackersDialog: self.liststore.set_value(selected, 1, tracker) self.edit_tracker_entry.hide() - def on_button_down_clicked(self, widget): - log.debug("on_button_down_clicked") + def on_button_up_clicked(self, widget): + log.debug("on_button_up_clicked") selected = self.get_selected() num_rows = self.liststore.iter_n_children(None) if selected != None and num_rows > 1: @@ -168,6 +158,16 @@ class EditTrackersDialog: # Now change the tier for this tracker self.liststore.set_value(selected, 0, new_tier) + def on_button_down_clicked(self, widget): + log.debug("on_button_down_clicked") + selected = self.get_selected() + num_rows = self.liststore.iter_n_children(None) + if selected != None and num_rows > 1: + tier = self.liststore.get_value(selected, 0) + new_tier = tier + 1 + # Now change the tier for this tracker + self.liststore.set_value(selected, 0, new_tier) + def on_button_ok_clicked(self, widget): log.debug("on_button_ok_clicked") self.trackers = []