[totem] grilo: Don't allow selections to start at the root
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] grilo: Don't allow selections to start at the root
- Date: Tue, 14 Jan 2014 19:20:31 +0000 (UTC)
commit 8f2c0a4f0486ee0c2d07939723761bfb1366cb95
Author: Bastien Nocera <hadess hadess net>
Date: Tue Jan 14 15:40:43 2014 +0100
grilo: Don't allow selections to start at the root
src/plugins/grilo/totem-grilo.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/grilo/totem-grilo.c b/src/plugins/grilo/totem-grilo.c
index a7baae6..b73cd25 100644
--- a/src/plugins/grilo/totem-grilo.c
+++ b/src/plugins/grilo/totem-grilo.c
@@ -1168,6 +1168,21 @@ window_key_press_event_cb (GtkWidget *win,
}
static void
+selection_mode_requested (GdMainView *view,
+ TotemGriloPlugin *self)
+{
+ GtkTreePath *root;
+
+ g_object_get (self->priv->browser_filter_model,
+ "virtual-root", &root,
+ NULL);
+ if (root == NULL)
+ return;
+ gd_main_view_set_selection_mode (GD_MAIN_VIEW (view), TRUE);
+ gtk_tree_path_free (root);
+}
+
+static void
setup_browse (TotemGriloPlugin *self,
GtkBuilder *builder)
{
@@ -1219,6 +1234,8 @@ setup_browse (TotemGriloPlugin *self,
g_signal_connect (self->priv->browser, "item-activated",
G_CALLBACK (item_activated_cb), self);
+ g_signal_connect (self->priv->browser, "selection-mode-request",
+ G_CALLBACK (selection_mode_requested), self);
g_signal_connect (self->priv->browser, "popup-menu",
G_CALLBACK (popup_menu_cb), self);
g_signal_connect (self->priv->browser,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]