[rhythmbox] dbus-media-server: use the new page-inserted signal
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] dbus-media-server: use the new page-inserted signal
- Date: Mon, 19 Mar 2012 23:08:06 +0000 (UTC)
commit b635898dae9008f98437184352b72c6d6e9e9f3b
Author: Jonathan Matthew <jonathan d14n org>
Date: Tue Mar 20 09:07:13 2012 +1000
dbus-media-server: use the new page-inserted signal
.../rb-dbus-media-server-plugin.c | 24 +++++++++++++------
1 files changed, 16 insertions(+), 8 deletions(-)
---
diff --git a/plugins/dbus-media-server/rb-dbus-media-server-plugin.c b/plugins/dbus-media-server/rb-dbus-media-server-plugin.c
index edab082..0dc60f0 100644
--- a/plugins/dbus-media-server/rb-dbus-media-server-plugin.c
+++ b/plugins/dbus-media-server/rb-dbus-media-server-plugin.c
@@ -2297,15 +2297,11 @@ is_shareable_device (RBSource *source)
}
*/
-static gboolean
-display_page_inserted_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, RBMediaServer2Plugin *plugin)
+static void
+display_page_inserted_cb (RBDisplayPageModel *model, RBDisplayPage *page, GtkTreeIter *iter, RBMediaServer2Plugin *plugin)
{
- RBDisplayPage *page;
GList *l;
- gtk_tree_model_get (model, iter,
- RB_DISPLAY_PAGE_MODEL_COLUMN_PAGE, &page,
- -1);
if (RB_IS_SOURCE (page)) {
RBSource *source = RB_SOURCE (page);
/* figure out if this is a source we can publish */
@@ -2324,6 +2320,18 @@ display_page_inserted_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *i
}
}
+}
+
+static gboolean
+display_page_foreach_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, RBMediaServer2Plugin *plugin)
+{
+ RBDisplayPage *page;
+
+ gtk_tree_model_get (model, iter,
+ RB_DISPLAY_PAGE_MODEL_COLUMN_PAGE, &page,
+ -1);
+ display_page_inserted_cb (RB_DISPLAY_PAGE_MODEL (model), page, iter, plugin);
+
g_object_unref (page);
return FALSE;
}
@@ -2394,9 +2402,9 @@ impl_activate (PeasActivatable *bplugin)
g_object_unref (source);
/* watch for user-creatable sources (playlists, devices) */
- g_signal_connect_object (plugin->display_page_model, "row-inserted", G_CALLBACK (display_page_inserted_cb), plugin, 0);
+ g_signal_connect_object (plugin->display_page_model, "page-inserted", G_CALLBACK (display_page_inserted_cb), plugin, 0);
gtk_tree_model_foreach (GTK_TREE_MODEL (plugin->display_page_model),
- (GtkTreeModelForeachFunc) display_page_inserted_cb,
+ (GtkTreeModelForeachFunc) display_page_foreach_cb,
plugin);
register_category_container (plugin, _("Playlists"), RB_MEDIASERVER2_PLAYLISTS, RB_MEDIASERVER2_ROOT, is_shareable_playlist);
/* see comments above */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]