[Sugar-devel] [PATCH] Manage the Documents folder in the VolumesToolbar
Gonzalo Odiard
gonzalo at laptop.org
Mon Aug 29 14:23:51 EDT 2011
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 <simon at schampijer.de>wrote:
> On 08/26/2011 11:51 PM, godiard at sugarlabs.org wrote:
>
>> 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.
>>
>
> 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<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
>>
>
> ______________________________**_________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.**org <Sugar-devel at lists.sugarlabs.org>
> http://lists.sugarlabs.org/**listinfo/sugar-devel<http://lists.sugarlabs.org/listinfo/sugar-devel>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110829/11176b02/attachment-0001.html>
More information about the Sugar-devel
mailing list