[totem] grilo: Fix coming back from search
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] grilo: Fix coming back from search
- Date: Fri, 17 Jan 2014 09:11:01 +0000 (UTC)
commit 17579e23a3efcf524c615d8210616ad50bee3c65
Author: Bastien Nocera <hadess hadess net>
Date: Tue Jan 14 21:35:58 2014 +0100
grilo: Fix coming back from search
And reset to the root
src/plugins/grilo/totem-grilo.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/grilo/totem-grilo.c b/src/plugins/grilo/totem-grilo.c
index 47adc1b..b1464ce 100644
--- a/src/plugins/grilo/totem-grilo.c
+++ b/src/plugins/grilo/totem-grilo.c
@@ -1192,6 +1192,20 @@ selection_mode_requested (GdMainView *view,
}
static void
+search_mode_changed (GObject *gobject,
+ GParamSpec *pspec,
+ TotemGriloPlugin *self)
+{
+ gboolean search_mode;
+
+ search_mode = totem_main_toolbar_get_search_mode (TOTEM_MAIN_TOOLBAR (self->priv->header));
+ if (!search_mode)
+ set_browser_filter_model_for_path (self, NULL);
+
+ self->priv->in_search = search_mode;
+}
+
+static void
setup_browse (TotemGriloPlugin *self,
GtkBuilder *builder)
{
@@ -1223,6 +1237,8 @@ setup_browse (TotemGriloPlugin *self,
g_object_bind_property (self->priv->header, "search-mode",
self->priv->search_bar, "search-mode-enabled",
G_BINDING_BIDIRECTIONAL);
+ g_signal_connect (self->priv->header, "notify::search-mode",
+ G_CALLBACK (search_mode_changed), self);
/* Main view */
self->priv->browser_model = GTK_TREE_MODEL (gtk_builder_get_object (builder,
"gw_browse_store_results"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]