[Dextrose] [PATCH] Prevent multiple XS icon when re register

David Farning dfarning at gmail.com
Mon Aug 9 12:57:14 EDT 2010


On Sat, Aug 7, 2010 at 8:16 PM, Martin Abente <mabente at paraguayeduca.org> wrote:
> On Fri, 06 Aug 2010 21:18:37 -0400, Bernie Innocenti <bernie at codewiz.org>
> wrote:
>> 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__?
>>
>
> type does not work for custom classes.
>
>> Maybe isinstance() would be more appropriate here.
>
> Ops, forgot about that, we could change it directly into the patch maybe?

Martin,
Can you submit a new corrected patch?  I am still learning the workflow.,

david


More information about the Dextrose mailing list