Re: [Rhythmbox-devel] Patches for iTunes music share browsing



On Sun, 2005-07-31 at 05:48 -0400, Charles Schmidt wrote: 
> Hi all,
> 
> The attached patches are those I've developed to get browsing of iTunes
> music shares working in Rhythmbox.

Cool!

> shell/rb-shell.c/h:
> * In rb_shell_construct, there is now a check for the validity of the
> sources returned from the known_sources function array.  This is the
> simplest place to insert a function like rb_daap_sources_init() which
> sets up monitoring for daap sources to add to the source list later.

Ah...hm.  Maybe we should have a more generic "Plugin" concept, and a
plugin can create sources.  Does that make sense to you?

> Since this function won't actually create an RBSource, it returns NULL
> and rb_shell_construct catches that.
> * There is a new function array known_source_shutdowns[] to compliment
> the known_sources function array.  Its purpose is to call functions to
> shutdown sources, like rb_daap_sources_shutdown() which stops monitoring
> for daap sources.  

I think this would probably go in the plugin API too.

> The array is iterated in rb_shell_finalize().
> * rb_shell_append_source is no longer static, so that other parts of the
> RB code can add sources to the list (for example, a timeout function
> monitoring daap servers).
> 
> * rb_shell_append_source now takes a RBSource *parent argument, which is
> NULL in the case of adding a toplevel source.  This is so sources can
> have children (playlists within a daap server/ipod).

Makes sense.

> * rb_shell_select_internal now fires off rb_source_deactivate and
> rb_source_activate to the proper sources.  This is so a source can know
> when it is activated (daap source told to connect to the server & fetch
> data)

Makes sense too.

> * Sources can now be disconnected.  There changes to provide a UI hook
> for disconnecting sources.

Hm...disconnecting is different from removing?

> Changes in daap.diff

I'll take a look at this next; let's try to get the core changes in this
week first.

Looking through the core diff:

> +       { "SourceDisconnect", GTK_STOCK_DISCONNECT, N_("_Disconnect"),
> NULL, 
> +         N_("Disconnect from selected source"), 
> +         G_CALLBACK (rb_shell_cmd_source_disconnect) },

Can you explain what this is for?  Why do you need to disconnect from
shares?

> +       rb_source_activate(shell->priv->selected_source);

Don't forget the space before parens :)

> +       SourcePath *sp = g_new0(SourcePath,1);

Could probably just stack allocate this; not a big deal though.


Attachment: signature.asc
Description: This is a digitally signed message part



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