Btw, the ObjectChooser, with the Journal button at left, the Document folder, and the devices icons at right and the cancel button in the middle is.... intresting... :)
Gonzalo On Mon, Aug 29, 2011 at 11:58 AM, Simon Schampijer <si...@schampijer.de>wrote: > On 08/26/2011 11:51 PM, godi...@sugarlabs.org wrote: > >> From: Gonzalo Odiard<godi...@gmail.com> >> >> After adding the Documents folder in the VolumesToolbar, >> if the user unmount a device with the ObjectChooser opened, >> the code break and the device button is not removed. >> > > Thanks Gonzalo for the patch. We could as well store the mountpoint in > DocumentsButton, the information is there. That way the > '_get_button_for_mount' would return the correct information. What do you > think? > > Regards, > Simon > > > > > > Signed-off-by: Gonzalo Odiard<gonz...@laptop.org> >> --- >> src/jarabe/journal/**volumestoolbar.py | 3 ++- >> 1 files changed, 2 insertions(+), 1 deletions(-) >> >> diff --git a/src/jarabe/journal/**volumestoolbar.py b/src/jarabe/journal/ >> **volumestoolbar.py >> index 7a34e18..36f3011 100644 >> --- a/src/jarabe/journal/**volumestoolbar.py >> +++ b/src/jarabe/journal/**volumestoolbar.py >> @@ -280,7 +280,8 @@ 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 button.mount_point == mount_point: >> + if hasattr(button, 'mount_point') and \ >> + button.mount_point == mount_point: >> return button >> logging.error('Couldnt find button with mount_point %r', >> mount_point) >> return None >> > > ______________________________**_________________ > Sugar-devel mailing list > Sugar-devel@lists.sugarlabs.**org <Sugar-devel@lists.sugarlabs.org> > http://lists.sugarlabs.org/**listinfo/sugar-devel<http://lists.sugarlabs.org/listinfo/sugar-devel> >
_______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel