[totem] grilo: Make Ctrl+A not throw warnings in Recent view
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] grilo: Make Ctrl+A not throw warnings in Recent view
- Date: Wed, 22 Jan 2014 17:35:45 +0000 (UTC)
commit e39d1fbb23e16a74bf2d84333ce713d3bed09895
Author: Bastien Nocera <hadess hadess net>
Date: Wed Jan 22 18:27:19 2014 +0100
grilo: Make Ctrl+A not throw warnings in Recent view
src/plugins/grilo/totem-grilo.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/src/plugins/grilo/totem-grilo.c b/src/plugins/grilo/totem-grilo.c
index af97f53..463d303 100644
--- a/src/plugins/grilo/totem-grilo.c
+++ b/src/plugins/grilo/totem-grilo.c
@@ -1509,18 +1509,22 @@ static void
selection_mode_requested (GdMainView *view,
TotemGriloPlugin *self)
{
- GtkTreePath *root;
+ GtkTreePath *root = NULL;
+
+ /* Don't allow selections when at the root of the
+ * "Channels" view */
+ if (self->priv->browser_filter_model != NULL) {
+ g_object_get (self->priv->browser_filter_model,
+ "virtual-root", &root,
+ NULL);
+ if (root == NULL)
+ return;
+ }
- 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);
+ g_clear_pointer (&root, gtk_tree_path_free);
}
-
static void
view_selection_changed_cb (GdMainView *view,
TotemGriloPlugin *self)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]