Module: deluge Branch: master Commit: fb49aa02a894c974887eec3ed361660a671282b9
Author: Andrew Resch <[email protected]> Date: Mon Sep 13 18:21:31 2010 -0700 Fix preference page index when removing a preference page --- deluge/ui/gtkui/preferences.py | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/deluge/ui/gtkui/preferences.py b/deluge/ui/gtkui/preferences.py index d224686..0f9a219 100644 --- a/deluge/ui/gtkui/preferences.py +++ b/deluge/ui/gtkui/preferences.py @@ -173,6 +173,10 @@ class Preferences(component.Component): if self.iter_to_remove != None: self.liststore.remove(self.iter_to_remove) + # We need to re-adjust the index values for the remaining pages + for i, (index, name) in enumerate(self.liststore): + self.liststore[i][0] = i + def show(self, page=None): """Page should be the string in the left list.. ie, 'Network' or 'Bandwidth'""" -- You received this message because you are subscribed to the Google Groups "deluge-commit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/deluge-commit?hl=en.
