[rhythmbox] Link podcast plugin menus



commit 38e6447310956a0aa40f78cf0b9f55e131cbe0fd
Author: vrishab <vrishab in gmail com>
Date:   Thu Nov 3 22:17:27 2016 +1000

    Link podcast plugin menus
    
    https://bugzilla.gnome.org/show_bug.cgi?id=773858

 podcast/rb-podcast-source.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/podcast/rb-podcast-source.c b/podcast/rb-podcast-source.c
index 7326617..6beb0a2 100644
--- a/podcast/rb-podcast-source.c
+++ b/podcast/rb-podcast-source.c
@@ -1295,6 +1295,7 @@ impl_constructed (GObject *object)
        GtkAccelGroup *accel_group;
        GtkBuilder *builder;
        GMenu *section;
+       GApplication *app;
        GActionEntry actions[] = {
                { "podcast-add", podcast_add_action_cb },
                { "podcast-download", podcast_download_action_cb },
@@ -1305,6 +1306,7 @@ impl_constructed (GObject *object)
                { "podcast-feed-delete", podcast_feed_delete_action_cb }
        };
 
+       app = g_application_get_default ();
        RB_CHAIN_GOBJECT_METHOD (rb_podcast_source_parent_class, constructed, object);
        source = RB_PODCAST_SOURCE (object);
 
@@ -1315,11 +1317,14 @@ impl_constructed (GObject *object)
                      "accel-group", &accel_group,
                      NULL);
 
-       _rb_add_display_page_actions (G_ACTION_MAP (g_application_get_default ()), G_OBJECT (shell), actions, 
G_N_ELEMENTS (actions));
+       _rb_add_display_page_actions (G_ACTION_MAP (app), G_OBJECT (shell), actions, G_N_ELEMENTS (actions));
 
        builder = rb_builder_load ("podcast-popups.ui", NULL);
        source->priv->feed_popup = G_MENU_MODEL (gtk_builder_get_object (builder, "podcast-feed-popup"));
        source->priv->episode_popup = G_MENU_MODEL (gtk_builder_get_object (builder, 
"podcast-episode-popup"));
+       rb_application_link_shared_menus (RB_APPLICATION (app), G_MENU (source->priv->feed_popup));
+       rb_application_link_shared_menus (RB_APPLICATION (app), G_MENU (source->priv->episode_popup));
+
        g_object_ref (source->priv->feed_popup);
        g_object_ref (source->priv->episode_popup);
        g_object_unref (builder);


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