My only concern is if we can add a different message to the Documents directory.<br><br>May be we can keep the mount point of Documents directory in any variable in sugar?<br><br>Gonzalo<br><br><div class="gmail_quote">On Tue, Aug 30, 2011 at 11:12 AM, Simon Schampijer <span dir="ltr"><<a href="mailto:simon@schampijer.de">simon@schampijer.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">[adding the design pros to the conversation]<br>
<br>
Would be great to get feedback on this before the string freeze kicks in.<br>
<br>
Regards,<br><font color="#888888">
Simon</font><div><div></div><div class="h5"><br>
<br>
On 08/24/2011 12:51 PM, Simon Schampijer wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Currently the message will be the same for an empty Journal<br>
or an empty external device or an empty documents folder. This<br>
patch does distinguish betwen an empty Journal and an empty<br>
external device.<br>
<br>
Signed-off-by: Simon Schampijer<<a href="mailto:simon@laptop.org" target="_blank">simon@laptop.org</a>><br>
<br>
---<br>
<br>
Note: I am not yet sure about the naming. Maybe device can be<br>
replaced by folder? Other suggestions?<br>
---<br>
src/jarabe/journal/listview.py | 10 ++++++++--<br>
1 files changed, 8 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/jarabe/journal/listview.<u></u>py b/src/jarabe/journal/listview.<u></u>py<br>
index a9f5a53..5397e2c 100644<br>
--- a/src/jarabe/journal/listview.<u></u>py<br>
+++ b/src/jarabe/journal/listview.<u></u>py<br>
@@ -38,7 +38,8 @@ from jarabe.journal import misc<br>
UPDATE_INTERVAL = 300<br>
<br>
MESSAGE_EMPTY_JOURNAL = 0<br>
-MESSAGE_NO_MATCH = 1<br>
+MESSAGE_EMPTY_DEVICE = 1<br>
+MESSAGE_NO_MATCH = 2<br>
<br>
<br>
class TreeView(gtk.TreeView):<br>
@@ -315,7 +316,10 @@ class BaseListView(gtk.Bin):<br>
<br>
if len(tree_model) == 0:<br>
if self._is_query_empty():<br>
- self._show_message(MESSAGE_<u></u>EMPTY_JOURNAL)<br>
+ if self._query['mountpoints'] == ['/']:<br>
+ self._show_message(MESSAGE_<u></u>EMPTY_JOURNAL)<br>
+ else:<br>
+ self._show_message(MESSAGE_<u></u>EMPTY_DEVICE)<br>
else:<br>
self._show_message(MESSAGE_NO_<u></u>MATCH)<br>
else:<br>
@@ -385,6 +389,8 @@ class BaseListView(gtk.Bin):<br>
<br>
if message == MESSAGE_EMPTY_JOURNAL:<br>
text = _('Your Journal is empty')<br>
+ elif message == MESSAGE_EMPTY_DEVICE:<br>
+ text = _('Your device is empty')<br>
elif message == MESSAGE_NO_MATCH:<br>
text = _('No matching entries')<br>
else:<br>
</blockquote>
<br></div></div><div><div></div><div class="h5">
______________________________<u></u>_________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.<u></u>org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/<u></u>listinfo/sugar-devel</a><br>
</div></div></blockquote></div><br>