[Dextrose] [PATCH] Prevent multiple XS icon when re register
Bernie Innocenti
bernie at codewiz.org
Fri Aug 6 21:18:37 EDT 2010
El Fri, 06-08-2010 a las 14:59 -0400, Martin Abente escribió:
> @@ -122,7 +127,7 @@ class VolumesToolbar(gtk.Toolbar):
> def _get_button_for_mount(self, mount):
> mount_point = mount.get_root().get_path()
> for button in self.get_children():
> - if type(button) == VolumeButton and \
> + if button.__class__ == VolumeButton and \
I do not understand why this change was necessary: doesn't type(obj)
always return obj.__class__?
Maybe isinstance() would be more appropriate here.
--
// Bernie Innocenti - http://codewiz.org/
\X/ Sugar Labs - http://sugarlabs.org/
More information about the Dextrose
mailing list