[grilo-plugins] bookmarks: Pass the removed media when notifying



commit 18cf4d82acf30ba0b5565d9655b4c6eb6e7caada
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Mar 14 15:46:48 2014 +0100

    bookmarks: Pass the removed media when notifying
    
    When notifying of changes, pass the removed item, not its parent
    box.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726349

 src/bookmarks/grl-bookmarks.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/bookmarks/grl-bookmarks.c b/src/bookmarks/grl-bookmarks.c
index ecd62b2..9d6120a 100644
--- a/src/bookmarks/grl-bookmarks.c
+++ b/src/bookmarks/grl-bookmarks.c
@@ -578,6 +578,7 @@ produce_bookmarks_from_category (OperationSpec *os, const gchar *category_id)
 static void
 remove_bookmark (GrlBookmarksSource *bookmarks_source,
                  const gchar *bookmark_id,
+                 GrlMedia *media,
                  GError **error)
 {
   gint r;
@@ -610,7 +611,7 @@ remove_bookmark (GrlBookmarksSource *bookmarks_source,
     /* We can improve accuracy computing the parent container of removed
        element */
     grl_source_notify_change (GRL_SOURCE (bookmarks_source),
-                              NULL,
+                              media,
                               GRL_CONTENT_REMOVED,
                               TRUE);
   }
@@ -881,7 +882,7 @@ static void grl_bookmarks_source_remove (GrlSource *source,
   GRL_DEBUG (__FUNCTION__);
   GError *error = NULL;
   remove_bookmark (GRL_BOOKMARKS_SOURCE (rs->source),
-                  rs->media_id, &error);
+                  rs->media_id, rs->media, &error);
   rs->callback (rs->source, rs->media, rs->user_data, error);
   g_clear_error (&error);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]