[Sugar-devel] [DESIGN] Re: [PATCH sugar] Add new string 'Your device is empty' for external devices

Gonzalo Odiard gonzalo at laptop.org
Tue Aug 30 10:23:22 EDT 2011


My only concern is if we can add a different message to the Documents
directory.

May be we can keep the mount point of Documents directory in any variable in
sugar?

Gonzalo

On Tue, Aug 30, 2011 at 11:12 AM, Simon Schampijer <simon at schampijer.de>wrote:

> [adding the design pros to the conversation]
>
> Would be great to get feedback on this before the string freeze kicks in.
>
> Regards,
>   Simon
>
>
> On 08/24/2011 12:51 PM, Simon Schampijer wrote:
>
>> Currently the message will be the same for an empty Journal
>> or an empty external device or an empty documents folder. This
>> patch does distinguish betwen an empty Journal and an empty
>> external device.
>>
>> Signed-off-by: Simon Schampijer<simon at laptop.org>
>>
>> ---
>>
>> Note: I am not yet sure about the naming. Maybe device can be
>> replaced by folder? Other suggestions?
>> ---
>>  src/jarabe/journal/listview.py |   10 ++++++++--
>>  1 files changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/jarabe/journal/listview.**py
>> b/src/jarabe/journal/listview.**py
>> index a9f5a53..5397e2c 100644
>> --- a/src/jarabe/journal/listview.**py
>> +++ b/src/jarabe/journal/listview.**py
>> @@ -38,7 +38,8 @@ from jarabe.journal import misc
>>  UPDATE_INTERVAL = 300
>>
>>  MESSAGE_EMPTY_JOURNAL = 0
>> -MESSAGE_NO_MATCH = 1
>> +MESSAGE_EMPTY_DEVICE = 1
>> +MESSAGE_NO_MATCH = 2
>>
>>
>>  class TreeView(gtk.TreeView):
>> @@ -315,7 +316,10 @@ class BaseListView(gtk.Bin):
>>
>>          if len(tree_model) == 0:
>>              if self._is_query_empty():
>> -                self._show_message(MESSAGE_**EMPTY_JOURNAL)
>> +                if self._query['mountpoints'] == ['/']:
>> +                    self._show_message(MESSAGE_**EMPTY_JOURNAL)
>> +                else:
>> +                    self._show_message(MESSAGE_**EMPTY_DEVICE)
>>              else:
>>                  self._show_message(MESSAGE_NO_**MATCH)
>>          else:
>> @@ -385,6 +389,8 @@ class BaseListView(gtk.Bin):
>>
>>          if message == MESSAGE_EMPTY_JOURNAL:
>>              text = _('Your Journal is empty')
>> +        elif message == MESSAGE_EMPTY_DEVICE:
>> +            text = _('Your device is empty')
>>          elif message == MESSAGE_NO_MATCH:
>>              text = _('No matching entries')
>>          else:
>>
>
> ______________________________**_________________
> 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/20110830/5db06864/attachment.html>


More information about the Sugar-devel mailing list