[Goodies-commits] r3235 - / xfmedia-remote-plugin xfmedia-remote-plugin/trunk xfmedia-remote-plugin/trunk/panel-plugin xfmedia-remote-plugin/trunk/po

Pasi Orovuo pasi at xfce.org
Wed Sep 19 00:48:43 CEST 2007


Author: pasi
Date: 2007-09-18 22:48:42 +0000 (Tue, 18 Sep 2007)
New Revision: 3235

Added:
   xfmedia-remote-plugin/
   xfmedia-remote-plugin/branches/
   xfmedia-remote-plugin/tags/
   xfmedia-remote-plugin/trunk/
   xfmedia-remote-plugin/trunk/AUTHORS
   xfmedia-remote-plugin/trunk/COPYING
   xfmedia-remote-plugin/trunk/ChangeLog
   xfmedia-remote-plugin/trunk/INSTALL
   xfmedia-remote-plugin/trunk/Makefile.am
   xfmedia-remote-plugin/trunk/NEWS
   xfmedia-remote-plugin/trunk/README
   xfmedia-remote-plugin/trunk/TODO
   xfmedia-remote-plugin/trunk/autogen.sh
   xfmedia-remote-plugin/trunk/configure.ac
   xfmedia-remote-plugin/trunk/panel-plugin/
   xfmedia-remote-plugin/trunk/panel-plugin/Makefile.am
   xfmedia-remote-plugin/trunk/panel-plugin/xfmedia-remote-plugin.c
   xfmedia-remote-plugin/trunk/panel-plugin/xfmedia-remote.c
   xfmedia-remote-plugin/trunk/panel-plugin/xfmedia-remote.desktop.in.in
   xfmedia-remote-plugin/trunk/panel-plugin/xfmedia-remote.h
   xfmedia-remote-plugin/trunk/po/
   xfmedia-remote-plugin/trunk/po/ChangeLog
   xfmedia-remote-plugin/trunk/po/POTFILES.in
   xfmedia-remote-plugin/trunk/po/fi.po
Log:
Import of version 0.2.2

Added: xfmedia-remote-plugin/trunk/AUTHORS
===================================================================
--- xfmedia-remote-plugin/trunk/AUTHORS	                        (rev 0)
+++ xfmedia-remote-plugin/trunk/AUTHORS	2007-09-18 22:48:42 UTC (rev 3235)
@@ -0,0 +1,2 @@
+Pasi Orovuo <pasi.ov at gmail.com>
+

Added: xfmedia-remote-plugin/trunk/COPYING
===================================================================
--- xfmedia-remote-plugin/trunk/COPYING	                        (rev 0)
+++ xfmedia-remote-plugin/trunk/COPYING	2007-09-18 22:48:42 UTC (rev 3235)
@@ -0,0 +1,340 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.

Added: xfmedia-remote-plugin/trunk/ChangeLog
===================================================================
--- xfmedia-remote-plugin/trunk/ChangeLog	                        (rev 0)
+++ xfmedia-remote-plugin/trunk/ChangeLog	2007-09-18 22:48:42 UTC (rev 3235)
@@ -0,0 +1,29 @@
+2007-09-09	Pasi Orovuo	<pasi.ov at gmail.com>
+			* Fix compilation error with new DBUS versions
+
+2005-10-16  Pasi Orovuo <pasi.ov at gmail.com>
+			* Fix potential crash in D-BUS handling
+			* Fix D-BUS errors caused by non-utf8 strings
+			* Make curretly playing song appear bolded in the menu
+
+2005-10-15  Pasi Orovuo <pasi.ov at gmail.com>
+			* Fix the delay on playing a selected track
+			* Disable settings dialog when it's redundant (flaky
+			Xmedia/dbus combination)
+
+2005-10-14	Pasi Orovuo <pasi.ov at gmail.com>
+			* Add track now handles multiple files
+			* Reduced functionality on Xfmedia 0.9.x with new D-BUS (>=0.31)
+			because of problems (no add track, load/save/clear playlist)
+			* Show playlist in menu setting
+			* Hidden setting for number of Xfmedia instances to probe
+
+2005-10-10	Pasi Orovuo <pasi.ov at gmail.com>
+			* Add support for the 4.4 panel api
+
+2005-07-18	Pasi Orovuo <pasi.ov at gmail.com>
+			* Fix compilation problem with dbus 0.34
+
+2005-07-14	Pasi Orovuo <pasi.ov at gmail.com>
+			* New file
+

Added: xfmedia-remote-plugin/trunk/INSTALL
===================================================================
--- xfmedia-remote-plugin/trunk/INSTALL	                        (rev 0)
+++ xfmedia-remote-plugin/trunk/INSTALL	2007-09-18 22:48:42 UTC (rev 3235)
@@ -0,0 +1,234 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006 Free Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about.  Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+Installation Names
+==================
+
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+     Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+

Added: xfmedia-remote-plugin/trunk/Makefile.am
===================================================================
--- xfmedia-remote-plugin/trunk/Makefile.am	                        (rev 0)
+++ xfmedia-remote-plugin/trunk/Makefile.am	2007-09-18 22:48:42 UTC (rev 3235)
@@ -0,0 +1,25 @@
+ at SET_MAKE@
+
+SUBDIRS = \
+	panel-plugin \
+	po
+
+distclean-local:
+	rm -rf *.cache *~
+
+dist-bz2: dist
+	zcat $(PACKAGE)-$(VERSION).tar.gz | bzip2 --best -c > $(PACKAGE)-$(VERSION).tar.bz2
+
+distcheck-bz2: distcheck
+	zcat $(PACKAGE)-$(VERSION).tar.gz | bzip2 --best -c > $(PACKAGE)-$(VERSION).tar.bz2
+
+EXTRA_DIST = \
+	intltool-extract.in \
+	intltool-merge.in \
+	intltool-update.in
+
+DISTCLEANFILES = \
+	intltool-extract \
+	intltool-merge \
+	intltool-update
+

Added: xfmedia-remote-plugin/trunk/NEWS
===================================================================
--- xfmedia-remote-plugin/trunk/NEWS	                        (rev 0)
+++ xfmedia-remote-plugin/trunk/NEWS	2007-09-18 22:48:42 UTC (rev 3235)
@@ -0,0 +1,16 @@
++---------------------------+
+|   Xfmedia Remote Plugin   |
++---------------------------+
+
+Version 0.2.0:
+    Bugfixes:
+        * A lot.
+        
+    Features:
+        * Playlist management
+
+
+
+Version 0.1.n:
+    Initial release
+

Added: xfmedia-remote-plugin/trunk/README
===================================================================
--- xfmedia-remote-plugin/trunk/README	                        (rev 0)
+++ xfmedia-remote-plugin/trunk/README	2007-09-18 22:48:42 UTC (rev 3235)
@@ -0,0 +1,27 @@
++---------------------------+
+|   Xfmedia Remote Plugin   |
++---------------------------+
+
+About
+=============================
+Xfmedia Remote Plugin is a plugin for Xfce 4 Panel which enables
+controlling Xfmedia, a all-around media player for Xfce 4, via
+the panel. The plugin was written by Pasi Orovuo <pasi.ov at gmail.com>.
+
+Features
+=============================
+ * Simple playlist management
+ * Playlist menu
+ * Multiple Xfmedia instances
+ * Now playing tooltip
+
+Requirements
+=============================
+ * Xfmedia 0.9.0 or newer
+ * D-BUS 0.22 or newer
+ * Xfce 4 Panel 4.2.0 or newer
+
+NOTE:
+There is certain combination of Xfmedia and D-BUS versions, on which
+the plugin has a very limited functionality (i.e. no playlist management).
+

Added: xfmedia-remote-plugin/trunk/TODO
===================================================================
--- xfmedia-remote-plugin/trunk/TODO	                        (rev 0)
+++ xfmedia-remote-plugin/trunk/TODO	2007-09-18 22:48:42 UTC (rev 3235)
@@ -0,0 +1,3 @@
+
+The panel hangs while the playlist submenu is being populated.
+

Added: xfmedia-remote-plugin/trunk/autogen.sh
===================================================================
--- xfmedia-remote-plugin/trunk/autogen.sh	                        (rev 0)
+++ xfmedia-remote-plugin/trunk/autogen.sh	2007-09-18 22:48:42 UTC (rev 3235)
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# $Id: autogen.sh 13265 2005-03-12 04:15:08Z brian $
+#
+# Copyright (c) 2002-2005
+#         The Xfce development team. All rights reserved.
+#
+# Written for Xfce by Benedikt Meurer <benny at xfce.org>.
+#
+
+(type xdt-autogen) >/dev/null 2>&1 || {
+  cat >&2 <<EOF
+autogen.sh: You don't seem to have the Xfce development tools installed on
+            your system, which are required to build this software.
+            Please install the xfce4-dev-tools package first, it is available
+            from http://www.xfce.org/.
+EOF
+  exit 1
+}
+
+exec xdt-autogen $@
+
+# vi:set ts=2 sw=2 et ai:


Property changes on: xfmedia-remote-plugin/trunk/autogen.sh
___________________________________________________________________
Name: svn:executable
   + 

Added: xfmedia-remote-plugin/trunk/configure.ac
===================================================================
--- xfmedia-remote-plugin/trunk/configure.ac	                        (rev 0)
+++ xfmedia-remote-plugin/trunk/configure.ac	2007-09-18 22:48:42 UTC (rev 3235)
@@ -0,0 +1,64 @@
+dnl configure.ac
+dnl
+dnl xfmedia-remote-plugin - Xfce4 panel plugin for Xfmedia remote control
+dnl 
+
+AC_INIT([xfmedia-remote-plugin], [0.2.2], [pasi.ov at gmail.com])
+AC_PREREQ([2.5.0])
+AM_INIT_AUTOMAKE()
+AM_CONFIG_HEADER([config.h])
+AM_MAINTAINER_MODE
+
+AC_AIX
+AC_ISC_POSIX
+AC_MINIX
+
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AC_PROG_INSTALL
+AC_PROG_INTLTOOL([0.31], [no-xml])
+
+AC_HEADER_STDC
+AC_CHECK_HEADERS(string.h)
+
+XDT_I18N([fi])
+
+XDT_CHECK_LIBX11_REQUIRE
+
+XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.4.0])
+XDT_CHECK_PACKAGE([GOBJECT], [gobject-2.0], [2.4.0])
+XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.4.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.2.0])
+XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.2.0])
+
+dnl For now we just fetch the CFLAGS (for includes)
+XDT_CHECK_OPTIONAL_PACKAGE([XFMEDIA], [xfmedia-plugin], [0.10.0])
+if test "x$XFMEDIA_FOUND" != "xyes"; then
+    XDT_CHECK_PACKAGE([XFMEDIA], [xfmedia-plugin], [0.9.0])
+    AC_DEFINE([XFMEDIA_TOO_OLD], [1], [Old xfmedia])
+fi
+
+XDT_CHECK_OPTIONAL_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.3.22])
+if test "x$LIBXFCE4PANEL_FOUND" != "xyes"; then
+    XDT_XFCE_PANEL_PLUGIN([XFCE4_PANEL], [4.2.0])
+    AC_DEFINE([HAVE_OLD_PANEL], [1], [Use old panel api])
+fi
+AM_CONDITIONAL([BUILD_OLD_PANEL_PLUGIN], [test "x$LIBXFCE4PANEL_FOUND" != "xyes"])
+
+dnl check for dbus
+XDT_CHECK_OPTIONAL_PACKAGE([DBUS], [dbus-glib-1], [0.31], [dbus],
+                           [D-BUS (new api)], [yes])
+dnl AM_CONDITIONAL([BUILD_WITH_OLD_DBUS], [test "x$DBUS_FOUND" != "xyes"])
+if test "x$DBUS_FOUND" != "xyes"; then
+    XDT_CHECK_PACKAGE([DBUS], [dbus-glib-1], [0.22])
+    AC_DEFINE([DBUS_USE_OLD_API], [1], [Use old D-BUS api])
+fi
+
+BM_DEBUG_SUPPORT
+
+AC_OUTPUT([
+Makefile
+panel-plugin/Makefile
+po/Makefile.in
+])
+

Added: xfmedia-remote-plugin/trunk/panel-plugin/Makefile.am
===================================================================
--- xfmedia-remote-plugin/trunk/panel-plugin/Makefile.am	                        (rev 0)
+++ xfmedia-remote-plugin/trunk/panel-plugin/Makefile.am	2007-09-18 22:48:42 UTC (rev 3235)
@@ -0,0 +1,75 @@
+
+if BUILD_OLD_PANEL_PLUGIN
+
+plugindir = @XFCE4_PANEL_PLUGINSDIR@
+plugin_LTLIBRARIES = libxfmedia-remote.la
+
+libxfmedia_remote_la_LDFLAGS = \
+	-avoid-version \
+	-export-dynamic \
+	-module
+
+libxfmedia_remote_la_SOURCES = \
+	xfmedia-remote.h \
+	xfmedia-remote.c \
+	xfmedia-remote-plugin.c
+
+libxfmedia_remote_la_CFLAGS = \
+	@XFCE4_PANEL_CFLAGS@ \
+	@DBUS_CFLAGS@ \
+	@XFMEDIA_CFLAGS@ \
+	-DLOCALEDIR=\"$(localedir)\"
+
+libxfmedia_remote_la_LIBADD = \
+	@XFCE4_PANEL_LIBS@ \
+	@DBUS_LIBS@
+
+else
+
+plugindir = $(libexecdir)/xfce4/panel-plugins
+plugin_PROGRAMS = xfmedia-remote-plugin
+
+xfmedia_remote_plugin_SOURCES = \
+	xfmedia-remote.h \
+	xfmedia-remote.c \
+	xfmedia-remote-plugin.c
+
+xfmedia_remote_plugin_CFLAGS = \
+	@LIBXFCE4PANEL_CFLAGS@ \
+	@DBUS_CFLAGS@ \
+	@XFMEDIA_CFLAGS@ \
+	-DLOCALEDIR=\"$(localedir)\"
+
+xfmedia_remote_plugin_LDFLAGS = \
+	@LIBXFCE4PANEL_LIBS@ \
+	@DBUS_LIBS@
+
+
+# .desktop file
+#
+# Some automake trickery here. Because we cannot use $(libexecdir) in the
+# automake stage, we'll use sed to get the full path into the .desktop file.
+# We also need to let intltool merge the translated fields, so we add an
+# additional level of indirection: a <name>.desktop.in.in file.
+#
+
+desktop_in_in_files = xfmedia-remote.desktop.in.in
+desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in)
+
+desktopdir = $(datadir)/xfce4/panel-plugins
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+ at INTLTOOL_DESKTOP_RULE@
+
+# get full path into .desktop file
+%.desktop.in: %.desktop.in.in
+	sed -e "s^@PLUGIN_PATH@^$(libexecdir)/xfce4/panel-plugins^"     \
+		$< > $@
+
+EXTRA_DIST =                                \
+	$(desktop_in_in_files)
+	
+DISTCLEANFILES =                            \
+    $(desktop_DATA) $(desktop_in_files)
+
+endif
+

Added: xfmedia-remote-plugin/trunk/panel-plugin/xfmedia-remote-plugin.c
===================================================================
--- xfmedia-remote-plugin/trunk/panel-plugin/xfmedia-remote-plugin.c	                        (rev 0)
+++ xfmedia-remote-plugin/trunk/panel-plugin/xfmedia-remote-plugin.c	2007-09-18 22:48:42 UTC (rev 3235)
@@ -0,0 +1,1409 @@
+/* 
+ *  Xfmedia Remote Plugin - Xfmedia Remote Control Plugin for Xfce4 Panel
+ *  Copyright (C) 2005  Pasi Orovuo <pasi.ov at gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <glib.h>
+#include <glib-object.h>
+
+#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4util/libxfce4util.h>
+
+#ifdef HAVE_OLD_PANEL
+#include <panel/plugins.h>
+#include <panel/xfce.h>
+#include <stdlib.h>
+#else
+#include <libxfce4panel/xfce-panel-plugin.h>
+#endif
+
+#include "xfmedia-remote.h"
+
+#define BORDER_WIDTH            8
+#define MAX_XFMEDIA_INSTANCES   4
+#define LIST_CACHE_TIME         ( 1000 * 2 )
+/* Cache instance information for 5 seconds */
+#define INSTANCE_CACHE_TIME     ( 1000 * 5 )
+
+
+#if LIBXFCEGUI4_CHECK_VERSION( 4, 3, 4 ) && XFCE_DISABLE_DEPRECATED
+#ifdef XFCE_FILE_CHOOSER
+#undef XFCE_FILE_CHOOSER
+#endif
+#define XFCE_FILE_CHOOSER GTK_FILE_CHOOSER
+
+#define xfce_file_chooser_new gtk_file_chooser_dialog_new
+#define xfce_file_chooser_get_filename gtk_file_chooser_get_filename
+#define xfce_file_chooser_set_select_multiple gtk_file_chooser_set_select_multiple
+#define xfce_file_chooser_get_filenames gtk_file_chooser_get_filenames
+#endif
+
+typedef struct _TrackAddList TrackAddList;
+typedef struct _TrackPlayInfo TrackPlayInfo;
+typedef struct _PlaybackActionInfo PlaybackActionInfo;
+typedef struct _XfmediaRemoteInstance XfmediaRemoteInstance;
+typedef struct _XfmediaPanelPlugin XfmediaPanelPlugin;
+
+struct _TrackAddList {
+    guint           evsrc;
+    gint            instance_no;
+    GSList          *list;
+    GSList          *current;
+};
+
+struct _TrackPlayInfo {
+    XfmediaPanelPlugin  *plugin;
+    guint               index;
+    guint               instance;
+};
+
+struct _PlaybackActionInfo {
+    XfmediaRemoteInstance   *instance;
+    gboolean (*remote_cb)( XfmediaRemote *remote );
+};
+
+struct _XfmediaRemoteInstance {
+    gint            no;
+    guint32         atime;
+    gchar           *now_playing;
+    gint            now_playing_index;
+    XfmediaRemote   *remote;
+};
+
+struct _XfmediaPanelPlugin {
+    GtkWidget       *evbox;
+    GtkWidget       *image;
+    GdkPixbuf       *pixbuf;
+
+    GtkTooltips     *tooltip;
+    GtkWidget       *menu;
+
+    guint32         atime;
+    XfmediaRemoteInstance   **remote_list;
+    guint           max_instances;
+    
+    gboolean        show_playlist;
+
+    /* Currently open dialog */
+    GtkWidget       *dialog;
+
+    TrackAddList    *add_list;
+};
+
+static gboolean
+plugin_playback_action_cb( PlaybackActionInfo *info )
+{
+    info->instance->atime = 0;
+    
+    if ( !info->remote_cb( info->instance->remote ) ) {
+        g_warning( "xfmedia-remote: plugin_track_action_cb failed!" );
+    }
+
+    g_free( info );
+
+    return ( FALSE );
+}
+
+static gboolean
+plugin_play_track_cb( TrackPlayInfo *track )
+{
+    XfmediaPanelPlugin      *plugin = track->plugin;
+    XfmediaRemoteInstance   *instance = (plugin->remote_list)[track->instance];
+
+    if ( instance ) {
+        if ( !xfmedia_remote_song_play( instance->remote, track->index ) ) {
+            g_warning( "xfmedia_remote_song_play( %d, %d ) failed!", instance->no, track->index );
+        }
+
+        instance->atime = 0;
+    }
+
+    g_free( track );
+
+    return ( FALSE );
+}
+
+static void
+plugin_menu_prev_activate_cb( GtkWidget *widget, gpointer user_data )
+{
+    gint                    inst_no;
+    XfmediaPanelPlugin      *plugin = user_data;
+    PlaybackActionInfo      *info;
+
+    inst_no = GPOINTER_TO_INT( g_object_get_data( G_OBJECT( gtk_widget_get_parent( widget ) ),
+                                                  "xfmedia-instance" ) );
+    info            = g_new0( PlaybackActionInfo, 1 );
+    info->instance  = (plugin->remote_list)[inst_no];
+    info->remote_cb = xfmedia_remote_song_previous;
+
+    g_idle_add( (GSourceFunc) plugin_playback_action_cb, info );
+}
+
+static void
+plugin_menu_play_activate_cb( GtkWidget *widget, gpointer user_data )
+{
+    TrackPlayInfo           *info;
+    GtkWidget               *parent = gtk_widget_get_parent( widget );
+
+    info = g_new0( TrackPlayInfo, 1 );
+    info->plugin        = user_data;
+    info->index         = -1;
+    info->instance      = GPOINTER_TO_INT( g_object_get_data( G_OBJECT( parent ),
+                                                              "xfmedia-instance" ) );
+
+    g_idle_add( (GSourceFunc) plugin_play_track_cb, info );
+}
+
+static void
+plugin_menu_pause_activate_cb( GtkWidget *widget, gpointer user_data )
+{
+    gint                    inst_no;
+    XfmediaPanelPlugin      *plugin = user_data;
+    PlaybackActionInfo      *info;
+
+    inst_no = GPOINTER_TO_INT( g_object_get_data( G_OBJECT( gtk_widget_get_parent( widget ) ),
+                                                  "xfmedia-instance" ) );
+    info            = g_new0( PlaybackActionInfo, 1 );
+    info->instance  = (plugin->remote_list)[inst_no];
+    info->remote_cb = xfmedia_remote_song_pause;
+
+    g_idle_add( (GSourceFunc) plugin_playback_action_cb, info );
+}
+
+static void
+plugin_menu_stop_activate_cb( GtkWidget *widget, gpointer user_data )
+{
+    gint                    inst_no;
+    XfmediaPanelPlugin      *plugin = user_data;
+    PlaybackActionInfo      *info;
+
+    inst_no = GPOINTER_TO_INT( g_object_get_data( G_OBJECT( gtk_widget_get_parent( widget ) ),
+                                                  "xfmedia-instance" ) );
+    info            = g_new0( PlaybackActionInfo, 1 );
+    info->instance  = (plugin->remote_list)[inst_no];
+    info->remote_cb = xfmedia_remote_song_stop;
+
+    g_idle_add( (GSourceFunc) plugin_playback_action_cb, info );
+}
+
+static void
+plugin_menu_next_activate_cb( GtkWidget *widget, gpointer user_data )
+{
+    gint                    inst_no;
+    XfmediaPanelPlugin      *plugin = user_data;
+    PlaybackActionInfo      *info;
+
+    inst_no = GPOINTER_TO_INT( g_object_get_data( G_OBJECT( gtk_widget_get_parent( widget ) ),
+                                                  "xfmedia-instance" ) );
+    info            = g_new0( PlaybackActionInfo, 1 );
+    info->instance  = (plugin->remote_list)[inst_no];
+    info->remote_cb = xfmedia_remote_song_next;
+
+    g_idle_add( (GSourceFunc) plugin_playback_action_cb, info );
+}
+
+#if !defined( XFMEDIA_TOO_OLD ) || defined( DBUS_USE_OLD_API )
+static void _init_dialog( GtkWidget *dialog, XfmediaPanelPlugin *plugin )
+{
+    GdkPixbuf               *pb;
+    
+    plugin->dialog = dialog;
+    g_signal_connect( G_OBJECT( dialog ), "destroy",
+                      G_CALLBACK( gtk_widget_destroyed ), &(plugin->dialog) );
+
+    if ( ( pb = xfce_themed_icon_load( "xfmedia", 48 ) ) ) {
+        gtk_window_set_icon( GTK_WINDOW( dialog ), pb );
+        g_object_unref( G_OBJECT( pb ) );
+    }
+}
+
+static void
+plugin_menu_playlist_load_activate_cb( GtkWidget *widget, gpointer user_data )
+{
+    XfmediaPanelPlugin      *plugin = user_data;
+    GtkWidget               *chooser;
+
+    chooser = xfce_file_chooser_new( _( "Choose playlist to load" ),
+                                     NULL,
+                                     XFCE_FILE_CHOOSER_ACTION_OPEN,
+                                     GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+                                     GTK_STOCK_OK, GTK_RESPONSE_OK,
+                                     NULL );
+    _init_dialog( chooser, plugin );
+
+    if ( gtk_dialog_run( GTK_DIALOG( chooser ) ) == GTK_RESPONSE_OK ) {
+        gchar       *fn;
+
+        fn = xfce_file_chooser_get_filename( XFCE_FILE_CHOOSER( chooser ) );
+        if ( fn ) {
+            gint                    i;
+            XfmediaRemoteInstance   *instance;
+            
+            i = GPOINTER_TO_INT( g_object_get_data( G_OBJECT( gtk_widget_get_parent( widget ) ),
+                                                    "xfmedia-instance" ) );
+            instance = (plugin->remote_list)[i];
+
+            if ( !xfmedia_remote_playlist_load( instance->remote, fn ) ) {
+                g_warning( "xfmedia_remote_playlist_load( %d ) failed!", instance->no );
+            }
+            g_free( fn );
+        }
+    }
+    gtk_widget_destroy( chooser );
+}
+
+static void
+plugin_menu_playlist_save_activate_cb( GtkWidget *widget, gpointer user_data )
+{
+    XfmediaPanelPlugin      *plugin = user_data;
+    GtkWidget               *chooser;
+
+    chooser = xfce_file_chooser_new( _( "Save playlist" ),
+                                     NULL,
+                                     XFCE_FILE_CHOOSER_ACTION_SAVE,
+                                     GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+                                     GTK_STOCK_OK, GTK_RESPONSE_OK,
+                                     NULL );
+
+    _init_dialog( chooser, plugin );
+
+    if ( gtk_dialog_run( GTK_DIALOG( chooser ) ) == GTK_RESPONSE_OK ) {
+        gint                    i;
+        XfmediaRemoteInstance   *instance;
+        gchar                   *fn;
+
+        fn = xfce_file_chooser_get_filename( XFCE_FILE_CHOOSER( chooser ) );
+        if ( fn ) {
+            i = GPOINTER_TO_INT( g_object_get_data( G_OBJECT( gtk_widget_get_toplevel( widget ) ),
+                                                    "xfmedia-instance" ) );
+            instance = (plugin->remote_list)[i];
+
+            if ( !xfmedia_remote_playlist_save( instance->remote, fn ) ) {
+                xfce_err( _( "Failed to save playlist" ) );
+            }
+            g_free( fn );
+        }
+    }
+    gtk_widget_destroy( chooser );
+}
+
+static void
+plugin_menu_playlist_clear_activate_cb( GtkWidget *widget, gpointer user_data )
+{
+    XfmediaPanelPlugin      *plugin = user_data;
+    gint                    i;
+    XfmediaRemoteInstance   *instance;
+
+    i = GPOINTER_TO_INT( g_object_get_data( G_OBJECT( gtk_widget_get_parent( widget ) ),
+                                            "xfmedia-instance" ) );
+
+    instance = (plugin->remote_list)[i];
+
+    if ( !xfmedia_remote_playlist_clear( instance->remote ) ) {
+        g_warning( "xfmedia_remote_playlist_clear( %d ) failed!", instance->no );
+    }
+}
+
+static gboolean
+plugin_add_track_cb( gpointer data )
+{
+    XfmediaPanelPlugin  *plugin = data;
+    guint               no;
+    
+    g_assert( plugin->add_list );
+
+    no = plugin->add_list->instance_no;
+    if ( (plugin->remote_list)[no] ) {
+        XfmediaRemoteInstance   *instance = (plugin->remote_list)[no];
+
+        if ( !xfmedia_remote_playlist_add_file( instance->remote,
+                    (gchar *) plugin->add_list->current->data, -1 ) ) {
+            g_warning( "xfmedia_remote_playlist_add_file( %d ) failed!", instance->no );
+        }
+
+        g_free( plugin->add_list->current->data );
+        plugin->add_list->current = plugin->add_list->current->next;
+    }
+    else {
+        while ( plugin->add_list->current ) {
+            g_free( plugin->add_list->current->data );
+            plugin->add_list->current = plugin->add_list->current->next;
+        }
+    }
+
+    if ( !plugin->add_list->current ) {
+        g_slist_free( plugin->add_list->list );
+        g_free( plugin->add_list );
+        plugin->add_list = NULL;
+
+        return ( FALSE );
+    }
+    return ( TRUE );
+}
+        
+static void
+plugin_menu_playlist_track_add_activate_cb( GtkWidget *widget, gpointer user_data )
+{
+    XfmediaPanelPlugin      *plugin = user_data;
+    GtkWidget               *chooser;
+
+    if ( plugin->add_list ) {
+        xfce_info( _( "Please wait until the previous add operation completes." ) );
+        return;
+    }
+
+    chooser = xfce_file_chooser_new( _( "Add track(s) to playlist" ),
+                                     NULL,
+                                     XFCE_FILE_CHOOSER_ACTION_OPEN,
+                                     GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+                                     GTK_STOCK_OK, GTK_RESPONSE_OK,
+                                     NULL );
+
+    _init_dialog( chooser, plugin );
+
+    xfce_file_chooser_set_select_multiple( XFCE_FILE_CHOOSER( chooser ), TRUE );
+
+    if ( gtk_dialog_run( GTK_DIALOG( chooser ) ) == GTK_RESPONSE_OK ) {
+        GSList      *list;
+
+        list = xfce_file_chooser_get_filenames( XFCE_FILE_CHOOSER( chooser ) );
+        if ( list ) {
+            gint                    i;
+            TrackAddList            *add_list;
+            
+            i = GPOINTER_TO_INT( g_object_get_data( G_OBJECT( gtk_widget_get_parent( widget ) ),
+                                                    "xfmedia-instance" ) );
+            
+            plugin->add_list = add_list = g_new0( TrackAddList, 1 );
+            add_list->instance_no   = i;
+            add_list->list          = list;
+            add_list->current       = list;
+            add_list->evsrc         = g_idle_add( plugin_add_track_cb, plugin );
+        }
+    }
+    gtk_widget_destroy( chooser );
+}
+
+static void
+plugin_menu_playlist_track_play_activate_cb( GtkWidget *widget,
+                                             gpointer user_data )
+{
+    TrackPlayInfo           *info;
+
+    info = g_new( TrackPlayInfo, 1 );
+    info->plugin    = user_data;
+    info->index     = GPOINTER_TO_INT( g_object_get_data( G_OBJECT( widget->parent ),
+                                                          "track-index" ) );
+    info->instance  = GPOINTER_TO_INT( g_object_get_data( G_OBJECT( widget->parent ),
+                                                          "xfmedia-instance" ) );
+
+    g_idle_add( (GSourceFunc) plugin_play_track_cb, info );
+}
+
+static void
+plugin_menu_playlist_track_remove_activate_cb( GtkWidget *widget,
+                                               gpointer user_data )
+{
+    XfmediaPanelPlugin      *plugin = user_data;
+    gint                    i, track;
+    XfmediaRemoteInstance   *instance;
+
+    i = GPOINTER_TO_INT( g_object_get_data( G_OBJECT( widget->parent ),
+                                            "xfmedia-instance" ) );
+    track = GPOINTER_TO_INT( g_object_get_data( G_OBJECT( widget->parent ),
+                                                "track-index" ) );
+    instance = (plugin->remote_list)[i];
+
+    if ( !xfmedia_remote_playlist_remove_file( instance->remote, track ) ) {
+        g_warning( "xfmedia_remote_playlist_remove_file( %d, %d ) failed!", instance->no, track );
+    }
+
+}
+
+static void
+plugin_menu_playlist_show_cb( GtkWidget *playlist_menu, gpointer user_data )
+{
+    XfmediaPanelPlugin      *plugin = user_data;
+    gchar                   **playlist = NULL;
+    guint                   ntracks, i;
+    guint                   instance_no;
+    XfmediaRemoteInstance   *instance;
+
+    if ( GPOINTER_TO_INT( g_object_get_data( G_OBJECT( playlist_menu ), "playlist" ) ) ) {
+        /* Playlist already filled */
+        DBG( "Playlist menu already built" );
+        return;
+    }
+
+    instance_no = GPOINTER_TO_INT( g_object_get_data( G_OBJECT( playlist_menu ),
+                                                      "xfmedia-instance" ) );
+
+    g_assert( (plugin->remote_list)[instance_no] != NULL );
+    
+    instance = (plugin->remote_list)[instance_no];
+
+    if ( !xfmedia_remote_playlist_get( instance->remote, &playlist, &ntracks ) ) {
+        DBG( "Failed to get playlist from Xfmedia instance %d", instance->no );
+        return;
+    }
+
+    if ( ntracks ) {
+        GtkWidget       *track_menu;
+        GtkWidget       *item;
+        GtkWidget       *image;
+        gchar           *trackitem;
+
+        /* Separator */
+        item = gtk_separator_menu_item_new();
+        gtk_widget_show( item );
+        gtk_menu_shell_append( GTK_MENU_SHELL( playlist_menu ), item );
+
+        for ( i = 0; i < ntracks; i++ ) {
+            /* Song name to playlist menu */
+            trackitem = g_strdup_printf( "%.2d: %s", i + 1, playlist[i] );
+
+            item = gtk_menu_item_new_with_label( trackitem );
+
+            if ( i == instance->now_playing_index ) {
+                gchar   *markup = g_markup_printf_escaped( "<b>%s</b>", trackitem );
+             
+                gtk_label_set_markup( GTK_LABEL( GTK_BIN( item )->child ), markup );
+
+                g_free( markup );
+            }
+
+            gtk_widget_show( item );
+            gtk_menu_shell_append( GTK_MENU_SHELL( playlist_menu ), item );
+
+            g_free( trackitem );
+
+            track_menu = gtk_menu_new();
+            g_object_set_data( G_OBJECT( track_menu ),
+                               "xfmedia-instance",
+                               GINT_TO_POINTER( instance->no ) );
+            g_object_set_data( G_OBJECT( track_menu ),
+                               "track-index",
+                               GINT_TO_POINTER( i ) );
+            gtk_menu_item_set_submenu( GTK_MENU_ITEM( item ), track_menu );
+
+            /* Play */
+            item = gtk_image_menu_item_new_with_mnemonic( _( "_Play" ) );
+            g_signal_connect( G_OBJECT( item ), "activate",
+                    G_CALLBACK( plugin_menu_playlist_track_play_activate_cb ),
+                    plugin );
+            gtk_widget_show( item );
+            gtk_menu_shell_append( GTK_MENU_SHELL( track_menu ), item );
+
+            image = gtk_image_new_from_stock( GTK_STOCK_MEDIA_PLAY, GTK_ICON_SIZE_MENU );
+            gtk_widget_show( image );
+            gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM( item ), image );
+
+            /* Remove */
+            item = gtk_image_menu_item_new_with_mnemonic( _( "_Remove" ) );
+            g_signal_connect( G_OBJECT( item ),
+                              "activate",
+                              G_CALLBACK( plugin_menu_playlist_track_remove_activate_cb ),
+                              plugin );
+            gtk_widget_show( item );
+            gtk_menu_shell_append( GTK_MENU_SHELL( track_menu ), item );
+
+            image = gtk_image_new_from_stock( GTK_STOCK_REMOVE, GTK_ICON_SIZE_MENU );
+            gtk_widget_show( image );
+            gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM( item ), image );
+        }
+    }
+
+    if ( playlist ) {
+        g_strfreev( playlist );
+    }
+
+    g_object_set_data( G_OBJECT( playlist_menu ), "playlist", GINT_TO_POINTER( 1 ) );
+}
+#endif /* !defined( XFMEDIA_TOO_OLD ) || defined( DBUS_USE_OLD_API ) */
+
+static void
+plugin_menu_quit_activate_cb( GtkWidget *widget,
+                              gpointer user_data )
+{
+    XfmediaPanelPlugin      *plugin = user_data;
+    gint                    i;
+    XfmediaRemoteInstance   *instance;
+
+    i = GPOINTER_TO_INT( g_object_get_data( G_OBJECT( gtk_widget_get_parent( widget ) ),
+                                            "xfmedia-instance" ) );
+
+    instance = (plugin->remote_list)[i];
+    instance->atime = 0;
+
+    if ( !xfmedia_remote_quit( instance->remote ) ) {
+        g_warning( "xfmedia_remote_quit( %d ) failed!", instance->no );
+    }
+}
+
+static void
+plugin_menu_start_xfmedia_activate_cb( GtkWidget *widget,
+                                       gpointer user_data )
+{
+    GError      *error = NULL;
+    
+    if ( !xfce_exec( "xfmedia", FALSE, TRUE, &error ) ) {
+        xfce_err( _( "Failed to execute xfmedia: %s" ), error->message );
+    }
+}
+
+static GtkWidget *
+plugin_instance_menu_build( XfmediaPanelPlugin *plugin,
+                            XfmediaRemoteInstance *instance )
+{
+    GtkWidget       *instance_menu;
+#if !defined( XFMEDIA_TOO_OLD ) || defined( DBUS_USE_OLD_API )
+    GtkWidget       *playlist_menu;
+#endif /* !defined( XFMEDIA_TOO_OLD ) || defined( DBUS_USE_OLD_API ) */
+    GtkWidget       *item;
+    GtkWidget       *image;
+
+    instance_menu = gtk_menu_new();
+    g_object_set_data( G_OBJECT( instance_menu ),
+                       "xfmedia-instance",
+                       GINT_TO_POINTER( instance->no ) );
+    
+    /* Prev */
+    item = gtk_image_menu_item_new_with_mnemonic( _( "P_rev" ) );
+    g_signal_connect( G_OBJECT( item ), "activate",
+                      G_CALLBACK( plugin_menu_prev_activate_cb ), plugin );
+    gtk_widget_show( item );
+    gtk_menu_shell_append( GTK_MENU_SHELL( instance_menu ), item );
+
+    image = gtk_image_new_from_stock( GTK_STOCK_MEDIA_PREVIOUS, GTK_ICON_SIZE_MENU );
+    gtk_widget_show( image );
+    gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM( item ), image );
+
+    /* Play */
+    item = gtk_image_menu_item_new_with_mnemonic( _( "_Play" ) );
+    g_signal_connect( G_OBJECT( item ), "activate",
+                      G_CALLBACK( plugin_menu_play_activate_cb ), plugin );
+    gtk_widget_show( item );
+    gtk_menu_shell_append( GTK_MENU_SHELL( instance_menu ), item );
+
+    image = gtk_image_new_from_stock( GTK_STOCK_MEDIA_PLAY, GTK_ICON_SIZE_MENU );
+    gtk_widget_show( image );
+    gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM( item ), image );
+
+    /* Pause */
+    item = gtk_image_menu_item_new_with_mnemonic( _( "P_ause" ) );
+    g_signal_connect( G_OBJECT( item ), "activate",
+                      G_CALLBACK( plugin_menu_pause_activate_cb ), plugin );
+    gtk_widget_show( item );
+    gtk_menu_shell_append( GTK_MENU_SHELL( instance_menu ), item );
+
+    image = gtk_image_new_from_stock( GTK_STOCK_MEDIA_PAUSE, GTK_ICON_SIZE_MENU );
+    gtk_widget_show( image );
+    gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM( item ), image );
+
+    /* Stop */
+    item = gtk_image_menu_item_new_with_mnemonic( _( "_Stop" ) );
+    g_signal_connect( G_OBJECT( item ), "activate",
+                      G_CALLBACK( plugin_menu_stop_activate_cb ), plugin );
+    gtk_widget_show( item );
+    gtk_menu_shell_append( GTK_MENU_SHELL( instance_menu ), item );
+
+    image = gtk_image_new_from_stock( GTK_STOCK_MEDIA_STOP, GTK_ICON_SIZE_MENU );
+    gtk_widget_show( image );
+    gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM( item ), image );
+
+    /* Next */
+    item = gtk_image_menu_item_new_with_mnemonic( _( "_Next" ) );
+    g_signal_connect( G_OBJECT( item ), "activate",
+                      G_CALLBACK( plugin_menu_next_activate_cb ), plugin );
+    gtk_widget_show( item );
+    gtk_menu_shell_append( GTK_MENU_SHELL( instance_menu ), item );
+
+    image = gtk_image_new_from_stock( GTK_STOCK_MEDIA_NEXT, GTK_ICON_SIZE_MENU );
+    gtk_widget_show( image );
+    gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM( item ), image );
+
+    /* Separator */
+    item = gtk_separator_menu_item_new();
+    gtk_widget_show( item );
+    gtk_menu_shell_append( GTK_MENU_SHELL( instance_menu ), item );
+    
+#if !defined( XFMEDIA_TOO_OLD ) || defined( DBUS_USE_OLD_API )
+    /* Playlist */
+    item = gtk_menu_item_new_with_mnemonic( _( "P_laylist" ) );
+    gtk_widget_show( item );
+    gtk_menu_shell_append( GTK_MENU_SHELL( instance_menu ), item );
+
+    if ( plugin->show_playlist ) {
+        /* Playlist menu */
+        playlist_menu = gtk_menu_new();
+        
+        g_object_set_data( G_OBJECT( playlist_menu ),
+                           "xfmedia-instance",
+                           GINT_TO_POINTER( instance->no ) );
+        g_object_set_data( G_OBJECT( playlist_menu ),
+                           "playlist",
+                           GINT_TO_POINTER( 0 ) );
+        
+        g_signal_connect( G_OBJECT( playlist_menu ), "show",
+                          G_CALLBACK( plugin_menu_playlist_show_cb ), plugin );
+
+        gtk_menu_item_set_submenu( GTK_MENU_ITEM( item ), playlist_menu );
+    }
+    else {
+        gtk_label_set_text( GTK_LABEL( GTK_BIN( item )->child ), _( "Playlist" ) );
+        gtk_widget_set_sensitive( item, FALSE );
+
+        playlist_menu = instance_menu;
+    }
+
+    /* Load Playlist */
+    item = gtk_image_menu_item_new_with_mnemonic( _( "_Load..." ) );
+    g_signal_connect( G_OBJECT( item ), "activate",
+                      G_CALLBACK( plugin_menu_playlist_load_activate_cb ), plugin );
+    gtk_widget_show( item );
+    gtk_menu_shell_append( GTK_MENU_SHELL( playlist_menu ), item );
+
+    image = gtk_image_new_from_stock( GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU );
+    gtk_widget_show( image );
+    gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM( item ), image );
+
+    /* Save Playlist */
+    item = gtk_image_menu_item_new_with_mnemonic( _( "_Save..." ) );
+    g_signal_connect( G_OBJECT( item ), "activate",
+                      G_CALLBACK( plugin_menu_playlist_save_activate_cb ), plugin );
+    gtk_widget_show( item );
+    gtk_menu_shell_append( GTK_MENU_SHELL( playlist_menu ), item );
+
+    image = gtk_image_new_from_stock( GTK_STOCK_SAVE, GTK_ICON_SIZE_MENU );
+    gtk_widget_show( image );
+    gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM( item ), image );
+
+    /* Clear Playlist */
+    item = gtk_image_menu_item_new_with_mnemonic( _( "_Clear" ) );
+    g_signal_connect( G_OBJECT( item ), "activate",
+                      G_CALLBACK( plugin_menu_playlist_clear_activate_cb ), plugin );
+    gtk_widget_show( item );
+    gtk_menu_shell_append( GTK_MENU_SHELL( playlist_menu ), item );
+
+    image = gtk_image_new_from_stock( GTK_STOCK_CLEAR, GTK_ICON_SIZE_MENU );
+    gtk_widget_show( image );
+    gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM( item ), image );
+
+    /* Add Track */
+    item = gtk_image_menu_item_new_with_mnemonic( _( "_Add track(s)..." ) );
+    g_signal_connect( G_OBJECT( item ), "activate",
+                      G_CALLBACK( plugin_menu_playlist_track_add_activate_cb ), plugin );
+    gtk_widget_show( item );
+    gtk_menu_shell_append( GTK_MENU_SHELL( playlist_menu ), item );
+
+    image = gtk_image_new_from_stock( GTK_STOCK_ADD, GTK_ICON_SIZE_MENU );
+    gtk_widget_show( image );
+    gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM( item ), image );
+
+    /* Separator */
+    item = gtk_separator_menu_item_new();
+    gtk_widget_show( item );
+    gtk_menu_shell_append( GTK_MENU_SHELL( instance_menu ), item );
+#endif /* !defined( XFMEDIA_TOO_OLD ) || defined( DBUS_USE_OLD_API ) */
+    
+    /* Quit */
+    item = gtk_image_menu_item_new_with_mnemonic( _( "_Quit" ) );
+    g_signal_connect( G_OBJECT( item ), "activate",
+                      G_CALLBACK( plugin_menu_quit_activate_cb ), plugin );
+    gtk_widget_show( item );
+    gtk_menu_shell_append( GTK_MENU_SHELL( instance_menu ), item );
+
+    image = gtk_image_new_from_stock( GTK_STOCK_QUIT, GTK_ICON_SIZE_MENU );
+    gtk_widget_show( image );
+    gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM( item ), image );
+
+    return ( instance_menu );
+}
+
+static void
+plugin_popup_menu( XfmediaPanelPlugin *plugin, guint32 time, gint button )
+{
+    GtkWidget       *item, *instance_menu;
+    int             i, count;
+    GList           *list = NULL, *li = NULL;
+
+    if ( plugin->menu ) {
+        /* TODO:
+         * Cache the menu somehow?
+         * FIXME:
+         * This causes a delay in menu popup if we have a really
+         * big playlist (+1000 entries)
+         */
+        gtk_widget_destroy( plugin->menu );
+        plugin->menu = NULL;
+    }
+
+    for ( i = 0, count = 0; i < plugin->max_instances; i++ ) {
+        if ( (plugin->remote_list)[i] != NULL ) {
+                        
+            count++;
+
+            instance_menu = plugin_instance_menu_build( plugin, (plugin->remote_list)[i] );
+            
+            if ( instance_menu ) {
+                list = g_list_prepend( list, instance_menu );
+            }
+        }
+    }
+    list = g_list_reverse( list );
+
+    if ( count > 1 ) {
+        gchar       *str;
+        
+        plugin->menu = gtk_menu_new();
+        
+        for ( i = 0, li = list; li != NULL; li = li->next, i++ ) {
+            instance_menu = li->data;
+            
+            str = g_strdup_printf( "Xfmedia #%d", i + 1 );
+            
+            item = gtk_menu_item_new_with_label( str );
+            gtk_widget_show( item );
+            gtk_menu_shell_append( GTK_MENU_SHELL( plugin->menu ), item );
+
+            gtk_menu_item_set_submenu( GTK_MENU_ITEM( item ), instance_menu );
+
+            g_free( str );
+        }
+    }
+    else if ( count == 1 ) {
+        plugin->menu = list->data;
+    }
+    else {
+        plugin->menu = gtk_menu_new();
+
+        /* Start Xfmedia */
+        item = gtk_menu_item_new_with_mnemonic( _( "Start _Xfmedia" ) );
+        g_signal_connect( G_OBJECT( item ), "activate",
+                          G_CALLBACK( plugin_menu_start_xfmedia_activate_cb ), plugin );
+        gtk_widget_show( item );
+        gtk_menu_shell_prepend( GTK_MENU_SHELL( plugin->menu ), item );
+    }
+
+    if ( list ) {
+        g_list_free( list );
+    }
+
+    /* Separator */
+    item = gtk_separator_menu_item_new();
+    gtk_widget_show( item );
+    gtk_menu_shell_prepend( GTK_MENU_SHELL( plugin->menu ), item );
+
+    /* Header */
+    item = gtk_menu_item_new_with_label( _( "Xfmedia Remote" ) );
+    gtk_widget_show( item );
+    gtk_widget_set_sensitive( item, FALSE );
+    gtk_menu_shell_prepend( GTK_MENU_SHELL( plugin->menu ), item );
+
+    gtk_menu_popup( GTK_MENU( plugin->menu ), NULL, NULL, NULL, NULL, button, time );
+    g_signal_connect( G_OBJECT( plugin->menu ), "destroy",
+                      G_CALLBACK( gtk_widget_destroyed ), &(plugin->menu) );
+}
+
+static gboolean
+plugin_button_press_cb( GtkWidget *widget, GdkEventButton *button, gpointer user_data )
+{
+    XfmediaPanelPlugin      *plugin = user_data;
+
+    if ( button->type == GDK_BUTTON_PRESS && button->button == 1 ) {
+        if ( plugin->dialog ) {
+            gtk_window_present( GTK_WINDOW( plugin->dialog ) );
+        }
+        else {
+            plugin_popup_menu( plugin, button->time, button->button );
+        }
+        return ( TRUE );
+    }
+
+    return ( FALSE );
+}
+
+static gboolean
+plugin_mouse_enter_cb( GtkWidget *widget, GdkEventCrossing *event,
+                               gpointer user_data )
+{
+    XfmediaPanelPlugin      *plugin = user_data;
+    guint                   i;
+    GString                 *string = NULL;
+
+    if ( event->time - plugin->atime < LIST_CACHE_TIME ) {
+        return ( FALSE );
+    }
+    plugin->atime = event->time;
+
+    for ( i = 0; i < plugin->max_instances; i++ ) {
+        XfmediaRemoteInstance   *inst = (plugin->remote_list)[i];
+
+retry:
+        
+        if ( !inst ) {
+            XfmediaRemote   *remote = xfmedia_remote_new( i );
+
+            DBG( "No instance %d", i );
+
+            if ( remote ) {
+                inst = g_new0( XfmediaRemoteInstance, 1 );
+
+                inst->remote    = remote;
+                inst->no        = i;
+            }
+        }
+
+        if ( inst ) {
+            /* Cache update delay sorta solved in
+             * (prev|play|stop|next) handlers...
+             */
+            if ( event->time - inst->atime > INSTANCE_CACHE_TIME ) {
+                gchar       *title;
+                gint        index;
+                guint       length;
+
+                DBG( "Instance %d expired", i );
+
+                if ( inst->now_playing ) {
+                    g_free( inst->now_playing );
+                    inst->now_playing = NULL;
+                }
+
+                if ( xfmedia_remote_now_playing( inst->remote, &index, &title, &length ) ) {
+                    DBG( "Instance %d playing", i );
+
+                    inst->atime = event->time;
+
+                    if ( !(plugin->remote_list)[i] ) {
+                        (plugin->remote_list)[i] = inst;
+                    }
+                    /*
+                    else {
+                        g_assert( (plugin->remote_list)[i] == inst );
+                    }
+                    */
+
+                    if ( index >= 0 ) {
+                        inst->now_playing = g_strdup_printf( "#%u: %s (%.2u:%.2u)",
+                                                             index + 1,
+                                                             title,
+                                                             length / 60,
+                                                             length % 60 );
+
+                        g_free( title );
+                    }
+                    inst->now_playing_index = index;
+                }
+                else {
+                    DBG( "now_playing error, removing %d", i );
+
+                    xfmedia_remote_free( inst->remote );
+
+                    g_free( inst );
+                    
+                    if ( (plugin->remote_list)[i] ) {
+                        /* inst has been free'd, but we're just comparing the pointer */
+                        /*
+                        g_assert( (plugin->remote_list)[i] == inst );
+                        */
+                        (plugin->remote_list)[i] = NULL;
+                        inst = NULL;
+                        goto retry;
+                    }
+                }
+            }
+        }
+    }
+
+    for ( i = 0; i < plugin->max_instances; i++ ) {
+        if ( (plugin->remote_list)[i] ) {
+            gchar       *s = (plugin->remote_list)[i]->now_playing ?
+                             (plugin->remote_list)[i]->now_playing :
+                             _( "Stopped" );
+            
+            if ( !string ) {
+                string = g_string_new( s );
+            }
+            else {
+                g_string_append( string, "\n" );
+                g_string_append( string, s );
+            }
+        }
+    }
+
+    if ( string ) {
+        gtk_tooltips_set_tip( plugin->tooltip, plugin->evbox, string->str, NULL );
+        g_string_free( string, TRUE );
+    }
+    else {
+        gtk_tooltips_set_tip( plugin->tooltip, plugin->evbox,
+                              _( "No Xfmedia instances running" ), NULL );
+    }
+
+    return ( FALSE );
+}
+
+static void
+xfmedia_plugin_set_max_instances( XfmediaPanelPlugin *plugin,
+                                  guint max_instances )
+{
+    int                     i;
+    XfmediaRemoteInstance   **list;
+    int                     min, max;
+
+    if ( !max_instances ) {
+        max_instances = MAX_XFMEDIA_INSTANCES;
+    }
+    
+    if ( plugin->remote_list &&
+         plugin->max_instances == max_instances ) {
+        return;
+    }
+    
+    list = g_new0( XfmediaRemoteInstance *, max_instances );
+
+    min = MIN( plugin->max_instances, max_instances );
+    max = MAX( plugin->max_instances, max_instances );
+
+    for ( i = 0; i < max; i++ ) {
+        if ( i < min ) {
+            list[i] = (plugin->remote_list)[i];
+        }
+        else if ( i >= min ) {
+            if ( plugin->max_instances != max ) {
+                /* Pointless to continue looping */
+                break;
+            }
+
+            if ( (plugin->remote_list)[i] ) {
+                XfmediaRemoteInstance   *inst = (plugin->remote_list)[i];
+
+                if ( inst->now_playing ) {
+                    g_free( inst->now_playing );
+                }
+                xfmedia_remote_free( inst->remote );
+                g_free( inst );
+            }
+        }
+    }
+
+    g_free( plugin->remote_list );
+
+    plugin->remote_list     = list;
+    plugin->max_instances   = max_instances;
+}
+
+static XfmediaPanelPlugin *
+xfmedia_plugin_create( GtkContainer *container )
+{
+    XfmediaPanelPlugin      *plugin;
+
+    plugin                  = g_new0( XfmediaPanelPlugin, 1 );
+
+    plugin->evbox           = gtk_event_box_new();
+    gtk_widget_show( plugin->evbox );
+    gtk_container_add( container, plugin->evbox );
+
+    plugin->image           = xfce_scaled_image_new();
+    gtk_widget_show( plugin->image );
+    gtk_container_add( GTK_CONTAINER( plugin->evbox ), plugin->image );
+
+    plugin->tooltip         = gtk_tooltips_new();
+
+    plugin->max_instances   = MAX_XFMEDIA_INSTANCES;
+    plugin->remote_list     = g_new0( XfmediaRemoteInstance *, MAX_XFMEDIA_INSTANCES );
+    plugin->show_playlist   = TRUE;
+
+    g_signal_connect( G_OBJECT( plugin->evbox ), "button-press-event",
+                      G_CALLBACK( plugin_button_press_cb ), plugin );
+    g_signal_connect( G_OBJECT( plugin->evbox ), "enter-notify-event",
+                      G_CALLBACK( plugin_mouse_enter_cb ), plugin );
+    
+    return ( plugin );
+}
+
+void xfmedia_plugin_destroy( XfmediaPanelPlugin *plugin )
+{
+    int         i;
+
+    if ( plugin->add_list ) {
+        g_source_remove( plugin->add_list->evsrc );
+
+        while ( plugin->add_list->current ) {
+            g_free( plugin->add_list->current->data );
+            plugin->add_list->current = plugin->add_list->current->next;
+        }
+        g_slist_free( plugin->add_list->list );
+        g_free( plugin->add_list );
+    }
+
+    if ( plugin->pixbuf ) {
+        g_object_unref( plugin->pixbuf );
+    }
+
+    for ( i = 0; i < plugin->max_instances; i++ ) {
+        XfmediaRemoteInstance   *instance = (plugin->remote_list)[i];
+
+        if ( instance ) {
+            if ( instance->now_playing ) {
+                g_free( instance->now_playing );
+            }
+            xfmedia_remote_free( instance->remote );
+
+            g_free( instance );
+        }
+    }
+
+    gtk_object_sink( GTK_OBJECT( plugin->tooltip ) );
+
+    xfmedia_remote_disconnect();
+
+    g_free( plugin );
+}
+
+static void
+xfmedia_plugin_set_size( XfmediaPanelPlugin *plugin, gint size )
+{
+    gint        sz = size - BORDER_WIDTH;
+    
+    if ( plugin->pixbuf ) {
+        g_object_unref( G_OBJECT( plugin->pixbuf ) );
+    }
+
+    plugin->pixbuf = xfce_themed_icon_load( "xfmedia", sz );
+    xfce_scaled_image_set_from_pixbuf( XFCE_SCALED_IMAGE( plugin->image ),
+                                       plugin->pixbuf );
+    
+    gtk_widget_set_size_request( plugin->evbox, size, size );
+}
+
+#if !defined( XFMEDIA_TOO_OLD ) || defined( DBUS_USE_OLD_API )
+static void
+xfmedia_plugin_menu_show_playlist_toggled_cb( GtkWidget *widget,
+                                              XfmediaPanelPlugin *plugin )
+{
+    plugin->show_playlist =
+        gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( widget ) );
+}
+
+static void
+xfmedia_plugin_create_options( XfmediaPanelPlugin *plugin, GtkWidget *dlgvbox )
+{
+    GtkWidget           *frame, *frame_bin;
+    GtkWidget           *checkbox;
+    GtkWidget           *vbox;
+    
+#if LIBXFCEGUI4_CHECK_VERSION( 4, 3, 4 )
+    frame = xfce_create_framebox( _( "Popup menu" ), &frame_bin );
+#else
+    frame = xfce_framebox_new( _( "Popup menu" ), TRUE );
+    frame_bin = XFCE_FRAMEBOX( frame )->hbox;
+#endif
+    gtk_widget_set_size_request( frame, 300, 120 );
+    gtk_frame_set_shadow_type( GTK_FRAME( frame ), GTK_SHADOW_NONE );
+    gtk_widget_show( frame );
+    gtk_box_pack_start( GTK_BOX( dlgvbox ), frame, FALSE, TRUE, 0 );
+
+    vbox = gtk_vbox_new( FALSE, BORDER_WIDTH );
+    gtk_widget_show( vbox );
+    gtk_container_add( GTK_CONTAINER( frame_bin ), vbox );
+    
+    checkbox = gtk_check_button_new_with_mnemonic( _( "Show _playlist" ) );
+    g_signal_connect( G_OBJECT( checkbox ), "toggled",
+                      G_CALLBACK( xfmedia_plugin_menu_show_playlist_toggled_cb ),
+                      plugin );
+    gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( checkbox ),
+                                  plugin->show_playlist );
+    gtk_widget_show( checkbox );
+    gtk_box_pack_start( GTK_BOX( vbox ), checkbox, FALSE, FALSE, 0 );
+}
+#endif /* !defined( XFMEDIA_TOO_OLD ) || defined( DBUS_USE_OLD_API ) */
+
+#ifdef HAVE_OLD_PANEL
+
+#if !defined( XFMEDIA_TOO_OLD ) || defined( DBUS_USE_OLD_API )
+static void
+xfmedia_plugin_configure( Control *control, GtkContainer *container,
+                          GtkWidget *done )
+{
+    GtkWidget       *vbox;
+
+    vbox = gtk_vbox_new( FALSE, BORDER_WIDTH );
+    gtk_widget_show( vbox );
+    gtk_container_add( container, vbox );
+
+    xfmedia_plugin_create_options( control->data, vbox );
+}
+#endif /* !defined( XFMEDIA_TOO_OLD ) || defined( DBUS_USE_OLD_API ) */
+
+static void
+xfmedia_plugin_read_config( Control *control, xmlNodePtr node )
+{
+    XfmediaPanelPlugin      *plugin = control->data;
+    xmlChar                 *value;
+
+    value = xmlGetProp( node, (const xmlChar *) "show_playlist" );
+    if ( value ) {
+        plugin->show_playlist = ( *value == '1' ? TRUE : FALSE );
+        xmlFree( value );
+    }
+
+    value = xmlGetProp( node, (const xmlChar *) "max_instances" );
+    if ( value ) {
+        guint       max_instances;
+        
+        max_instances = atoi( value );
+        xmlFree( value );
+
+        xfmedia_plugin_set_max_instances( plugin, max_instances );
+    }
+}
+
+static void
+xfmedia_plugin_write_config( Control *control, xmlNodePtr node )
+{
+    XfmediaPanelPlugin      *plugin = control->data;
+    gchar                   buf[64];
+
+    xmlSetProp( node, (const xmlChar *) "show_playlist",
+                plugin->show_playlist ? "1" : "0" );
+    g_snprintf( buf, sizeof( buf ) / sizeof( gchar ), "%u", plugin->max_instances );
+    xmlSetProp( node, (const xmlChar *) "max_instances", buf );
+}
+
+static void
+xfmedia_plugin_size_changed( Control *ctrl, int size )
+{
+    XfmediaPanelPlugin  *plugin = ctrl->data;
+
+    xfmedia_plugin_set_size( plugin, icon_size[size] + border_width );
+}
+
+static void
+xfmedia_plugin_attach_callback( Control *control, const gchar *signal,
+                                GCallback callback, gpointer data )
+{
+    XfmediaPanelPlugin  *plugin = (XfmediaPanelPlugin *) control->data;
+
+    g_signal_connect( G_OBJECT( plugin->evbox ), signal, callback, data );
+}
+
+static void
+xfmedia_plugin_free( Control *ctrl )
+{
+    XfmediaPanelPlugin      *plugin = ctrl->data;
+
+    xfmedia_plugin_destroy( plugin );
+
+    ctrl->data = NULL;
+}
+
+static gboolean
+xfmedia_plugin_new( Control *control )
+{
+    XfmediaPanelPlugin  *plugin;
+
+    xfce_textdomain( GETTEXT_PACKAGE, LOCALEDIR, "UTF-8" );
+
+    plugin = xfmedia_plugin_create( GTK_CONTAINER( control->base ) );
+
+    control->data = plugin;
+    
+    return ( TRUE );
+}
+
+G_MODULE_EXPORT void
+xfce_control_class_init( ControlClass *cc )
+{
+    xfce_textdomain( GETTEXT_PACKAGE, LOCALEDIR, "UTF-8" );
+
+    cc->name            = "xfmedia-remote-plugin";
+    cc->caption         = _( "Xfmedia Remote" );
+    cc->create_control  = (CreateControlFunc) xfmedia_plugin_new;
+    cc->free            = xfmedia_plugin_free;
+    cc->read_config     = xfmedia_plugin_read_config;
+    cc->write_config    = xfmedia_plugin_write_config;
+#if !defined( XFMEDIA_TOO_OLD ) || defined( DBUS_USE_OLD_API )
+    cc->create_options  = xfmedia_plugin_configure;
+#endif 
+    cc->attach_callback = xfmedia_plugin_attach_callback;
+    cc->set_size        = xfmedia_plugin_size_changed;
+    cc->set_orientation = NULL;
+}
+
+XFCE_PLUGIN_CHECK_INIT
+
+#else /* HAVE_OLD_PANEL */
+
+#if !defined( XFMEDIA_TOO_OLD ) || defined( DBUS_USE_OLD_API )
+static void
+xfmedia_plugin_dialog_response_cb( GtkWidget *dialog,
+                                   gint response,
+                                   XfcePanelPlugin *panel_plugin )
+{
+    gtk_widget_destroy( dialog );
+    xfce_panel_plugin_unblock_menu( panel_plugin );
+}
+
+static void
+xfmedia_plugin_configure( XfcePanelPlugin *panel_plugin,
+                          XfmediaPanelPlugin *xfmedia_plugin )
+{
+    GtkWidget           *dialog;
+    GtkWidget           *header;
+    GtkWidget           *vbox;
+
+    xfce_panel_plugin_block_menu( panel_plugin );
+ 
+    dialog = gtk_dialog_new_with_buttons( _( "Xfmedia Remote Properties" ),
+                                          GTK_WINDOW( gtk_widget_get_toplevel(
+                                                  GTK_WIDGET( panel_plugin ) ) ),
+                                          GTK_DIALOG_DESTROY_WITH_PARENT |
+                                          GTK_DIALOG_NO_SEPARATOR,
+                                          GTK_STOCK_CLOSE, GTK_RESPONSE_OK,
+                                          NULL );
+    xfmedia_plugin->dialog = dialog;
+    g_signal_connect( G_OBJECT( dialog ), "destroy",
+                      G_CALLBACK( gtk_widget_destroyed ), &(xfmedia_plugin->dialog) );
+    g_signal_connect( G_OBJECT( dialog ), "response",
+                      G_CALLBACK( xfmedia_plugin_dialog_response_cb ), panel_plugin );
+    gtk_container_set_border_width( GTK_CONTAINER( dialog ), 2 );
+
+    header = xfce_create_header( NULL, _( "Xfmedia Remote" ) );
+    gtk_widget_set_size_request( GTK_BIN( header )->child, -1, 32 );
+    gtk_container_set_border_width( GTK_CONTAINER( header ), BORDER_WIDTH - 2 );
+    gtk_widget_show( header );
+    gtk_box_pack_start( GTK_BOX( GTK_DIALOG( dialog )->vbox ), header,
+                                 FALSE, TRUE, 0 );
+    
+    vbox = gtk_vbox_new( FALSE, BORDER_WIDTH );
+    gtk_widget_show( vbox );
+    gtk_box_pack_start( GTK_BOX( GTK_DIALOG( dialog )->vbox ), vbox, TRUE, TRUE, 0 );
+    
+    xfmedia_plugin_create_options( xfmedia_plugin, vbox );
+    
+    gtk_widget_show( dialog );
+}
+#endif /* !defined( XFMEDIA_TOO_OLD ) || defined( DBUS_USE_OLD_API ) */
+
+static void
+xfmedia_plugin_read_config( XfcePanelPlugin *panel_plugin,
+                            XfmediaPanelPlugin *xfmedia_plugin )
+{
+    gchar       *fn;
+    XfceRc      *rc;
+    guint       max_instances;
+
+    fn = xfce_panel_plugin_lookup_rc_file( panel_plugin );
+    if ( !fn ) {
+        return;
+    }
+
+    rc = xfce_rc_simple_open( fn, TRUE );
+    g_free( fn );
+
+    if ( !rc ) {
+        return;
+    }
+
+    xfmedia_plugin->show_playlist = xfce_rc_read_bool_entry( rc, "show_playlist", TRUE );
+    max_instances = xfce_rc_read_int_entry( rc, "max_instances", MAX_XFMEDIA_INSTANCES );
+    xfmedia_plugin_set_max_instances( xfmedia_plugin, max_instances );
+
+    xfce_rc_close( rc );
+}   
+
+static void
+xfmedia_plugin_write_config( XfcePanelPlugin *panel_plugin,
+                             XfmediaPanelPlugin *xfmedia_plugin )
+{
+    gchar           *fn;
+    XfceRc          *rc;
+
+    fn = xfce_panel_plugin_save_location( panel_plugin, TRUE );
+    if ( !fn ) {
+        return;
+    }
+
+    rc = xfce_rc_simple_open( fn, FALSE );
+    g_free( fn );
+
+    if ( !rc ) {
+        return;
+    }
+
+    xfce_rc_write_bool_entry( rc, "show_playlist", xfmedia_plugin->show_playlist );
+    xfce_rc_write_int_entry( rc, "max_instances", xfmedia_plugin->max_instances );
+
+    xfce_rc_close( rc );
+}
+
+static gboolean
+xfmedia_plugin_size_changed( XfcePanelPlugin *panel_plugin,
+                                gint size,
+                                XfmediaPanelPlugin *xfmedia_plugin )
+{
+    xfmedia_plugin_set_size( xfmedia_plugin, size );
+    
+    return ( TRUE );
+}
+
+static void
+xfmedia_plugin_free( XfcePanelPlugin *panel_plugin,
+                        XfmediaPanelPlugin *xfmedia_plugin )
+{
+    xfmedia_plugin_destroy( xfmedia_plugin );
+}
+
+static void
+xfmedia_plugin_new( XfcePanelPlugin *panel_plugin )
+{
+    XfmediaPanelPlugin      *xfmedia;
+
+    xfce_textdomain( GETTEXT_PACKAGE, LOCALEDIR, "UTF-8" );
+
+    xfmedia = xfmedia_plugin_create( GTK_CONTAINER( panel_plugin ) );
+    xfmedia_plugin_read_config( panel_plugin, xfmedia );
+    
+    xfce_panel_plugin_add_action_widget( panel_plugin, xfmedia->evbox );
+
+    g_signal_connect( G_OBJECT( panel_plugin ), "free-data",
+                      G_CALLBACK( xfmedia_plugin_free ), xfmedia );
+    
+    g_signal_connect( G_OBJECT( panel_plugin ), "size-changed",
+                      G_CALLBACK( xfmedia_plugin_size_changed ), xfmedia );
+    
+    g_signal_connect( G_OBJECT( panel_plugin ), "save",
+                      G_CALLBACK( xfmedia_plugin_write_config ), xfmedia );
+    
+#if !defined( XFMEDIA_TOO_OLD ) || defined( DBUS_USE_OLD_API )
+    xfce_panel_plugin_menu_show_configure( panel_plugin );
+    g_signal_connect( G_OBJECT( panel_plugin ), "configure-plugin",
+                      G_CALLBACK( xfmedia_plugin_configure ), xfmedia );
+#endif /* !defined( XFMEDIA_TOO_OLD ) || defined( DBUS_USE_OLD_API ) */
+}
+
+XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL( xfmedia_plugin_new );
+
+#endif /* HAVE_OLD_PANEL */
+

Added: xfmedia-remote-plugin/trunk/panel-plugin/xfmedia-remote.c
===================================================================
--- xfmedia-remote-plugin/trunk/panel-plugin/xfmedia-remote.c	                        (rev 0)
+++ xfmedia-remote-plugin/trunk/panel-plugin/xfmedia-remote.c	2007-09-18 22:48:42 UTC (rev 3235)
@@ -0,0 +1,763 @@
+/* 
+ *  Xfmedia Remote Plugin - Xfmedia Remote Control Plugin for Xfce4 Panel
+ *  Copyright (C) 2005  Pasi Orovuo <pasi.ov at gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#define DBUS_API_SUBJECT_TO_CHANGE
+#include <dbus/dbus.h>
+#include <dbus/dbus-glib.h>
+#include <dbus/dbus-glib-lowlevel.h>
+
+#include <glib.h>
+#include <libxfce4util/libxfce4util.h>
+#include <xfmedia-remote-common.h>
+#include "xfmedia-remote.h"
+
+#ifdef DBUS_USE_OLD_API
+#define dbus_message_set_auto_start dbus_message_set_auto_activation
+#endif
+
+#define PLUGIN_NAME                     "xfmedia-remote-plugin"
+
+struct _XfmediaRemote {
+    gint                instance_no;
+ 
+    /*DBusConnection      *connection;*/
+    gchar               *name;
+    gchar               *path;
+};
+
+static DBusConnection       *_dbus_connection = NULL;
+
+static DBusHandlerResult
+_dbus_message_filter_cb( DBusConnection *connection,
+                         DBusMessage *message,
+                         void *user_data )
+{
+    if ( dbus_message_is_signal( message,
+#ifdef DBUS_USE_OLD_API
+                                 DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL,
+#else
+                                 DBUS_INTERFACE_LOCAL,
+#endif
+                                 "Disconnected" ) ) {
+        g_warning( PLUGIN_NAME ": DBus disconnected" );
+
+        dbus_connection_unref( _dbus_connection );
+        _dbus_connection = NULL;
+    }
+    return ( DBUS_HANDLER_RESULT_NOT_YET_HANDLED );
+}
+
+static DBusConnection *
+_get_dbus_connection( void )
+{
+    if ( !_dbus_connection ) {
+        DBusError       error;
+
+        dbus_error_init( &error );
+        
+        _dbus_connection = dbus_bus_get( DBUS_BUS_SESSION, &error );
+        if ( !_dbus_connection ) {
+            g_warning( PLUGIN_NAME ": Failed to connect session bus: %s", error.message );
+            dbus_error_free( &error );
+        }
+        else {
+            dbus_connection_setup_with_g_main( _dbus_connection, NULL );
+            dbus_connection_set_exit_on_disconnect( _dbus_connection, FALSE );
+
+            if ( !dbus_connection_add_filter( _dbus_connection,
+                                              _dbus_message_filter_cb,
+                                              NULL,
+                                              NULL ) ) {
+                g_warning( PLUGIN_NAME ": Failed to set up message bus filter" );
+
+                /*
+                 * You may not close a shared connection. Connections created with 
+                 * dbus_connection_open() or dbus_bus_get() are shared. These 
+                 * connections are owned by libdbus, and applications should only 
+                 * unref them, never close them. Applications can know it is safe 
+                 * to unref these connections because libdbus will be holding a 
+                 * reference as long as the connection is open. Thus, either the 
+                 * connection is closed and it is OK to drop the last reference, 
+                 * or the connection is open and the app knows it does not have 
+                 * the last reference.
+                dbus_connection_close( _dbus_connection );
+                */
+                dbus_connection_unref( _dbus_connection );
+
+                _dbus_connection = NULL;
+            }
+        }
+    }
+    return ( _dbus_connection );
+}
+
+static gchar *
+_get_xfmedia( DBusConnection *connection, gchar *bus_name )
+{
+    DBusMessage     *message, *reply;
+    DBusError       error;
+    gchar           *unique_name = NULL;
+
+    message = dbus_message_new_method_call(
+#ifdef DBUS_USE_OLD_API
+                                            DBUS_SERVICE_ORG_FREEDESKTOP_DBUS,
+                                            DBUS_PATH_ORG_FREEDESKTOP_DBUS,
+                                            DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS,
+                                            "GetServiceOwner"
+#else
+                                            DBUS_SERVICE_DBUS,
+                                            DBUS_PATH_DBUS,
+                                            DBUS_INTERFACE_DBUS,
+                                            "GetNameOwner"
+#endif
+                                            );
+    if ( !message ) {
+        return ( NULL );
+    }
+    
+    dbus_message_set_auto_start( message, FALSE );
+    
+    if ( !dbus_message_append_args( message,
+#ifdef DBUS_USE_OLD_API
+                                    DBUS_TYPE_STRING, bus_name,
+#else
+                                    DBUS_TYPE_STRING, &bus_name,
+#endif
+                                    DBUS_TYPE_INVALID ) ) {
+        dbus_message_unref( message );
+        return ( NULL );
+    }
+
+    dbus_error_init( &error );
+
+    reply = dbus_connection_send_with_reply_and_block( connection,
+                                                       message,
+                                                       -1,
+                                                       &error );
+    if ( !reply || dbus_message_get_type( reply ) == DBUS_MESSAGE_TYPE_ERROR ) {
+        dbus_error_free( &error );
+        
+        if ( reply ) {
+            dbus_message_unref( reply );
+        }
+        return ( NULL );
+    }
+    
+    if ( dbus_message_get_args( reply,
+                                &error,
+                                DBUS_TYPE_STRING, &unique_name,
+                                DBUS_TYPE_INVALID ) ) {
+        unique_name = g_strdup( unique_name );
+    }
+
+    dbus_message_unref( message );
+    dbus_message_unref( reply );
+
+    return ( unique_name );
+}
+
+static int
+_remote_xfmedia_connect( XfmediaRemote *remote, guint instance )
+{
+    DBusConnection      *connection;
+    gchar               *name;
+    gchar               bus_name[64];
+
+    if ( !( connection = _get_dbus_connection() ) ) {
+        return ( -1 );
+    }
+
+    g_snprintf( bus_name, sizeof( bus_name ) / sizeof( gchar ),
+                XFMEDIA_DBUS_SERVICE_FMT, instance );
+
+    if ( !( name = _get_xfmedia( connection, bus_name ) ) ) {
+        /* Disconnect? */
+        return ( -1 );
+    }
+
+    remote->instance_no     = instance;
+    /*remote->connection      = connection;*/
+    remote->name            = name;
+    remote->path            = g_strdup_printf( XFMEDIA_DBUS_PATH_FMT, instance );
+
+    return ( 0 );
+}
+
+static gboolean
+_send_noparam_message( XfmediaRemote *remote, const gchar *method )
+{
+    DBusMessage     *message;
+    gboolean        success = FALSE;
+
+    g_return_val_if_fail( _dbus_connection != NULL, FALSE );
+
+    message = dbus_message_new_method_call( remote->name,
+                                            remote->path,
+                                            XFMEDIA_DBUS_INTERFACE,
+                                            method );
+    if ( message ) {
+        DBusMessage     *reply;
+        DBusError       error;
+
+        dbus_message_set_auto_start( message, FALSE );
+        dbus_error_init( &error );
+
+        reply = dbus_connection_send_with_reply_and_block( _dbus_connection,
+                                                           message,
+                                                           -1,
+                                                           &error );
+        if ( !reply ) {
+            dbus_error_free( &error );
+        }
+        else {
+            dbus_message_unref( reply );
+            dbus_message_unref( message );
+            success = TRUE;
+        }
+    }
+    return ( success );
+}
+
+/* ====================== Public api ============================ */
+
+void
+xfmedia_remote_disconnect( void )
+{
+    if ( _dbus_connection ) {
+        /*
+        dbus_connection_close( _dbus_connection );
+        */
+        dbus_connection_unref( _dbus_connection );
+        _dbus_connection = NULL;
+    }
+}
+
+/*
+ * XfmediaRemote *xfmedia_remote_new( guint );
+ */
+XfmediaRemote *
+xfmedia_remote_new( guint instance_no )
+{
+    XfmediaRemote       remote, *p;
+
+    if ( _remote_xfmedia_connect( &remote, instance_no ) < 0 ) {
+        return ( NULL );
+    }
+
+    p = g_new0( XfmediaRemote, 1 );
+    *p = remote;
+    
+    return ( p );
+}
+
+/*
+ * void xfmedia_remote_free( XfmediaRemote * );
+ */
+void
+xfmedia_remote_free( XfmediaRemote *remote )
+{
+    if ( remote->path ) {
+        g_free( remote->path );
+    }
+    if ( remote->name ) {
+        g_free( remote->name );
+    }
+    g_free( remote );
+}
+
+/*
+ * gboolean xfmedia_remote_xfmedia_running( XfmediaRemote * );
+ */
+gboolean
+xfmedia_remote_xfmedia_is_running( XfmediaRemote *remote )
+{
+    return ( _send_noparam_message( remote, XFMEDIA_REMOTE_IS_RUNNING ) );
+}
+
+/*
+ * gboolean xfmedia_remote_song_previous( XfmediaRemote * );
+ */
+gboolean
+xfmedia_remote_song_previous( XfmediaRemote *remote )
+{
+    return ( _send_noparam_message( remote, XFMEDIA_REMOTE_PREV ) );
+}
+
+
+/*
+ * gboolean xfmedia_remote_song_play( XfmediaRemote *, gint );
+ */
+gboolean
+xfmedia_remote_song_play( XfmediaRemote *remote, gint index )
+{
+    DBusMessage         *message;
+    gboolean            success = FALSE;
+
+    g_return_val_if_fail( _dbus_connection != NULL, FALSE );
+
+    message = dbus_message_new_method_call( remote->name,
+                                            remote->path,
+                                            XFMEDIA_DBUS_INTERFACE,
+                                            XFMEDIA_REMOTE_PLAY );
+    if ( message ) {
+        dbus_message_set_auto_start( message, FALSE );
+
+        if ( dbus_message_append_args( message,
+#ifdef DBUS_USE_OLD_API
+                                       DBUS_TYPE_INT32, index,
+#else
+                                       DBUS_TYPE_INT32, &index,
+#endif
+                                       DBUS_TYPE_INVALID ) ) {
+            DBusMessage     *reply;
+            DBusError       error;
+
+            dbus_error_init( &error );
+
+            reply = dbus_connection_send_with_reply_and_block( _dbus_connection,
+                                                               message,
+                                                               -1,
+                                                               &error );
+            if ( reply ) {
+                if ( dbus_message_get_type( reply ) != DBUS_MESSAGE_TYPE_ERROR ) {
+                    success = TRUE;
+                }
+                dbus_message_unref( reply );
+            }
+            else {
+                dbus_error_free( &error );
+            }
+        }
+        dbus_message_unref( message );
+    }
+    return ( success );
+}
+
+/*
+ * gboolean xfmedia_remote_song_pause( XfmediaRemote * );
+ */
+gboolean
+xfmedia_remote_song_pause( XfmediaRemote *remote )
+{
+    return ( _send_noparam_message( remote, XFMEDIA_REMOTE_PAUSE ) );
+}
+
+/*
+ * gboolean xfmedia_remote_song_stop( XfmediaRemote * );
+ */
+gboolean
+xfmedia_remote_song_stop( XfmediaRemote *remote )
+{
+    return ( _send_noparam_message( remote, XFMEDIA_REMOTE_STOP ) );
+}
+
+/*
+ * gboolean xfmedia_remote_song_next( XfmediaRemote * );
+ */
+gboolean
+xfmedia_remote_song_next( XfmediaRemote *remote )
+{
+    return ( _send_noparam_message( remote, XFMEDIA_REMOTE_NEXT ) );
+}
+
+/*
+ * gboolean xfmedia_remote_quit( XfmediaRemote * );
+ */
+gboolean
+xfmedia_remote_quit( XfmediaRemote *remote )
+{
+    return ( _send_noparam_message( remote, XFMEDIA_REMOTE_QUIT ) );
+}
+
+/*
+ * gboolean xfmedia_remote_playlist_add_file( XfmediaRemote *, const gchar *, gint );
+ */
+gboolean
+xfmedia_remote_playlist_add_file( XfmediaRemote *remote,
+                                  const gchar *fn,
+                                  gint index )
+{
+    DBusMessage         *message;
+    gboolean            success = FALSE;
+
+    g_return_val_if_fail( _dbus_connection != NULL, FALSE );
+
+    message = dbus_message_new_method_call( remote->name,
+                                            remote->path,
+                                            XFMEDIA_DBUS_INTERFACE,
+                                            XFMEDIA_REMOTE_ADD_FILE );
+    if ( message ) {
+        gchar           *utf8_fn;
+        
+        dbus_message_set_auto_start( message, FALSE );
+
+        utf8_fn = ( !g_utf8_validate( fn, -1, NULL )
+                    ? g_filename_to_utf8( fn, -1, NULL, NULL, NULL )
+                    : g_strdup( fn ) );
+
+        if ( utf8_fn ) {
+            if ( dbus_message_append_args( message,
+#ifdef DBUS_USE_OLD_API
+                                           DBUS_TYPE_STRING, utf8_fn,
+                                           DBUS_TYPE_INT32, index,
+#else
+                                           DBUS_TYPE_STRING, &utf8_fn,
+                                           DBUS_TYPE_INT32, &index,
+#endif
+                                           DBUS_TYPE_INVALID ) ) {
+                DBusMessage         *reply;
+                DBusError           error;
+
+                dbus_error_init( &error );
+
+                reply = dbus_connection_send_with_reply_and_block( _dbus_connection,
+                                                                   message,
+                                                                   -1,
+                                                                   &error );
+                if ( reply ) {
+                    if ( dbus_message_get_args( reply,
+                                                &error,
+                                                DBUS_TYPE_INT32, &index,
+                                                DBUS_TYPE_INVALID ) ) {
+                        success = TRUE;
+                    }
+                    dbus_message_unref( reply );
+                }
+
+                if ( dbus_error_is_set( &error ) ) {
+                    dbus_error_free( &error );
+                }
+            }
+
+            g_free( utf8_fn );
+        }
+
+        dbus_message_unref( message );
+    }
+    return ( success );
+}
+
+/*
+ * gboolean xfmedia_remote_playlist_remove_file( XfmediaRemote *, guint );
+ */
+gboolean
+xfmedia_remote_playlist_remove_file( XfmediaRemote *remote, guint index )
+{
+    DBusMessage         *message;
+    gboolean            success = FALSE;
+
+    g_return_val_if_fail( _dbus_connection != NULL, FALSE );
+
+    message = dbus_message_new_method_call( remote->name,
+                                            remote->path,
+                                            XFMEDIA_DBUS_INTERFACE,
+                                            XFMEDIA_REMOTE_REMOVE_FILE );
+    if ( message ) {
+        dbus_message_set_auto_start( message, FALSE );
+
+        if ( dbus_message_append_args( message,
+#ifdef DBUS_USE_OLD_API
+                                       DBUS_TYPE_UINT32, index,
+#else
+                                       DBUS_TYPE_UINT32, &index,
+#endif
+                                       DBUS_TYPE_INVALID ) ) {
+            DBusMessage     *reply;
+            DBusError       error;
+
+            dbus_error_init( &error );
+
+            reply = dbus_connection_send_with_reply_and_block( _dbus_connection,
+                                                               message,
+                                                               -1,
+                                                               &error );
+            if ( reply ) {
+                if ( dbus_message_get_type( reply ) != DBUS_MESSAGE_TYPE_ERROR ) {
+                    success = TRUE;
+                }
+                dbus_message_unref( reply );
+            }
+            else {
+                dbus_error_free( &error );
+            }
+        }
+        dbus_message_unref( message );
+    }
+    return ( success );
+}
+
+/*
+ * gboolean xfmedia_remote_playlist_load( XfmediaRemote *, const gchar * );
+ */
+gboolean
+xfmedia_remote_playlist_load( XfmediaRemote *remote, const gchar *fn )
+{
+    DBusMessage         *message;
+    gboolean            success = FALSE;
+
+    g_return_val_if_fail( _dbus_connection != NULL, FALSE );
+
+    message = dbus_message_new_method_call( remote->name,
+                                            remote->path,
+                                            XFMEDIA_DBUS_INTERFACE,
+                                            XFMEDIA_REMOTE_LOAD_PLAYLIST );
+    if ( message ) {
+        gchar           *utf8_fn;
+
+        dbus_message_set_auto_start( message, FALSE );
+
+        utf8_fn = ( !g_utf8_validate( fn, -1, NULL ) ?
+                    g_filename_to_utf8( fn, -1, NULL, NULL, NULL ) :
+                    g_strdup( fn ) );
+
+        if ( utf8_fn ) {
+            if ( dbus_message_append_args( message,
+#ifdef DBUS_USE_OLD_API
+                                           DBUS_TYPE_STRING, utf8_fn,
+#else
+                                           DBUS_TYPE_STRING, &utf8_fn,
+#endif
+                                           DBUS_TYPE_INVALID ) ) {
+                DBusMessage         *reply;
+                DBusError           error;
+
+                dbus_error_init( &error );
+
+                reply = dbus_connection_send_with_reply_and_block( _dbus_connection,
+                                                                   message,
+                                                                   -1,
+                                                                   &error );
+                if ( reply ) {
+                    success = TRUE;
+
+                    dbus_message_unref( reply );
+                }
+                else {
+                    dbus_error_free( &error );
+                }
+            }
+            g_free( utf8_fn );
+        }
+        dbus_message_unref( message );
+    }
+    return ( success );
+}
+
+/*
+ * gboolean xfmedia_remote_playlist_save( XfmediaRemote *, const gchar * );
+ */
+gboolean
+xfmedia_remote_playlist_save( XfmediaRemote *remote, const gchar *fn )
+{
+    DBusMessage         *message;
+    gboolean            success = FALSE;
+
+    g_return_val_if_fail( _dbus_connection != NULL, FALSE );
+
+    message = dbus_message_new_method_call( remote->name,
+                                            remote->path,
+                                            XFMEDIA_DBUS_INTERFACE,
+                                            XFMEDIA_REMOTE_SAVE_PLAYLIST );
+    if ( message ) {
+        gchar           *utf8_fn;
+        
+        dbus_message_set_auto_start( message, FALSE );
+
+        utf8_fn = ( !g_utf8_validate( fn, -1, NULL ) ?
+                    g_filename_to_utf8( fn, -1, NULL, NULL, NULL ) :
+                    g_strdup( fn ) );
+
+        if ( utf8_fn ) {
+            if ( dbus_message_append_args( message,
+#ifdef DBUS_USE_OLD_API
+                                           DBUS_TYPE_STRING, utf8_fn,
+#else
+                                           DBUS_TYPE_STRING, &utf8_fn,
+#endif
+                                           DBUS_TYPE_INVALID ) ) {
+                DBusMessage         *reply;
+                DBusError           error;
+
+                dbus_error_init( &error );
+
+                reply = dbus_connection_send_with_reply_and_block( _dbus_connection,
+                                                                   message,
+                                                                   -1,
+                                                                   &error );
+                if ( reply ) {
+                    success = TRUE;
+
+                    dbus_message_unref( reply );
+                }
+                else {
+                    dbus_error_free( &error );
+                }
+            }
+            g_free( utf8_fn );
+        }
+        dbus_message_unref( message );
+    }
+    return ( success );
+}
+
+/*
+ * gboolean xfmedia_remote_playlist_clear( XfmediaRemote * );
+ */
+gboolean
+xfmedia_remote_playlist_clear( XfmediaRemote *remote )
+{
+    return ( _send_noparam_message( remote, XFMEDIA_REMOTE_CLEAR_PLAYLIST ) );
+}
+
+/*
+ * gboolean xfmedia_remote_playlist_get( XfmediaRemote *,  );
+ */
+gboolean
+xfmedia_remote_playlist_get( XfmediaRemote *remote,
+                             gchar ***playlist,
+                             guint *ntracks )
+{
+    DBusMessage         *message;
+    gboolean            success = FALSE;
+    
+    g_return_val_if_fail( _dbus_connection != NULL, FALSE );
+
+    message = dbus_message_new_method_call( remote->name,
+                                            remote->path,
+                                            XFMEDIA_DBUS_INTERFACE,
+                                            XFMEDIA_REMOTE_GET_PLAYLIST );
+    if ( message ) {
+        DBusMessage         *reply;
+        DBusError           error;
+
+        dbus_message_set_auto_start( message, FALSE );
+        dbus_error_init( &error );
+
+        reply = dbus_connection_send_with_reply_and_block( _dbus_connection,
+                                                           message,
+                                                           -1,
+                                                           &error );
+        if ( reply ) {
+            gchar           **tmp;
+            guint           n;
+
+            if ( dbus_message_get_args( reply,
+                                        &error,
+                                        DBUS_TYPE_ARRAY, DBUS_TYPE_STRING,
+                                        &tmp, &n,
+                                        DBUS_TYPE_INVALID ) ) {
+                *playlist       = g_strdupv( tmp );
+                *ntracks        = n;
+
+                dbus_free_string_array( tmp );
+
+                success = TRUE;
+            }
+
+            dbus_message_unref( reply );
+        }
+
+        if ( dbus_error_is_set( &error ) ) {
+            dbus_error_free( &error );
+        }
+
+        dbus_message_unref( message );
+    }
+    return ( success );
+}
+
+/*
+ * gboolean xfmedia_remote_playlist_entry_get( XfmediaRemote *, guint, gchar ** );
+ */
+/* Not currently needed */
+
+/*
+ * XfmediaTrackInfo *xfmedia_remote_now_playing( XfmediaRemote *);
+ */
+gboolean
+xfmedia_remote_now_playing( XfmediaRemote *remote, gint *index, gchar **title, guint *length )
+{
+    DBusMessage         *message;
+    gboolean            success = FALSE;
+
+    g_return_val_if_fail( _dbus_connection != NULL, FALSE );
+
+    message = dbus_message_new_method_call( remote->name,
+                                            remote->path,
+                                            XFMEDIA_DBUS_INTERFACE,
+                                            XFMEDIA_REMOTE_NOW_PLAYING );
+    if ( message ) {
+        DBusMessage         *reply;
+        DBusError           error;
+        gint                i, len;
+        gchar               *t, *fn;
+        
+        dbus_message_set_auto_start( message, FALSE );
+        dbus_error_init( &error );
+
+        reply = dbus_connection_send_with_reply_and_block( _dbus_connection,
+                                                           message,
+                                                           -1,
+                                                           &error );
+        if ( reply ) {
+            if ( dbus_message_get_args( reply,
+                                        &error,
+                                        DBUS_TYPE_INT32, &i,
+                                        DBUS_TYPE_STRING, &t,
+                                        DBUS_TYPE_INT32, &len,
+                                        DBUS_TYPE_STRING, &fn,
+                                        DBUS_TYPE_INVALID ) ) {
+                success = TRUE;
+
+                *index      = i;
+                *title      = g_strdup( t != NULL ? t : fn );
+                *length     = len;
+
+#ifdef DBUS_USE_OLD_API
+                dbus_free( t );
+                dbus_free( fn );
+#endif
+            }
+
+            dbus_message_unref( reply );
+        }
+        else {
+            if ( dbus_error_has_name( &error, XFMEDIA_DBUS_ERROR ) ) {
+                *index = -1;
+                success = TRUE;
+            }
+        }
+
+        if ( dbus_error_is_set( &error ) ) {
+            dbus_error_free( &error );
+        }
+        
+        dbus_message_unref( message );
+    }
+    return ( success );
+}
+

Added: xfmedia-remote-plugin/trunk/panel-plugin/xfmedia-remote.desktop.in.in
===================================================================
--- xfmedia-remote-plugin/trunk/panel-plugin/xfmedia-remote.desktop.in.in	                        (rev 0)
+++ xfmedia-remote-plugin/trunk/panel-plugin/xfmedia-remote.desktop.in.in	2007-09-18 22:48:42 UTC (rev 3235)
@@ -0,0 +1,8 @@
+[Xfce Panel]
+Type=X-XFCE-PanelPlugin
+Encoding=UTF-8
+_Name=Xfmedia Remote
+_Comment=Control Xfmedia music player
+Icon=xfmedia
+X-XFCE-Exec=@PLUGIN_PATH@/xfmedia-remote-plugin
+

Added: xfmedia-remote-plugin/trunk/panel-plugin/xfmedia-remote.h
===================================================================
--- xfmedia-remote-plugin/trunk/panel-plugin/xfmedia-remote.h	                        (rev 0)
+++ xfmedia-remote-plugin/trunk/panel-plugin/xfmedia-remote.h	2007-09-18 22:48:42 UTC (rev 3235)
@@ -0,0 +1,51 @@
+/* 
+ *  Xfmedia Remote Plugin - Xfmedia Remote Control Plugin for Xfce4 Panel
+ *  Copyright (C) 2005  Pasi Orovuo <pasi.ov at gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef XFMEDIA_REMOTE_H_INCLUDED
+#define XFMEDIA_REMOTE_H_INCLUDED
+
+#include <gtk/gtk.h>
+
+typedef struct _XfmediaRemote   XfmediaRemote;
+
+/* Work around some dbus sillyness */
+void xfmedia_remote_disconnect( void );
+
+XfmediaRemote *xfmedia_remote_new( guint );
+void xfmedia_remote_free( XfmediaRemote * );
+gboolean xfmedia_remote_xfmedia_is_running( XfmediaRemote * );
+
+gboolean xfmedia_remote_song_previous( XfmediaRemote * );
+gboolean xfmedia_remote_song_play( XfmediaRemote *, gint );
+gboolean xfmedia_remote_song_pause( XfmediaRemote * );
+gboolean xfmedia_remote_song_stop( XfmediaRemote * );
+gboolean xfmedia_remote_song_next( XfmediaRemote * );
+gboolean xfmedia_remote_quit( XfmediaRemote * );
+
+gboolean xfmedia_remote_playlist_add_file( XfmediaRemote *, const gchar *, gint );
+gboolean xfmedia_remote_playlist_remove_file( XfmediaRemote *, guint );
+gboolean xfmedia_remote_playlist_load( XfmediaRemote *, const gchar * );
+gboolean xfmedia_remote_playlist_save( XfmediaRemote *, const gchar * );
+gboolean xfmedia_remote_playlist_clear( XfmediaRemote * );
+gboolean xfmedia_remote_playlist_get( XfmediaRemote *, gchar ***, guint * );
+/* gboolean xfmedia_remote_playlist_entry_get( XfmediaRemote *, guint, gchar ** ); */
+gboolean xfmedia_remote_now_playing( XfmediaRemote *, gint *, gchar **, guint * );
+
+#endif
+

Added: xfmedia-remote-plugin/trunk/po/ChangeLog
===================================================================

Added: xfmedia-remote-plugin/trunk/po/POTFILES.in
===================================================================
--- xfmedia-remote-plugin/trunk/po/POTFILES.in	                        (rev 0)
+++ xfmedia-remote-plugin/trunk/po/POTFILES.in	2007-09-18 22:48:42 UTC (rev 3235)
@@ -0,0 +1,3 @@
+panel-plugin/xfmedia-remote.c
+panel-plugin/xfmedia-remote-plugin.c
+panel-plugin/xfmedia-remote.desktop.in.in

Added: xfmedia-remote-plugin/trunk/po/fi.po
===================================================================
--- xfmedia-remote-plugin/trunk/po/fi.po	                        (rev 0)
+++ xfmedia-remote-plugin/trunk/po/fi.po	2007-09-18 22:48:42 UTC (rev 3235)
@@ -0,0 +1,144 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: fi\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-10-16 22:31+0300\n"
+"PO-Revision-Date: 2005-10-15 16:51+0300\n"
+"Last-Translator: Pasi Orovuo <pasi.ov at gmail.com>\n"
+"Language-Team: Finnish <fi at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../panel-plugin/xfmedia-remote-plugin.c:245
+msgid "Choose playlist to load"
+msgstr "Valitse ladattava soittolista"
+
+#: ../panel-plugin/xfmedia-remote-plugin.c:280
+msgid "Save playlist"
+msgstr "Tallenna soittolista"
+
+#: ../panel-plugin/xfmedia-remote-plugin.c:301
+msgid "Failed to save playlist"
+msgstr "Soittolistan tallennus epäonnistui"
+
+#: ../panel-plugin/xfmedia-remote-plugin.c:370
+msgid "Please wait until the previous add operation completes."
+msgstr "Ole hyvä ja odota kunnes edellinen lisäys valmistuu"
+
+#: ../panel-plugin/xfmedia-remote-plugin.c:374
+msgid "Add track(s) to playlist"
+msgstr "Lisää tiedostoja soittolistaan"
+
+#. Play
+#: ../panel-plugin/xfmedia-remote-plugin.c:509
+#: ../panel-plugin/xfmedia-remote-plugin.c:601
+msgid "_Play"
+msgstr "_Soita"
+
+#. Remove
+#: ../panel-plugin/xfmedia-remote-plugin.c:521
+msgid "_Remove"
+msgstr "_Poista"
+
+#: ../panel-plugin/xfmedia-remote-plugin.c:569
+#, c-format
+msgid "Failed to execute xfmedia: %s"
+msgstr "Xfmedian käynnistys epäonnistui: %s"
+
+#. Prev
+#: ../panel-plugin/xfmedia-remote-plugin.c:590
+msgid "P_rev"
+msgstr "_Edellinen"
+
+#. Pause
+#: ../panel-plugin/xfmedia-remote-plugin.c:612
+msgid "P_ause"
+msgstr "_Tauko"
+
+#. Stop
+#: ../panel-plugin/xfmedia-remote-plugin.c:623
+msgid "_Stop"
+msgstr "_Pysäytä"
+
+#. Next
+#: ../panel-plugin/xfmedia-remote-plugin.c:634
+msgid "_Next"
+msgstr "Se_uraava"
+
+#. Playlist
+#: ../panel-plugin/xfmedia-remote-plugin.c:651
+msgid "P_laylist"
+msgstr "Soitto_lista"
+
+#: ../panel-plugin/xfmedia-remote-plugin.c:672
+msgid "Playlist"
+msgstr "Soittolista"
+
+#. Load Playlist
+#: ../panel-plugin/xfmedia-remote-plugin.c:679
+msgid "_Load..."
+msgstr "_Lataa..."
+
+#. Save Playlist
+#: ../panel-plugin/xfmedia-remote-plugin.c:690
+msgid "_Save..."
+msgstr "_Tallenna"
+
+#. Clear Playlist
+#: ../panel-plugin/xfmedia-remote-plugin.c:701
+msgid "_Clear"
+msgstr "T_tyhjennä"
+
+#. Add Track
+#: ../panel-plugin/xfmedia-remote-plugin.c:712
+msgid "_Add track(s)..."
+msgstr "L_isää tiedostoja..."
+
+#. Quit
+#: ../panel-plugin/xfmedia-remote-plugin.c:729
+msgid "_Quit"
+msgstr "Poist_u"
+
+#. Start Xfmedia
+#: ../panel-plugin/xfmedia-remote-plugin.c:800
+msgid "Start _Xfmedia"
+msgstr "_Käynnistä Xfmedia"
+
+#. Header
+#: ../panel-plugin/xfmedia-remote-plugin.c:817
+#: ../panel-plugin/xfmedia-remote-plugin.c:1241
+#: ../panel-plugin/xfmedia-remote-plugin.c:1292
+#: ../panel-plugin/xfmedia-remote.desktop.in.in.h:2
+msgid "Xfmedia Remote"
+msgstr "Xfmedia-kaukosäädin"
+
+#: ../panel-plugin/xfmedia-remote-plugin.c:942
+msgid "Stopped"
+msgstr "Pysäytetty"
+
+#: ../panel-plugin/xfmedia-remote-plugin.c:960
+msgid "No Xfmedia instances running"
+msgstr "Xfmedia ei käynnissä"
+
+#: ../panel-plugin/xfmedia-remote-plugin.c:1117
+#: ../panel-plugin/xfmedia-remote-plugin.c:1119
+msgid "Popup menu"
+msgstr "Ponnahdusvalikko"
+
+#: ../panel-plugin/xfmedia-remote-plugin.c:1131
+msgid "Show _playlist"
+msgstr "_Näytä soittolista"
+
+#: ../panel-plugin/xfmedia-remote-plugin.c:1278
+msgid "Xfmedia Remote Properties"
+msgstr "Xfmedia-kaukosäätimen asetukset"
+
+#: ../panel-plugin/xfmedia-remote.desktop.in.in.h:1
+msgid "Control Xfmedia music player"
+msgstr "Ohjaa Xfmedia-musiikkisoitinta"




More information about the Goodies-commits mailing list