[rhythmbox] source-toolbar: allow this to be used by non-source pages
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] source-toolbar: allow this to be used by non-source pages
- Date: Mon, 24 Sep 2012 13:32:52 +0000 (UTC)
commit 026ea016e45345c6053a46adaac875ec93b7231d
Author: Jonathan Matthew <jonathan d14n org>
Date: Mon Sep 24 23:27:19 2012 +1000
source-toolbar: allow this to be used by non-source pages
plugins/audiocd/rb-audiocd-source.c | 2 +-
.../rb-audioscrobbler-radio-source.c | 2 +-
plugins/fmradio/rb-fm-radio-source.c | 2 +-
plugins/iradio/rb-iradio-source.c | 2 +-
podcast/rb-podcast-source.c | 2 +-
sources/rb-auto-playlist-source.c | 2 +-
sources/rb-browser-source.c | 2 +-
sources/rb-static-playlist-source.c | 2 +-
widgets/rb-source-toolbar.c | 10 +++++-----
widgets/rb-source-toolbar.h | 2 +-
10 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/plugins/audiocd/rb-audiocd-source.c b/plugins/audiocd/rb-audiocd-source.c
index eab0385..ddb2677 100644
--- a/plugins/audiocd/rb-audiocd-source.c
+++ b/plugins/audiocd/rb-audiocd-source.c
@@ -345,7 +345,7 @@ rb_audiocd_source_constructed (GObject *object)
g_object_set (action, "short-label", _("Extract"), NULL);
/* source toolbar */
- toolbar = rb_source_toolbar_new (RB_SOURCE (source), ui_manager);
+ toolbar = rb_source_toolbar_new (RB_DISPLAY_PAGE (source), ui_manager);
g_object_unref (ui_manager);
g_object_get (source, "entry-type", &entry_type, NULL);
diff --git a/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c b/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c
index 1914f77..7287607 100644
--- a/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c
+++ b/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c
@@ -457,7 +457,7 @@ rb_audioscrobbler_radio_source_constructed (GObject *object)
gtk_container_add (GTK_CONTAINER (source), main_vbox);
/* toolbar */
- toolbar = rb_source_toolbar_new (RB_SOURCE (source), ui_manager);
+ toolbar = rb_source_toolbar_new (RB_DISPLAY_PAGE (source), ui_manager);
gtk_box_pack_start (GTK_BOX (main_vbox), GTK_WIDGET (toolbar), FALSE, FALSE, 0);
gtk_widget_show_all (GTK_WIDGET (toolbar));
diff --git a/plugins/fmradio/rb-fm-radio-source.c b/plugins/fmradio/rb-fm-radio-source.c
index 67fb048..6b22982 100644
--- a/plugins/fmradio/rb-fm-radio-source.c
+++ b/plugins/fmradio/rb-fm-radio-source.c
@@ -185,7 +185,7 @@ rb_fm_radio_source_constructed (GObject *object)
G_N_ELEMENTS (rb_fm_radio_source_actions),
self);
- toolbar = rb_source_toolbar_new (RB_SOURCE (self), ui_manager);
+ toolbar = rb_source_toolbar_new (RB_DISPLAY_PAGE (self), ui_manager);
g_object_unref (toolbar);
self->priv->stations = rb_entry_view_new (self->priv->db,
diff --git a/plugins/iradio/rb-iradio-source.c b/plugins/iradio/rb-iradio-source.c
index dd052cb..44476a6 100644
--- a/plugins/iradio/rb-iradio-source.c
+++ b/plugins/iradio/rb-iradio-source.c
@@ -397,7 +397,7 @@ rb_iradio_source_constructed (GObject *object)
gtk_paned_pack2 (GTK_PANED (paned), GTK_WIDGET (source->priv->stations), TRUE, FALSE);
/* set up toolbar */
- source->priv->toolbar = rb_source_toolbar_new (RB_SOURCE (source), ui_manager);
+ source->priv->toolbar = rb_source_toolbar_new (RB_DISPLAY_PAGE (source), ui_manager);
rb_source_toolbar_add_search_entry (source->priv->toolbar, NULL, _("Search your internet radio stations"));
grid = gtk_grid_new ();
diff --git a/podcast/rb-podcast-source.c b/podcast/rb-podcast-source.c
index 9b43f2e..d7879d8 100644
--- a/podcast/rb-podcast-source.c
+++ b/podcast/rb-podcast-source.c
@@ -1584,7 +1584,7 @@ impl_constructed (GObject *object)
GDK_ACTION_COPY | GDK_ACTION_MOVE);
/* set up toolbar */
- source->priv->toolbar = rb_source_toolbar_new (RB_SOURCE (source), ui_manager);
+ source->priv->toolbar = rb_source_toolbar_new (RB_DISPLAY_PAGE (source), ui_manager);
rb_source_toolbar_add_search_entry (source->priv->toolbar, "/PodcastSourceSearchMenu", NULL);
/* pack the feed and post views into the source */
diff --git a/sources/rb-auto-playlist-source.c b/sources/rb-auto-playlist-source.c
index 680ed49..bd799ed 100644
--- a/sources/rb-auto-playlist-source.c
+++ b/sources/rb-auto-playlist-source.c
@@ -305,7 +305,7 @@ rb_auto_playlist_source_constructed (GObject *object)
/* set up toolbar */
g_object_get (source, "shell", &shell, NULL);
g_object_get (shell, "ui-manager", &ui_manager, NULL);
- priv->toolbar = rb_source_toolbar_new (RB_SOURCE (source), ui_manager);
+ priv->toolbar = rb_source_toolbar_new (RB_DISPLAY_PAGE (source), ui_manager);
rb_source_toolbar_add_search_entry (priv->toolbar, "/AutoPlaylistSourceSearchMenu", NULL);
g_object_unref (ui_manager);
diff --git a/sources/rb-browser-source.c b/sources/rb-browser-source.c
index e135a1b..253f897 100644
--- a/sources/rb-browser-source.c
+++ b/sources/rb-browser-source.c
@@ -410,7 +410,7 @@ rb_browser_source_constructed (GObject *object)
gtk_paned_pack2 (GTK_PANED (paned), GTK_WIDGET (source->priv->songs), TRUE, FALSE);
/* set up toolbar */
- source->priv->toolbar = rb_source_toolbar_new (RB_SOURCE (source), ui_manager);
+ source->priv->toolbar = rb_source_toolbar_new (RB_DISPLAY_PAGE (source), ui_manager);
rb_source_toolbar_add_search_entry (source->priv->toolbar, "/BrowserSourceSearchMenu", NULL);
content = gtk_grid_new ();
diff --git a/sources/rb-static-playlist-source.c b/sources/rb-static-playlist-source.c
index 8cede31..395a438 100644
--- a/sources/rb-static-playlist-source.c
+++ b/sources/rb-static-playlist-source.c
@@ -359,7 +359,7 @@ rb_static_playlist_source_constructed (GObject *object)
gtk_paned_pack2 (GTK_PANED (paned), GTK_WIDGET (songs), TRUE, FALSE);
/* set up search box / toolbar */
- priv->toolbar = rb_source_toolbar_new (RB_SOURCE (source), ui_manager);
+ priv->toolbar = rb_source_toolbar_new (RB_DISPLAY_PAGE (source), ui_manager);
rb_source_toolbar_add_search_entry (priv->toolbar, "/StaticPlaylistSourceSearchMenu", NULL);
g_object_unref (ui_manager);
diff --git a/widgets/rb-source-toolbar.c b/widgets/rb-source-toolbar.c
index 893db84..63d4ca6 100644
--- a/widgets/rb-source-toolbar.c
+++ b/widgets/rb-source-toolbar.c
@@ -386,7 +386,7 @@ rb_source_toolbar_class_init (RBSourceToolbarClass *klass)
g_param_spec_object ("source",
"source",
"RBSource instance",
- RB_TYPE_SOURCE,
+ RB_TYPE_DISPLAY_PAGE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
/**
* RBSourceToolbar:ui-manager:
@@ -405,21 +405,21 @@ rb_source_toolbar_class_init (RBSourceToolbarClass *klass)
/**
* rb_source_toolbar_new:
- * @source: a #RBSource
+ * @page: a #RBDisplayPage
* @ui_manager: the #GtkUIManager
*
- * Creates a new source toolbar for @source. The toolbar does not
+ * Creates a new source toolbar for @page. The toolbar does not
* initially include a search entry. Call #rb_source_toolbar_add_search_entry
* to add one. The toolbar content comes from the @RBSource:toolbar-path property.
*
* Return value: the #RBSourceToolbar
*/
RBSourceToolbar *
-rb_source_toolbar_new (RBSource *source, GtkUIManager *ui_manager)
+rb_source_toolbar_new (RBDisplayPage *page, GtkUIManager *ui_manager)
{
GObject *object;
object = g_object_new (RB_TYPE_SOURCE_TOOLBAR,
- "source", source,
+ "source", page,
"ui-manager", ui_manager,
"column-spacing", 6,
"column-homogeneous", TRUE,
diff --git a/widgets/rb-source-toolbar.h b/widgets/rb-source-toolbar.h
index 2e35c78..0095a30 100644
--- a/widgets/rb-source-toolbar.h
+++ b/widgets/rb-source-toolbar.h
@@ -59,7 +59,7 @@ struct _RBSourceToolbarClass
GType rb_source_toolbar_get_type (void);
-RBSourceToolbar *rb_source_toolbar_new (RBSource *source,
+RBSourceToolbar *rb_source_toolbar_new (RBDisplayPage *page,
GtkUIManager *ui_manager);
void rb_source_toolbar_add_search_entry (RBSourceToolbar *toolbar,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]