[rhythmbox] grilo: update container types more usefully
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] grilo: update container types more usefully
- Date: Tue, 20 May 2014 12:31:24 +0000 (UTC)
commit b22af115de949e47e0ee6b34f960d4febe8eceea
Author: Jonathan Matthew <jonathan d14n org>
Date: Tue May 20 22:29:29 2014 +1000
grilo: update container types more usefully
Record a container as holding media as soon as we see any, otherwise set it as
not having media when we get to the end without finding any.
https://bugzilla.gnome.org/show_bug.cgi?id=682574
plugins/grilo/rb-grilo-source.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/plugins/grilo/rb-grilo-source.c b/plugins/grilo/rb-grilo-source.c
index 3d051f3..c13a305 100644
--- a/plugins/grilo/rb-grilo-source.c
+++ b/plugins/grilo/rb-grilo-source.c
@@ -655,7 +655,7 @@ set_container_type (RBGriloSource *source, GtkTreeIter *iter, gboolean has_media
iter,
2, &container_type,
-1);
- if (container_type == CONTAINER_UNKNOWN_MEDIA) {
+ if (container_type != CONTAINER_HAS_MEDIA) {
container_type = has_media ? CONTAINER_HAS_MEDIA : CONTAINER_NO_MEDIA;
}
@@ -735,12 +735,20 @@ grilo_browse_cb (GrlSource *grilo_source, guint operation_id, GrlMedia *media, g
/* no more results for this container, so delete the marker row */
delete_marker_row (source, &source->priv->browse_container_iter);
- set_container_type (source, &source->priv->browse_container_iter,
source->priv->browse_got_media);
+ set_container_type (source,
+ &source->priv->browse_container_iter,
+ FALSE);
gtk_tree_store_set (source->priv->browser_model,
&source->priv->browse_container_iter,
3, -1,
-1);
} else if (source->priv->browse_container != NULL) {
+ if (source->priv->browse_got_media) {
+ set_container_type (source,
+ &source->priv->browse_container_iter,
+ TRUE);
+ }
+
if (source->priv->browse_position >= CONTAINER_GIVE_UP_POINT &&
gtk_tree_model_iter_n_children (GTK_TREE_MODEL (source->priv->browser_model),
&source->priv->browse_container_iter) == 1) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]