Tested and works ok.<br>IMHO, sending the constants had more sense when we only had two messages,<br>now should be more clear if we do:<br><br><div class="gmail_quote"> if len(tree_model) == 0:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
if self._is_query_empty():<br>
- self._show_message(MESSAGE_EMPTY_JOURNAL)<br>
+ if self._query['mountpoints'] == ['/']:<br>
+ self._show_message(_('Your Journal is empty'))<br>
+ elif self._query['mountpoints'] == \<br>
+ [model.get_documents_path()]:<br>
+ self._show_message(_('Your documents folder is empty'))<br>
+ else:<br>
+ self._show_message(_('The device is empty'))<br>
else:<br>
self._show_message(_('No matching entries'),show_clear_query=True)<br>
else:<br>
@@ -385,6 +393,10 @@ class BaseListView(gtk.Bin):<br><br></blockquote><div><br> <br>
def _show_message(self, message, show_clear_query=False):<br><br> .....<br><br>
if show_clear_query:<br> button = gtk.Button(label=_('Clear search'))<br> button.connect('clicked', self.__clear_button_clicked_cb)<br> button.props.image = Icon(icon_name='dialog-cancel',<br>
icon_size=gtk.ICON_SIZE_BUTTON)<br> canvas_button = hippo.CanvasWidget(widget=button,<br> xalign=hippo.ALIGNMENT_CENTER)<br> box.append(canvas_button)<br>
<br><br>... but is only me. <br>Regards,<br><br>Gonzalo<br></div></div>