[Sugar-devel] [PATCH] Manage the Documents folder in the VolumesToolbar
godiard at sugarlabs.org
godiard at sugarlabs.org
Fri Aug 26 17:51:45 EDT 2011
From: Gonzalo Odiard <godiard at 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.
Signed-off-by: Gonzalo Odiard <gonzalo at 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
--
1.7.4.4
More information about the Sugar-devel
mailing list