Re: [Rhythmbox-devel] plugin development

On Tue, Aug 05, 2008 at 12:59:41AM +0400, Alexander Kraev wrote:
> Hello all,
> I am developing a plugin for one of social networks(just a home project  
> for myself and friends). I almost do not know Python, but it seems that  
> I can study it faster than GObject or Vala. I have a one question about  
> plugin development for Rhythmbox on Pyton.
> I have reviewed the source code of few plugins and, in principle, I  
> understand the logic of Pyton plugin system. But most of the existed  
> plugins using BrowserSource work with a list of already prepared tracks  
> from remote files or something else. The essence of my plugin - do  
> search in the remote database and use the response to fill the track  
> list of BrowserSource. The problem is that the search bar of  
> BrowserSource is connected to the track list already filled with tracks  
> and I don't know how to change the behaviour of search bar.

You can do this by subclassing BrowserSource and overriding the
'do_impl_search' method.  The only parameter to this method is the text
that the user has typed in the search box.  This method can be called
multiple times while the user is typing in the search box, so you might
need to limit the query rate or add an extra delay there.

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