GNOME Bugzilla – Bug 117083
Dashboard interface for rhythmbox
Last modified: 2004-12-22 21:47:04 UTC
The totally cool dashboard application should know what 'rb' is doing, by the sending of 'cluepackets' to dashboard. I am working on a patch to do this. There is a second part of this issue, where the entries in dashboard should be able to trigger the playing of songs in rb.
Created attachment 18182 [details] Header file for dashboard support
Created attachment 18183 [details] [review] Main processing file for dashboard support
Created attachment 18184 [details] [review] Patch for existing code modules
This is an initial patch for phase 1 (sending cluepackets). The conditional build stuff might be rubbish, so look out!
Created attachment 18260 [details] Diff for existing dashboard code.
Created attachment 18261 [details] New backend for rhythmbox views in dashboard, should go in /backends
Created attachment 18262 [details] Additional image - goes in /engine/images
Created attachment 18263 [details] [review] Improved patch for rb, with the cluepackets sent at the start of play.
I don't really quite understand where each of these components are supposed to go, and I don't have Dashboard installed right now, so I don't have an easy way to test this. Do you have CVS access? If not you really should. Send an email to cvsmaster@gnome.org, and please tell them that I asked for this.
Colin - the 'c' code belongs in rhythmbox, this just sends a message to dashboard (via a socket that will fail gracefully when dashboard isn't running, so there are no external dependencies). the 'cs' (mono) modules belong in dashboard, but I have put them in this bug to keep them all together.
Patches attached send artist, album, title and genre clues to dashboard, and the dashboard backend will make the rhythmbox library available to be searched.
Created attachment 22176 [details] [review] Rhythmbox patch to send clues
Created attachment 22177 [details] [review] Dashboard backend
Screenshot at: http://www.leewillis.co.uk/dashboard/Screenshot.png
In file included from rb-shell-player.c:62: dashboard-frontend.c: In function `dashboard_connect_with_timeout': dashboard-frontend.c:49: warning: implicit declaration of function `bzero' dashboard-frontend.c:82: warning: implicit declaration of function `getdtablesize' rb-shell-player.c: At top level: dashboard-frontend.c:182: warning: `dashboard_send_raw_cluepacket_sync' defined but not used dashboard-frontend.c:381: warning: `dashboard_build_cluepacket' defined but not used distcc[9063] ERROR: compile on localhost failed
Also, it might be nice to have the ability to disable this with --disable-dashboard at configure time. Please re-add the PATCH keyword when you add an updated patch. Thanks!
Oh, and one other thing - I don't like at all how the backend parses rhythmdb.xml itself. I can't guarantee that won't change. Can C# talk to Bonobo? If so, you could work on extending the current Rhythmbox Bonobo API to support the kinds of queries you're doing.
Amended path to cover: - configure option - fix compile warnings - rename dashboard file - add a rb_shell_player_sync_with_source (player) and rb_shell_player_sync_buttons (player) I'm not sure about: - The autoconf stuff, it seems to work but there may be better ways of doing it - The following change: --- shell/Makefile.am 16 Dec 2003 15:37:00 -0000 1.36 +++ shell/Makefile.am 19 Dec 2003 09:31:40 -0000 @@ -85,7 +85,7 @@ -DDATADIR=\""$(datadir)"\" \ $(WARN_CFLAGS) \ $(RHYTHMBOX_CFLAGS) \ - -D_XOPEN_SOURCE + -D_GNU_SOURCE Unfortunately without it the function getdtablesize() is undefined and I don't know an alternative? Does this matter?
Created attachment 22556 [details] [review] Revised patch
On the backend issue, short term I think checking for the version number in rhythmdb.xml would be a resonable fix, I've submitted a patch for that to dashboard ... <rhythmdb version="1.0"> I agree, that we need to thinkabout other methods longer term ..
Ok, this has been merged into rhythmbox--mainline--0.6--patch-378, and rhythmbox--mainline--0.7--patch-91. I changed -D_GNU_SOURCE to -D_BSD_SOURCE. _GNU_SOURCE pulls in a lot of GNU-specific stuff that unfortunately we can't depend on. _BSD_SOURCE should be relatively portable. I also renamed "rb-dashboard.c" to just "dashboard.c", since it's not really our source. I also added an arch-tag. Otherwise, looks good. I haven't been able to test it, so if you could just confirm it works, that'd be good. Thanks!