[Rhythmbox-devel] rb applet
- From: William Jon McCann <mccannwj pha jhu edu>
- To: rhythmbox-devel gnome org
- Subject: [Rhythmbox-devel] rb applet
- Date: Wed, 10 Sep 2003 20:07:30 -0400
Hi,
I have made an attempt at creating a panel applet for rhythmbox. It
seems to work fairly well considering this is a first try.
<http://acs.pha.jhu.edu/~mccannwj/rhythmbox/rb-applet-0.1.tar>
This code drops into the top level of HEAD and the build is enabled by
the attached patch.
There are two known issues:
* There doesn't seem to be an easy way to determine if RB is paused.
From the IDL:
long getPlayingTime (); /* returns -1 if not playing */
But when a song is paused the playing time just stays the same, and is
positive.
This makes it hard to update the play/pause button state.
* When the applet is added to the panel, RB will restart after it is exited.
Please let me know what you think. This is my first applet so be kind ;).
Jon
PS. I used the GNOME-cdplayer-applet code as a template so things
shouldn't be too wierd.
Index: configure.ac
===================================================================
RCS file: /cvs/gnome/rhythmbox/configure.ac,v
retrieving revision 1.37
diff -u -r1.37 configure.ac
--- configure.ac 7 Sep 2003 21:12:25 -0000 1.37
+++ configure.ac 10 Sep 2003 23:39:49 -0000
@@ -368,6 +368,12 @@
AC_DEFINE_UNQUOTED(SHARE_UNINSTALLED_DIR,"`pwd`/data",[path to source data dir])
AC_SUBST(DATADIR_UNINST)
+dnl applet support
+PKG_CHECK_MODULES(GNOME_APPLETS, [libpanelapplet-2.0], build_applet=true,
+ AC_MSG_WARN([libpanelapplet-2.0.pc not found. Not building applet.]))
+AC_SUBST(GNOME_APPLETS_CFLAGS)
+AC_SUBST(GNOME_APPLETS_LIBS)
+
AC_OUTPUT([
Makefile
rhythmdb/Makefile
@@ -393,6 +399,7 @@
help/C/Makefile
po/Makefile.in
component/Makefile
+applet/Makefile
rhythmbox.spec
])
Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/rhythmbox/Makefile.am,v
retrieving revision 1.28
diff -u -r1.28 Makefile.am
--- Makefile.am 9 Sep 2003 07:40:45 -0000 1.28
+++ Makefile.am 10 Sep 2003 23:39:49 -0000
@@ -2,7 +2,7 @@
AUTOMAKE_OPTIONS = 1.7
-SUBDIRS = lib rhythmdb monkey-media sources library iradio corba shell data po tests component help
+SUBDIRS = lib rhythmdb monkey-media sources library iradio corba shell data po tests component help applet
EXTRA_DIST = \
autogen.sh \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]