[bijiben] Controller : do not advertise "no result" inside Trash



commit 790bf66d147d70789a7afef49e3f786e92f2a642
Author: Pierre-Yves Luyten <py luyten fr>
Date:   Thu Mar 6 21:56:53 2014 +0100

    Controller : do not advertise "no result" inside Trash
    
    Trash might be empty. Do not say there are no items.

 src/bjb-controller.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/bjb-controller.c b/src/bjb-controller.c
index 1f66546..c9e8d55 100644
--- a/src/bjb-controller.c
+++ b/src/bjb-controller.c
@@ -462,7 +462,7 @@ update_controller_callback (GList *result,
 
 
 
-  if (!result)
+  if (!result && priv->group == BIJI_LIVING_ITEMS)
   {
     bjb_window_base_switch_to (priv->window, BJB_WINDOW_BASE_NO_RESULT);
     return;
@@ -518,12 +518,13 @@ bjb_controller_apply_needle (BjbController *self)
   needle = priv->needle;
   g_clear_pointer (&priv->items_to_show, g_list_free);
 
-  /* Show all notes */
+  /* Show all items
+   * If no items, tell it - unless trash is visited */
   if (needle == NULL || g_strcmp0 (needle,"") == 0)
   {
     result = biji_manager_get_items (self->priv->manager, self->priv->group);
 
-    if (result == NULL)
+    if (result == NULL && priv->group == BIJI_LIVING_ITEMS)
       bjb_window_base_switch_to (self->priv->window, BJB_WINDOW_BASE_NO_NOTE);
 
     else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]