[totem] grilo: Fix warnings when clicking on an item



commit c2ececf6bbb6d98ab52793d52b3165a9183f774e
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jan 29 14:25:44 2014 +0100

    grilo: Fix warnings when clicking on an item
    
    When the search is on. The search results might not be the ones
    displayed. So make sure that we dismiss the search bar, and
    activate the clicked item.

 src/plugins/grilo/totem-grilo.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/grilo/totem-grilo.c b/src/plugins/grilo/totem-grilo.c
index 6014e78..d98a6dc 100644
--- a/src/plugins/grilo/totem-grilo.c
+++ b/src/plugins/grilo/totem-grilo.c
@@ -926,11 +926,16 @@ item_activated_cb (GdMainView  *view,
                   gpointer user_data)
 {
        TotemGriloPlugin *self = TOTEM_GRILO_PLUGIN (user_data);
+       GtkTreeModel *model;
+
+       model = gd_main_view_get_model (view);
 
-       if (self->priv->in_search)
+       if (model == self->priv->search_results_model) {
                search_activated_cb (view, path, user_data);
-       else
+       } else {
+               totem_main_toolbar_set_search_mode (TOTEM_MAIN_TOOLBAR (self->priv->header), FALSE);
                browser_activated_cb (view, path, user_data);
+       }
 }
 
 static gboolean


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