[totem] main: Don't add containers in the Recent view
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] main: Don't add containers in the Recent view
- Date: Mon, 24 Mar 2014 13:23:48 +0000 (UTC)
commit af5a2c0b4b6aead90cd3e41c56c4a8c548974d77
Author: Bastien Nocera <hadess hadess net>
Date: Sat Mar 22 13:29:15 2014 +0100
main: Don't add containers in the Recent view
Try harder not to add containers to the recent view, we don't
want to see them, and they break navigation (for the bookmarks
source for example).
https://bugzilla.gnome.org/show_bug.cgi?id=726874
src/totem-grilo.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/totem-grilo.c b/src/totem-grilo.c
index 1e5f115..f2db80d 100644
--- a/src/totem-grilo.c
+++ b/src/totem-grilo.c
@@ -130,6 +130,7 @@ G_DEFINE_TYPE_WITH_CODE (TotemGrilo, totem_grilo, GTK_TYPE_BOX,
typedef struct {
TotemGrilo *totem_grilo;
+ gboolean ignore_boxes; /* For the recent view */
GtkTreeRowReference *ref_parent;
GtkTreeModel *model;
} BrowseUserData;
@@ -707,10 +708,14 @@ browse_cb (GrlSource *source,
g_assert_not_reached ();
}
- add_local_metadata (self, source, media);
- add_media_to_model (GTK_TREE_STORE (bud->model),
- bud->ref_parent ? &parent : NULL,
- source, media);
+ if (GRL_IS_MEDIA_BOX (media) && bud->ignore_boxes) {
+ /* Ignore boxes for certain sources */
+ } else {
+ add_local_metadata (self, source, media);
+ add_media_to_model (GTK_TREE_STORE (bud->model),
+ bud->ref_parent ? &parent : NULL,
+ source, media);
+ }
g_object_unref (media);
}
@@ -753,6 +758,7 @@ browse (TotemGrilo *self,
bud = g_slice_new0 (BrowseUserData);
bud->totem_grilo = g_object_ref (self);
+ bud->ignore_boxes = source_is_recent (source);
if (path)
bud->ref_parent = gtk_tree_row_reference_new (model, path);
bud->model = g_object_ref (model);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]