Re: [Rhythmbox-devel] How to add an entry to a source?



On Fri, May 7, 2010 at 12:22 AM, Jannik Heller <scrawl baseoftrash de> wrote:
> Thanks, it works!
>
> Next question: How do I add a context menu to the source? Here is my
> current code, it's "inspired" by the jamendo code, but something seems
> to be missing

Yes, you're missing the code to display the menu. Since you're using a
browser source, you can just implement the 'impl_show_entry_popup'
method in your source, something like this:

    def do_impl_show_entry_popup(self):
        self.show_source_popup("/DuplicateSourceViewPopup")

If you weren't using a browser source, you'd need to do this in a
handler for the 'show-popup' signal from your entry view widget.

This type of thing should be covered somewhere in the plugin writing
guide (http://live.gnome.org/RhythmboxPlugins/WritingGuide) but I
can't get to it at the moment. When live.gnome.org comes back, please
check if it's there, and if not, add it there or on the linked
examples page.


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