[totem] grilo: Set the number of selected items
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] grilo: Set the number of selected items
- Date: Fri, 17 Jan 2014 09:11:26 +0000 (UTC)
commit 12f90007aea8960d6268ff776b906ac4936040e1
Author: Bastien Nocera <hadess hadess net>
Date: Wed Jan 15 18:42:27 2014 +0100
grilo: Set the number of selected items
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 9962dd1..a31ea06 100644
--- a/src/plugins/grilo/totem-grilo.c
+++ b/src/plugins/grilo/totem-grilo.c
@@ -1206,6 +1206,20 @@ search_mode_changed (GObject *gobject,
}
static void
+view_selection_changed_cb (GdMainView *view,
+ TotemGriloPlugin *self)
+{
+ GList *list;
+ guint count;
+
+ list = gd_main_view_get_selection (view);
+ count = g_list_length (list);
+ g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
+
+ totem_main_toolbar_set_n_selected (TOTEM_MAIN_TOOLBAR (self->priv->header), count);
+}
+
+static void
setup_browse (TotemGriloPlugin *self,
GtkBuilder *builder)
{
@@ -1247,6 +1261,8 @@ setup_browse (TotemGriloPlugin *self,
self->priv->browser, "selection-mode",
G_BINDING_BIDIRECTIONAL);
+ g_signal_connect (self->priv->browser, "view-selection-changed",
+ G_CALLBACK (view_selection_changed_cb), self);
g_signal_connect (self->priv->browser, "item-activated",
G_CALLBACK (item_activated_cb), self);
g_signal_connect (self->priv->browser, "selection-mode-request",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]