[Goodies-commits] r2824 - / xfce4-cddrive-plugin xfce4-cddrive-plugin/trunk xfce4-cddrive-plugin/trunk/panel-plugin xfce4-cddrive-plugin/trunk/panel-plugin/os-dependant xfce4-cddrive-plugin/trunk/po

Sylvain Reynal syl at xfce.org
Wed Jun 13 23:14:28 CEST 2007


Author: syl
Date: 2007-06-13 21:14:28 +0000 (Wed, 13 Jun 2007)
New Revision: 2824

Added:
   xfce4-cddrive-plugin/
   xfce4-cddrive-plugin/branches/
   xfce4-cddrive-plugin/tags/
   xfce4-cddrive-plugin/trunk/
   xfce4-cddrive-plugin/trunk/AUTHORS
   xfce4-cddrive-plugin/trunk/COPYING
   xfce4-cddrive-plugin/trunk/ChangeLog
   xfce4-cddrive-plugin/trunk/INSTALL
   xfce4-cddrive-plugin/trunk/Makefile.am
   xfce4-cddrive-plugin/trunk/NEWS
   xfce4-cddrive-plugin/trunk/README
   xfce4-cddrive-plugin/trunk/THANKS
   xfce4-cddrive-plugin/trunk/TODO
   xfce4-cddrive-plugin/trunk/autogen.sh
   xfce4-cddrive-plugin/trunk/configure.in.in
   xfce4-cddrive-plugin/trunk/panel-plugin/
   xfce4-cddrive-plugin/trunk/panel-plugin/Makefile
   xfce4-cddrive-plugin/trunk/panel-plugin/Makefile.am
   xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-cddb.c
   xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-cddb.h
   xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-dialogs.c
   xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-dialogs.h
   xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-error.c
   xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-error.h
   xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-monitor-private.h
   xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-monitor.c
   xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-monitor.h
   xfce4-cddrive-plugin/trunk/panel-plugin/cddrive.c
   xfce4-cddrive-plugin/trunk/panel-plugin/cddrive.desktop.in.in
   xfce4-cddrive-plugin/trunk/panel-plugin/cddrive.h
   xfce4-cddrive-plugin/trunk/panel-plugin/os-dependant/
   xfce4-cddrive-plugin/trunk/panel-plugin/os-dependant/cddrive-cdrom.c
   xfce4-cddrive-plugin/trunk/panel-plugin/os-dependant/cddrive-cdrom.h
   xfce4-cddrive-plugin/trunk/panel-plugin/os-dependant/cddrive-process.c
   xfce4-cddrive-plugin/trunk/panel-plugin/os-dependant/cddrive-process.h
   xfce4-cddrive-plugin/trunk/po/
   xfce4-cddrive-plugin/trunk/po/ChangeLog
   xfce4-cddrive-plugin/trunk/po/LINGUAS
   xfce4-cddrive-plugin/trunk/po/Makefile.in.in
   xfce4-cddrive-plugin/trunk/po/POTFILES.in
   xfce4-cddrive-plugin/trunk/po/fr.po
   xfce4-cddrive-plugin/trunk/po/xfce4-cddrive-plugin.pot
Log:
Initial import

Added: xfce4-cddrive-plugin/trunk/AUTHORS
===================================================================
--- xfce4-cddrive-plugin/trunk/AUTHORS	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/AUTHORS	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1 @@
+Sylvain Reynal <sreynal at nerim.net>

Added: xfce4-cddrive-plugin/trunk/COPYING
===================================================================
--- xfce4-cddrive-plugin/trunk/COPYING	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/COPYING	2007-06-13 21:14:28 UTC (rev 2824)
@@ -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: xfce4-cddrive-plugin/trunk/ChangeLog
===================================================================
--- xfce4-cddrive-plugin/trunk/ChangeLog	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/ChangeLog	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,3 @@
+2007-04-20	Sylvain Reynal <sreynal at nerim.net>
+
+	* === Released 0.0.1 ===

Added: xfce4-cddrive-plugin/trunk/INSTALL
===================================================================
--- xfce4-cddrive-plugin/trunk/INSTALL	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/INSTALL	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,231 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free
+Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+These are generic installation instructions.
+
+   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 only 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.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes awhile.  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=c89 CFLAGS=-O2 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 must use a version of `make' that
+supports the `VPATH' variable, such as 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 `..'.
+
+   If you have to use a `make' that does not support the `VPATH'
+variable, you have 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' will install the package's files in
+`/usr/local/bin', `/usr/local/man', 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
+give `configure' the option `--exec-prefix=PREFIX', the package will
+use PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files will 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 `--target=TYPE' option 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
+
+will cause the specified gcc to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+`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: xfce4-cddrive-plugin/trunk/Makefile.am
===================================================================
--- xfce4-cddrive-plugin/trunk/Makefile.am	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/Makefile.am	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,24 @@
+# $Id$
+
+SUBDIRS =								\
+	panel-plugin 						\
+	po
+
+distclean-local:
+	rm -rf *.cache *~
+
+rpm: dist
+	rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz
+	@rm -f $(PACKAGE)-$(VERSION).tar.gz
+
+EXTRA_DIST =								\
+	intltool-extract.in						\
+	intltool-merge.in						\
+	intltool-update.in
+
+DISTCLEANFILES =							\
+	intltool-extract						\
+	intltool-merge							\
+	intltool-update
+
+# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:

Added: xfce4-cddrive-plugin/trunk/NEWS
===================================================================
--- xfce4-cddrive-plugin/trunk/NEWS	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/NEWS	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,3 @@
+0.0.1
+=====
+- First release.

Added: xfce4-cddrive-plugin/trunk/README
===================================================================
--- xfce4-cddrive-plugin/trunk/README	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/README	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,42 @@
+What is it?
+===========
+
+xfce4-cddrive-plugin puts a button in the XFCE panel which allow to open
+or close a CD-ROM drive tray.
+Additionally, the button icon reports the content of the drive.
+The icon indicates if there is a disc in the drive, if it is mounted,
+and the type of the disc (regular CD-ROM, audio or DVD).
+You can also mount or unmount the disc via the plugin's menu (the action appears
+when a disc is in the drive).
+
+
+Requirements & limitations
+==========================
+
+- This plugin is based on HAL, and will not work if 'hald' is not running.
+
+- This release only works correctly with Linux.
+
+- The icons used to reports the content of the drive are the one of the theme
+  currently in use (it becomes a limitation if your theme does not provide icons
+  for cdrom drive and disc).
+  
+- The plugin can query the freedb.org servers for audio CD titles. To compile
+  with this feature enabled, you need libcdio and libcddb. The gthread-2.0
+  library is also recommanded in this case, but it is not mandatory.
+
+
+Installation
+============
+
+The file 'INSTALL' contains generic installation instructions. For more
+detailed information, visit the CD drive plugin website at
+http://goodies.xfce.org/projects/panel-plugins/xfce4-cddrive-plugin
+
+
+How to report bugs?
+===================
+
+Bugs should be reported to the Xfce bug tracking system
+(http://bugzilla.xfce.org, product 'Xfce Panel Plugins', Component
+'CD drive plugin'). You will need to create an account for yourself.

Added: xfce4-cddrive-plugin/trunk/THANKS
===================================================================
--- xfce4-cddrive-plugin/trunk/THANKS	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/THANKS	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,22 @@
+What's this file about?
+-----------------------
+This file lists all external people that have contributed to this project and
+thereby helped to make the sample project such a successful project.
+
+
+Translators (sorted by language):
+----------------------------------
+These people have translated the sample plugin to foreign languages.
+
+ John Doo <john at foo.org>
+ * be translations
+
+ Foo Bar <bar at foo.org>
+ * nl translations
+
+
+Other contributors (sorted by name):
+------------------------------------
+
+ Foo Bar <bar at foo.org>
+ * patches

Added: xfce4-cddrive-plugin/trunk/TODO
===================================================================
--- xfce4-cddrive-plugin/trunk/TODO	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/TODO	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,7 @@
+- Update/rewrite cddrive-monitor to use libexo only
+  (and may be remove fallback commands config)
+
+- Support more OSes. As i have only Linux on my machine, this one won't be done
+  without help.
+
+- Use Thunar D-BUS interface to show some relevant operations in the menu.

Added: xfce4-cddrive-plugin/trunk/autogen.sh
===================================================================
--- xfce4-cddrive-plugin/trunk/autogen.sh	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/autogen.sh	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# $Id$
+#
+# Copyright (c) 2002-2007
+#         The Xfce development team. All rights reserved.
+#
+
+(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
+}
+
+# verify that po/LINGUAS is present
+(test -f po/LINGUAS) >/dev/null 2>&1 || {
+  cat >&2 <<EOF
+autogen.sh: The file po/LINGUAS could not be found. Please check your snapshot
+            or try to checkout again.
+EOF
+  exit 1
+}
+
+# substitute revision and linguas
+linguas=`sed -e '/^#/d' po/LINGUAS`
+revision=`LC_ALL=C svn info $0 | awk '/^Revision: / {printf "%05d\n", $2}'`
+sed -e "s/@LINGUAS@/${linguas}/g" \
+    -e "s/@REVISION@/${revision}/g" \
+    < "configure.in.in" > "configure.in"
+
+exec xdt-autogen $@


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

Added: xfce4-cddrive-plugin/trunk/configure.in.in
===================================================================
--- xfce4-cddrive-plugin/trunk/configure.in.in	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/configure.in.in	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,137 @@
+dnl $Id$
+dnl
+dnl xfce4-cddrive-plugin - CD-ROM drive plugin for the Xfce panel
+dnl
+dnl 2007 Sylvain Reynal <sreynal at nerim.net>
+dnl
+
+dnl ***************************
+dnl *** Version information ***
+dnl ***************************
+m4_define([cddrive_version], [0.0.1])
+
+dnl ***************************
+dnl *** Initialize autoconf ***
+dnl ***************************
+AC_COPYRIGHT([Copyright (c) 2006-2007
+        The Xfce development team. All rights reserved.])
+AC_INIT([xfce4-cddrive-plugin], [cddrive_version()], [http://bugzilla.xfce.org/], [xfce4-cddrive-plugin])
+AC_PREREQ([2.50])
+AC_CANONICAL_TARGET()
+AC_REVISION([$Id])
+
+dnl ***************************
+dnl *** Initialize automake ***
+dnl ***************************
+AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar])
+AM_CONFIG_HEADER([config.h])
+AM_MAINTAINER_MODE()
+
+dnl ********************************
+dnl *** Check for basic programs ***
+dnl ********************************
+AC_PROG_CC()
+AC_PROG_LD()
+AC_PROG_INSTALL()
+AC_PROG_INTLTOOL()
+
+dnl **********************************
+dnl *** Check for standard headers ***
+dnl **********************************
+AC_CHECK_HEADERS([math.h memory.h stdlib.h string.h sys/stat.h \
+                  sys/time.h time.h])
+
+dnl ************************************
+dnl *** Check for standard functions ***
+dnl ************************************
+AC_CHECK_FUNCS([])
+
+dnl ******************************
+dnl *** Check for i18n support ***
+dnl ******************************
+XDT_I18N([@LINGUAS@])
+
+dnl *******************************
+dnl *** Check for X11 installed ***
+dnl *******************************
+XDT_CHECK_LIBX11_REQUIRE()
+
+dnl ***********************************
+dnl *** Check for required packages ***
+dnl ***********************************
+XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.3.99.2])
+XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.3.99.2])
+XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.1.12rc2])
+XDT_CHECK_PACKAGE([HALSTORAGE], [hal-storage], [0.5.8.1])
+XDT_CHECK_PACKAGE([DBUSGLIB], [dbus-glib-1], [0.71])
+XDT_CHECK_OPTIONAL_PACKAGE([LIBCDIO], [libcdio], [0.76])
+XDT_CHECK_OPTIONAL_PACKAGE([LIBCDDB], [libcddb], [1.2.1])
+XDT_CHECK_OPTIONAL_PACKAGE([GTHREAD], [gthread-2.0], [2.12.4])
+
+dnl ************************************************
+dnl *** Check for required headers and libraries ***
+dnl ************************************************
+AC_CHECK_HEADERS(stdarg.h unistd.h fcntl.h sys/ioctl.h linux/cdrom.h errno.h, ,
+                 [AC_MSG_ERROR(Required header file is missing or unusable.)])
+
+dnl ***********************************
+dnl *** Check for debugging support ***
+dnl ***********************************
+XDT_FEATURE_DEBUG()
+
+dnl ***********************************
+dnl *** Check for optimisations     ***
+dnl ***********************************
+dnl BM_DEBUG_SUPPORT()
+dnl # --enable-final (Disable assertions, as their purpose is debug only)
+AC_ARG_ENABLE([final], AC_HELP_STRING([--enable-final], [Build final version]),
+    [enable_final=yes], [])
+AC_MSG_CHECKING([whether to build final version])
+if test x"$enable_final" = x"yes"; then
+  AC_MSG_RESULT([yes])
+  CPPFLAGS="$CPPFLAGS -DG_DISABLE_CHECKS -DG_DISABLE_ASSERT"
+  CPPFLAGS="$CPPFLAGS -DG_DISABLE_CAST_CHECKS"
+  if test x"$LD" = x""; then
+    AC_PROG_LD()
+  fi
+  AC_MSG_CHECKING([whether $LD accepts -O1])
+  case `$LD -O1 -v 2>&1 </dev/null` in
+  *GNU* | *'with BFD'*)
+    LDFLAGS="$LDFLAGS -Wl,-O1"
+    AC_MSG_RESULT([yes])
+    ;;
+  *)
+    AC_MSG_RESULT([no])
+    ;;
+  esac
+else
+  AC_MSG_RESULT([no])
+fi
+
+dnl *********************************
+dnl *** Substitute platform flags ***
+dnl *********************************
+AC_MSG_CHECKING([PLATFORM_CPPFLAGS])
+AC_MSG_RESULT([$PLATFORM_CPPFLAGS])
+AC_SUBST([PLATFORM_CPPFLAGS])
+AC_MSG_CHECKING([PLATFORM_CFLAGS])
+AC_MSG_RESULT([$PLATFORM_CFLAGS])
+AC_SUBST([PLATFORM_CFLAGS])
+AC_MSG_CHECKING([PLATFORM_LDFLAGS])
+AC_MSG_RESULT([$PLATFORM_LDFLAGS])
+AC_SUBST([PLATFORM_LDFLAGS])
+
+AC_OUTPUT([
+Makefile
+panel-plugin/Makefile
+po/Makefile.in
+])
+
+dnl ***************************
+dnl *** Print configuration ***
+dnl ***************************
+echo
+echo "Build Configuration:"
+echo
+echo "* Debug Support:    $enable_debug"
+echo

Added: xfce4-cddrive-plugin/trunk/panel-plugin/Makefile
===================================================================
--- xfce4-cddrive-plugin/trunk/panel-plugin/Makefile	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/panel-plugin/Makefile	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,732 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# panel-plugin/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+# $Id$
+
+
+srcdir = .
+top_srcdir = ..
+
+pkgdatadir = $(datadir)/xfce4-cddrive-plugin
+pkglibdir = $(libdir)/xfce4-cddrive-plugin
+pkgincludedir = $(includedir)/xfce4-cddrive-plugin
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /usr/bin/install -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+target_triplet = i686-pc-linux-gnu
+plugin_PROGRAMS = xfce4-cddrive-plugin$(EXEEXT)
+subdir = panel-plugin
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(desktopdir)"
+pluginPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(plugin_PROGRAMS)
+am_xfce4_cddrive_plugin_OBJECTS =  \
+	xfce4_cddrive_plugin-cddrive-cdrom.$(OBJEXT) \
+	xfce4_cddrive_plugin-cddrive-process.$(OBJEXT) \
+	xfce4_cddrive_plugin-cddrive-error.$(OBJEXT) \
+	xfce4_cddrive_plugin-cddrive-cddb.$(OBJEXT) \
+	xfce4_cddrive_plugin-cddrive-monitor.$(OBJEXT) \
+	xfce4_cddrive_plugin-cddrive-dialogs.$(OBJEXT) \
+	xfce4_cddrive_plugin-cddrive.$(OBJEXT)
+xfce4_cddrive_plugin_OBJECTS = $(am_xfce4_cddrive_plugin_OBJECTS)
+am__DEPENDENCIES_1 =
+xfce4_cddrive_plugin_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(xfce4_cddrive_plugin_SOURCES)
+DIST_SOURCES = $(xfce4_cddrive_plugin_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+desktopDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(desktop_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/syl/projets/c/xfce4-cddrive-plugin/missing --run aclocal-1.9
+ALL_LINGUAS = fr
+AMDEP_FALSE = #
+AMDEP_TRUE = 
+AMTAR = ${SHELL} /home/syl/projets/c/xfce4-cddrive-plugin/missing --run tar
+AUTOCONF = ${SHELL} /home/syl/projets/c/xfce4-cddrive-plugin/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/syl/projets/c/xfce4-cddrive-plugin/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/syl/projets/c/xfce4-cddrive-plugin/missing --run automake-1.9
+AWK = mawk
+CATALOGS =  fr.gmo
+CATOBJEXT = .gmo
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS =  -DG_DISABLE_CHECKS -DG_DISABLE_ASSERT -DG_DISABLE_CAST_CHECKS
+CYGPATH_W = echo
+DATADIRNAME = share
+DBUSGLIB_CFLAGS = -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  
+DBUSGLIB_LIBS = -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0  
+DBUSGLIB_REQUIRED_VERSION = 0.71
+DBUSGLIB_VERSION = 0.73
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+EXO_CFLAGS = -I/usr/include/exo-0.3 -I/usr/include/gtk-2.0 -I/usr/include/xfce4 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12  
+EXO_LIBS = -lexo-0.3 -lgtk-x11-2.0 -lxfce4util -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXfixes -lpango-1.0 -lcairo -lX11 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0  
+EXO_REQUIRED_VERSION = 0.3.1.12rc2
+EXO_VERSION = 0.3.1.12rc2
+GETTEXT_PACKAGE = xfce4-cddrive-plugin
+GMOFILES =  fr.gmo
+GMSGFMT = /usr/bin/msgfmt
+GREP = /bin/grep
+GTHREAD_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  
+GTHREAD_LIBS = -pthread -lgthread-2.0 -lglib-2.0  
+GTHREAD_REQUIRED_VERSION = 2.12.4
+GTHREAD_VERSION = 2.12.4
+HALSTORAGE_CFLAGS = -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/hal -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include  
+HALSTORAGE_LIBS = -lhal-storage -lhal -ldbus-1  
+HALSTORAGE_REQUIRED_VERSION = 0.5.8.1
+HALSTORAGE_VERSION = 0.5.8.1
+HAVE_GTHREAD_FALSE = #
+HAVE_GTHREAD_TRUE = 
+HAVE_LIBCDDB_FALSE = #
+HAVE_LIBCDDB_TRUE = 
+HAVE_LIBCDIO_FALSE = #
+HAVE_LIBCDIO_TRUE = 
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+INSTOBJEXT = .mo
+INTLLIBS = 
+INTLTOOL_CAVES_RULE = %.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_DESKTOP_RULE = %.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_DIRECTORY_RULE = %.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_EXTRACT = $(top_builddir)/intltool-extract
+INTLTOOL_ICONV = /usr/bin/iconv
+INTLTOOL_KBD_RULE = %.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_KEYS_RULE = %.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_MERGE = $(top_builddir)/intltool-merge
+INTLTOOL_MSGFMT = /usr/bin/msgfmt
+INTLTOOL_MSGMERGE = /usr/bin/msgmerge
+INTLTOOL_OAF_RULE = %.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@
+INTLTOOL_PERL = /usr/bin/perl
+INTLTOOL_PONG_RULE = %.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_PROP_RULE = %.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SCHEMAS_RULE = %.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SERVER_RULE = %.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SERVICE_RULE = %.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SHEET_RULE = %.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SOUNDLIST_RULE = %.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_THEME_RULE = %.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_UI_RULE = %.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_UPDATE = $(top_builddir)/intltool-update
+INTLTOOL_XAM_RULE = %.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_XGETTEXT = /usr/bin/xgettext
+INTLTOOL_XML_NOMERGE_RULE = %.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@
+INTLTOOL_XML_RULE = %.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+LDFLAGS =  -Wl,-O1
+LIBCDDB_CFLAGS =  
+LIBCDDB_LIBS = -lcddb  
+LIBCDDB_REQUIRED_VERSION = 1.2.1
+LIBCDDB_VERSION = 1.2.1
+LIBCDIO_CFLAGS =  
+LIBCDIO_LIBS = -lcdio -lm  
+LIBCDIO_REQUIRED_VERSION = 0.76
+LIBCDIO_VERSION = 0.76
+LIBOBJS = 
+LIBS = 
+LIBX11_CFLAGS = 
+LIBX11_LDFLAGS = 
+LIBX11_LIBS =  -lSM -lICE -lX11
+LIBXFCE4PANEL_CFLAGS = -I/usr/include/xfce4/ -I/usr/include/xfce4 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/atk-1.0  
+LIBXFCE4PANEL_LIBS = -lxfce4panel -lxfcegui4 -lgtk-x11-2.0 -lxfce4util -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXfixes -lpango-1.0 -lcairo -lX11 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0  
+LIBXFCE4PANEL_REQUIRED_VERSION = 4.3.99.2
+LIBXFCE4PANEL_VERSION = 4.3.99.2
+LIBXFCEGUI4_CFLAGS = -I/usr/include/xfce4 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/atk-1.0  
+LIBXFCEGUI4_LIBS = -lxfcegui4 -lgtk-x11-2.0 -lxfce4util -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXfixes -lpango-1.0 -lcairo -lX11 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0  
+LIBXFCEGUI4_REQUIRED_VERSION = 4.3.99.2
+LIBXFCEGUI4_VERSION = 4.3.99.2
+LTLIBOBJS = 
+MAINT = #
+MAINTAINER_MODE_FALSE = 
+MAINTAINER_MODE_TRUE = #
+MAKEINFO = ${SHELL} /home/syl/projets/c/xfce4-cddrive-plugin/missing --run makeinfo
+MKINSTALLDIRS = ./mkinstalldirs
+MSGFMT = /usr/bin/msgfmt
+OBJEXT = o
+PACKAGE = xfce4-cddrive-plugin
+PACKAGE_BUGREPORT = http://bugzilla.xfce.org/
+PACKAGE_NAME = xfce4-cddrive-plugin
+PACKAGE_STRING = xfce4-cddrive-plugin 0.0.1
+PACKAGE_TARNAME = xfce4-cddrive-plugin
+PACKAGE_VERSION = 0.0.1
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+PLATFORM_CFLAGS = 
+PLATFORM_CPPFLAGS = 
+PLATFORM_LDFLAGS = 
+POFILES =  fr.po
+POSUB = po
+PO_IN_DATADIR_FALSE = 
+PO_IN_DATADIR_TRUE = 
+SET_MAKE = 
+SHELL = /bin/sh
+STRIP = 
+USE_NLS = yes
+VERSION = 0.0.1
+XGETTEXT = /usr/bin/xgettext
+XGETTEXT_ARGS = --keyword=Q_
+XMKMF = 
+X_CFLAGS = 
+X_EXTRA_LIBS = 
+X_LIBS = 
+X_PRE_LIBS =  -lSM -lICE
+ac_ct_CC = gcc
+am__fastdepCC_FALSE = #
+am__fastdepCC_TRUE = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = tar --format=ustar -chf - "$$tardir"
+am__untar = tar -xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = /home/syl/projets/c/xfce4-cddrive-plugin/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = mkdir -p --
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+sysconfdir = ${prefix}/etc
+target = i686-pc-linux-gnu
+target_alias = 
+target_cpu = i686
+target_os = linux-gnu
+target_vendor = pc
+INCLUDES = \
+	-I$(top_srcdir)							            \
+	-DG_LOG_DOMAIN=\"xfce4-cddrive-plugin\"	\
+	-DPACKAGE_LOCALE_DIR=\"$(localedir)\"	  \
+	$(PLATFORM_CPPFLAGS)
+
+plugindir = \
+	$(libexecdir)/xfce4/panel-plugins
+
+xfce4_cddrive_plugin_SOURCES = \
+  os-dependant/cddrive-cdrom.h      \
+  os-dependant/cddrive-cdrom.c      \
+  os-dependant/cddrive-process.h    \
+  os-dependant/cddrive-process.c    \
+	cddrive-error.h                   \
+	cddrive-error.c                   \
+  cddrive-cddb.h                    \
+  cddrive-cddb.c                    \
+	cddrive-monitor.h                 \
+  cddrive-monitor-private.h         \
+	cddrive-monitor.c                 \
+	cddrive-dialogs.h			            \
+	cddrive-dialogs.c			            \
+	cddrive.h					                \
+	cddrive.c
+
+xfce4_cddrive_plugin_CFLAGS = \
+	-Wall						            \
+	$(LIBXFCEGUI4_CFLAGS)				\
+	$(LIBXFCE4PANEL_CFLAGS)			\
+	$(EXO_CFLAGS)			          \
+	$(HALSTORAGE_CFLAGS)				\
+  $(DBUSGLIB_CFLAGS)          \
+  $(LIBCDIO_CFLAGS)           \
+  $(LIBCDDB_CFLAGS)           \
+  $(GTHREAD_CFLAGS)           \
+	$(PLATFORM_CFLAGS)
+
+xfce4_cddrive_plugin_LDADD = \
+	$(LIBXFCEGUI4_LIBS)					\
+	$(LIBXFCE4PANEL_LIBS)				\
+	$(EXO_LIBS)  			          \
+	$(HALSTORAGE_LIBS)	        \
+  $(DBUSGLIB_LIBS)            \
+  $(LIBCDIO_LIBS)             \
+  $(LIBCDDB_LIBS)             \
+  $(GTHREAD_LIBS)
+
+
+#
+# Desktop file
+#
+desktopdir = \
+	$(datadir)/xfce4/panel-plugins
+
+desktop_in_in_files = \
+	cddrive.desktop.in.in
+
+desktop_in_files = \
+	$(desktop_in_in_files:.desktop.in.in=.desktop.in)
+
+desktop_DATA = \
+	$(desktop_in_files:.desktop.in=.desktop)
+
+EXTRA_DIST = \
+	$(desktop_in_in_files)
+
+CLEANFILES = \
+	$(desktop_in_files) \
+	$(desktop_DATA)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  panel-plugin/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  panel-plugin/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: # $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-pluginPROGRAMS: $(plugin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(plugindir)" || $(mkdir_p) "$(DESTDIR)$(plugindir)"
+	@list='$(plugin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	  ; then \
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(pluginPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(pluginPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(plugindir)/$$f" || exit 1; \
+	  else :; fi; \
+	done
+
+uninstall-pluginPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(plugin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f '$(DESTDIR)$(plugindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(plugindir)/$$f"; \
+	done
+
+clean-pluginPROGRAMS:
+	-test -z "$(plugin_PROGRAMS)" || rm -f $(plugin_PROGRAMS)
+xfce4-cddrive-plugin$(EXEEXT): $(xfce4_cddrive_plugin_OBJECTS) $(xfce4_cddrive_plugin_DEPENDENCIES) 
+	@rm -f xfce4-cddrive-plugin$(EXEEXT)
+	$(LINK) $(xfce4_cddrive_plugin_LDFLAGS) $(xfce4_cddrive_plugin_OBJECTS) $(xfce4_cddrive_plugin_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/xfce4_cddrive_plugin-cddrive-cddb.Po
+include ./$(DEPDIR)/xfce4_cddrive_plugin-cddrive-cdrom.Po
+include ./$(DEPDIR)/xfce4_cddrive_plugin-cddrive-dialogs.Po
+include ./$(DEPDIR)/xfce4_cddrive_plugin-cddrive-error.Po
+include ./$(DEPDIR)/xfce4_cddrive_plugin-cddrive-monitor.Po
+include ./$(DEPDIR)/xfce4_cddrive_plugin-cddrive-process.Po
+include ./$(DEPDIR)/xfce4_cddrive_plugin-cddrive.Po
+
+.c.o:
+	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c $<
+
+.c.obj:
+	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+xfce4_cddrive_plugin-cddrive-cdrom.o: os-dependant/cddrive-cdrom.c
+	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -MT xfce4_cddrive_plugin-cddrive-cdrom.o -MD -MP -MF "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-cdrom.Tpo" -c -o xfce4_cddrive_plugin-cddrive-cdrom.o `test -f 'os-dependant/cddrive-cdrom.c' || echo '$(srcdir)/'`os-dependant/cddrive-cdrom.c; \
+	then mv -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-cdrom.Tpo" "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-cdrom.Po"; else rm -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-cdrom.Tpo"; exit 1; fi
+#	source='os-dependant/cddrive-cdrom.c' object='xfce4_cddrive_plugin-cddrive-cdrom.o' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -c -o xfce4_cddrive_plugin-cddrive-cdrom.o `test -f 'os-dependant/cddrive-cdrom.c' || echo '$(srcdir)/'`os-dependant/cddrive-cdrom.c
+
+xfce4_cddrive_plugin-cddrive-cdrom.obj: os-dependant/cddrive-cdrom.c
+	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -MT xfce4_cddrive_plugin-cddrive-cdrom.obj -MD -MP -MF "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-cdrom.Tpo" -c -o xfce4_cddrive_plugin-cddrive-cdrom.obj `if test -f 'os-dependant/cddrive-cdrom.c'; then $(CYGPATH_W) 'os-dependant/cddrive-cdrom.c'; else $(CYGPATH_W) '$(srcdir)/os-dependant/cddrive-cdrom.c'; fi`; \
+	then mv -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-cdrom.Tpo" "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-cdrom.Po"; else rm -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-cdrom.Tpo"; exit 1; fi
+#	source='os-dependant/cddrive-cdrom.c' object='xfce4_cddrive_plugin-cddrive-cdrom.obj' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -c -o xfce4_cddrive_plugin-cddrive-cdrom.obj `if test -f 'os-dependant/cddrive-cdrom.c'; then $(CYGPATH_W) 'os-dependant/cddrive-cdrom.c'; else $(CYGPATH_W) '$(srcdir)/os-dependant/cddrive-cdrom.c'; fi`
+
+xfce4_cddrive_plugin-cddrive-process.o: os-dependant/cddrive-process.c
+	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -MT xfce4_cddrive_plugin-cddrive-process.o -MD -MP -MF "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-process.Tpo" -c -o xfce4_cddrive_plugin-cddrive-process.o `test -f 'os-dependant/cddrive-process.c' || echo '$(srcdir)/'`os-dependant/cddrive-process.c; \
+	then mv -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-process.Tpo" "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-process.Po"; else rm -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-process.Tpo"; exit 1; fi
+#	source='os-dependant/cddrive-process.c' object='xfce4_cddrive_plugin-cddrive-process.o' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -c -o xfce4_cddrive_plugin-cddrive-process.o `test -f 'os-dependant/cddrive-process.c' || echo '$(srcdir)/'`os-dependant/cddrive-process.c
+
+xfce4_cddrive_plugin-cddrive-process.obj: os-dependant/cddrive-process.c
+	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -MT xfce4_cddrive_plugin-cddrive-process.obj -MD -MP -MF "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-process.Tpo" -c -o xfce4_cddrive_plugin-cddrive-process.obj `if test -f 'os-dependant/cddrive-process.c'; then $(CYGPATH_W) 'os-dependant/cddrive-process.c'; else $(CYGPATH_W) '$(srcdir)/os-dependant/cddrive-process.c'; fi`; \
+	then mv -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-process.Tpo" "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-process.Po"; else rm -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-process.Tpo"; exit 1; fi
+#	source='os-dependant/cddrive-process.c' object='xfce4_cddrive_plugin-cddrive-process.obj' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -c -o xfce4_cddrive_plugin-cddrive-process.obj `if test -f 'os-dependant/cddrive-process.c'; then $(CYGPATH_W) 'os-dependant/cddrive-process.c'; else $(CYGPATH_W) '$(srcdir)/os-dependant/cddrive-process.c'; fi`
+
+xfce4_cddrive_plugin-cddrive-error.o: cddrive-error.c
+	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -MT xfce4_cddrive_plugin-cddrive-error.o -MD -MP -MF "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-error.Tpo" -c -o xfce4_cddrive_plugin-cddrive-error.o `test -f 'cddrive-error.c' || echo '$(srcdir)/'`cddrive-error.c; \
+	then mv -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-error.Tpo" "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-error.Po"; else rm -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-error.Tpo"; exit 1; fi
+#	source='cddrive-error.c' object='xfce4_cddrive_plugin-cddrive-error.o' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -c -o xfce4_cddrive_plugin-cddrive-error.o `test -f 'cddrive-error.c' || echo '$(srcdir)/'`cddrive-error.c
+
+xfce4_cddrive_plugin-cddrive-error.obj: cddrive-error.c
+	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -MT xfce4_cddrive_plugin-cddrive-error.obj -MD -MP -MF "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-error.Tpo" -c -o xfce4_cddrive_plugin-cddrive-error.obj `if test -f 'cddrive-error.c'; then $(CYGPATH_W) 'cddrive-error.c'; else $(CYGPATH_W) '$(srcdir)/cddrive-error.c'; fi`; \
+	then mv -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-error.Tpo" "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-error.Po"; else rm -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-error.Tpo"; exit 1; fi
+#	source='cddrive-error.c' object='xfce4_cddrive_plugin-cddrive-error.obj' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -c -o xfce4_cddrive_plugin-cddrive-error.obj `if test -f 'cddrive-error.c'; then $(CYGPATH_W) 'cddrive-error.c'; else $(CYGPATH_W) '$(srcdir)/cddrive-error.c'; fi`
+
+xfce4_cddrive_plugin-cddrive-cddb.o: cddrive-cddb.c
+	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -MT xfce4_cddrive_plugin-cddrive-cddb.o -MD -MP -MF "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-cddb.Tpo" -c -o xfce4_cddrive_plugin-cddrive-cddb.o `test -f 'cddrive-cddb.c' || echo '$(srcdir)/'`cddrive-cddb.c; \
+	then mv -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-cddb.Tpo" "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-cddb.Po"; else rm -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-cddb.Tpo"; exit 1; fi
+#	source='cddrive-cddb.c' object='xfce4_cddrive_plugin-cddrive-cddb.o' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -c -o xfce4_cddrive_plugin-cddrive-cddb.o `test -f 'cddrive-cddb.c' || echo '$(srcdir)/'`cddrive-cddb.c
+
+xfce4_cddrive_plugin-cddrive-cddb.obj: cddrive-cddb.c
+	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -MT xfce4_cddrive_plugin-cddrive-cddb.obj -MD -MP -MF "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-cddb.Tpo" -c -o xfce4_cddrive_plugin-cddrive-cddb.obj `if test -f 'cddrive-cddb.c'; then $(CYGPATH_W) 'cddrive-cddb.c'; else $(CYGPATH_W) '$(srcdir)/cddrive-cddb.c'; fi`; \
+	then mv -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-cddb.Tpo" "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-cddb.Po"; else rm -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-cddb.Tpo"; exit 1; fi
+#	source='cddrive-cddb.c' object='xfce4_cddrive_plugin-cddrive-cddb.obj' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -c -o xfce4_cddrive_plugin-cddrive-cddb.obj `if test -f 'cddrive-cddb.c'; then $(CYGPATH_W) 'cddrive-cddb.c'; else $(CYGPATH_W) '$(srcdir)/cddrive-cddb.c'; fi`
+
+xfce4_cddrive_plugin-cddrive-monitor.o: cddrive-monitor.c
+	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -MT xfce4_cddrive_plugin-cddrive-monitor.o -MD -MP -MF "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-monitor.Tpo" -c -o xfce4_cddrive_plugin-cddrive-monitor.o `test -f 'cddrive-monitor.c' || echo '$(srcdir)/'`cddrive-monitor.c; \
+	then mv -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-monitor.Tpo" "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-monitor.Po"; else rm -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-monitor.Tpo"; exit 1; fi
+#	source='cddrive-monitor.c' object='xfce4_cddrive_plugin-cddrive-monitor.o' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -c -o xfce4_cddrive_plugin-cddrive-monitor.o `test -f 'cddrive-monitor.c' || echo '$(srcdir)/'`cddrive-monitor.c
+
+xfce4_cddrive_plugin-cddrive-monitor.obj: cddrive-monitor.c
+	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -MT xfce4_cddrive_plugin-cddrive-monitor.obj -MD -MP -MF "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-monitor.Tpo" -c -o xfce4_cddrive_plugin-cddrive-monitor.obj `if test -f 'cddrive-monitor.c'; then $(CYGPATH_W) 'cddrive-monitor.c'; else $(CYGPATH_W) '$(srcdir)/cddrive-monitor.c'; fi`; \
+	then mv -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-monitor.Tpo" "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-monitor.Po"; else rm -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-monitor.Tpo"; exit 1; fi
+#	source='cddrive-monitor.c' object='xfce4_cddrive_plugin-cddrive-monitor.obj' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -c -o xfce4_cddrive_plugin-cddrive-monitor.obj `if test -f 'cddrive-monitor.c'; then $(CYGPATH_W) 'cddrive-monitor.c'; else $(CYGPATH_W) '$(srcdir)/cddrive-monitor.c'; fi`
+
+xfce4_cddrive_plugin-cddrive-dialogs.o: cddrive-dialogs.c
+	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -MT xfce4_cddrive_plugin-cddrive-dialogs.o -MD -MP -MF "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-dialogs.Tpo" -c -o xfce4_cddrive_plugin-cddrive-dialogs.o `test -f 'cddrive-dialogs.c' || echo '$(srcdir)/'`cddrive-dialogs.c; \
+	then mv -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-dialogs.Tpo" "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-dialogs.Po"; else rm -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-dialogs.Tpo"; exit 1; fi
+#	source='cddrive-dialogs.c' object='xfce4_cddrive_plugin-cddrive-dialogs.o' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -c -o xfce4_cddrive_plugin-cddrive-dialogs.o `test -f 'cddrive-dialogs.c' || echo '$(srcdir)/'`cddrive-dialogs.c
+
+xfce4_cddrive_plugin-cddrive-dialogs.obj: cddrive-dialogs.c
+	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -MT xfce4_cddrive_plugin-cddrive-dialogs.obj -MD -MP -MF "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-dialogs.Tpo" -c -o xfce4_cddrive_plugin-cddrive-dialogs.obj `if test -f 'cddrive-dialogs.c'; then $(CYGPATH_W) 'cddrive-dialogs.c'; else $(CYGPATH_W) '$(srcdir)/cddrive-dialogs.c'; fi`; \
+	then mv -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-dialogs.Tpo" "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-dialogs.Po"; else rm -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive-dialogs.Tpo"; exit 1; fi
+#	source='cddrive-dialogs.c' object='xfce4_cddrive_plugin-cddrive-dialogs.obj' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -c -o xfce4_cddrive_plugin-cddrive-dialogs.obj `if test -f 'cddrive-dialogs.c'; then $(CYGPATH_W) 'cddrive-dialogs.c'; else $(CYGPATH_W) '$(srcdir)/cddrive-dialogs.c'; fi`
+
+xfce4_cddrive_plugin-cddrive.o: cddrive.c
+	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -MT xfce4_cddrive_plugin-cddrive.o -MD -MP -MF "$(DEPDIR)/xfce4_cddrive_plugin-cddrive.Tpo" -c -o xfce4_cddrive_plugin-cddrive.o `test -f 'cddrive.c' || echo '$(srcdir)/'`cddrive.c; \
+	then mv -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive.Tpo" "$(DEPDIR)/xfce4_cddrive_plugin-cddrive.Po"; else rm -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive.Tpo"; exit 1; fi
+#	source='cddrive.c' object='xfce4_cddrive_plugin-cddrive.o' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -c -o xfce4_cddrive_plugin-cddrive.o `test -f 'cddrive.c' || echo '$(srcdir)/'`cddrive.c
+
+xfce4_cddrive_plugin-cddrive.obj: cddrive.c
+	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -MT xfce4_cddrive_plugin-cddrive.obj -MD -MP -MF "$(DEPDIR)/xfce4_cddrive_plugin-cddrive.Tpo" -c -o xfce4_cddrive_plugin-cddrive.obj `if test -f 'cddrive.c'; then $(CYGPATH_W) 'cddrive.c'; else $(CYGPATH_W) '$(srcdir)/cddrive.c'; fi`; \
+	then mv -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive.Tpo" "$(DEPDIR)/xfce4_cddrive_plugin-cddrive.Po"; else rm -f "$(DEPDIR)/xfce4_cddrive_plugin-cddrive.Tpo"; exit 1; fi
+#	source='cddrive.c' object='xfce4_cddrive_plugin-cddrive.obj' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_cddrive_plugin_CFLAGS) $(CFLAGS) -c -o xfce4_cddrive_plugin-cddrive.obj `if test -f 'cddrive.c'; then $(CYGPATH_W) 'cddrive.c'; else $(CYGPATH_W) '$(srcdir)/cddrive.c'; fi`
+uninstall-info-am:
+install-desktopDATA: $(desktop_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(desktopdir)" || $(mkdir_p) "$(DESTDIR)$(desktopdir)"
+	@list='$(desktop_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(desktopDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(desktopdir)/$$f'"; \
+	  $(desktopDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(desktopdir)/$$f"; \
+	done
+
+uninstall-desktopDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(desktop_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(desktopdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(desktopdir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(desktopdir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-pluginPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-desktopDATA install-pluginPROGRAMS
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-desktopDATA uninstall-info-am \
+	uninstall-pluginPROGRAMS
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-pluginPROGRAMS ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-desktopDATA install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-pluginPROGRAMS install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-desktopDATA uninstall-info-am \
+	uninstall-pluginPROGRAMS
+
+
+%.desktop.in: %.desktop.in.in
+	sed -e "s,\@libexecdir\@,$(libexecdir),g" < $< > $@
+
+%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+
+# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: xfce4-cddrive-plugin/trunk/panel-plugin/Makefile.am
===================================================================
--- xfce4-cddrive-plugin/trunk/panel-plugin/Makefile.am	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/panel-plugin/Makefile.am	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,82 @@
+# $Id$
+
+INCLUDES =									              \
+	-I$(top_srcdir)							            \
+	-DG_LOG_DOMAIN=\"xfce4-cddrive-plugin\"	\
+	-DPACKAGE_LOCALE_DIR=\"$(localedir)\"	  \
+	$(PLATFORM_CPPFLAGS)
+
+
+plugin_PROGRAMS =			  \
+	xfce4-cddrive-plugin
+
+plugindir =								          \
+	$(libexecdir)/xfce4/panel-plugins
+
+xfce4_cddrive_plugin_SOURCES =	    \
+  os-dependant/cddrive-cdrom.h      \
+  os-dependant/cddrive-cdrom.c      \
+  os-dependant/cddrive-process.h    \
+  os-dependant/cddrive-process.c    \
+	cddrive-error.h                   \
+	cddrive-error.c                   \
+  cddrive-cddb.h                    \
+  cddrive-cddb.c                    \
+	cddrive-monitor.h                 \
+  cddrive-monitor-private.h         \
+	cddrive-monitor.c                 \
+	cddrive-dialogs.h			            \
+	cddrive-dialogs.c			            \
+	cddrive.h					                \
+	cddrive.c
+
+xfce4_cddrive_plugin_CFLAGS =	\
+	-Wall						            \
+	$(LIBXFCEGUI4_CFLAGS)				\
+	$(LIBXFCE4PANEL_CFLAGS)			\
+	$(EXO_CFLAGS)			          \
+	$(HALSTORAGE_CFLAGS)				\
+  $(DBUSGLIB_CFLAGS)          \
+  $(LIBCDIO_CFLAGS)           \
+  $(LIBCDDB_CFLAGS)           \
+  $(GTHREAD_CFLAGS)           \
+	$(PLATFORM_CFLAGS)
+
+xfce4_cddrive_plugin_LDADD =	\
+	$(LIBXFCEGUI4_LIBS)					\
+	$(LIBXFCE4PANEL_LIBS)				\
+	$(EXO_LIBS)  			          \
+	$(HALSTORAGE_LIBS)	        \
+  $(DBUSGLIB_LIBS)            \
+  $(LIBCDIO_LIBS)             \
+  $(LIBCDDB_LIBS)             \
+  $(GTHREAD_LIBS)
+
+#
+# Desktop file
+#
+desktopdir =								      \
+	$(datadir)/xfce4/panel-plugins
+
+desktop_in_in_files =		\
+	cddrive.desktop.in.in
+
+desktop_in_files =							                    \
+	$(desktop_in_in_files:.desktop.in.in=.desktop.in)
+
+%.desktop.in: %.desktop.in.in
+	sed -e "s,\@libexecdir\@,$(libexecdir),g" < $< > $@
+
+desktop_DATA =								            \
+	$(desktop_in_files:.desktop.in=.desktop)
+
+ at INTLTOOL_DESKTOP_RULE@
+
+EXTRA_DIST =						  \
+	$(desktop_in_in_files)
+
+CLEANFILES =					\
+	$(desktop_in_files) \
+	$(desktop_DATA)
+
+# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:

Added: xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-cddb.c
===================================================================
--- xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-cddb.c	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-cddb.c	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,368 @@
+/*  $Id$
+ *
+ *  Copyright (c) 2007 The Xfce development team. All rights reserved.
+ *
+ *  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 Library 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 "cddrive-cddb.h"
+
+#if defined (HAVE_LIBCDIO) && defined (HAVE_LIBCDDB)
+
+#include <cdio/cdio.h>
+#include <cddb/cddb.h>
+#include <libxfce4util/libxfce4util.h>
+
+
+#ifndef PACKAGE
+#define PACKAGE "xfce4-cddrive-plugin"
+#endif
+#ifndef VERSION
+#define VERSION "unknown"
+#endif
+
+#define CDDRIVE_CDDB_CACHE_PATH           "xfce4/panel/cddrive"
+#define CDDRIVE_CDDB_CACHE_GROUP          "Cddb"
+#define CDDRIVE_CDDB_CACHE_SIZE           20
+#define cddrive_cddb_get_key_for_id(id)   g_strdup_printf ("%08x", id)
+
+
+
+/* Save a pair (CDDB id, CD title) in the cache file only if it is not already
+   stored. Do nothing otherwise.
+   
+   If it does not yet exist, create the cache file before saving.
+   
+   The cache file is a Xfce rc file, containing a group called "Cddb" with
+   at most CDDRIVE_CDDB_CACHE_SIZE entries, each having a CDDB id as the key,
+   and a CD title as the value.
+*/
+static void
+cddrive_cddb_cache_save (guint id, const gchar *title)
+{
+  XfceRc *cache;
+  gchar* *keys;
+  gchar  *k;
+  guint   nb;
+
+  cache = xfce_rc_config_open (XFCE_RESOURCE_CACHE,
+                               CDDRIVE_CDDB_CACHE_PATH,
+                               FALSE);
+  if (cache == NULL)
+    {
+      g_warning ("unable to open CDDB cache file.");
+      return;
+    }
+  
+  xfce_rc_set_group (cache, CDDRIVE_CDDB_CACHE_GROUP);
+  
+  k = cddrive_cddb_get_key_for_id (id);
+  if (! xfce_rc_has_entry (cache, k))
+    {
+      /* check if the cache limit is reached. If so, remove the first entry. */
+      keys = xfce_rc_get_entries (cache, CDDRIVE_CDDB_CACHE_GROUP);
+      nb = g_strv_length (keys);
+    
+      if (nb >= CDDRIVE_CDDB_CACHE_SIZE)
+        xfce_rc_delete_entry (cache, keys [0], FALSE);
+      
+      g_strfreev (keys);
+      
+      /* write the new entry */
+      xfce_rc_write_entry (cache, k, title);
+    }
+  
+  xfce_rc_close (cache);
+  g_free (k);
+}
+
+
+
+/* Return the title corresponding to the CDDB id 'id' in the cache, or NULL
+   if not found. */
+gchar*
+cddrive_cddb_cache_read (guint id)
+{
+  XfceRc *cache;
+  gchar  *k, *res;
+
+  cache = xfce_rc_config_open (XFCE_RESOURCE_CACHE,
+                               CDDRIVE_CDDB_CACHE_PATH,
+                               TRUE);
+  if (cache == NULL)
+    {
+      g_warning ("unable to open CDDB cache file.");
+      return NULL;
+    }
+  
+  xfce_rc_set_group (cache, CDDRIVE_CDDB_CACHE_GROUP);
+  k = cddrive_cddb_get_key_for_id (id);
+  res = g_strdup (xfce_rc_read_entry (cache, k, NULL));
+  xfce_rc_close (cache);
+  g_free (k);
+  
+  return res;
+}
+
+
+
+/* Set the cddb id and the length of the audio CD in 'cdda', as well as each
+   track and its frame offset.
+   Return TRUE on success, FALSE otherwise. */
+static gboolean
+cddrive_cddb_fill_cdda (CdIo_t *cdio, cddb_disc_t *cdda)
+{
+  track_t       first, last, i; /* first, last and current track numbers */
+  lba_t         lba;
+  cddb_track_t *track;
+  
+  /* set CDDA's length */
+  lba = cdio_get_track_lba (cdio, CDIO_CDROM_LEADOUT_TRACK);
+  if (lba == CDIO_INVALID_LBA)
+    {
+      g_warning ("leadout track has invalid Logical Block Address.");
+      return FALSE;
+    }
+  cddb_disc_set_length (cdda, FRAMES_TO_SECONDS (lba));
+
+  /* get number of the first track (should be 1, but just in case...) */
+  first = cdio_get_first_track_num (cdio);
+  if (first == CDIO_INVALID_TRACK)
+    {
+      g_warning ("unable to get first track number.");
+      return FALSE;
+    }
+
+  /* get number of the last track */
+  last = cdio_get_last_track_num (cdio);
+  if (last == CDIO_INVALID_TRACK)
+    {
+      g_warning ("unable to get last track number.");
+      return FALSE;
+    }
+  
+  /* set frame offset for each track of the CDDA */
+  for (i = first; i <= last; i++)
+    {
+      track = cddb_track_new ();
+      if (track == NULL)
+        {
+          g_warning ("not enough memory to get CDDA title.");
+          return FALSE;
+        }
+      
+      cddb_disc_add_track (cdda, track);
+      
+      lba = cdio_get_track_lba (cdio, i);
+      if (lba == CDIO_INVALID_LBA)
+        {
+          g_warning ("invalid Logical Block Adress for track %d.", i);
+          return FALSE;
+        }
+      
+      cddb_track_set_frame_offset (track, lba);
+    }
+  
+  if (! cddb_disc_calc_discid (cdda))
+    {
+      g_warning ("failed to compute the CDDB disc id.");
+      return FALSE;
+    }
+  
+  return TRUE;
+}
+
+
+
+static cddb_disc_t*
+cddrive_cddb_new_cdda (const gchar* device)
+{
+  cddb_disc_t *res;
+  CdIo_t      *cdio;
+
+  cdio = cdio_open_cd (device);
+  if (cdio == NULL)
+  {
+    g_warning ("unable to open CDDA in drive '%s'.", device);
+    return NULL;
+  }
+
+  res = cddb_disc_new ();
+  if (res == NULL)
+    g_warning ("not enough memory to get CDDA title.");
+  else
+    {
+      if (! cddrive_cddb_fill_cdda (cdio, res))
+        {
+          cddb_disc_destroy (res);
+          res = NULL;
+        }
+    }
+  
+  cdio_destroy (cdio);
+  return res;
+}
+
+
+
+static cddb_conn_t*
+cddrive_cddb_new_connection ()
+{
+  cddb_conn_t *res;
+
+  res = cddb_new ();
+  if (res == NULL)
+    {
+      g_warning ("failed to create CDDB connection.");
+      return NULL;
+    }
+  
+  /* Use HTTP rather than CDDB to avoid firewall headaches...
+     as soon as freedb.org accept HTTP requests again. */
+  /*cddb_http_enable (res);*/
+  
+  cddb_set_client (res, PACKAGE, VERSION);
+  
+  /* cache disabled (cache does not work for me, and we only need to cache the title anyway) */
+  cddb_cache_disable (res);
+  
+  return res;
+}
+
+
+
+static gpointer
+cddrive_cddb_cache_title_from_server (gpointer data)
+{
+  cddb_disc_t *cdda = (cddb_disc_t*) data;
+  cddb_conn_t *conn;
+  static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
+
+  /* we don't want two connections at the same time, have mercy for freedb.org,
+     nor we want two thread writing in the cache together; hence the mutex. */
+  if (g_static_mutex_trylock (&mutex))
+    {
+      conn = cddrive_cddb_new_connection ();
+      if (conn != NULL)
+        {
+          if (cddb_query (conn, cdda) == -1)
+            g_warning ("query on server '%s' failed (%s).",
+                       cddb_get_server_name (conn),
+                       cddb_error_str (cddb_errno (conn)));
+          else
+            {
+              if (cddb_disc_get_title (cdda) != NULL)
+                cddrive_cddb_cache_save (cddb_disc_get_discid (cdda),
+                                         cddb_disc_get_title (cdda));
+            }
+      
+          cddb_destroy (conn);
+        }
+      g_static_mutex_unlock (&mutex);
+    }
+  
+  cddb_disc_destroy (cdda);
+  
+  return NULL; /* dummy return value */
+}
+
+
+
+gchar*
+cddrive_cddb_get_title (const gchar* device)
+{
+  gchar       *res = NULL;
+  cddb_disc_t *cdda;
+
+  cdda = cddrive_cddb_new_cdda (device);
+  if (cdda != NULL)
+    {
+      res = cddrive_cddb_cache_read (cddb_disc_get_discid (cdda));
+      
+      if (res == NULL)
+        {
+          /* the CDDB disc id was not found in cache. Try to fetch it on freedb.org */
+        
+#ifdef HAVE_GTHREAD
+          /* if possible, fetch the title in a thread, so the plugin do not freeze
+             while attempting to connect to the server */          
+          g_thread_create (cddrive_cddb_cache_title_from_server,
+                           cdda,
+                           FALSE,
+                           NULL);
+          /* note: cdda is destroyed in the thread function */
+        
+#else
+          /* no thread support, plugin freeze will depend on the connection quality */
+          cddrive_cddb_cache_title_from_server (cdda);
+          res = g_strdup (cddb_disc_get_title (cdda));
+          cddb_disc_destroy (cdda);
+#endif
+        }
+      else
+        cddb_disc_destroy (cdda);
+    }
+
+  return res;
+}
+
+
+
+void
+cddrive_cddb_init_globals ()
+{
+#ifdef HAVE_GTHREAD
+  if (! g_thread_supported ())
+    g_thread_init (NULL);
+#endif
+}
+
+
+
+void
+cddrive_cddb_free_globals ()
+{
+  libcddb_shutdown ();
+}
+
+
+
+#else /* ---------- NO CDDB SUPPORT ---------- */
+
+gchar*
+cddrive_cddb_get_title (const gchar* device)
+{
+  return NULL;
+}
+
+
+
+void
+cddrive_cddb_init_globals ()
+{
+}
+
+
+
+void
+cddrive_cddb_free_globals ()
+{
+}
+
+#endif

Added: xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-cddb.h
===================================================================
--- xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-cddb.h	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-cddb.h	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,51 @@
+/*  $Id$
+ *
+ *  Copyright (c) 2007 The Xfce development team. All rights reserved.
+ *
+ *  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 Library 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 __CDDRIVE_CDDB_H__
+#define __CDDRIVE_CDDB_H__
+
+#include <glib.h>
+
+
+G_BEGIN_DECLS
+
+/* freedb.org support (to get the title of an audio CD) */
+
+
+/* To call at program start */
+void
+cddrive_cddb_init_globals ();
+
+
+
+/* Free cddb global resources.
+   To call at program termination. */
+void
+cddrive_cddb_free_globals ();
+
+
+
+/* Return the title of the audio CD in the drive of device path 'device',
+   or NULL if the drive have no audio CD, or if the operation failed.
+   The result must be freed after use. */
+gchar*
+cddrive_cddb_get_title (const gchar* device);
+
+G_END_DECLS
+#endif

Added: xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-dialogs.c
===================================================================
--- xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-dialogs.c	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-dialogs.c	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,663 @@
+/*  $Id$
+ *
+ *  Copyright (c) 2007 The Xfce development team. All rights reserved.
+ *
+ *  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 Library 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 <libxfcegui4/libxfcegui4.h>
+#include "cddrive-error.h"
+#include "cddrive.h"
+#include "cddrive-dialogs.h"
+#include "cddrive-monitor.h"
+
+
+#define CDDRIVE_TITLE            _("CD Drive Monitor")
+#define CDDRIVE_VERSION          "0.0.1"
+#define CDDRIVE_COPYRIGHT_YEARS  "2007"
+#define CDDRIVE_COPYRIGHT_OWNERS "The Xfce development team. All rights reserved."
+
+#define CDDRIVE_SECTION_PADDING             5
+#define CDDRIVE_SECTION_VBOX_SPACING        5
+#define CDDRIVE_SECTION_VBOX_PADDING        5
+#define CDDRIVE_VBOX_SPACING                5
+#define CDDRIVE_VBOX_PADDING                5
+#define CDDRIVE_NAME_TOGGLES_LEFT_PADDING   20
+#define CDDRIVE_TABLE_SETTINGS  GTK_SHRINK|GTK_FILL, GTK_SHRINK|GTK_FILL, 5, 5
+
+#define CDDRIVE_NAME_ENTRY_MAX_LEN    10
+#define CDDRIVE_COMMAND_ENTRY_MAX_LEN 300 /* hope it is enough to store a command line */
+
+#define CDDRIVE_DRIVE_INFOS_ID            "drv_infos"
+#define CDDRIVE_TOGGLE_BUTTON_WIDGET_ID   "wid"
+#define CDDRIVE_MOUNT_ENTRY_ID            "mount_entry"
+#define CDDRIVE_UNMOUNT_ENTRY_ID          "unmount_entry"
+
+
+
+/* Read fallback command from corresponding entry,
+  and clear the data pointing to the entry */
+static void
+cddrive_configure_pick_fallback_command (CddrivePlugin      *cddrive,
+                                         CddriveCommandType  command_type)
+{
+  gchar     *eid;
+  GtkEntry  *e;
+
+  eid = (command_type == CDDRIVE_MOUNT) ? CDDRIVE_MOUNT_ENTRY_ID : CDDRIVE_UNMOUNT_ENTRY_ID;
+  e = GTK_ENTRY (g_object_get_data (G_OBJECT (cddrive->plugin), eid));
+  
+  if (command_type == CDDRIVE_MOUNT)
+    cddrive_set_mount_fallback (cddrive, gtk_entry_get_text (e));
+  else
+    cddrive_set_unmount_fallback (cddrive, gtk_entry_get_text (e));
+
+  g_object_set_data (G_OBJECT (cddrive->plugin), eid, NULL);
+}
+
+
+
+static void
+cddrive_configure_response (GtkWidget     *dialog,
+                            gint           response,
+                            CddrivePlugin *cddrive)
+{
+  CddriveDriveInfo* *nfo;
+
+  /* retrieve and free drives infos list */
+  nfo = (CddriveDriveInfo**) g_object_get_data (G_OBJECT (cddrive->plugin),
+                                                CDDRIVE_DRIVE_INFOS_ID);
+  if (nfo != NULL)
+    cddrive_cdrom_drive_infos_free (nfo);
+  
+  /* set mount and unmount commands options */
+  cddrive_configure_pick_fallback_command (cddrive, CDDRIVE_MOUNT);
+  cddrive_configure_pick_fallback_command (cddrive, CDDRIVE_UNMOUNT);
+  
+  /* end dialog */
+  g_object_set_data (G_OBJECT (cddrive->plugin), CDDRIVE_DRIVE_INFOS_ID, NULL);
+  g_object_set_data (G_OBJECT (cddrive->plugin), "dialog", NULL);
+  gtk_widget_destroy (dialog);
+  xfce_panel_plugin_unblock_menu (cddrive->plugin);
+
+  cddrive_save (cddrive->plugin, cddrive);
+  cddrive_update_monitor (cddrive);
+}
+
+
+
+static void
+cddrive_toggle_button_set_widget (GtkToggleButton *button, GtkWidget *widget)
+{
+  g_object_set_data (G_OBJECT (button),
+                     CDDRIVE_TOGGLE_BUTTON_WIDGET_ID,
+                     widget);
+  gtk_widget_set_sensitive (widget, gtk_toggle_button_get_active (button));
+}
+
+
+
+static GtkWidget*
+cddrive_toggle_button_get_widget (GtkToggleButton *button)
+{
+  return GTK_WIDGET (g_object_get_data (G_OBJECT (button),
+                                        CDDRIVE_TOGGLE_BUTTON_WIDGET_ID));
+}
+
+
+
+/* Enable/disable the widget associated with a toggle button */
+static void
+cddrive_toggle_button_toggle_widget (GtkToggleButton *button)
+{
+  gtk_widget_set_sensitive (cddrive_toggle_button_get_widget (button),
+                            gtk_toggle_button_get_active (button));
+}
+
+
+
+static void
+cddrive_configure_change_device (GtkComboBox   *device_combo_box,
+                                 CddrivePlugin *cddrive)
+{
+  CddriveDriveInfo* *drv_infos;
+  gint              i;
+
+  /* retrieve drives infos list */
+  drv_infos = (CddriveDriveInfo**) g_object_get_data (G_OBJECT (cddrive->plugin),
+                                                      CDDRIVE_DRIVE_INFOS_ID);
+  i = gtk_combo_box_get_active (device_combo_box);
+
+  g_free (cddrive->device);
+  
+  cddrive->device = g_strdup (drv_infos [i]->device);
+  cddrive_update_monitor (cddrive);
+  gtk_widget_show (cddrive->image);
+}
+
+
+
+static void
+cddrive_configure_change_name (GtkEntry      *name_entry,
+                               CddrivePlugin *cddrive)
+{
+  
+  if (cddrive->name != NULL)
+    g_free (cddrive->name);
+  
+  cddrive->name = g_strdup (gtk_entry_get_text (GTK_ENTRY (name_entry)));
+  cddrive_update_label (cddrive);
+  if (cddrive->label != NULL)
+    gtk_widget_show (cddrive->label);
+}
+
+
+
+static void
+cddrive_configure_toggle_panel_name (GtkButton     *toggle,
+                                     CddrivePlugin *cddrive)
+{
+  GtkWidget *name_entry = cddrive_toggle_button_get_widget (GTK_TOGGLE_BUTTON (toggle));
+
+  cddrive->use_name_in_panel = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle));
+  gtk_widget_set_sensitive (name_entry,
+                            cddrive->use_name_in_panel || cddrive->use_name_in_tip);
+
+  cddrive_update_label (cddrive);
+  if (cddrive->label != NULL)
+    gtk_widget_show (cddrive->label);
+}
+
+
+
+static void
+cddrive_configure_toggle_tip_name (GtkButton     *toggle,
+                                   CddrivePlugin *cddrive)
+{
+  GtkWidget *name_entry = cddrive_toggle_button_get_widget (GTK_TOGGLE_BUTTON (toggle));
+
+  cddrive->use_name_in_tip = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle));
+  gtk_widget_set_sensitive (name_entry,
+                            cddrive->use_name_in_panel || cddrive->use_name_in_tip);
+  cddrive_update_tip (cddrive);
+}
+
+
+
+static void
+cddrive_configure_toggle_mounted_color (GtkButton     *toggle,
+                                        CddrivePlugin *cddrive)
+{
+  cddrive->use_mounted_color = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle));
+  cddrive_toggle_button_toggle_widget (GTK_TOGGLE_BUTTON (toggle));
+  cddrive_update_icon (cddrive);
+}
+
+
+
+static void
+cddrive_configure_toggle_unmounted_color (GtkButton     *toggle,
+                                          CddrivePlugin *cddrive)
+{
+  cddrive->use_unmounted_color = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle));
+  cddrive_toggle_button_toggle_widget (GTK_TOGGLE_BUTTON (toggle));
+  cddrive_update_icon (cddrive);
+}
+
+
+
+static GdkColor*
+cddrive_configure_get_color_copy (GtkColorButton  *button)
+{
+  GdkColor *res, c;
+
+  gtk_color_button_get_color (button, &c);
+  
+  /* to be sure 'color_to_update' can later be freed with 'gdk_color_free()'.
+  
+     May be 'color_to_update' can be set directly with 'gtk_color_button_get_color()',
+     but GDK API only state that 'gdk_color_free()' is used to free colors which
+     are set with 'gdk_color_copy()'.
+     As, in the plugin, 'gdk_color_free()' must be used to free colors which are
+     set from the config file, 'color_to_update' is here set as a copy to avoid
+     any problem in other parts of the plugin. */
+  res = gdk_color_copy (&c);
+  
+  /* again no clear info about the color map used by 'gtk_color_button_get_color ()',
+     and how the color set with 'gtk_color_button_get_color' should be freed. */
+  gdk_colormap_free_colors (gdk_colormap_get_system(), &c, 1);
+
+  return res;
+}
+
+
+
+static void
+cddrive_configure_change_mounted_color (GtkColorButton *button,
+                                        CddrivePlugin  *cddrive)
+{
+  if (cddrive->mounted_color != NULL)
+    gdk_color_free (cddrive->mounted_color);
+  cddrive->mounted_color = cddrive_configure_get_color_copy (button);
+  cddrive_update_icon (cddrive);
+}
+
+
+
+static void
+cddrive_configure_change_unmounted_color (GtkColorButton *button,
+                                          CddrivePlugin  *cddrive)
+{
+  if (cddrive->unmounted_color != NULL)
+    gdk_color_free (cddrive->unmounted_color);
+  cddrive->unmounted_color = cddrive_configure_get_color_copy (button);
+  cddrive_update_icon (cddrive);
+}
+
+
+
+static void
+cddrive_configure_toggle_translucency (GtkButton     *toggle,
+                                       CddrivePlugin *cddrive)
+{
+  cddrive->use_translucency = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle));
+  cddrive_toggle_button_toggle_widget (GTK_TOGGLE_BUTTON (toggle));
+  cddrive_update_icon (cddrive);
+}
+
+
+
+static void
+cddrive_configure_change_translucency (GtkSpinButton *spin_button,
+                                       CddrivePlugin *cddrive)
+{
+  cddrive->translucency = gtk_spin_button_get_value (spin_button);
+  cddrive_update_icon (cddrive);
+}
+
+
+
+static GtkBox*
+cddrive_create_section_vbox (CddrivePlugin *cddrive,
+                             GtkDialog     *dialog,
+                             gchar         *title)
+{
+  GtkWidget *res, *frm;
+
+  res = gtk_vbox_new (FALSE, CDDRIVE_SECTION_VBOX_SPACING);
+  frm = xfce_create_framebox_with_content (title, res);
+  gtk_box_pack_start (GTK_BOX (dialog->vbox), frm,
+                      FALSE, FALSE, CDDRIVE_SECTION_PADDING);
+  return GTK_BOX (res);
+}
+
+
+
+static void
+cddrive_add_fallback_entry (CddrivePlugin      *cddrive,
+                            GtkTable           *table,
+                            CddriveCommandType  command_type)
+{
+  GtkWidget   *align, *label, *entry;
+  GtkTooltips *tip;
+  gchar       *cmd ,*label_txt, *tip_txt, *entry_id, *tmp;
+  gint         table_row;
+
+  if (command_type == CDDRIVE_MOUNT)
+    {
+      cmd       = cddrive->mount_fallback;
+      label_txt = _("Mounting");
+      tip_txt   = _("Enter a command to use if HAL system fails to mount the disc.");
+      entry_id  = CDDRIVE_MOUNT_ENTRY_ID;
+      table_row = 0;
+    }
+  else
+    {
+      cmd       = cddrive->unmount_fallback;
+      label_txt = _("Unmounting");
+      tip_txt   = _("Enter a command to use if the HAL system fails to unmount the disc.");
+      entry_id  = CDDRIVE_UNMOUNT_ENTRY_ID;
+      table_row = 1;
+    }
+
+  align = gtk_alignment_new (0, 0.5, 0, 0);
+  /*gtk_alignment_set_padding (GTK_ALIGNMENT (align), 0, 0, 0, 0);*/  
+  gtk_table_attach (table, align, 0, 1, table_row, table_row + 1, CDDRIVE_TABLE_SETTINGS);
+  label = gtk_label_new (label_txt);
+  gtk_container_add (GTK_CONTAINER (align), label);
+    
+  entry = gtk_entry_new_with_max_length (CDDRIVE_COMMAND_ENTRY_MAX_LEN);
+  if (cmd != NULL)
+    gtk_entry_set_text (GTK_ENTRY (entry), cmd);
+  gtk_table_attach (table, entry, 1, 2, table_row, table_row + 1, CDDRIVE_TABLE_SETTINGS);
+  /* to retrieve entry the response callback */
+  g_object_set_data (G_OBJECT (cddrive->plugin), entry_id, entry);
+
+  tmp = g_strjoin ("\n\n", tip_txt, _("You can use \"%d\", \"%m\" and \"%u\" \
+character sequences as arguments for your command. These will be replaced respectively \
+with the device path, the disc mount point and the disc UDI."), NULL);
+  tip = gtk_tooltips_new ();
+  gtk_tooltips_set_tip (tip, entry, tmp, NULL);
+  g_free (tmp);
+}
+
+
+
+static void
+cddrive_add_icon_color_option (CddrivePlugin *cddrive,
+                               GtkTable *table,
+                               CddriveCommandType status_type)
+{
+  GtkWidget *tb, *cb;
+  gchar     *label_txt;
+  gint       table_row;
+  gboolean   toggled;
+  GdkColor  *color;
+  GCallback  toggle_callback, color_callback;
+
+  if (status_type == CDDRIVE_MOUNT)
+    {
+      label_txt       = _("Mounted disc icon color");
+      table_row       = 0;
+      toggled         = cddrive->use_mounted_color;
+      color           = cddrive->mounted_color;
+      toggle_callback = G_CALLBACK (cddrive_configure_toggle_mounted_color);
+      color_callback  = G_CALLBACK (cddrive_configure_change_mounted_color);
+    }
+  else
+    {
+      label_txt       = _("Unmounted disc icon color");
+      table_row       = 1;
+      toggled         = cddrive->use_unmounted_color;
+      color           = cddrive->unmounted_color;
+      toggle_callback = G_CALLBACK (cddrive_configure_toggle_unmounted_color);
+      color_callback  = G_CALLBACK (cddrive_configure_change_unmounted_color);
+    }
+  
+  tb = gtk_check_button_new_with_label (label_txt);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tb), toggled);
+  gtk_table_attach (table, tb, 0, 1, table_row, table_row + 1,
+                    CDDRIVE_TABLE_SETTINGS);
+  g_signal_connect (tb, "clicked", toggle_callback, cddrive);
+      
+  cb = gtk_color_button_new ();
+  if (color != NULL)
+    gtk_color_button_set_color (GTK_COLOR_BUTTON (cb), color);
+  gtk_table_attach (table, cb, 1, 2, table_row, table_row + 1,
+                    CDDRIVE_TABLE_SETTINGS);
+  g_signal_connect (cb, "color-set", color_callback, cddrive);
+  /* to enable/disable the color button when the toggle is selected/deselected */
+  cddrive_toggle_button_set_widget (GTK_TOGGLE_BUTTON (tb), cb);
+}
+
+
+
+void
+cddrive_configure (XfcePanelPlugin  *plugin,
+                   CddrivePlugin    *cddrive)
+{
+  GtkWidget         *drv_wid, *hbox, *align, *table,
+                    *label, *entry, *button, *spin_button;
+  GtkDialog         *dialog;
+  GtkBox            *section_vbox, *vbox;
+  CddriveDriveInfo* *drv_infos;
+  gint               i;
+  gchar             *combo_txt;
+  GError            *err = NULL;
+
+  xfce_panel_plugin_block_menu (plugin);
+
+  dialog = GTK_DIALOG (xfce_titled_dialog_new_with_buttons (CDDRIVE_TITLE,
+                                                NULL,
+                                                GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR,
+                                                GTK_STOCK_CLOSE, GTK_RESPONSE_OK,
+                                                NULL));
+
+  gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER);
+
+  gtk_window_set_icon_name (GTK_WINDOW (dialog), "xfce4-settings");
+
+  /* link the dialog to the plugin, so we can destroy it when the plugin
+   * is closed, but the dialog is still open */
+  g_object_set_data (G_OBJECT (plugin), CDDRIVE_DRIVE_INFOS_ID, dialog);
+
+  g_signal_connect (G_OBJECT (dialog), "response",
+                    G_CALLBACK(cddrive_configure_response), cddrive);
+                    
+  gtk_container_set_border_width (GTK_CONTAINER (dialog), 2);
+  
+
+  /* --- "Drive" section  --- */
+  section_vbox = cddrive_create_section_vbox (cddrive, dialog, _("Drive"));
+  
+  /* get infos (device path and model) for all detected CD-ROM drives */
+  drv_infos = cddrive_cdrom_drive_infos_new (&err);
+  
+  if (drv_infos == NULL)
+    drv_wid = gtk_label_new (_("CD-ROM drive detection failed !"));
+    /* 'err' is displayed after the dialog is shown; see at the end of this function */
+  else
+    {
+      if (drv_infos [0] == NULL)
+        drv_wid = gtk_label_new (_("No CD-ROM drive detected"));
+      else
+        {
+          /* create the CD-ROM drivers combo box */
+          drv_wid = gtk_combo_box_new_text ();
+        
+          /* to get selected device in change callback and free devices infos
+             in response callback */
+          g_object_set_data (G_OBJECT (cddrive->plugin),
+                             CDDRIVE_DRIVE_INFOS_ID,
+                             drv_infos);
+       
+          /* fill the combo box */
+          i = 0;
+          while (drv_infos [i] != NULL)
+            {
+              combo_txt = g_strconcat (drv_infos [i]->model,
+                                       " ( ",
+                                       drv_infos [i]->device,
+                                       " )",
+                                       NULL);
+              gtk_combo_box_append_text (GTK_COMBO_BOX (drv_wid), combo_txt);
+              if (cddrive->device != NULL &&
+                  g_str_equal (cddrive->device, drv_infos [i]->device))
+                gtk_combo_box_set_active (GTK_COMBO_BOX (drv_wid), i);
+              
+              i++;
+            }
+          
+          g_signal_connect (drv_wid,
+                            "changed",
+                            G_CALLBACK (cddrive_configure_change_device), 
+                            cddrive);
+          
+          if (gtk_combo_box_get_active (GTK_COMBO_BOX (drv_wid)) == -1)
+            /* None of the driver match the configured device path.
+               Select the first one in the list. */
+            gtk_combo_box_set_active (GTK_COMBO_BOX (drv_wid), 0);
+       }
+    }
+  gtk_box_pack_start (section_vbox, drv_wid,
+                      FALSE, FALSE, CDDRIVE_SECTION_VBOX_PADDING);
+
+  if (drv_infos != NULL && drv_infos [0] != NULL)
+    {
+      /* if some drives have been detected... */
+    
+
+      /* --- "Commands" section --- */    
+      section_vbox = cddrive_create_section_vbox (cddrive, dialog, _("Fallback Commands"));
+      table = gtk_table_new (2, 2, FALSE);
+      gtk_box_pack_start (section_vbox, table,
+                          FALSE, FALSE, CDDRIVE_SECTION_VBOX_PADDING);
+      cddrive_add_fallback_entry (cddrive, GTK_TABLE (table), CDDRIVE_MOUNT);
+      cddrive_add_fallback_entry (cddrive, GTK_TABLE (table), CDDRIVE_UNMOUNT);
+    
+     
+      /* --- "Display" section --- */
+    
+      /* -- name config -- */
+      section_vbox = cddrive_create_section_vbox (cddrive, dialog, _("Display"));
+    
+      hbox = gtk_hbox_new (FALSE, 0);
+      gtk_box_pack_start (section_vbox, hbox, FALSE, FALSE, 0);
+    
+      label = gtk_label_new (_("Name to display"));
+      gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 5);
+    
+      entry = gtk_entry_new ();
+      if (cddrive->name != NULL)
+        gtk_entry_set_text (GTK_ENTRY (entry), cddrive->name);
+      gtk_entry_set_max_length (GTK_ENTRY (entry), CDDRIVE_NAME_ENTRY_MAX_LEN);
+      
+      gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 5);
+      g_signal_connect (entry,
+                        "changed",
+                        G_CALLBACK (cddrive_configure_change_name),
+                        cddrive);
+                       
+      align = gtk_alignment_new (0, 0, 0, 0);
+      gtk_alignment_set_padding (GTK_ALIGNMENT (align),
+                                 0, 0,
+                                 CDDRIVE_NAME_TOGGLES_LEFT_PADDING, 0);
+      gtk_box_pack_start (section_vbox, align,
+                          FALSE, FALSE, CDDRIVE_VBOX_PADDING);
+                          
+      vbox = GTK_BOX (gtk_vbox_new (FALSE, CDDRIVE_VBOX_SPACING));
+      gtk_container_add (GTK_CONTAINER (align), GTK_WIDGET (vbox));
+      
+      button = gtk_check_button_new_with_label (_("display in panel"));
+      gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
+                                    cddrive->use_name_in_panel);
+      gtk_box_pack_start (vbox, button, FALSE, FALSE, 0);
+      g_signal_connect (button,
+                        "clicked",
+                        G_CALLBACK (cddrive_configure_toggle_panel_name),
+                        cddrive);
+      /* to enable/disable the name entry when the toggle button is clicked */
+      cddrive_toggle_button_set_widget (GTK_TOGGLE_BUTTON (button), entry);
+      
+      button = gtk_check_button_new_with_label (_("use in tooltip"));
+      gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
+                                    cddrive->use_name_in_tip);
+      gtk_box_pack_start (vbox, button, FALSE, FALSE, 0);
+      g_signal_connect (button,
+                        "clicked",
+                        G_CALLBACK (cddrive_configure_toggle_tip_name),
+                        cddrive);
+      /* to enable/disable the name entry when the toggle button is clicked */
+      cddrive_toggle_button_set_widget (GTK_TOGGLE_BUTTON (button), entry);
+    
+      /* -- mounted/unmounted disc icon config -- */
+      table = gtk_table_new (2, 2, FALSE);
+      gtk_box_pack_start (section_vbox, table,
+                          FALSE, FALSE, CDDRIVE_SECTION_VBOX_PADDING);
+                          
+      cddrive_add_icon_color_option (cddrive, GTK_TABLE (table), CDDRIVE_MOUNT);
+      cddrive_add_icon_color_option (cddrive, GTK_TABLE (table), CDDRIVE_UNMOUNT);
+    
+      button = gtk_check_button_new_with_label (_("Unmounted disc icon opacity"));
+        /* "opacity" is shorter than "translucency", and, i think, more commonly used */
+      gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
+                                    cddrive->use_translucency);
+      gtk_table_attach (GTK_TABLE (table), button, 0, 1, 2, 3,
+                        CDDRIVE_TABLE_SETTINGS);
+      g_signal_connect (button,
+                        "clicked",
+                        G_CALLBACK (cddrive_configure_toggle_translucency),
+                        cddrive);
+      
+      spin_button = gtk_spin_button_new_with_range (0, 100, 1);
+      gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin_button), cddrive->translucency);
+      gtk_table_attach (GTK_TABLE (table), spin_button, 1, 2, 2, 3,
+                        CDDRIVE_TABLE_SETTINGS);
+      g_signal_connect (spin_button,
+                        "value-changed",
+                        G_CALLBACK (cddrive_configure_change_translucency),
+                        cddrive);
+      /* to enable/disable the opacity spin button when the toggle button is clicked */
+      cddrive_toggle_button_set_widget (GTK_TOGGLE_BUTTON (button), spin_button);
+    }
+  
+  gtk_widget_show_all (GTK_WIDGET (dialog));
+  
+  if (err != NULL)
+    {
+      cddrive_show_error (err);
+      cddrive_clear_error (&err); /* useless with _current_ implementation */
+    }
+}
+
+
+
+void
+cddrive_about (XfcePanelPlugin *plugin)
+{
+  XfceAboutInfo *nfo;
+  GtkWidget     *dialog;
+
+  nfo = xfce_about_info_new (CDDRIVE_TITLE,
+                             CDDRIVE_VERSION,
+                             _("CD-ROM drive tray and content control"),
+                             XFCE_COPYRIGHT_TEXT (CDDRIVE_COPYRIGHT_YEARS,
+                                                  CDDRIVE_COPYRIGHT_OWNERS),
+                             XFCE_LICENSE_GPL);
+  xfce_about_info_add_credit (nfo, "Sylvain Reynal", "sreynal at nerim.net", "author");
+
+  dialog = xfce_about_dialog_new_with_values (NULL, nfo, NULL);
+  xfce_about_info_free (nfo);
+
+  gtk_dialog_run(GTK_DIALOG(dialog));
+  gtk_widget_destroy (dialog);
+}
+
+
+
+void
+cddrive_show_error_message (CddriveError error_group,
+                            const gchar *error_message)
+{
+  g_assert (error_message != NULL);
+
+  /* xfce_err ("%s : %s", cddrive_error_get_label (error_group), error_message); */
+  xfce_message_dialog (NULL,
+                       _("Error"),
+                       GTK_STOCK_DIALOG_ERROR,
+                       cddrive_error_get_label (error_group),
+                       error_message,
+                       GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
+                       NULL);
+}
+
+
+
+void
+cddrive_show_error (const GError *error)
+{
+  g_assert (error != NULL);
+
+  if (error->message != NULL)
+    cddrive_show_error_message (error->code,
+                                error->message);
+  else
+    cddrive_show_error_message (error->code,
+                                _("No error description available."));
+}

Added: xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-dialogs.h
===================================================================
--- xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-dialogs.h	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-dialogs.h	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,46 @@
+/*  $Id$
+ *
+ *  Copyright (c) 2007 The Xfce development team. All rights reserved.
+ *
+ *  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 Library 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 __CDDRIVE_DIALOGS_H__
+#define __CDDRIVE_DIALOGS_H__
+
+#include <libxfce4panel/xfce-panel-plugin.h>
+#include "cddrive.h"
+
+
+G_BEGIN_DECLS
+
+void
+cddrive_configure               (XfcePanelPlugin *plugin,
+                                 CddrivePlugin   *cddrive);
+
+void
+cddrive_about                   (XfcePanelPlugin *plugin);
+
+
+void
+cddrive_show_error_message      (CddriveError  error_group,
+                                 const gchar  *error_message);
+
+
+void
+cddrive_show_error              (const GError *error);
+
+G_END_DECLS
+#endif

Added: xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-error.c
===================================================================
--- xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-error.c	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-error.c	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,140 @@
+/*  $Id$
+ *
+ *  Copyright (c) 2007 The Xfce development team. All rights reserved.
+ *
+ *  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 Library 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 <stdarg.h>
+#include <libintl.h>
+#include "cddrive-error.h"
+
+#define _(message) gettext (message)
+#define gettext_noop(message) message
+
+
+/* To be able to report an "out of memory" error.
+   Freed with 'cddrive_error_free_globals()'. */
+static GError *_cddrive_no_memory_error;
+
+
+
+/*#define CDDRIVE_ERROR_LABEL_COUNT 7*/
+static const gchar* const cddrive_error_label [] =
+{
+  gettext_noop ("Configuration error"),
+  gettext_noop ("System error"),
+  gettext_noop ("Eject failed"),
+  gettext_noop ("Close failed"),
+  gettext_noop ("Mount failed"),
+  gettext_noop ("Unmount failed"),
+  gettext_noop ("Busy disc"),
+};
+
+
+
+void
+cddrive_error_init_globals ()
+{
+  _cddrive_no_memory_error = g_error_new (CDDRIVE_ERROR_DOMAIN,
+                                          CDDRIVE_ERROR_SYSTEM,
+                                          _("Not enough memory to perform the operation."));
+}
+
+
+
+void
+cddrive_error_free_globals ()
+{
+  g_error_free (_cddrive_no_memory_error);
+}
+
+
+
+void
+cddrive_set_error (GError       **error,
+                   CddriveError   code,
+                   const gchar   *format,
+                   ...)
+{
+  /* Slower than a macro, but type safe (ensure code is right at compilation time) */
+  va_list  vl;
+  gchar   *msg;
+
+  va_start (vl, format);
+  msg = g_strdup_vprintf (format, vl);
+  va_end (vl);
+
+  g_set_error (error,
+               CDDRIVE_ERROR_DOMAIN,
+               code,
+               msg);
+  g_free (msg);
+}
+
+
+
+void
+cddrive_set_error_code (GError **error, CddriveError code)
+{
+  GError *new = NULL;
+
+  g_assert (*error != NULL);
+  
+  if (*error != _cddrive_no_memory_error && (*error)->code != code)
+    {
+      g_set_error (&new, CDDRIVE_ERROR_DOMAIN, code, (*error)->message);
+      g_clear_error (error);
+      g_propagate_error (error, new);
+    }
+}
+
+
+
+GError*
+cddrive_no_memory_error ()
+{
+  g_assert (_cddrive_no_memory_error != NULL);
+  return _cddrive_no_memory_error;
+}
+
+
+
+void
+cddrive_clear_error (GError **error)
+{
+  if (error != NULL)
+    {
+      if (*error != _cddrive_no_memory_error)
+        g_clear_error (error);
+      else
+        *error = NULL;
+    }
+}
+
+
+
+const gchar*
+cddrive_error_get_label (CddriveError code)
+{
+  g_assert (code >= 0);
+  g_assert (code < g_strv_length ((gchar**) cddrive_error_label));
+
+  return _(cddrive_error_label [code]);
+}

Added: xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-error.h
===================================================================
--- xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-error.h	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-error.h	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,95 @@
+/*  $Id$
+ *
+ *  Copyright (c) 2007 The Xfce development team. All rights reserved.
+ *
+ *  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 Library 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 __CDDRIVE_ERROR_H__
+#define __CDDRIVE_ERROR_H__
+
+#include <glib.h>
+
+
+#define CDDRIVE_ERROR_DOMAIN          g_quark_from_static_string ("CDDRIVE_ERROR")
+
+
+G_BEGIN_DECLS
+
+/* IMPORTANT: when adding an error code to the following enum, do not forget to
+   add the corresponding label (even a NULL one) to cddrive_error_label in cddrive-error.c */
+typedef enum
+{
+  CDDRIVE_ERROR_FAILED  = 0x00, /* external config error (due to hald not running for example) */
+  CDDRIVE_ERROR_SYSTEM  = 0x01,
+  CDDRIVE_ERROR_EJECT   = 0x02,
+  CDDRIVE_ERROR_CLOSE   = 0x03,
+  CDDRIVE_ERROR_MOUNT   = 0x04,
+  CDDRIVE_ERROR_UNMOUNT = 0x05,
+  CDDRIVE_ERROR_BUSY    = 0x06  /* disc busy */
+}
+CddriveError;
+
+
+
+/* To call at program start */
+void
+cddrive_error_init_globals ();
+
+
+
+/* Free error global resource (i.e. 'cddrive_no_memory_error').
+   To call at program termination. */
+void
+cddrive_error_free_globals ();
+
+
+
+/* Set a 'CDDRIVE_ERROR_*' error (slower than a macro, but type safe for 'code') */
+void
+cddrive_set_error          (GError       **error,
+                            CddriveError   code,
+                            const gchar   *format,
+                            ...);
+                            
+                            
+
+/* Set 'error' code with 'code' (leave 'error' message unchanged).
+   '*error' must not be NULL. */
+void
+cddrive_set_error_code     (GError **error, CddriveError code);
+
+
+
+/* Return an "out of memory" error... even if there is no more free memory */
+GError*
+cddrive_no_memory_error    ();
+
+
+
+/* Safe way to free an error set with a 'cddrive_*()' function.
+   Act the same as 'g_clear_error'. */
+void
+cddrive_clear_error        (GError **error);
+
+
+
+/* Return the label corresponding to the code of 'error'.
+   'error' must have been set with a CddriveError code. */
+const gchar*
+cddrive_error_get_label    (CddriveError code);
+
+G_END_DECLS
+#endif

Added: xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-monitor-private.h
===================================================================
--- xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-monitor-private.h	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-monitor-private.h	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,77 @@
+/*  $Id$
+ *
+ *  Copyright (c) 2007 The Xfce development team. All rights reserved.
+ *
+ *  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 Library 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
+
+#ifndef __CDDRIVE_MONITOR_PRIVATE_H__
+#define __CDDRIVE_MONITOR_PRIVATE_H__
+
+#include <hal/libhal-storage.h>
+
+
+G_BEGIN_DECLS
+
+typedef struct
+{
+  LibHalContext *ctx;
+  gpointer       on_disc_inserted;
+  gpointer       on_disc_removed;
+  gpointer       on_disc_modified;
+  gboolean       callbacks_enabled;
+
+  gchar         *dev;                  /* CD-ROM drive's device path                       */
+  gchar         *udi;                  /* CD-ROM disc's UDI (NULL if none)                 */
+  gpointer       dat;                  /* data to use in callbacks                         */
+  gchar*         mount;                /* fallback mount command (not empty if not NULL)   */
+  gchar *        unmount;              /* fallback unmount command (not empty if not NULL) */
+
+  /* to know if 'mount' and 'unmount' needs to be formatted before execution */
+  gboolean       mount_needs_update;   
+  gboolean       unmount_needs_update;
+
+  /* special status infos */
+
+  /* set once at init only (could have been set for each new CddriveStatus, but
+     we don't really expect this property to change, do we ?) */
+  gboolean       is_ejectable;
+
+  /* audio disc title cache */
+  gchar         *audio_title;
+} _CddriveMonitor;
+
+
+
+typedef struct
+{
+  gboolean         is_empty;     /* is the drive empty (no disc inside) ?                 */
+  gboolean         is_open;      /* is the tray open   ?                                  */
+  gboolean         is_mounted;   /* is there a mounted disc in the drive ?                */
+  gboolean         is_blank;     /* is there a blank disc in the drive ?                  */
+  gboolean         is_audio;     /* is there an audio disc in the drive ?                 */
+  gchar           *title;        /* title of disc if there is one, NULL otherwise         */
+  const gchar     *type;         /* type of disc if there is one, NULL otherwise          */
+  const gchar     *icon_name;    /* name of the icon showing the drive status, never NULL */
+
+  _CddriveMonitor *mon;          /* to access cached datas */
+} _CddriveStatus;
+
+G_END_DECLS
+#endif

Added: xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-monitor.c
===================================================================
--- xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-monitor.c	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-monitor.c	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,1307 @@
+/*  $Id$
+ *
+ *  Copyright (c) 2007 The Xfce development team. All rights reserved.
+ *
+ *  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 Library 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 <libintl.h>
+#include <dbus/dbus-glib-lowlevel.h>
+
+#include "cddrive-monitor.h"
+#include "cddrive-error.h"
+#include "os-dependant/cddrive-process.h"
+#include "os-dependant/cddrive-cdrom.h"
+#include "cddrive-cddb.h"
+
+
+#define _(message) gettext (message)
+#define gettext_noop(message) message
+
+#define CDDRIVE_DBUS_REPLY_TIMEOUT  -1 /* in milliseconds (-1 = default timeout value) */
+#define CDDRIVE_HAL_DEST            "org.freedesktop.Hal"
+#define CDDRIVE_HAL_IFACE_STORAGE   "org.freedesktop.Hal.Device.Storage"
+#define CDDRIVE_HAL_IFACE_VOLUME    "org.freedesktop.Hal.Device.Volume"
+
+#define CDDRIVE_UNKNOWN_STATUS_ICON_NAME "stock_unknown"
+#define CDDRIVE_EMPTY_DRIVE_ICON_NAME    "gnome-dev-removable"
+
+/* commented as long as the open/close event is not notified */
+/* #define CDDRIVE_OPEN_DRIVE_ICON_NAME     "gnome-dev-removable" */
+
+
+
+/* HAL icon names mapping                                     */
+/*(originaly borrowed from gnome-vfs-hal-mounts.c (rev 5309)) */
+/* Remove this once exo-hal replace the direct use of HAL.    */
+#define CDDRIVE_AUDIO_DISC_ICON_NAME  "gnome-dev-cdrom-audio"
+static const gchar* const cddrive_disc_icon_name [] =
+{
+  "gnome-dev-disc-cdr",
+  "gnome-dev-disc-cdr",
+  "gnome-dev-disc-cdrw",
+  "gnome-dev-disc-dvdrom",
+  "gnome-dev-disc-dvdram",
+  "gnome-dev-disc-dvdr",
+  "gnome-dev-disc-dvdrw",
+  "gnome-dev-disc-dvdr-plus",
+  "gnome-dev-disc-dvdrw",
+  "gnome-dev-disc-dvdr-plus"
+};
+
+/* note: do these strings need to be gettextized ? */
+static const gchar* const cddrive_disc_type_name [] =
+{
+	gettext_noop ("cd-rom"),
+	gettext_noop ("cd-r"),
+	gettext_noop ("cd-rw"),
+	gettext_noop ("dvd"),     /*dvd-rom */
+	gettext_noop ("dvd-ram"),
+	gettext_noop ("dvd-r"),
+	gettext_noop ("dvd-rw"),
+	gettext_noop ("dvd+r"),
+	gettext_noop ("dvd+rw"),
+	gettext_noop ("dvd+r dl"),
+	gettext_noop ("bd-rom"),
+	gettext_noop ("bd-r"),
+	gettext_noop ("bd-re"),
+	gettext_noop ("hddvd"),   /* hddvd-rom */
+	gettext_noop ("hddvd-r"),
+	gettext_noop ("hddvd-rw")
+};
+
+
+
+/* Set a GError from a DBusError. */
+static void
+cddrive_store_dbus_error (GError       **error,
+                          CddriveError   code,
+                          DBusError     *dbus_error)
+{
+  g_assert (error == NULL || *error == NULL);
+  g_assert (dbus_error_is_set (dbus_error));
+
+  g_warning (dbus_error->message);
+  if (error != NULL)
+    cddrive_set_error (error,
+                       code,
+                       dbus_error->message);
+}
+
+
+
+static LibHalVolume*
+cddrive_monitor_get_hal_disc (CddriveMonitor *monitor, GError **error);
+
+
+
+/* Set 'error' with 'code' and a message indicating the locking process, if possible.
+   If a problem occured, then only the code of error will be changed
+   (that's why error must be set before the call, to provide a message as precise
+   as possible, or be NULL to set nothing). */
+static void
+cddrive_set_disc_busy_error (GError         **error,
+                             CddriveError     code,
+                             CddriveMonitor  *monitor)
+{
+  LibHalVolume *v;
+  guint64       pid;
+  gchar        *name;
+
+  g_assert (error == NULL || *error != NULL);
+  g_assert (monitor != NULL);
+  g_assert (monitor->udi != NULL);
+  
+  if (error == NULL)
+    /* nothing to set */
+    return;
+  
+  v = cddrive_monitor_get_hal_disc (monitor, NULL);
+  if (v == NULL)
+    {
+      g_warning ("failed to retrieve disc with UDI '%s'", monitor->udi);
+      cddrive_set_error_code (error, code);
+      return;
+    }
+  
+  pid = cddrive_find_dir_locker_pid (libhal_volume_get_mount_point (v));
+  libhal_volume_free (v);
+  
+	if (pid == 0)
+    {
+      g_warning ("unable to retrieve the disc lock");
+      /* just set the code of the error, leaving the original message unchanged */
+      cddrive_set_error_code (error, code);
+      return;
+    }
+    
+  /* we know the locker's pid; enough to set a new error */
+  cddrive_clear_error (error);
+  
+  name = cddrive_get_process_name (pid);
+  if (name == NULL)
+    cddrive_set_error (error,
+                       code,
+                       _("The disc is locked by a process (pid: %llu)."),
+                       pid);
+  else
+    {
+      cddrive_set_error (error,
+                         code,
+                         _("The disc is locked by the program '%s' (pid: %llu)."),
+                         name,
+                         pid);
+      g_free (name);
+    }
+}
+
+
+
+static void
+cddrive_close_hal_context (LibHalContext *context)
+{
+  libhal_ctx_shutdown (context, NULL);
+  libhal_ctx_free (context);
+}
+
+
+
+static LibHalContext*
+cddrive_get_new_hal_context (GError **error)
+{
+  LibHalContext  *res = NULL;
+  DBusConnection *con;
+  DBusError       derr;
+
+  g_assert (error == NULL || *error == NULL);
+
+  dbus_error_init (&derr);
+
+  con = dbus_bus_get (DBUS_BUS_SYSTEM, &derr);
+  if (G_UNLIKELY (dbus_error_is_set (&derr)))
+    {
+      cddrive_store_dbus_error (error, CDDRIVE_ERROR_FAILED, &derr);
+      dbus_error_free (&derr);
+      return NULL;
+    }
+  
+  dbus_connection_setup_with_g_main (con, NULL);  
+  res = libhal_ctx_new ();
+  
+  if (G_UNLIKELY (! libhal_ctx_set_dbus_connection (res, con)))
+    {
+      cddrive_set_error (error,
+                         CDDRIVE_ERROR_FAILED,
+                         _("Failed to set the D-BUS connection of HAL context."));
+      libhal_ctx_free (res);
+      return NULL;
+    }
+  
+  if (G_UNLIKELY (! libhal_ctx_init (res, &derr)))
+    {
+      cddrive_store_dbus_error (error, CDDRIVE_ERROR_FAILED, &derr);
+      dbus_error_free (&derr);
+      cddrive_close_hal_context (res);
+      return NULL;
+    }
+
+  return res;
+}
+
+
+
+CddriveDriveInfo**
+cddrive_cdrom_drive_infos_new (GError **error)
+{
+  CddriveDriveInfo* *res;
+  LibHalContext     *ctx;
+  LibHalDrive       *drv;
+  DBusError          derr;
+  gchar*            *udis;
+  gint               i, count;
+
+  g_assert (error == NULL || *error == NULL);
+
+  ctx = cddrive_get_new_hal_context (error);
+
+  if (ctx == NULL)
+    return NULL;
+
+  dbus_error_init (&derr);
+  udis = libhal_find_device_by_capability (ctx,
+                                           "storage.cdrom",
+                                           &count,
+                                           &derr);
+  if (udis == NULL)
+    {
+      cddrive_store_dbus_error (error, CDDRIVE_ERROR_FAILED, &derr);
+      dbus_error_free (&derr);
+      cddrive_close_hal_context (ctx);
+      return NULL;
+    }
+    
+  res = (CddriveDriveInfo**) g_malloc0 ((count + 1) * sizeof (CddriveDriveInfo*));
+  
+  for (i=0; i < count; i++)
+    {
+      drv = libhal_drive_from_udi (ctx, udis [i]);
+
+      res [i] = (CddriveDriveInfo*) g_malloc0 (sizeof (CddriveDriveInfo));      
+      res [i]->device = g_strdup (libhal_drive_get_device_file (drv));
+      res [i]->model  = g_strdup (libhal_drive_get_model (drv));
+      
+      libhal_drive_free (drv);
+    }
+  res [count] = NULL;
+  
+  libhal_free_string_array (udis);
+  cddrive_close_hal_context (ctx);
+  
+  return res;
+}
+
+
+
+void
+cddrive_cdrom_drive_infos_free (CddriveDriveInfo* *infos)
+{
+  gint i;
+
+  g_assert (infos != NULL);
+
+  i = 0;
+  while (infos [i] != NULL)
+    {
+      g_free (infos[i]->device);
+      g_free (infos[i]->model);
+      g_free (infos [i]);
+      i++;
+    }
+  
+  g_free (infos);
+}
+
+
+
+/* Return the monitored drive from stored device path or NULL if retrieve failed. */
+static LibHalDrive*
+cddrive_monitor_get_hal_drive (CddriveMonitor *monitor, GError **error)
+{
+  LibHalDrive *res;
+
+  g_assert (monitor != NULL);
+  g_assert (monitor->dev != NULL);
+  g_assert (error == NULL || *error == NULL);
+
+  res = libhal_drive_from_device_file (monitor->ctx, monitor->dev);
+  if (G_UNLIKELY (res == NULL))
+    {
+      cddrive_set_error (error,
+                         CDDRIVE_ERROR_FAILED,
+                         _("Failed to retrieve drive from device path '%s'."),
+                         monitor->dev);
+    }
+  
+  return res;
+}
+
+
+
+/* Return the monitored disc from stored UDI, NULL if there is no disc or
+  retrieve failed. */
+static LibHalVolume*
+cddrive_monitor_get_hal_disc (CddriveMonitor *monitor, GError **error)
+{
+  LibHalVolume *res;
+
+  g_assert (monitor != NULL);
+  g_assert (error == NULL || *error == NULL);
+
+  if (monitor->udi == NULL)
+    return NULL;
+  
+  res = libhal_volume_from_udi (monitor->ctx, monitor->udi);
+  if (G_UNLIKELY (res == NULL))
+    cddrive_set_error (error,
+                       CDDRIVE_ERROR_FAILED,
+                       _("Failed to retrieve disc from UDI '%s'."),
+                       monitor->udi);
+  return res;
+}
+
+
+
+static void
+cddrive_monitor_hal_callback_property_modified (LibHalContext *ctx,
+                                                const char    *udi,
+                                                const char    *key,
+                                                dbus_bool_t    is_removed,
+                                                dbus_bool_t    is_added)
+{
+  CddriveMonitor *m;
+
+  g_assert (ctx != NULL);
+
+  m = (CddriveMonitor*) libhal_ctx_get_user_data (ctx);
+  g_assert (m != NULL);
+
+  /* filter the properties we are interested in */
+  if (g_str_equal (key, "volume.is_mounted") ||
+      g_str_equal (key, "volume.ignore"))
+    {
+      (*((CddriveOnDiscModified) m->on_disc_modified)) (m, m->dat);
+    }
+}
+
+
+
+
+static void
+cddrive_monitor_register_disc (CddriveMonitor  *monitor,
+                               LibHalVolume    *disc)
+{
+  DBusError derr;
+
+  g_assert (monitor != NULL);
+  g_assert (monitor->udi == NULL); /* if not NULL, need to unregister first */
+  g_assert (disc != NULL);
+
+  monitor->udi = g_strdup (libhal_volume_get_udi (disc));
+  
+  dbus_error_init (&derr);
+
+  if (G_UNLIKELY (! libhal_device_add_property_watch (monitor->ctx, monitor->udi, &derr)))
+    {
+      g_warning (derr.message);
+      dbus_error_free (&derr);
+      return;
+    }
+  
+  if (G_UNLIKELY (! libhal_ctx_set_device_property_modified (
+                              monitor->ctx,
+                              cddrive_monitor_hal_callback_property_modified)))
+    {
+      g_warning (_("Failed to set drive's status change callback."));
+      if (G_UNLIKELY (! libhal_device_remove_property_watch (monitor->ctx,
+                                                             monitor->udi,
+                                                             &derr)))
+        g_warning (derr.message);
+        dbus_error_free (&derr);
+    }
+}
+
+
+
+static void
+cddrive_monitor_unregister_disc (CddriveMonitor *monitor)
+{
+  DBusError derr;
+
+  g_assert (monitor != NULL);
+  g_assert (monitor->udi != NULL);
+
+  dbus_error_init (&derr);
+  if (! libhal_device_remove_property_watch (monitor->ctx, monitor->udi, &derr))
+    {
+      g_warning (derr.message);
+      dbus_error_free (&derr);
+    }
+  
+  g_free (monitor->udi);
+  monitor->udi = NULL;
+  
+  if (monitor->audio_title != NULL)
+    {
+      g_free (monitor->audio_title);
+      monitor->audio_title = NULL;
+    }
+}
+
+
+
+static void
+cddrive_monitor_update_disc (CddriveMonitor *monitor)
+{
+  LibHalVolume *v;
+
+  g_assert (monitor != NULL);
+  g_assert (monitor->dev != NULL);
+
+  if (monitor->udi != NULL)
+    cddrive_monitor_unregister_disc (monitor);
+
+  v = libhal_volume_from_device_file (monitor->ctx, monitor->dev);
+  if (v != NULL)
+    {
+      cddrive_monitor_register_disc (monitor, v);
+      libhal_volume_free (v);
+    }
+}
+
+
+
+static void
+cddrive_monitor_hal_callback_device_added (LibHalContext *ctx, const char *udi)
+{
+  CddriveMonitor *m;
+
+  g_assert (ctx != NULL);
+  g_assert (udi != NULL);
+
+  m = (CddriveMonitor*) libhal_ctx_get_user_data (ctx);
+  g_assert (m != NULL);
+
+  cddrive_monitor_update_disc (m);
+  if (m->udi != NULL && g_str_equal (m->udi, udi))
+      (*((CddriveOnDiscInserted) m->on_disc_inserted)) (m, m->dat);
+}
+
+
+
+static void
+cddrive_monitor_hal_callback_device_removed (LibHalContext *ctx, const char *udi)
+{
+  CddriveMonitor *m;
+
+  g_assert (ctx != NULL);
+  g_assert (udi != NULL);
+
+  m = (CddriveMonitor*) libhal_ctx_get_user_data (ctx);
+  g_assert (m != NULL);
+
+  if (m->udi != NULL && g_str_equal (m->udi, udi))
+    {
+      cddrive_monitor_unregister_disc (m);
+      (*((CddriveOnDiscRemoved) m->on_disc_removed)) (m, m->dat);
+    }
+}
+
+
+
+gboolean
+cddrive_monitor_enable_callbacks (CddriveMonitor *monitor,
+                                  gboolean enable,
+                                  GError **error)
+{
+  DBusError derr;
+
+  g_assert (monitor != NULL);
+
+  if (monitor->callbacks_enabled == enable)
+    return TRUE;
+  
+  if (enable)
+    {
+      /*enable callbacks */
+    
+      if (G_UNLIKELY (! libhal_ctx_set_device_added (monitor->ctx,
+                                                     cddrive_monitor_hal_callback_device_added)))
+        {
+          cddrive_set_error (error,
+                             CDDRIVE_ERROR_FAILED,
+                             _("Failed to register drive addition callback."));
+          return FALSE;
+        }
+  
+      if (G_UNLIKELY (! libhal_ctx_set_device_removed (monitor->ctx,
+                                                       cddrive_monitor_hal_callback_device_removed)))
+        {
+          cddrive_set_error (error,
+                             CDDRIVE_ERROR_FAILED,
+                             _("Failed to register drive removal callback."));
+          return FALSE;
+        }
+      
+      if (monitor->udi != NULL)
+        {
+          dbus_error_init (&derr);
+          if (! libhal_device_remove_property_watch (monitor->ctx, monitor->udi, &derr))
+            {
+              cddrive_store_dbus_error (error, CDDRIVE_ERROR_FAILED, &derr);
+              dbus_error_free (&derr);
+              return FALSE;
+            }
+        }
+    }
+  else 
+    {
+      /* disable callbacks */
+    
+      if (G_UNLIKELY (! libhal_ctx_set_device_added (monitor->ctx, NULL)))
+        {
+          cddrive_set_error (error,
+                             CDDRIVE_ERROR_FAILED,
+                             _("Failed to unregister drive addition callback."));
+          return FALSE;
+        }
+  
+      if (G_UNLIKELY (! libhal_ctx_set_device_removed (monitor->ctx, NULL)))
+        {
+          cddrive_set_error (error,
+                             CDDRIVE_ERROR_FAILED,
+                             _("Failed to unregister drive removal callback."));
+          return FALSE;
+        }
+      
+      if (monitor->udi != NULL)
+        {
+          dbus_error_init (&derr);
+          if (! libhal_device_remove_property_watch (monitor->ctx, monitor->udi, &derr))
+            {
+              cddrive_store_dbus_error (error, CDDRIVE_ERROR_FAILED, &derr);
+              dbus_error_free (&derr);
+              return FALSE;
+            }
+        }
+    }
+  
+  monitor->callbacks_enabled = enable;
+  return TRUE;
+}
+
+
+
+gboolean
+cddrive_monitor_callbacks_enabled (CddriveMonitor *monitor)
+{
+  g_assert (monitor != NULL);
+
+  return monitor->callbacks_enabled;
+}
+
+
+
+static void
+cddrive_monitor_set_is_ejectable (CddriveMonitor *monitor, GError **error)
+{
+  LibHalDrive *drv;
+
+  g_assert (monitor != NULL);
+  g_assert (monitor->dev != NULL);
+  g_assert (error == NULL || *error == NULL);
+
+  monitor->is_ejectable = FALSE;
+  drv = cddrive_monitor_get_hal_drive (monitor, error);
+  if (drv != NULL)
+    {
+      monitor->is_ejectable = libhal_drive_requires_eject (drv);
+      libhal_drive_free (drv);
+    }
+}
+
+
+
+/* Return a copy of a fallback command with each "%'symbol'" occurences replaced
+   with ''. Symbol is either "d", "m" or "u". The result must be freed after use. */
+static gchar*
+cddrive_monitor_get_command_with_value (const gchar *custom_command,
+                                        const gchar  symbol,
+                                        const gchar *value)
+{
+  gchar *res, *tmp, *s;
+  gchar ss [] = {'%', symbol, '\0'};
+
+  g_assert (custom_command != NULL);
+  g_assert (symbol =='d' || symbol == 'm' || symbol == 'u');
+  g_assert (value != NULL);
+  
+  /* replace symbol string with "%s" in the command string */
+  tmp = g_strdup (custom_command);
+  for (s = g_strrstr (tmp, ss); s != NULL; s = g_strrstr (tmp, ss))
+    s[1] = 's';
+  
+  res = g_strdup_printf (tmp, value);
+  g_free (tmp);
+  return res;
+}
+
+
+
+CddriveMonitor*
+cddrive_monitor_new (gchar                  *device,
+                     gpointer                callback_data,
+                     CddriveOnDiscInserted   on_disc_inserted_callback,
+                     CddriveOnDiscRemoved    on_disc_removed_callback,
+                     CddriveOnDiscModified   on_disc_modified_callback,
+                     const gchar            *mount_fallback,
+                     const gchar            *unmount_fallback,
+                     GError                **error)
+{
+  CddriveMonitor *res;
+
+  g_assert (device != NULL);
+  g_assert (on_disc_inserted_callback != NULL);
+  g_assert (on_disc_removed_callback  != NULL);
+  g_assert (on_disc_modified_callback != NULL);
+  g_assert (mount_fallback == NULL || g_utf8_strlen (mount_fallback, 1) != 0);
+  g_assert (unmount_fallback == NULL || g_utf8_strlen (unmount_fallback, 1) != 0);
+  g_assert (error == NULL || *error == NULL);
+
+  res = (CddriveMonitor*) g_try_malloc (sizeof (CddriveMonitor));
+  if (res == NULL)
+    {
+      if (error != NULL)
+        *error = cddrive_no_memory_error ();
+      return NULL;
+    }
+
+  res->dev                  = device;
+  res->dat                  = callback_data;
+  res->on_disc_inserted     = on_disc_inserted_callback;
+  res->on_disc_removed      = on_disc_removed_callback;
+  res->on_disc_modified     = on_disc_modified_callback;
+  res->callbacks_enabled    = FALSE; /* set to FALSE to enable callbacks effectively below */
+  res->udi                  = NULL;
+  res->is_ejectable         = FALSE;
+  res->audio_title          = NULL;
+
+  res->mount                = NULL;
+  res->mount_needs_update   = FALSE;
+  res->unmount              = NULL;
+  res->unmount_needs_update = FALSE;
+
+  res->ctx = cddrive_get_new_hal_context (error);
+  if (G_UNLIKELY (res->ctx == NULL))
+    {
+      cddrive_monitor_free (res);
+      return NULL;
+    }
+
+  if (G_UNLIKELY (! libhal_ctx_set_user_data (res->ctx, res)))
+    {
+      cddrive_set_error (error,
+                         CDDRIVE_ERROR_FAILED,
+                         _("Failed to store monitor in HAL context."));
+      cddrive_monitor_free (res);
+      return NULL;
+    }
+  
+  if (G_UNLIKELY (! cddrive_monitor_enable_callbacks (res, TRUE, error)))
+    {
+      cddrive_monitor_free (res);
+      return NULL;
+    }
+  
+  cddrive_monitor_set_is_ejectable (res, error);
+  
+  if (G_UNLIKELY (error != NULL && *error != NULL))
+    {
+      cddrive_monitor_free (res);
+      return NULL;
+    }
+  
+  /* register disc if any */
+  cddrive_monitor_update_disc (res);
+  
+  /* store the custom commands with device inserted once for all */
+  if (mount_fallback != NULL)
+    {
+      res->mount = cddrive_monitor_get_command_with_value (mount_fallback,
+                                                           'd',
+                                                           res->dev);
+      /* because %d is more likely to be used than %m and %u, we detect once for all
+         if these two are present in the command, implying an update each time
+         the mount command is used */
+      res->mount_needs_update = (g_strrstr (res->mount, "%m") != NULL ||
+                                 g_strrstr (res->mount, "%u") != NULL);
+    }
+  if (unmount_fallback != NULL)
+    {
+      res->unmount = cddrive_monitor_get_command_with_value (unmount_fallback,
+                                                             'd',
+                                                             res->dev);
+      /* same as above, for unmount this time */
+      res->unmount_needs_update = (g_strrstr (res->unmount, "%m") != NULL ||
+                                   g_strrstr (res->unmount, "%u") != NULL);
+    }
+  
+  return res;
+}
+
+
+
+void
+cddrive_monitor_free (CddriveMonitor * monitor)
+{
+  g_assert (monitor != NULL);
+
+  /* (monitor->ctx == NULL) implies (monitor->udi == NULL) */
+  g_assert ((monitor->ctx != NULL) || (monitor->udi == NULL));
+
+  if (G_LIKELY (monitor->ctx != NULL))
+    {
+      if (monitor->udi != NULL)
+        cddrive_monitor_unregister_disc (monitor);
+      cddrive_close_hal_context (monitor->ctx);
+    }
+
+  g_free (monitor->mount);
+  g_free (monitor->unmount);
+  g_free (monitor);
+}
+
+
+
+/* Send a command (created with 'cddrive_new_command_message()') to hald.
+   'command_message' is unreferenced by this function. */
+static void
+cddrive_monitor_send_command (CddriveMonitor  *monitor,
+                              DBusMessage     *command_message,
+                              DBusError       *dbus_error)
+{
+  DBusMessage    *reply;
+  DBusConnection *con;
+
+  g_assert (monitor != NULL);
+  g_assert (monitor->ctx != NULL);
+  g_assert (command_message != NULL);
+  
+  /* send D-BUS message and wait for reply */
+  con = libhal_ctx_get_dbus_connection (monitor->ctx);
+  reply = dbus_connection_send_with_reply_and_block (con,
+                                                     command_message,
+                                                     CDDRIVE_DBUS_REPLY_TIMEOUT,
+                                                     dbus_error);
+  /* cleanup messages */
+  dbus_message_unref (command_message);
+  if (G_LIKELY (reply != NULL))
+    dbus_message_unref (reply);  
+}
+
+
+
+/* Launch a command on the drive (to open or close the tray) */
+static void
+cddrive_monitor_command_drive (CddriveMonitor  *monitor,
+                               const gchar     *command,
+                               GError         **error,
+                               CddriveError     code)
+{
+  LibHalDrive  *drv;
+  DBusMessage  *msg;
+  DBusError     derr;
+  const gchar*  msg_opts [0]; /* no special option */
+
+  g_assert (monitor != NULL);
+  g_assert (monitor->ctx != NULL);
+  g_assert (monitor->dev != NULL);
+  g_assert (error == NULL || *error == NULL);
+
+  /* retrieve drive UDI */
+  drv = cddrive_monitor_get_hal_drive (monitor, error);
+  if (drv == NULL)
+    return;
+
+  msg = dbus_message_new_method_call (CDDRIVE_HAL_DEST,
+                                      libhal_drive_get_udi (drv),
+                                      CDDRIVE_HAL_IFACE_STORAGE,
+                                      command);
+  libhal_drive_free (drv);
+  
+  if (G_UNLIKELY (msg == NULL))
+    {
+      if (error != NULL)
+        *error = cddrive_no_memory_error ();
+      return;
+    }  
+
+  dbus_message_append_args (msg,
+                            DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &msg_opts, 0,
+                            DBUS_TYPE_INVALID);
+
+  dbus_error_init (&derr);
+  cddrive_monitor_send_command (monitor, msg, &derr); /* note: msg is unrefed by this call */
+
+  /* set 'error' if necessary */
+  if (dbus_error_is_set (&derr))
+    {
+      cddrive_store_dbus_error (error, code, &derr);
+      dbus_error_free (&derr);
+    }
+}
+
+
+
+void
+cddrive_monitor_eject (CddriveMonitor *monitor, GError **error)
+{
+  g_assert (monitor != NULL);
+  g_assert (monitor->ctx != NULL);
+  g_assert (monitor->dev != NULL);
+  g_assert (error == NULL || *error == NULL);
+
+  cddrive_monitor_command_drive (monitor,
+                                 "Eject",
+                                 error,
+                                 CDDRIVE_ERROR_EJECT);
+}
+
+
+
+void
+cddrive_monitor_close (CddriveMonitor *monitor, GError **error)
+{
+  g_assert (monitor != NULL);
+  g_assert (monitor->ctx != NULL);
+  g_assert (monitor->dev != NULL);
+  g_assert (error == NULL || *error == NULL);
+
+  cddrive_monitor_command_drive (monitor,
+                                 "CloseTray",
+                                 error,
+                                 CDDRIVE_ERROR_CLOSE);
+}
+
+
+
+/* Return TRUE if mount succeeded, FALSE otherwise. */
+static gboolean
+cddrive_monitor_hal_mount (CddriveMonitor *monitor, GError **error)
+{
+  DBusMessage *msg;
+  DBusError    derr;
+
+  /* mount arguments */
+  const gchar*  mount_opts [0];     /* no special option */
+  const gchar  *fs_type     = "";   /* use default fs type */
+  const gchar  *mount_point = "";   /* use default mount point
+                                       (note: HAL spec says NULL is valid,
+                                        but it crash the plugin ) */
+  
+  g_assert (monitor != NULL);
+  g_assert (monitor->ctx != NULL);
+  g_assert (monitor->udi != NULL);
+  g_assert (error == NULL || *error == NULL);
+  
+  /* create command message */
+  msg = dbus_message_new_method_call (CDDRIVE_HAL_DEST,
+                                      monitor->udi,
+                                      CDDRIVE_HAL_IFACE_VOLUME,
+                                      "Mount");
+  if (msg == NULL)
+    {
+      if (error != NULL)
+        *error = cddrive_no_memory_error ();
+      return FALSE;
+    }
+  
+  dbus_message_append_args (msg,
+                            DBUS_TYPE_STRING, &mount_point,
+                            DBUS_TYPE_STRING, &fs_type,
+                            DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &mount_opts, 0,
+                            DBUS_TYPE_INVALID);  
+
+  dbus_error_init (&derr);
+  cddrive_monitor_send_command (monitor, msg, &derr); /* note: msg is unrefed by this call */
+  
+  /* set 'error' if necessary */
+  if (dbus_error_is_set (&derr))
+    {
+      cddrive_store_dbus_error (error, CDDRIVE_ERROR_MOUNT, &derr);
+      dbus_error_free (&derr);
+      return FALSE;
+    }
+  
+  return TRUE;
+}
+
+
+
+/* Return TRUE if unmount succeeded, FALSE otherwise. */
+static gboolean
+cddrive_monitor_hal_unmount (CddriveMonitor *monitor, GError **error)
+{
+  DBusMessage  *msg;
+  DBusError    derr;
+
+  /* unmount arguments */
+  const gchar*  unmount_opts [0]; /* no special option */
+  
+  g_assert (monitor != NULL);
+  g_assert (monitor->ctx != NULL);
+  g_assert (monitor->udi != NULL);
+  g_assert (error == NULL || *error == NULL);
+
+  /* create command message */
+  msg = dbus_message_new_method_call (CDDRIVE_HAL_DEST,
+                                      monitor->udi,
+                                      CDDRIVE_HAL_IFACE_VOLUME,
+                                      "Unmount");
+  if (msg == NULL)
+    {
+      if (error != NULL)
+        *error = cddrive_no_memory_error ();
+      return FALSE;
+    }
+
+  dbus_message_append_args (msg,
+                            DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &unmount_opts, 0,
+                            DBUS_TYPE_INVALID);  
+
+  dbus_error_init (&derr);
+  cddrive_monitor_send_command (monitor, msg, &derr); /* note: msg is unrefed by this call */
+  
+  /* set 'error' if necessary */
+  if (dbus_error_is_set (&derr))
+    {
+      if (dbus_error_has_name (&derr, "org.freedesktop.Hal.Device.Volume.Busy"))
+        /* filter the "busy" error to provide a more useful message to the user */
+        cddrive_store_dbus_error (error, CDDRIVE_ERROR_BUSY, &derr);
+      else
+        cddrive_store_dbus_error (error, CDDRIVE_ERROR_UNMOUNT, &derr);
+      
+      dbus_error_free (&derr);
+      return FALSE;
+    }
+  
+  return TRUE;
+}
+
+
+
+static void
+cddrive_monitor_run_updated_command (CddriveMonitor  *monitor,
+                                     const gchar     *command,
+                                     GError         **error)
+{
+  gchar        *cmd, *tmp;
+  LibHalVolume *disc;
+
+  g_assert (monitor != NULL);
+  g_assert (monitor->udi != NULL);
+  g_assert (command != NULL);
+  g_assert (error == NULL || *error == NULL);
+
+  cmd = g_strdup (command);
+  if (g_strrstr (cmd, "%m"))
+    {
+      disc = cddrive_monitor_get_hal_disc (monitor, error);
+      if (disc == NULL)
+        return;
+      tmp = cmd;
+      cmd = cddrive_monitor_get_command_with_value (tmp,
+                                                    'm',
+                                                    libhal_volume_get_mount_point (disc));
+      g_free (tmp);
+      libhal_volume_free (disc);
+    }
+  
+  if (g_strrstr (cmd, "%u"))
+    {
+      tmp = cmd;
+      cmd = cddrive_monitor_get_command_with_value (tmp,
+                                                    'u',
+                                                    monitor->udi);
+      g_free (tmp);
+    }
+  
+  g_spawn_command_line_sync (cmd, NULL, NULL, NULL, error);
+  g_free (cmd);
+}
+
+
+
+void
+cddrive_monitor_mount (CddriveMonitor *monitor, GError **error)
+{
+  g_assert (monitor != NULL);
+  g_assert (error == NULL || *error == NULL);
+
+  if (! cddrive_monitor_hal_mount (monitor, error) && monitor->mount != NULL)
+    {
+      /* HAL failed, let's try the fallback */
+      if (error != NULL)
+        {
+          g_assert (*error != NULL);
+          g_message ("HAL mount failed : %s... Trying fallback command.",
+                     (*error)->message);
+          cddrive_clear_error (error);
+        }
+      
+      if (monitor->mount_needs_update)
+        cddrive_monitor_run_updated_command (monitor, monitor->mount, error);
+      else
+        g_spawn_command_line_sync (monitor->mount, NULL, NULL, NULL, error);
+
+      if (error != NULL && *error != NULL)
+        cddrive_set_error_code (error, CDDRIVE_ERROR_MOUNT);
+    }
+}
+
+
+
+void
+cddrive_monitor_unmount (CddriveMonitor *monitor, GError **error)
+{
+  g_assert (monitor != NULL);
+  g_assert (error == NULL || *error == NULL);
+
+  if (! cddrive_monitor_hal_unmount (monitor, error))
+    {
+      if (error != NULL && (*error)->code == CDDRIVE_ERROR_BUSY)
+        {
+          /* The disc is busy. No need to try the fallback command,
+             but we can try to find the culprit and set the error message accordingly. */
+          cddrive_set_disc_busy_error (error, CDDRIVE_ERROR_UNMOUNT, monitor);
+          return;
+        }
+      
+      if (monitor->unmount != NULL)
+        {
+          /* HAL failed, let's try the fallback */
+          if (error != NULL)
+            {
+              g_message ("HAL unmount failed : %s... Trying fallback command.",
+                         (*error)->message);
+              cddrive_clear_error (error);
+            }
+          
+          if (monitor->unmount_needs_update)
+            cddrive_monitor_run_updated_command (monitor, monitor->unmount, error);
+          else
+            g_spawn_command_line_sync (monitor->unmount, NULL, NULL, NULL, error);
+      
+          if (error != NULL && *error != NULL)
+            cddrive_set_error_code (error, CDDRIVE_ERROR_UNMOUNT);
+        }
+    }
+}
+
+
+
+static const gchar*
+cddrive_status_get_disc_icon_name (LibHalVolume *disc)
+{
+  g_assert (disc != NULL);
+
+  if (libhal_volume_disc_has_audio (disc))
+    return CDDRIVE_AUDIO_DISC_ICON_NAME;
+  else
+    return cddrive_disc_icon_name [libhal_volume_get_disc_type (disc) - LIBHAL_VOLUME_DISC_TYPE_CDROM];
+}
+
+
+
+static const gchar*
+cddrive_monitor_get_audio_disc_title (CddriveMonitor *monitor)
+{
+  g_assert (monitor != NULL);
+  g_assert (monitor->dev != NULL);
+
+  if (monitor->audio_title != NULL)
+    /* title has been previously cached */
+      return monitor->audio_title;
+
+  monitor->audio_title = cddrive_cddb_get_title (monitor->dev);
+  return monitor->audio_title;
+}
+
+
+
+CddriveStatus*
+cddrive_status_new (CddriveMonitor *monitor, GError **error)
+{
+  CddriveStatus *res;
+  LibHalVolume  *vol;
+  gint           tray_stat;
+
+  /* note: monitor can be NULL */
+
+  g_assert (error != NULL);
+  g_assert (*error == NULL);
+
+  if (monitor == NULL)
+    return NULL;
+
+  vol = cddrive_monitor_get_hal_disc (monitor, error);
+
+  if (G_UNLIKELY (*error != NULL))
+    {
+      if (vol != NULL)
+        libhal_volume_free (vol);
+      return NULL;
+    }
+  
+  res = (CddriveStatus*) g_try_malloc (sizeof (CddriveStatus));
+  if (res == NULL)
+    {
+      *error = cddrive_no_memory_error ();
+      return NULL;
+    }
+
+  res->mon = monitor;
+  /* set flags for empty drive */
+  res->is_open      = FALSE;
+  res->is_empty     = TRUE;
+  res->is_mounted   = FALSE;
+  res->is_blank     = FALSE;
+  res->is_audio     = FALSE;
+  res->type         = NULL;
+  res->title        = NULL;
+
+  if (vol == NULL)
+    {
+      /* drive is empty */
+      if (monitor->is_ejectable)
+        {
+          tray_stat = cddrive_get_tray_status (monitor->dev);
+          if (tray_stat == -1)
+            res->icon_name  = CDDRIVE_UNKNOWN_STATUS_ICON_NAME;
+          else
+            {
+              res->is_open = (tray_stat == 1);
+            
+              /* commented as long as the open/close event is not notified */
+              /*
+              if (res->is_open)
+                res->icon_name  = CDDRIVE_OPEN_DRIVE_ICON_NAME;
+              else
+              */
+                res->icon_name  = CDDRIVE_EMPTY_DRIVE_ICON_NAME;
+            }
+        }
+      else
+        res->icon_name  = CDDRIVE_EMPTY_DRIVE_ICON_NAME;
+    }
+  else
+    {
+      /* drive has a disc */
+      res->is_empty   = FALSE;
+      res->is_mounted = libhal_volume_is_mounted (vol);
+      res->is_blank   = libhal_volume_disc_is_blank (vol);
+      res->is_audio   = libhal_volume_disc_has_audio (vol);
+      res->icon_name  = cddrive_status_get_disc_icon_name (vol);
+        
+      res->type  = cddrive_disc_type_name [libhal_volume_get_disc_type (vol) - LIBHAL_VOLUME_DISC_TYPE_CDROM];
+      res->title = g_strdup (libhal_volume_get_label (vol));
+      
+      libhal_volume_free (vol);
+    }
+  
+  g_assert (res != NULL);
+  g_assert (res->icon_name != NULL);
+  return res;
+}
+  
+
+
+void
+cddrive_status_free (CddriveStatus *status)
+{
+  g_assert (status != NULL);
+
+  g_free (status->title);
+  g_free (status);
+}
+
+
+
+gboolean
+cddrive_status_is_ejectable (CddriveStatus *status)
+{
+  g_assert (status != NULL);
+  
+  return status->mon->is_ejectable;
+}
+
+
+
+gboolean
+cddrive_status_is_open (CddriveStatus *status)
+{
+  g_assert (status != NULL);
+  
+  return status->is_open;
+}
+
+
+
+gboolean
+cddrive_status_is_empty (CddriveStatus *status)
+{
+  g_assert (status != NULL);
+
+  return status->is_empty;
+}
+
+
+
+gboolean
+cddrive_status_is_mounted (CddriveStatus *status)
+{
+  g_assert (status != NULL);
+
+  return status->is_mounted;
+}
+
+
+
+gboolean
+cddrive_status_is_blank (CddriveStatus *status)
+{
+  g_assert (status != NULL);
+
+  return status->is_blank;
+}
+
+
+
+gboolean
+cddrive_status_is_audio (CddriveStatus *status)
+{
+  g_assert (status != NULL);
+
+  return status->is_audio;
+}
+
+
+
+const gchar*
+cddrive_status_get_title (CddriveStatus *status)
+{
+  g_assert (status != NULL);
+
+  if (status->title == NULL && status->is_audio)
+    return cddrive_monitor_get_audio_disc_title (status->mon);
+  
+  return status->title;  
+}
+
+
+
+const gchar*
+cddrive_status_get_type (CddriveStatus *status)
+{
+  g_assert (status != NULL);
+
+  return _(status->type);
+}
+
+
+
+const gchar*
+cddrive_status_get_icon_name (CddriveStatus *status)
+{
+  g_assert (status == NULL || status->icon_name != NULL);
+
+  if (status == NULL)
+    return CDDRIVE_UNKNOWN_STATUS_ICON_NAME;
+  
+  return status->icon_name;
+}

Added: xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-monitor.h
===================================================================
--- xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-monitor.h	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/panel-plugin/cddrive-monitor.h	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,210 @@
+/*  $Id$
+ *
+ *  Copyright (c) 2007 The Xfce development team. All rights reserved.
+ *
+ *  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 Library 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 __CDDRIVE_MONITOR_H__
+#define __CDDRIVE_MONITOR_H__
+
+#include "cddrive-monitor-private.h"
+
+
+G_BEGIN_DECLS
+
+typedef _CddriveMonitor CddriveMonitor;
+
+
+typedef _CddriveStatus CddriveStatus;
+
+
+typedef struct
+{
+  gchar *device;
+  gchar *model;
+}
+CddriveDriveInfo;
+
+
+
+typedef void (*CddriveOnDiscInserted) (CddriveMonitor *monitor,
+                                       gpointer        callback_data);
+
+typedef void (*CddriveOnDiscRemoved)  (CddriveMonitor *monitor,
+                                       gpointer        callback_data);
+
+typedef void (*CddriveOnDiscModified) (CddriveMonitor *monitor,
+                                       gpointer        callback_data);
+
+
+
+/* Return an array with the infos of each CD-ROM drive, or NULL if it failed.
+   The last element of the array is NULL. */
+CddriveDriveInfo**
+cddrive_cdrom_drive_infos_new  (GError **error);
+
+
+
+void
+cddrive_cdrom_drive_infos_free (CddriveDriveInfo* *infos);
+
+
+
+/* Create a monitor for the CD-ROM drive of 'device' device path.
+   'device' must not be NULL.
+   If the creation failed, set 'error' and return NULL. */
+CddriveMonitor*
+cddrive_monitor_new             (gchar                  *device,
+                                 gpointer                callback_data,
+                                 CddriveOnDiscInserted   on_disc_inserted_callback,
+                                 CddriveOnDiscRemoved    on_disc_removed_callback,
+                                 CddriveOnDiscModified   on_disc_modified_callback,
+                                 const gchar*            mount_fallback,
+                                 const gchar*            unmount_fallback,
+                                 GError                **error);
+
+
+
+void
+cddrive_monitor_free            (CddriveMonitor *monitor);
+
+
+
+/* Enable/disable callbacks on changes of drive state.
+   Return FALSE if the operation failed, TRUE otherwise. */
+gboolean
+cddrive_monitor_enable_callbacks    (CddriveMonitor  *monitor,
+                                     gboolean         enable,
+                                     GError         **error);
+
+
+
+/* Are the callbacks enabled ? */
+gboolean
+cddrive_monitor_callbacks_enabled   (CddriveMonitor *monitor);
+
+
+
+/* Open the tray of the CD-ROM drive */
+void
+cddrive_monitor_eject           (CddriveMonitor *monitor, GError **error);
+
+
+
+/* Close the tray of the CD-ROM drive */
+void
+cddrive_monitor_close           (CddriveMonitor *monitor, GError **error);
+
+
+
+/* Mount disc */
+void
+cddrive_monitor_mount           (CddriveMonitor *monitor, GError **error);
+
+
+
+/* Unmount disc */
+void
+cddrive_monitor_unmount         (CddriveMonitor *monitor, GError **error);
+
+
+
+/* Various infos about the CD-ROM drive, and the disc that might be in.
+   If a problem occured while retrieving an info, the function set 'error'
+   and return NULL.
+   A NULL value as 'monitor' is not an error. In this case the function return
+   NULL without setting 'error'.
+   It is up to the programmer to free the result with 'cddrive_status_free'. */
+CddriveStatus*
+cddrive_status_new  (CddriveMonitor *monitor, GError **error);
+
+
+
+void
+cddrive_status_free (CddriveStatus *status);
+
+
+
+/*  Can we eject the disc when there is one ?
+   'status' must not be NULL. */
+gboolean
+cddrive_status_is_ejectable  (CddriveStatus *status);
+
+
+
+/* TRUE if there is no disc in the CD-ROM drive, otherwise FALSE.
+   'status' must not be NULL. */
+gboolean
+cddrive_status_is_empty      (CddriveStatus *status);
+
+
+
+/* TRUE if the tray of the CD-ROM drive is open, otherwise FALSE.
+   'status' must not be NULL. */
+gboolean
+cddrive_status_is_open       (CddriveStatus *status);
+
+
+
+/* TRUE if there is a mounted disc in the CD-ROM drive, otherwise FALSE.
+   'status' must not be NULL. */
+gboolean
+cddrive_status_is_mounted    (CddriveStatus *status);
+
+
+
+/* TRUE if there is a blank disc in the CD-ROM drive, otherwise FALSE.
+   'status' must not be NULL. */
+gboolean
+cddrive_status_is_blank      (CddriveStatus *status);
+
+
+
+/* TRUE if there is a audio disc in the CD-ROM drive, otherwise FALSE.
+   'status' must not be NULL. */
+gboolean
+cddrive_status_is_audio      (CddriveStatus *status);
+
+
+
+/* TRUE if the disc is locked by an application, otherwise FALSE.
+   'status' must not be NULL. */
+gboolean
+cddrive_status_is_locked     (CddriveStatus *status);
+
+
+
+/* Title of the disc. NULL if there is none or the disc is audio or blank.
+   'status' must not be NULL. */
+const gchar*
+cddrive_status_get_title     (CddriveStatus *status);
+
+
+
+/* Type of the disc. NULL if there is none or the disc is audio or blank.
+   'status' must not be NULL. */
+const gchar*
+cddrive_status_get_type      (CddriveStatus *status);
+
+
+
+/* Name of icon showing the status of the drive (never NULL).
+   If 'status' is NULL, returns an icon for unknown status. */
+const gchar*
+cddrive_status_get_icon_name (CddriveStatus *status);
+
+G_END_DECLS
+#endif

Added: xfce4-cddrive-plugin/trunk/panel-plugin/cddrive.c
===================================================================
--- xfce4-cddrive-plugin/trunk/panel-plugin/cddrive.c	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/panel-plugin/cddrive.c	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,1193 @@
+/*  $Id$
+ *
+ *  Copyright (c) 2007 The Xfce development team. All rights reserved.
+ *
+ *  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 Library 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 <libxfcegui4/libxfcegui4.h>
+#include <libxfce4panel/xfce-panel-convenience.h> /* for xfce_create_panel_button() */
+#include <libxfce4panel/xfce-hvbox.h>
+#define EXO_API_SUBJECT_TO_CHANGE
+#include <exo/exo.h> /* for exo_gdk_pixbuf_lucent() */
+#include "cddrive.h"
+#include "cddrive-error.h"
+#include "cddrive-cddb.h"
+#include "cddrive-dialogs.h"
+
+
+#define CDDRIVE_ICON_PADDING                2
+
+#define CDDRIVE_CONF_ID_DEVICE              "device"
+#define CDDRIVE_CONF_ID_NAME                "name"
+#define CDDRIVE_CONF_ID_MOUNT_FALLBACK      "mount_fallback"
+#define CDDRIVE_CONF_ID_UNMOUNT_FALLBACK    "unmount_fallback"
+#define CDDRIVE_CONF_ID_USE_NAME_IN_PANEL   "use_name_in_panel"
+#define CDDRIVE_CONF_ID_USE_NAME_IN_TIP     "use_name_in_tip"
+#define CDDRIVE_CONF_ID_USE_MOUNTED_COLOR   "use_mounted_color"
+#define CDDRIVE_CONF_ID_MOUNTED_COLOR       "mounted_color"
+#define CDDRIVE_CONF_ID_USE_UNMOUNTED_COLOR "use_unmounted_color"
+#define CDDRIVE_CONF_ID_UNMOUNTED_COLOR     "unmounted_color"
+#define CDDRIVE_CONF_ID_USE_TRANSLUCENCY    "use_translucency"
+#define CDDRIVE_CONF_ID_TRANSLUCENCY        "translucency"
+
+#define CDDRIVE_DEFAULT_DEVICE              NULL
+#define CDDRIVE_DEFAULT_NAME                NULL
+#define CDDRIVE_DEFAULT_USE_NAME_IN_PANEL   FALSE
+#define CDDRIVE_DEFAULT_USE_NAME_IN_TIP     FALSE
+#define CDDRIVE_DEFAULT_COLOR               NULL
+#define CDDRIVE_DEFAULT_USE_MOUNTED_COLOR   FALSE
+#define CDDRIVE_DEFAULT_USE_UNMOUNTED_COLOR FALSE
+#define CDDRIVE_DEFAULT_USE_TRANSLUCENCY    TRUE
+#define CDDRIVE_DEFAULT_TRANSLUCENCY        50
+
+#define CDDRIVE_LOCK_EMBLEM "stock_lock"
+
+
+/* Default fallback mount and unmount commands sorted in preference order.
+   Last element must be NULL.
+   Use CddriveCommandType enum (in cddrive.h) to access one of the command sub-array). */
+static const gchar* const cddrive_default_fallback_commands[2][4] = 
+{
+  {
+    "exo-mount %d",
+    "pmount %d",
+    "mount %d",
+    NULL
+  },
+  {
+    "exo-mount -u %d",
+    "pumount %d",
+    "umount %d",
+    NULL
+  }
+};
+
+
+
+static void
+cddrive_set_button_icon (CddrivePlugin *cddrive,
+                         const gchar   *name,
+                         GdkColor      *color,
+                         gboolean       use_translucency)
+{
+  GdkPixbuf *ico, *tmp;
+  gint       size;
+
+  g_assert (cddrive->button != NULL);
+  g_assert (cddrive->image != NULL);
+  g_assert (name != NULL);
+
+  size = xfce_panel_plugin_get_size (cddrive->plugin) - CDDRIVE_ICON_PADDING * 2;
+
+  ico = xfce_themed_icon_load (name, size);
+
+  if (color != NULL)
+    {
+      tmp = exo_gdk_pixbuf_colorize (ico, color);
+      g_object_unref (G_OBJECT (ico));
+      ico = tmp;
+    }
+  
+  if (use_translucency)
+    {
+      tmp = exo_gdk_pixbuf_lucent (ico, cddrive->translucency);
+      g_object_unref (G_OBJECT (ico));
+      ico = tmp;
+    }
+  
+  gtk_image_clear (GTK_IMAGE (cddrive->image));
+  gtk_image_set_from_pixbuf (GTK_IMAGE (cddrive->image), ico);
+ 
+  g_object_unref (G_OBJECT (ico));
+}
+
+
+
+static void
+cddrive_update_icon_from_status (CddrivePlugin *cddrive, CddriveStatus *status)
+{
+  GdkColor *c = NULL;
+  gboolean  use_trans = FALSE;
+
+  if (status != NULL)
+    {
+      use_trans = (! (cddrive_status_is_empty (status)   ||
+                      cddrive_status_is_mounted (status) ||
+                      cddrive_status_is_audio (status)));
+  
+      if (cddrive_status_is_mounted (status))
+        c = cddrive->use_mounted_color ? cddrive->mounted_color : NULL;
+      else
+        {
+          if (! (cddrive_status_is_empty (status) ||
+                 cddrive_status_is_audio (status)))
+            c = cddrive->use_unmounted_color ? cddrive->unmounted_color : NULL;
+        }
+    }
+  
+  cddrive_set_button_icon (cddrive,
+                           cddrive_status_get_icon_name (status),
+                           c, use_trans);
+}
+
+
+
+void
+cddrive_update_icon (CddrivePlugin *cddrive)
+{
+  CddriveStatus *stat;
+  GError        *error = NULL;
+
+  stat = cddrive_status_new (cddrive->monitor, &error);
+  cddrive_update_icon_from_status (cddrive, stat);
+
+  if (stat != NULL)
+    cddrive_status_free (stat);
+
+  if (error != NULL)
+    {
+      cddrive_show_error (error);
+      cddrive_clear_error (&error);
+    }
+}
+
+
+
+/* The result must be freed when no longer needed. */
+static gchar*
+cddrive_get_unnamed_tip_text_from_status (CddriveStatus *status)
+{
+  const gchar *title, *type;
+
+  /* Even if it result in a clumsy code, try to write the messages without using
+     concatenation tricks, to preserve their meaning in the po files. */
+
+  if (status == NULL)
+    return g_strdup (_("Drive status is unavailable... is HAL installed and hald running ?"));
+  
+  if (cddrive_status_is_empty (status))
+    {
+      /* no CD title in the message */
+    
+      if (cddrive_status_is_ejectable (status))
+        {
+          if (cddrive_status_is_open (status))
+            return g_strdup (_("Close tray"));
+          
+          return g_strdup (_("Open tray"));
+        }
+              
+      /* drive is not ejectable */
+      return g_strdup (_("No disc in the drive"));
+    }
+  
+  /* There is a disc in the drive : use title whenever it is available.
+     Otherwise, use disc type. */
+  
+  title = cddrive_status_get_title (status);
+  type  = cddrive_status_get_type (status);
+  
+  if (cddrive_status_is_ejectable (status))
+    {
+      if (cddrive_status_is_blank (status))
+        /* translation note: "Eject blank <disc type>" (e.g. "Eject blank cd-rw") */
+        return g_strdup_printf (_("Eject blank %s"), type);
+      
+      if (title != NULL)
+        /* translation note: "Eject \"<disc title>\"" */
+        return g_strdup_printf (_("Eject \"%s\""), title);
+
+      if (cddrive_status_is_audio (status))
+        /* translation note: "Eject audio <disc type>" */
+        return g_strdup_printf (_("Eject audio %s"), type);
+        
+      /* translation note: "Eject <disc type>" (e.g. "Eject dvd") */
+      return g_strdup_printf (_("Eject %s"), type);
+    }
+  
+  /* unejectable drive with disc inside */
+  
+  if (cddrive_status_is_blank (status))
+    /* translation note: "Blank <disc type>" (e.g. "Blank cd-rw") */
+    return g_strdup_printf (_("Blank %s"), type);
+      
+  if (title != NULL)
+    /* translation note: "\"<disc title>\" (made translatable in case translation
+                         do not use the '"' character to enclose the title) */
+    return g_strdup_printf (_("\"%s\""), title);
+
+  if (cddrive_status_is_audio (status))
+    /* translation note: "Audio <disc type>" */
+    return g_strdup_printf (_("Audio %s"), type);
+        
+  return g_strdup (type);
+}
+
+
+
+/* The result must be freed when no longer needed. */
+static gchar*
+cddrive_get_named_tip_text_from_status (CddriveStatus *status,
+                                        const gchar   *drive_name)
+{
+  const gchar *title, *type;
+  
+  g_assert (drive_name != NULL);
+
+  /* Even if it result in a clumsy code, try to write the messages without using
+     concatenation tricks, to preserve their meaning in the po files. */
+
+  if (status == NULL)
+    return g_strdup_printf (_("%s status is unavailable... is HAL installed and hald running ?"),
+                     drive_name);
+  
+  if (cddrive_status_is_empty (status))
+    {
+      /* no CD title in the message */
+    
+      if (cddrive_status_is_ejectable (status))
+        {
+          if (cddrive_status_is_open (status))
+            /* translation note: "Close <drive name>" */
+            return g_strdup_printf (_("Close %s"), drive_name);
+          
+          /* translation note: "Open <drive name>" */
+          return g_strdup_printf (_("Open %s"), drive_name);
+        }
+              
+      /* drive is not ejectable */
+      
+      /* translation note: "No disc in <drive name>" */
+      return g_strdup_printf (_("No disc in %s"), drive_name);
+    }
+  
+  /* There is a disc in the drive : use title whenever it is available.
+     Otherwise, use disc type. */
+  
+  title = cddrive_status_get_title (status);
+  type  = cddrive_status_get_type (status);
+  
+  if (cddrive_status_is_ejectable (status))
+    {
+      if (cddrive_status_is_blank (status))
+        /* translation note: "Eject blank <disc type> from <drive name>" (e.g. "Eject blank cd-rw from cdrom1") */
+        return g_strdup_printf (_("Eject blank %s from %s"), type, drive_name);
+      
+      if (title != NULL)
+        /* translation note: "Eject \"<disc title>\" from <drive name>" */
+        return g_strdup_printf (_("Eject \"%s\" from %s"), title, drive_name);
+
+      if (cddrive_status_is_audio (status))
+        /* translation note: "Eject audio <disc type> from <drive name>" */
+        return g_strdup_printf (_("Eject audio %s from %s"), type, drive_name);
+        
+      /* translation note: "Eject <disc type> from <drive name>" (e.g. "Eject dvd from my-dvd-drive") */
+      return g_strdup_printf (_("Eject %s from %s"), type, drive_name);
+    }
+  
+  /* unejectable drive with disc inside */
+    
+  if (cddrive_status_is_blank (status))
+    /* translation note: "Blank <disc type> in <drive name>" (e.g. "Blank cd-rw in cdrom1") */
+    return g_strdup_printf (_("Blank %s in %s"), type, drive_name);
+      
+  if (title != NULL)
+    /* translation note: "\"<disc title>\" in <drive name>" (e.g. ""Backup #36" in cdrom1") */
+    return g_strdup_printf (_("\"%s\" in %s"), title, drive_name);
+
+  if (cddrive_status_is_audio (status))
+    /* translation note: "Audio <disc type> in <drive name>" */
+    return g_strdup_printf (_("Audio %s in %s"), type, drive_name);
+        
+  /* translation note: "<disc type> in <drive name>" (e.g. "dvd in cdrom1") */
+  return g_strdup_printf (_("%s in %s"), type, drive_name);
+}
+
+
+
+/* note: 'status' can be NULL, to set an "unknown status" message */
+static void
+cddrive_update_tip_from_status (CddrivePlugin *cddrive, CddriveStatus *status)
+{
+  gchar *txt;
+
+  gtk_tooltips_disable (cddrive->tips);
+
+  if (cddrive->use_name_in_tip && cddrive->name != NULL)
+    txt = cddrive_get_named_tip_text_from_status (status, cddrive->name);
+  else
+    txt = cddrive_get_unnamed_tip_text_from_status (status);
+        
+  gtk_tooltips_set_tip (cddrive->tips,
+                        cddrive->ebox,
+                        txt,
+                        NULL);
+  
+  g_free (txt);
+  gtk_tooltips_enable (cddrive->tips);
+}
+
+
+
+void
+cddrive_update_tip (CddrivePlugin *cddrive)
+{
+  CddriveStatus *stat;
+  GError        *error = NULL;
+
+  stat = cddrive_status_new (cddrive->monitor, &error);
+  cddrive_update_tip_from_status (cddrive, stat);
+  
+  if (stat != NULL)
+    cddrive_status_free (stat);
+
+  if (error != NULL)
+    {
+      cddrive_show_error (error);
+      cddrive_clear_error (&error);
+    }
+}
+
+
+
+void
+on_menu_item_activated (GtkMenuItem *menu_item, CddrivePlugin *cddrive)
+{
+  CddriveStatus *stat;
+  GError        *err = NULL;
+
+  g_assert (cddrive->monitor != NULL);
+
+  stat = cddrive_status_new (cddrive->monitor, &err);
+  if (stat != NULL)
+    {
+      if (cddrive_status_is_mounted (stat))
+        cddrive_monitor_unmount (cddrive->monitor, &err);
+      else
+        cddrive_monitor_mount (cddrive->monitor, &err);
+    }
+
+  if (err != NULL)
+    {
+      cddrive_show_error (err);
+      cddrive_clear_error (&err);
+    }
+}
+
+
+
+/* note: 'status' can be NULL, which hides menu_item. */
+void
+cddrive_update_menu_from_status (CddrivePlugin *cddrive, CddriveStatus *status)
+{
+  GtkLabel    *label;
+  gchar       *txt;
+  const gchar *title;
+
+  if (cddrive->menu_item == NULL)
+    /* mount and unmount are both unavailable command */
+    return;
+
+  xfce_panel_plugin_block_menu (cddrive->plugin);
+
+  if (status == NULL ||
+      cddrive_status_is_empty (status) ||
+      cddrive_status_is_blank (status) ||
+      cddrive_status_is_audio (status))
+    gtk_widget_hide (cddrive->menu_item);
+  else
+    {
+      label = GTK_LABEL (gtk_bin_get_child (GTK_BIN (cddrive->menu_item)));
+      title = cddrive_status_get_title (status);
+      if (title == NULL)
+        {
+          if (cddrive_status_is_mounted (status))
+            gtk_label_set_text (label, _("Unmount disc"));
+          else
+            gtk_label_set_text (label, _("Mount disc"));
+        }
+      else
+        {
+          if (cddrive_status_is_mounted (status))
+            txt = g_strdup_printf (_("Unmount \"%s\""), title);
+          else
+            txt = g_strdup_printf (_("Mount \"%s\""), title);
+          
+          gtk_label_set_text (label, txt);
+          g_free (txt);
+        }
+      
+      gtk_widget_show (cddrive->menu_item);
+    }
+  
+  xfce_panel_plugin_unblock_menu (cddrive->plugin);
+}
+
+
+
+void
+cddrive_update_menu (CddrivePlugin *cddrive)
+{
+  CddriveStatus *stat;
+  GError        *error = NULL;
+
+  stat = cddrive_status_new (cddrive->monitor, &error);
+  cddrive_update_menu_from_status (cddrive, stat);
+  if (stat != NULL)
+    cddrive_status_free (stat);
+
+  if (error != NULL)
+    {
+      cddrive_show_error (error);
+      cddrive_clear_error (&error);
+    }
+}
+
+
+
+/* Set the icon, tip and menu according to CD-ROM drive status. */
+static void
+cddrive_update_interface (CddrivePlugin *cddrive)
+{
+  CddriveStatus *stat;
+  GError        *error = NULL;
+
+  stat = cddrive_status_new (cddrive->monitor, &error);
+  cddrive_update_icon_from_status (cddrive, stat);
+  cddrive_update_tip_from_status (cddrive, stat);
+  cddrive_update_menu_from_status (cddrive, stat);
+
+  if (stat != NULL)
+    cddrive_status_free (stat);
+  
+  if (error != NULL)
+    {
+      cddrive_show_error (error);
+      cddrive_clear_error (&error);
+    }
+}
+
+
+
+/* Return the first default fallback command found in user's path, NULL otherwise. */
+static const gchar*
+cddrive_get_default_fallback_command (CddriveCommandType command_type)
+{
+  gchar  *p = NULL;
+  gchar* *cmd_args;
+  gint    i;
+
+  for (i=0; cddrive_default_fallback_commands [command_type][i] != NULL; i++)
+    {
+      /* extract command name and check if it is in user's path */
+      cmd_args = g_strsplit (cddrive_default_fallback_commands [command_type][i], " ", 2);
+      p = g_find_program_in_path (cmd_args [0]);
+      g_strfreev (cmd_args);
+    
+      if (p != NULL)
+        {
+          g_free (p);
+          break;
+        }
+    }
+  
+  return cddrive_default_fallback_commands [command_type][i];
+}
+
+
+
+static gchar*
+cddrive_get_filtered_command (const gchar *command)
+{
+  gchar *res;
+
+  if (command == NULL)
+    return NULL;
+
+  res = g_strdup (command);
+  g_strstrip (res);
+  
+  if (g_utf8_strlen (res, 1) == 0)
+    {
+      g_free (res);
+      return NULL;
+    }
+  
+  return res;
+}
+
+
+
+void
+cddrive_set_mount_fallback (CddrivePlugin *cddrive,
+                            const gchar   *value)
+{
+  g_free (cddrive->mount_fallback);
+  cddrive->mount_fallback = cddrive_get_filtered_command (value);
+}
+
+
+
+void
+cddrive_set_unmount_fallback (CddrivePlugin *cddrive,
+                              const gchar   *value)
+{
+  g_free (cddrive->unmount_fallback);
+  cddrive->unmount_fallback = cddrive_get_filtered_command (value);
+}
+
+
+
+static void
+cddrive_free_settings (CddrivePlugin *cddrive)
+{
+  g_free (cddrive->device);
+  g_free (cddrive->mount_fallback);
+  g_free (cddrive->unmount_fallback);
+  g_free (cddrive->name);
+  if (cddrive->mounted_color != NULL)
+    gdk_color_free (cddrive->mounted_color);
+  if (cddrive->unmounted_color != NULL)
+    gdk_color_free (cddrive->unmounted_color);
+}
+
+
+
+static void
+cddrive_free (XfcePanelPlugin *plugin,
+              CddrivePlugin   *cddrive)
+{
+  GtkWidget *dialog;
+
+  /* check if the dialog is still open. if so, destroy it */
+  dialog = g_object_get_data (G_OBJECT (plugin), "dialog");
+  if (G_UNLIKELY (dialog != NULL))
+    gtk_widget_destroy (dialog);
+
+  /* destroy the panel widgets */
+  gtk_widget_destroy (cddrive->ebox);
+
+  /* cleanup the settings */
+  cddrive_free_settings (cddrive);
+  
+  /* free internals */
+  if (G_LIKELY (cddrive->monitor != NULL))
+    cddrive_monitor_free (cddrive->monitor);
+  
+  cddrive_cddb_free_globals ();
+  cddrive_error_free_globals ();
+
+  /* free the plugin structure */
+  panel_slice_free (CddrivePlugin, cddrive);
+}
+
+
+
+static GdkColor*
+cddrive_rc_copy_fallback_color (const GdkColor *fallback)
+{
+  if (fallback == NULL)
+    return NULL;
+  
+  return gdk_color_copy (fallback);
+}
+
+
+
+/* The result must be freed using 'gdk_color_free()'. */
+static GdkColor*
+cddrive_rc_read_color_entry (const XfceRc   *rc,
+                             const gchar    *key,
+                             const GdkColor *fallback)
+{
+  /* To be sure the result can be freed with 'gdk_color_free()', this function
+     only return colors provided by 'gdk_color_copy()'.
+  
+     GDK API only state that 'gdk_color_free()' is used to free colors which
+     are set with 'gdk_color_copy()', nothing else.
+     (No, read 'gdk_color_free()' code is not the answer, because the implementation
+     could change without contradicting the current API). */
+
+  GdkColor *res, res_src;
+  gchar    *v;
+
+  g_assert (rc != NULL);
+  g_assert (key != NULL);
+
+  v = g_strdup (xfce_rc_read_entry (rc, key, NULL));
+  if (v == NULL)
+    return cddrive_rc_copy_fallback_color (fallback);
+  
+  if (! gdk_colormap_alloc_color (gdk_colormap_get_system(), &res_src, TRUE, TRUE))
+    {
+      g_warning ("Failed to allocate color for config key '%s'. Using fallback color.",
+                 key);
+      g_free (v);
+      return cddrive_rc_copy_fallback_color (fallback);
+    }
+  
+  if (! gdk_color_parse (v, &res_src))
+    {
+      g_warning ("Failed to parse color from '%s' key's value '%s'. Using fallback color.",
+                 key,
+                 v);
+      gdk_colormap_free_colors (gdk_colormap_get_system(), &res_src, 1);
+      g_free (v);
+      return cddrive_rc_copy_fallback_color (fallback);
+    }
+  
+  g_free (v);
+  res = gdk_color_copy (&res_src);
+  gdk_colormap_free_colors (gdk_colormap_get_system(), &res_src, 1);
+  
+  return res;
+}
+
+
+
+static void
+cddrive_rc_write_color_entry (XfceRc         *rc,
+                              const gchar    *key,
+                              const GdkColor *color)
+{
+  gchar v[8];
+
+  g_assert (rc != NULL);
+  g_assert (key != NULL);
+  g_assert (color != NULL);
+
+  /* I don't know if a string with 16 bits colors would be accepted by
+     gdk_color_parse(). I don't care. This is a mere plugin, not the gimp. */
+  g_snprintf(v, 8, "#%02X%02X%02X",
+             (guint)(color->red >> 8),
+             (guint)(color->green >> 8),
+             (guint)(color->blue >> 8));
+  xfce_rc_write_entry (rc, key, v);
+}
+
+
+
+void
+cddrive_save (XfcePanelPlugin *plugin,
+              CddrivePlugin   *cddrive)
+{
+  XfceRc *rc;
+  gchar  *rc_path;
+
+  /* get the config file location */
+  rc_path = xfce_panel_plugin_save_location (plugin, TRUE);
+
+  if (G_UNLIKELY (rc_path == NULL))
+    {
+       g_warning ("failed to open config file");
+       return;
+    }
+
+  /* open the config file, read/write */
+  rc = xfce_rc_simple_open (rc_path, FALSE);
+  g_free (rc_path);
+
+  if (G_LIKELY (rc != NULL))
+    {
+      /* save the settings */
+      if (cddrive->device == NULL)
+        xfce_rc_delete_entry (rc, CDDRIVE_CONF_ID_DEVICE, FALSE);
+      else
+        xfce_rc_write_entry (rc, CDDRIVE_CONF_ID_DEVICE, cddrive->device);
+      
+      if (cddrive->mount_fallback == NULL)
+        xfce_rc_write_entry (rc, CDDRIVE_CONF_ID_MOUNT_FALLBACK, "");
+      else
+        xfce_rc_write_entry (rc,
+                             CDDRIVE_CONF_ID_MOUNT_FALLBACK,
+                             cddrive->mount_fallback);
+
+       if (cddrive->unmount_fallback == NULL)
+        xfce_rc_write_entry (rc, CDDRIVE_CONF_ID_UNMOUNT_FALLBACK, "");
+      else
+        xfce_rc_write_entry (rc,
+                             CDDRIVE_CONF_ID_UNMOUNT_FALLBACK,
+                             cddrive->unmount_fallback);
+
+     if (cddrive->name == NULL)
+        xfce_rc_delete_entry (rc, CDDRIVE_CONF_ID_NAME, FALSE);
+      else
+        xfce_rc_write_entry (rc, CDDRIVE_CONF_ID_NAME, cddrive->name);
+
+      xfce_rc_write_bool_entry (rc, CDDRIVE_CONF_ID_USE_NAME_IN_PANEL,
+                                cddrive->use_name_in_panel);
+      xfce_rc_write_bool_entry (rc, CDDRIVE_CONF_ID_USE_NAME_IN_TIP,
+                                cddrive->use_name_in_tip);
+      
+      xfce_rc_write_bool_entry (rc, CDDRIVE_CONF_ID_USE_MOUNTED_COLOR,
+                                cddrive->use_mounted_color);
+      if (cddrive->mounted_color != NULL)
+        cddrive_rc_write_color_entry (rc,
+                                      CDDRIVE_CONF_ID_MOUNTED_COLOR,
+                                      cddrive->mounted_color);
+      
+      xfce_rc_write_bool_entry (rc, CDDRIVE_CONF_ID_USE_UNMOUNTED_COLOR,
+                                cddrive->use_unmounted_color);
+      if (cddrive->unmounted_color != NULL)
+        cddrive_rc_write_color_entry (rc,
+                                      CDDRIVE_CONF_ID_UNMOUNTED_COLOR,
+                                      cddrive->unmounted_color);
+      
+      xfce_rc_write_bool_entry (rc, CDDRIVE_CONF_ID_USE_TRANSLUCENCY,
+                                cddrive->use_translucency);
+      xfce_rc_write_int_entry (rc, CDDRIVE_CONF_ID_TRANSLUCENCY,
+                               cddrive->translucency);
+
+      /* close the rc file */
+      xfce_rc_close (rc);
+    }
+}
+
+
+
+static void
+cddrive_read (CddrivePlugin *cddrive)
+{
+  XfceRc *rc;
+  gchar  *rc_path;
+
+  cddrive_free_settings (cddrive);
+
+  /* get the plugin config file location */
+  rc_path = xfce_panel_plugin_save_location (cddrive->plugin, TRUE);
+
+  if (G_LIKELY (rc_path != NULL))
+    {
+      /* open the config file, readonly */
+      rc = xfce_rc_simple_open (rc_path, TRUE);
+
+      /* cleanup */
+      g_free (rc_path);
+
+      if (G_LIKELY (rc != NULL))
+        {
+          /* read the settings */          
+          cddrive->device               = g_strdup (xfce_rc_read_entry (rc,
+                                                    CDDRIVE_CONF_ID_DEVICE,
+                                                    CDDRIVE_DEFAULT_DEVICE));
+        
+          cddrive->name                 = g_strdup (xfce_rc_read_entry (rc,
+                                                    CDDRIVE_CONF_ID_NAME,
+                                                    CDDRIVE_DEFAULT_NAME));
+        
+          cddrive_set_mount_fallback (cddrive,
+                                      xfce_rc_read_entry (rc,
+                                                          CDDRIVE_CONF_ID_MOUNT_FALLBACK,
+                                                          cddrive_get_default_fallback_command (CDDRIVE_MOUNT)));
+                                      
+          cddrive_set_unmount_fallback (cddrive,
+                                        xfce_rc_read_entry (rc,
+                                                            CDDRIVE_CONF_ID_UNMOUNT_FALLBACK,
+                                                            cddrive_get_default_fallback_command (CDDRIVE_UNMOUNT)));
+                                      
+          cddrive->use_name_in_panel    = xfce_rc_read_bool_entry (rc,
+                                              CDDRIVE_CONF_ID_USE_NAME_IN_PANEL,
+                                              CDDRIVE_DEFAULT_USE_NAME_IN_PANEL);
+        
+          cddrive->use_name_in_tip      = xfce_rc_read_bool_entry (rc,
+                                              CDDRIVE_CONF_ID_USE_NAME_IN_TIP,
+                                              CDDRIVE_DEFAULT_USE_NAME_IN_TIP);
+        
+          cddrive->use_mounted_color    = xfce_rc_read_bool_entry (rc,
+                                              CDDRIVE_CONF_ID_USE_MOUNTED_COLOR,
+                                              CDDRIVE_DEFAULT_USE_MOUNTED_COLOR);
+        
+          cddrive->mounted_color        = cddrive_rc_read_color_entry (rc,
+                                              CDDRIVE_CONF_ID_MOUNTED_COLOR,
+                                              CDDRIVE_DEFAULT_COLOR);
+                                          
+          cddrive->use_unmounted_color  = xfce_rc_read_bool_entry (rc,
+                                              CDDRIVE_CONF_ID_USE_UNMOUNTED_COLOR,
+                                              CDDRIVE_DEFAULT_USE_UNMOUNTED_COLOR);
+        
+          cddrive->unmounted_color      = cddrive_rc_read_color_entry (rc,
+                                              CDDRIVE_CONF_ID_UNMOUNTED_COLOR,
+                                              CDDRIVE_DEFAULT_COLOR);
+                                          
+          cddrive->use_translucency     = xfce_rc_read_bool_entry (rc,
+                                              CDDRIVE_CONF_ID_USE_TRANSLUCENCY,
+                                              CDDRIVE_DEFAULT_USE_TRANSLUCENCY);
+                                          
+          cddrive->translucency         = xfce_rc_read_int_entry (rc,
+                                              CDDRIVE_CONF_ID_TRANSLUCENCY,
+                                              CDDRIVE_DEFAULT_TRANSLUCENCY);
+          if (cddrive->translucency < 0)
+            cddrive->translucency = 0;
+          if (cddrive->translucency > 100)
+            cddrive->translucency = 100;
+
+          /* cleanup */
+          xfce_rc_close (rc);
+
+          /* leave the function, everything went well */
+          return;
+        }
+    }
+
+  /* something went wrong, apply default values */
+  g_warning ("failed to open config file. Applying default settings.");
+  cddrive->device               = g_strdup (CDDRIVE_DEFAULT_DEVICE);
+  cddrive->name                 = g_strdup (CDDRIVE_DEFAULT_NAME);
+  cddrive->use_name_in_panel    = CDDRIVE_DEFAULT_USE_NAME_IN_PANEL;
+  cddrive->use_name_in_tip      = CDDRIVE_DEFAULT_USE_NAME_IN_TIP;
+  cddrive->use_mounted_color    = CDDRIVE_DEFAULT_USE_MOUNTED_COLOR;
+  cddrive->mounted_color        = cddrive_rc_copy_fallback_color (CDDRIVE_DEFAULT_COLOR);
+  cddrive->use_unmounted_color  = CDDRIVE_DEFAULT_USE_UNMOUNTED_COLOR;
+  cddrive->unmounted_color      = cddrive_rc_copy_fallback_color (CDDRIVE_DEFAULT_COLOR);
+  cddrive->use_translucency     = CDDRIVE_DEFAULT_USE_TRANSLUCENCY;
+  cddrive->translucency         = CDDRIVE_DEFAULT_TRANSLUCENCY;
+  
+  cddrive_set_mount_fallback (cddrive,
+                              cddrive_get_default_fallback_command (CDDRIVE_MOUNT));
+  cddrive_set_unmount_fallback (cddrive,
+                                cddrive_get_default_fallback_command (CDDRIVE_UNMOUNT));
+}
+
+
+
+void
+cddrive_update_label (CddrivePlugin *cddrive)
+{
+  if (cddrive->use_name_in_panel && cddrive->name != NULL)
+    {
+      if (cddrive->label == NULL)
+        {
+          cddrive->label = gtk_label_new (cddrive->name);
+          gtk_box_pack_end (GTK_BOX (cddrive->hvbox),
+                            cddrive->label,
+                            FALSE, FALSE, 0);
+        }
+      else
+        gtk_label_set_text (GTK_LABEL (cddrive->label), cddrive->name);
+    }
+  else
+    {
+      if (cddrive->label != NULL)
+        {
+          gtk_widget_destroy (cddrive->label);
+          cddrive->label = NULL;
+        }
+    }
+}
+
+
+
+static gboolean
+cddrive_on_enter (GtkWidget        *hvbox,
+                  GdkEventCrossing *event,
+                  CddrivePlugin    *cddrive)
+{
+  cddrive_update_tip (cddrive);
+  return FALSE;
+}
+
+
+
+static void
+cddrive_on_click (GtkButton     *button,
+                  CddrivePlugin *cddrive)
+{
+  CddriveStatus *s;
+  GError        *err = NULL;
+  gboolean       cb_enabled, update_mon;
+
+  if (G_UNLIKELY (cddrive->monitor == NULL))
+    return;
+  
+  /* We will force the status update. It doesn't need to be done a second time
+     upon a state drive change event, so we deactivate the callbacks. */
+  cb_enabled = cddrive_monitor_callbacks_enabled (cddrive->monitor);
+  update_mon = cddrive_monitor_enable_callbacks (cddrive->monitor, FALSE, NULL);
+  
+  s = cddrive_status_new (cddrive->monitor, &err);
+  if (G_LIKELY (s != NULL ))
+    {
+      if (cddrive_status_is_open (s))
+      /* close the tray */
+      cddrive_monitor_close (cddrive->monitor, &err);
+      else
+        {
+          if (cddrive_status_is_mounted (s))
+            /* try to unmount the disc */
+            cddrive_monitor_unmount (cddrive->monitor, &err);        
+
+          if (G_LIKELY (err == NULL))
+            /* open the tray */
+            cddrive_monitor_eject (cddrive->monitor, &err);
+        }
+      
+      cddrive_status_free (s);
+      
+      if (G_LIKELY (err == NULL && update_mon))
+        {
+          /* update the monitor, to keep the button pushed down
+             while waiting for HAL response. */
+          cddrive_update_monitor (cddrive);
+          gtk_widget_show_all (cddrive->ebox);
+        }
+    }
+  
+  if (update_mon)
+    {
+      /* Forced status update done, restore callbacks activation. */
+      cddrive_monitor_enable_callbacks (cddrive->monitor, cb_enabled, NULL);
+    }
+  
+  if (G_UNLIKELY (err != NULL))
+    {    
+      cddrive_show_error (err);
+      cddrive_clear_error (&err);
+    }
+}
+
+
+
+static void
+cddrive_on_disc_change (CddriveMonitor *monitor,
+                        CddrivePlugin  *cddrive)
+{
+  cddrive_update_interface (cddrive);
+  gtk_widget_show (cddrive->image);
+}
+
+
+
+static void
+cddrive_on_disc_inserted (CddriveMonitor *monitor,
+                          gpointer        callback_data)
+{
+  cddrive_on_disc_change (monitor, (CddrivePlugin*) callback_data);
+}
+
+
+
+static void
+cddrive_on_disc_removed (CddriveMonitor *monitor,
+                         gpointer        callback_data)
+{
+  cddrive_on_disc_change (monitor, (CddrivePlugin*) callback_data);
+}
+
+
+
+static void
+cddrive_on_disc_modified (CddriveMonitor *monitor,
+                          gpointer        callback_data)
+{
+  cddrive_on_disc_change (monitor, (CddrivePlugin*) callback_data);
+}
+
+
+
+static void
+on_icon_theme_changed (GtkIconTheme *icon_theme,
+                       CddrivePlugin *cddrive)
+{
+  cddrive_update_icon (cddrive);
+}
+
+
+
+void
+cddrive_update_monitor (CddrivePlugin *cddrive)
+{
+  GError *error = NULL;
+
+  if (cddrive->monitor != NULL)
+    cddrive_monitor_free (cddrive->monitor);
+
+  if (cddrive->device == NULL)
+    cddrive->monitor = NULL;
+  else
+    {
+      cddrive->monitor = cddrive_monitor_new (cddrive->device,
+                                              cddrive,
+                                              cddrive_on_disc_inserted,
+                                              cddrive_on_disc_removed,
+                                              cddrive_on_disc_modified,
+                                              cddrive->mount_fallback,
+                                              cddrive->unmount_fallback,
+                                              &error);
+      if (cddrive->monitor == NULL)
+        {
+          cddrive_show_error (error);
+          cddrive_clear_error (&error);
+        }
+    }
+    
+  /* set the icon and menu according to CD-ROM drive status */
+  cddrive_update_interface (cddrive);
+}
+
+
+
+static CddrivePlugin *
+cddrive_new (XfcePanelPlugin *plugin)
+{
+  CddrivePlugin *res;
+
+  cddrive_error_init_globals ();
+  cddrive_cddb_init_globals ();
+
+  res = panel_slice_new0 (CddrivePlugin);
+
+  res->plugin = plugin;
+  xfce_panel_plugin_set_expand (res->plugin, TRUE);
+ 
+  /* create plugin widgets */
+  res->ebox = gtk_event_box_new ();
+  gtk_container_add (GTK_CONTAINER (plugin), res->ebox);
+  res->hvbox = xfce_hvbox_new (xfce_panel_plugin_get_orientation (plugin),
+                               FALSE, 0);
+  gtk_container_add (GTK_CONTAINER (res->ebox), res->hvbox);
+
+  res->button = xfce_create_panel_button ();
+  gtk_box_pack_end (GTK_BOX (res->hvbox), res->button, FALSE, FALSE, 0);
+
+  res->image = gtk_image_new ();
+  gtk_button_set_image (GTK_BUTTON (res->button), res->image);
+
+  res->tips = gtk_tooltips_new ();
+  
+  /* set the panel's right-click menu */
+  xfce_panel_plugin_add_action_widget (plugin, res->ebox);
+  xfce_panel_plugin_add_action_widget (plugin, res->button);
+  xfce_panel_plugin_menu_show_configure (plugin);
+  xfce_panel_plugin_menu_show_about (plugin);
+  
+  /* create and insert the mount/unmount item */
+  res->menu_item = gtk_menu_item_new_with_label (""); /* empty text to create item's label widget */
+  xfce_panel_plugin_menu_insert_item (plugin,
+                                      GTK_MENU_ITEM (res->menu_item));
+  
+  /* update from user settings */
+  cddrive_read (res);
+  cddrive_update_monitor (res);
+  cddrive_update_label (res);
+
+  return res;
+}
+
+
+
+static void
+cddrive_orientation_changed (XfcePanelPlugin *plugin,
+                             GtkOrientation   orientation,
+                             CddrivePlugin   *cddrive)
+{
+  xfce_hvbox_set_orientation (XFCE_HVBOX (cddrive->hvbox), orientation);
+}
+
+
+
+static gboolean
+cddrive_size_changed (XfcePanelPlugin *plugin,
+                      gint             size,
+                      CddrivePlugin   *cddrive)
+{
+  GtkOrientation o;
+
+  o = xfce_panel_plugin_get_orientation (plugin);
+
+  if (o == GTK_ORIENTATION_HORIZONTAL)
+    gtk_widget_set_size_request (GTK_WIDGET (plugin), -1, size);
+  else
+    gtk_widget_set_size_request (GTK_WIDGET (plugin), size, -1);
+
+  cddrive_update_icon (cddrive);
+
+  return TRUE;
+}
+
+
+
+static void
+cddrive_construct (XfcePanelPlugin *plugin)
+{
+  CddrivePlugin *cddrive;
+
+  /* setup transation domain */
+  xfce_textdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
+
+  /* create the plugin */
+  cddrive = cddrive_new (plugin);
+
+  /* show the plugin widgets */
+  gtk_widget_show_all (cddrive->ebox);
+
+  /* as we cannot be notified of the open/close tray event, we update the tooltip
+     each time the mouse pointer enters the plugin */
+  g_signal_connect (cddrive->ebox,
+                    "enter-notify-event",
+                    G_CALLBACK (cddrive_on_enter), 
+                    cddrive);
+                    
+  /* to open or close the drive */
+  g_signal_connect (cddrive->button,
+                    "clicked",
+                    G_CALLBACK (cddrive_on_click),
+                    cddrive);
+      
+  /* connect plugin signals */
+  g_signal_connect (G_OBJECT (plugin), "free-data",
+                    G_CALLBACK (cddrive_free),
+                    cddrive);
+
+  g_signal_connect (G_OBJECT (plugin), "save",
+                    G_CALLBACK (cddrive_save),
+                    cddrive);
+
+  g_signal_connect (G_OBJECT (plugin), "size-changed",
+                    G_CALLBACK (cddrive_size_changed),
+                    cddrive);
+
+  g_signal_connect (G_OBJECT (plugin), "orientation-changed",
+                    G_CALLBACK (cddrive_orientation_changed),
+                    cddrive);
+
+  /* connect configure and about menu items */
+  g_signal_connect (G_OBJECT (plugin), "configure-plugin",
+                    G_CALLBACK (cddrive_configure),
+                    cddrive);
+  g_signal_connect (G_OBJECT (plugin), "about",
+                    G_CALLBACK (cddrive_about),
+                    NULL);
+
+  /* connect the mount/unmount menu item */
+  g_signal_connect (cddrive->menu_item,
+                    "activate",
+                    G_CALLBACK (on_menu_item_activated),
+                    cddrive);
+                    
+  /* to handle icon theme change */
+  g_signal_connect (gtk_icon_theme_get_default (),
+                    "changed",
+                    G_CALLBACK (on_icon_theme_changed),
+                    cddrive);
+}
+
+
+/* register the plugin */
+XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (cddrive_construct)

Added: xfce4-cddrive-plugin/trunk/panel-plugin/cddrive.desktop.in.in
===================================================================
--- xfce4-cddrive-plugin/trunk/panel-plugin/cddrive.desktop.in.in	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/panel-plugin/cddrive.desktop.in.in	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,7 @@
+[Xfce Panel]
+Type=X-XFCE-PanelPlugin
+Encoding=UTF-8
+_Name=CD Drive Monitor
+_Comment=CD-ROM drive tray and content control
+Icon=gnome-dev-removable
+X-XFCE-Exec=@libexecdir@/xfce4/panel-plugins/xfce4-cddrive-plugin

Added: xfce4-cddrive-plugin/trunk/panel-plugin/cddrive.h
===================================================================
--- xfce4-cddrive-plugin/trunk/panel-plugin/cddrive.h	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/panel-plugin/cddrive.h	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,111 @@
+/*  $Id$
+ *
+ *  Copyright (c) 2007 The Xfce development team. All rights reserved.
+ *
+ *  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 Library 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 __CDDRIVE_H__
+#define __CDDRIVE_H__
+
+#include <libxfce4panel/xfce-panel-plugin.h>
+#include "cddrive-monitor.h"
+
+
+G_BEGIN_DECLS
+
+/* plugin structure */
+typedef struct
+{
+  XfcePanelPlugin *plugin;
+
+  /* panel widgets */
+  GtkWidget       *ebox;
+  GtkWidget       *hvbox;
+  GtkWidget       *button;
+  GtkWidget       *image;            /* button icon */
+  GtkWidget       *label;            /* to display 'name' value */
+  GtkTooltips     *tips;
+  GtkWidget       *menu_item;
+  /*GtkWidget       *menu_sep;*/
+
+  /* settings */
+  gchar           *device;
+  gchar*           mount_fallback;       /* fallback mount command */
+  gchar*           unmount_fallback;     /* fallback unmount command */
+  gchar           *name;
+  gboolean         use_name_in_panel;    /* show name in panel ? */
+  gboolean         use_name_in_tip;      /* show name in tooltip ? */
+  gboolean         use_mounted_color;    /* colorize the unmounted disc icons ? */
+  GdkColor        *mounted_color;
+  gboolean         use_unmounted_color;  /* colorize the unmounted disc icons ? */
+  GdkColor        *unmounted_color;
+  gboolean         use_translucency;     /* fade the unmounted disc icons ? */
+  gint             translucency;         /* in percent */
+
+  /* internals */
+  CddriveMonitor  *monitor;
+}
+CddrivePlugin;
+
+
+
+typedef enum
+{
+  CDDRIVE_MOUNT   = 0,
+  CDDRIVE_UNMOUNT = 1
+}
+CddriveCommandType;
+
+
+
+void
+cddrive_save                 (XfcePanelPlugin *plugin,
+                              CddrivePlugin    *sample);
+
+
+
+void
+cddrive_set_mount_fallback   (CddrivePlugin *cddrive,
+                              const gchar   *value);
+                            
+                            
+                            
+void
+cddrive_set_unmount_fallback (CddrivePlugin *cddrive,
+                              const gchar   *value);
+
+
+
+void
+cddrive_update_monitor       (CddrivePlugin *cddrive);
+
+
+
+void
+cddrive_update_label         (CddrivePlugin *cddrive);
+
+
+
+void
+cddrive_update_icon          (CddrivePlugin *cddrive);
+
+
+
+void
+cddrive_update_tip           (CddrivePlugin *cddrive);
+                            
+G_END_DECLS
+#endif /* !__CDDRIVE_H__ */

Added: xfce4-cddrive-plugin/trunk/panel-plugin/os-dependant/cddrive-cdrom.c
===================================================================
--- xfce4-cddrive-plugin/trunk/panel-plugin/os-dependant/cddrive-cdrom.c	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/panel-plugin/os-dependant/cddrive-cdrom.c	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,94 @@
+/*  $Id$
+ *
+ *  Copyright (c) 2007 The Xfce development team. All rights reserved.
+ *
+ *  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 Library 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.
+ */
+
+#include "cddrive-cdrom.h"
+
+
+#ifdef __linux__
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <linux/cdrom.h>
+#include <errno.h>
+
+
+
+gint
+cddrive_get_tray_status (const gchar *device)
+{
+  gint res = 0;
+  gint fd, s;
+
+  g_assert (device != NULL);
+
+  fd = open (device, O_RDONLY|O_NONBLOCK);
+  
+	if (fd == -1)
+    {
+      g_warning ("Cannot open file '%s'. Failed to get tray status.",
+                 device);
+      return -1;
+    }
+
+	/* get CD drive status */  
+  s = ioctl (fd, CDROM_DRIVE_STATUS, CDSL_CURRENT);
+	if (s == -1)
+    {
+      g_warning ("%s. Failed to get tray status.", g_strerror (errno));
+      if (close (fd) != 0)
+        g_warning (g_strerror (errno));
+      return -1;
+    }
+  
+  /* inspect status */
+  switch (s)
+    {
+      case CDS_DRIVE_NOT_READY:
+        g_warning ("Drive '%s' is not ready. Failed to get tray status.",
+                   device);
+        break;
+      
+      case CDS_NO_INFO:
+        g_warning ("Drive status not available for device '%s' (not implemented in kernel).",
+                   device);
+        break;
+      
+      case CDS_TRAY_OPEN:
+        res = 1;
+    }
+  
+  /* cleanup */
+  if (close (fd) != 0)
+    g_warning (g_strerror (errno));
+  
+  return res;
+}
+
+
+#else /* ------- Unsupported Operating System or missing libs/headers ------- */
+#warning "compiling without tray status support"
+
+gint
+cddrive_get_tray_status (const gchar *device)
+{
+  g_warning ("Plugin compiled without tray status support.");
+  return -1;
+}
+#endif

Added: xfce4-cddrive-plugin/trunk/panel-plugin/os-dependant/cddrive-cdrom.h
===================================================================
--- xfce4-cddrive-plugin/trunk/panel-plugin/os-dependant/cddrive-cdrom.h	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/panel-plugin/os-dependant/cddrive-cdrom.h	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,30 @@
+/*  $Id$
+ *
+ *  Copyright (c) 2007 The Xfce development team. All rights reserved.
+ *
+ *  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 Library 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.
+ */
+
+#include <glib.h>
+
+
+
+/* Return the status of the tray of the CD-ROM drive with device path 'device'.
+   Possible values are :
+       0 : the tray is closed.
+       1 : the tray is open.
+      -1 : failed to get tray status. */
+gint
+cddrive_get_tray_status (const gchar* device);

Added: xfce4-cddrive-plugin/trunk/panel-plugin/os-dependant/cddrive-process.c
===================================================================
--- xfce4-cddrive-plugin/trunk/panel-plugin/os-dependant/cddrive-process.c	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/panel-plugin/os-dependant/cddrive-process.c	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,160 @@
+/*  $Id$
+ *
+ *  Copyright (c) 2007 The Xfce development team. All rights reserved.
+ *
+ *  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 Library 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.
+ */
+
+#include "cddrive-process.h"
+
+
+#ifdef __linux__
+
+#include <errno.h>
+
+/*
+  The following code is based on linux procfs. I don't know how much this is portable.
+  The functions use two procf files (are they linux only ?):
+    - the /proc/<pid>/cwd link, to know if a process currently uses the disc.
+    - the /proc/<pid>/exe link, to get the process name (i don't use /proc/<pid>/status file
+      since it only provide a truncated name).
+*/
+
+
+
+gchar*
+cddrive_get_process_name (guint64 process_pid)
+{
+  gchar *res = NULL;
+  gchar *p1, *p2;
+  gsize  w;
+
+  g_assert (process_pid > 0);
+
+  /* get the program path pointed by the exe link */
+  p1 = g_strdup_printf ("/proc/%llu/exe", process_pid);
+  p2 = g_file_read_link (p1, NULL);
+  g_free (p1);
+  p1 = g_filename_to_utf8 (p2, -1, NULL, &w, NULL);
+  g_free (p2);
+
+  if (p1 != NULL)
+    {
+      /* extract the name from the program path */
+      p2 = g_utf8_strrchr (p1, -1, '/');
+      if (p2 == NULL)
+        res = p1;
+      else
+        {
+          if (g_utf8_strlen (p2, -1) > 1)
+            {
+              /* remove the starting '/' */
+              res = g_utf8_find_next_char (p2, NULL);
+              if (res != NULL)
+                res = g_strdup (res);
+            }
+        }
+      g_free (p1);
+    }
+  
+  return res;
+}
+
+
+
+/* Return the pid of a process currently using the directory of path 'dir_path',
+   or zero if failed. */
+guint64
+cddrive_find_dir_locker_pid (const gchar *dir_path)
+{
+  guint64      res;
+  GDir        *d;
+  const gchar *f_name;
+  gchar       *cwd_path = NULL;
+  gchar       *cwd_lnk = NULL;
+  gchar       *c;
+
+  g_assert (dir_path != NULL);
+
+  /* note: at first, i tried to look for file locks, but found that none of
+           the blocking programs used locks, it's only that their cwd was the mount point
+           or one of its subdirectories. */
+
+  d = g_dir_open ("/proc", 0, NULL);
+  if (d == NULL)
+    {
+      g_warning ("unable to open directory /proc");
+      return 0;
+    }
+  
+  for (f_name = g_dir_read_name (d);
+       f_name != NULL;
+       f_name = g_dir_read_name (d))
+    {
+      res = g_ascii_strtoull (f_name, &c, 10);
+      if (errno != ERANGE && errno != EINVAL && *c == 0)
+        {
+          /* f_name is a number, i.e. the directory name of the process of pid 'res' */
+          cwd_path = g_strconcat ("/proc/", f_name, "/cwd", NULL);
+          if (g_file_test (cwd_path, G_FILE_TEST_IS_SYMLINK))
+            {
+              /* look if the cwd link point to the mount point or one of its subdirectories. */
+              cwd_lnk = g_file_read_link (cwd_path, NULL);
+              if (cwd_lnk != NULL && g_str_has_prefix (cwd_lnk, dir_path))
+                {
+                  /* locker found ! */
+                  g_free (cwd_path);
+                  g_free (cwd_lnk);
+                  break;
+                }
+              
+              g_free (cwd_lnk);
+              cwd_lnk = NULL;
+            }
+          
+          g_free (cwd_path);
+          cwd_path = NULL;
+        }      
+    }
+  
+  if (f_name == NULL)
+    res = 0;
+    
+  g_dir_close (d);
+  
+  return res;
+}
+
+
+
+#else /* ------- Unsupported Operating System or missing libs/headers ------- */
+#warning "compiling without process informations support"
+
+gchar*
+cddrive_get_process_name (guint64 process_pid)
+{
+  g_warning ("Plugin compiled without process name reading from pid support.");
+  return NULL;
+}
+
+
+
+guint64
+cddrive_find_dir_locker_pid (const gchar *dir_path)
+{
+  g_warning ("Plugin compiled without locker pid search support.");
+  return 0;
+}
+#endif

Added: xfce4-cddrive-plugin/trunk/panel-plugin/os-dependant/cddrive-process.h
===================================================================
--- xfce4-cddrive-plugin/trunk/panel-plugin/os-dependant/cddrive-process.h	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/panel-plugin/os-dependant/cddrive-process.h	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,35 @@
+/*  $Id$
+ *
+ *  Copyright (c) 2007 The Xfce development team. All rights reserved.
+ *
+ *  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 Library 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.
+ */
+
+#include <glib.h>
+
+
+
+/* Return the name of the program associated with the pid 'process_pid',
+   or NULL if it failed to retrieve it.
+   The result must be freed after use. */
+gchar*
+cddrive_get_process_name (guint64 process_pid);
+
+
+
+/* Return the pid of a process currently using the directory of path 'dir_path',
+   or zero if failed. */
+guint64
+cddrive_find_dir_locker_pid (const gchar *dir_path);

Added: xfce4-cddrive-plugin/trunk/po/ChangeLog
===================================================================
--- xfce4-cddrive-plugin/trunk/po/ChangeLog	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/po/ChangeLog	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,3 @@
+2007-04-20	Sylvain Reynal <sreynal at nerim.net>
+
+	* fr.po: French translation added.

Added: xfce4-cddrive-plugin/trunk/po/LINGUAS
===================================================================
--- xfce4-cddrive-plugin/trunk/po/LINGUAS	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/po/LINGUAS	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,2 @@
+# set of available languages (in alphabetic order)
+fr

Added: xfce4-cddrive-plugin/trunk/po/Makefile.in.in
===================================================================
--- xfce4-cddrive-plugin/trunk/po/Makefile.in.in	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/po/Makefile.in.in	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,219 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper at gnu.ai.mit.edu>
+#
+# This file file be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+#
+# - Modified by Owen Taylor <otaylor at redhat.com> to use GETTEXT_PACKAGE
+#   instead of PACKAGE and to look for po2tbl in ./ not in intl/
+#
+# - Modified by jacob berkman <jacob at ximian.com> to install
+#   Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
+#
+# - Modified by Rodney Dawes <dobey at novell.com> for use with intltool
+#
+# We have the following line for use by intltoolize:
+# INTLTOOL_MAKEFILE
+
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = @datadir@
+datarootdir = @datarootdir@
+libdir = @libdir@
+DATADIRNAME = @DATADIRNAME@
+itlocaledir = $(prefix)/$(DATADIRNAME)/locale
+subdir = po
+install_sh = @install_sh@
+# Automake >= 1.8 provides @mkdir_p at .
+# Until it can be supposed, use the safe fallback:
+mkdir_p = $(install_sh) -d
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT_ARGS = @XGETTEXT_ARGS@
+XGETTEXT = @XGETTEXT@ $(XGETTEXT_ARGS)
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+MSGMERGE = XGETTEXT_ARGS="$(XGETTEXT_ARGS)" INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
+GENPOT   = XGETTEXT_ARGS="$(XGETTEXT_ARGS)" INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
+
+ALL_LINGUAS = @ALL_LINGUAS@
+
+PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)
+
+USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS`" -o -n "`echo $$ALINGUAS|grep ' ?$$lang ?'`"; then printf "$$lang "; fi; done; fi)
+
+USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
+
+POFILES=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
+
+DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES)
+EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
+
+POTFILES = \
+# This comment gets stripped out
+
+CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
+
+.SUFFIXES:
+.SUFFIXES: .po .pox .gmo .mo .msg .cat
+
+.po.pox:
+	$(MAKE) $(GETTEXT_PACKAGE).pot
+	$(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
+
+.po.mo:
+	$(MSGFMT) -o $@ $<
+
+.po.gmo:
+	file=`echo $* | sed 's,.*/,,'`.gmo \
+	  && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+	sed -f ../intl/po2msg.sed < $< > $*.msg \
+	  && rm -f $@ && gencat $@ $*.msg
+
+
+all: all- at USE_NLS@
+
+all-yes: $(CATALOGS)
+all-no:
+
+$(GETTEXT_PACKAGE).pot: $(POTFILES)
+	$(GENPOT)
+
+install: install-data
+install-data: install-data- at USE_NLS@
+install-data-no: all
+install-data-yes: all
+	$(mkdir_p) $(DESTDIR)$(itlocaledir)
+	linguas="$(USE_LINGUAS)"; \
+	for lang in $$linguas; do \
+	  dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
+	  $(mkdir_p) $$dir; \
+	  if test -r $$lang.gmo; then \
+	    $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+	    echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
+	  else \
+	    $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+	    echo "installing $(srcdir)/$$lang.gmo as" \
+		 "$$dir/$(GETTEXT_PACKAGE).mo"; \
+	  fi; \
+	  if test -r $$lang.gmo.m; then \
+	    $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
+	    echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
+	  else \
+	    if test -r $(srcdir)/$$lang.gmo.m ; then \
+	      $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
+		$$dir/$(GETTEXT_PACKAGE).mo.m; \
+	      echo "installing $(srcdir)/$$lang.gmo.m as" \
+		   "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
+	    else \
+	      true; \
+	    fi; \
+	  fi; \
+	done
+
+# Empty stubs to satisfy archaic automake needs
+dvi info tags TAGS ID:
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+	linguas="$(USE_LINGUAS)"; \
+	for lang in $$linguas; do \
+	  rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
+	  rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
+	done
+
+check: all $(GETTEXT_PACKAGE).pot
+	rm -f missing notexist
+	srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
+	if [ -r missing -o -r notexist ]; then \
+	  exit 1; \
+	fi
+
+mostlyclean:
+	rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
+	rm -f .intltool-merge-cache
+
+clean: mostlyclean
+
+distclean: clean
+	rm -f Makefile Makefile.in POTFILES stamp-it
+	rm -f *.mo *.msg *.cat *.cat.m *.gmo
+
+maintainer-clean: distclean
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+	rm -f Makefile.in.in
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: $(DISTFILES)
+	dists="$(DISTFILES)"; \
+	extra_dists="$(EXTRA_DISTFILES)"; \
+	for file in $$extra_dists; do \
+	  test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
+	done; \
+	for file in $$dists; do \
+	  test -f $$file || file="$(srcdir)/$$file"; \
+	  ln $$file $(distdir) 2> /dev/null \
+	    || cp -p $$file $(distdir); \
+	done
+
+update-po: Makefile
+	$(MAKE) $(GETTEXT_PACKAGE).pot
+	tmpdir=`pwd`; \
+	linguas="$(USE_LINGUAS)"; \
+	for lang in $$linguas; do \
+	  echo "$$lang:"; \
+	  result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
+	  if $$result; then \
+	    if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+	      rm -f $$tmpdir/$$lang.new.po; \
+            else \
+	      if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+	        :; \
+	      else \
+	        echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+	        rm -f $$tmpdir/$$lang.new.po; \
+	        exit 1; \
+	      fi; \
+	    fi; \
+	  else \
+	    echo "msgmerge for $$lang.gmo failed!"; \
+	    rm -f $$tmpdir/$$lang.new.po; \
+	  fi; \
+	done
+
+Makefile POTFILES: stamp-it
+	@if test ! -f $@; then \
+	  rm -f stamp-it; \
+	  $(MAKE) stamp-it; \
+	fi
+
+stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
+	       $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: xfce4-cddrive-plugin/trunk/po/POTFILES.in
===================================================================
--- xfce4-cddrive-plugin/trunk/po/POTFILES.in	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/po/POTFILES.in	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,5 @@
+panel-plugin/cddrive.c
+panel-plugin/cddrive-error.c
+panel-plugin/cddrive-dialogs.c
+panel-plugin/cddrive-monitor.c
+panel-plugin/cddrive.desktop.in.in

Added: xfce4-cddrive-plugin/trunk/po/fr.po
===================================================================
--- xfce4-cddrive-plugin/trunk/po/fr.po	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/po/fr.po	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,414 @@
+# French translation of xfce4-cddrive-plugin
+# Copyright (C) 2007 The Xfce development team. All rights reserved.
+# This file is distributed under the same license as the xfce4-cddrive-plugin package.
+# Sylvain Reynal <sreynal at nerim.net>, 2007.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: 0.0.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-05-22 14:49+0200\n"
+"PO-Revision-Date: 2007-05-22 14:50+0200\n"
+"Last-Translator: Sylvain Reynal <sreynal at nerim.net>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../panel-plugin/cddrive.c:183
+msgid "Drive status is unavailable... is HAL installed and hald running ?"
+msgstr ""
+"L'état du lecteur n'est pas disponible... HAL est-il installé et hald lancé ?"
+
+#: ../panel-plugin/cddrive.c:192
+msgid "Close tray"
+msgstr "Fermer le lecteur"
+
+#: ../panel-plugin/cddrive.c:194
+msgid "Open tray"
+msgstr "Ouvrir le lecteur"
+
+#. drive is not ejectable
+#: ../panel-plugin/cddrive.c:198
+msgid "No disc in the drive"
+msgstr "Aucun disque dans le lecteur"
+
+#. translation note: "Eject blank <disc type>" (e.g. "Eject blank cd-rw")
+#: ../panel-plugin/cddrive.c:211
+#, c-format
+msgid "Eject blank %s"
+msgstr "Éjecter le %s vierge"
+
+#. translation note: "Eject \"<disc title>\""
+#: ../panel-plugin/cddrive.c:215
+#, c-format
+msgid "Eject \"%s\""
+msgstr "Éjecter \"%s\""
+
+#. translation note: "Eject audio <disc type>"
+#: ../panel-plugin/cddrive.c:219
+#, c-format
+msgid "Eject audio %s"
+msgstr "Éjecter le %s audio"
+
+#. translation note: "Eject <disc type>" (e.g. "Eject dvd")
+#: ../panel-plugin/cddrive.c:222
+#, c-format
+msgid "Eject %s"
+msgstr "Éjecter le %s"
+
+#. translation note: "Blank <disc type>" (e.g. "Blank cd-rw")
+#: ../panel-plugin/cddrive.c:229
+#, c-format
+msgid "Blank %s"
+msgstr "%s vierge"
+
+#. translation note: "\"<disc title>\" (made translatable in case translation
+#. do not use the '"' character to enclose the title)
+#: ../panel-plugin/cddrive.c:234
+#, c-format
+msgid "\"%s\""
+msgstr "\"%s\""
+
+#. translation note: "Audio <disc type>"
+#: ../panel-plugin/cddrive.c:238
+#, c-format
+msgid "Audio %s"
+msgstr "%s audio"
+
+#: ../panel-plugin/cddrive.c:258
+#, c-format
+msgid "%s status is unavailable... is HAL installed and hald running ?"
+msgstr ""
+"L'état de %s n'est pas disponible... HAL est-il installé et hald lancé ?"
+
+#. translation note: "Close <drive name>"
+#: ../panel-plugin/cddrive.c:269
+#, c-format
+msgid "Close %s"
+msgstr "Fermer %s"
+
+#. translation note: "Open <drive name>"
+#: ../panel-plugin/cddrive.c:272
+#, c-format
+msgid "Open %s"
+msgstr "Ouvrir %s"
+
+#. drive is not ejectable
+#. translation note: "No disc in <drive name>"
+#: ../panel-plugin/cddrive.c:278
+#, c-format
+msgid "No disc in %s"
+msgstr "Aucun disque dans %s"
+
+#. translation note: "Eject blank <disc type> from <drive name>" (e.g. "Eject blank cd-rw from cdrom1")
+#: ../panel-plugin/cddrive.c:291
+#, c-format
+msgid "Eject blank %s from %s"
+msgstr "Éjecter le %s vierge de %s"
+
+#. translation note: "Eject \"<disc title>\" from <drive name>"
+#: ../panel-plugin/cddrive.c:295
+#, c-format
+msgid "Eject \"%s\" from %s"
+msgstr "Éjecter \"%s\" de %s"
+
+#. translation note: "Eject audio <disc type> from <drive name>"
+#: ../panel-plugin/cddrive.c:299
+#, c-format
+msgid "Eject audio %s from %s"
+msgstr "Éjecter le %s audio de %s"
+
+#. translation note: "Eject <disc type> from <drive name>" (e.g. "Eject dvd from my-dvd-drive")
+#: ../panel-plugin/cddrive.c:302
+#, c-format
+msgid "Eject %s from %s"
+msgstr "Éjecter le %s de %s"
+
+#. translation note: "Blank <disc type> in <drive name>" (e.g. "Blank cd-rw in cdrom1")
+#: ../panel-plugin/cddrive.c:309
+#, c-format
+msgid "Blank %s in %s"
+msgstr "%s vierge dans %s"
+
+#. translation note: "\"<disc title>\" in <drive name>" (e.g. ""Backup #36" in cdrom1")
+#: ../panel-plugin/cddrive.c:313
+#, c-format
+msgid "\"%s\" in %s"
+msgstr "\"%s\" dans %s"
+
+#. translation note: "Audio <disc type> in <drive name>"
+#: ../panel-plugin/cddrive.c:317
+#, c-format
+msgid "Audio %s in %s"
+msgstr "%s audio dans %s"
+
+#. translation note: "<disc type> in <drive name>" (e.g. "dvd in cdrom1")
+#: ../panel-plugin/cddrive.c:320
+#, c-format
+msgid "%s in %s"
+msgstr "%s dans %s"
+
+#: ../panel-plugin/cddrive.c:422
+msgid "Unmount disc"
+msgstr "Démonter le disque"
+
+#: ../panel-plugin/cddrive.c:424
+msgid "Mount disc"
+msgstr "Monter le disque"
+
+#: ../panel-plugin/cddrive.c:429
+#, c-format
+msgid "Unmount \"%s\""
+msgstr "Démonter \"%s\""
+
+#: ../panel-plugin/cddrive.c:431
+#, c-format
+msgid "Mount \"%s\""
+msgstr "Monter \"%s\""
+
+#: ../panel-plugin/cddrive-error.c:41
+msgid "Configuration error"
+msgstr "Erreur de configuration"
+
+#: ../panel-plugin/cddrive-error.c:42
+msgid "System error"
+msgstr "Erreur système"
+
+#: ../panel-plugin/cddrive-error.c:43
+msgid "Eject failed"
+msgstr "L'éjection a échoué"
+
+#: ../panel-plugin/cddrive-error.c:44
+msgid "Close failed"
+msgstr "La fermeture a échoué"
+
+#: ../panel-plugin/cddrive-error.c:45
+msgid "Mount failed"
+msgstr "Le montage a échoué"
+
+#: ../panel-plugin/cddrive-error.c:46
+msgid "Unmount failed"
+msgstr "Le démontage a échoué"
+
+#: ../panel-plugin/cddrive-error.c:47
+msgid "Busy disc"
+msgstr "Disque occupé"
+
+#: ../panel-plugin/cddrive-error.c:57
+msgid "Not enough memory to perform the operation."
+msgstr "Pas assez de mémoire pour réaliser l'opération"
+
+#: ../panel-plugin/cddrive-dialogs.c:31
+#: ../panel-plugin/cddrive.desktop.in.in.h:1
+msgid "CD Drive Monitor"
+msgstr "Contrôle de lecteur CD"
+
+#: ../panel-plugin/cddrive-dialogs.c:325
+msgid "Mounting"
+msgstr "Montage"
+
+#: ../panel-plugin/cddrive-dialogs.c:326
+msgid "Enter a command to use if HAL system fails to mount the disc."
+msgstr ""
+"Entrez une commande à utiliser si le système HAL ne réussit pas à monter le "
+"disque."
+
+#: ../panel-plugin/cddrive-dialogs.c:333
+msgid "Unmounting"
+msgstr "Démontage"
+
+#: ../panel-plugin/cddrive-dialogs.c:334
+msgid "Enter a command to use if the HAL system fails to unmount the disc."
+msgstr ""
+"Entrez une commande à utiliser si le système HAL ne réussit pas à démonter "
+"le disque."
+
+#: ../panel-plugin/cddrive-dialogs.c:352
+#, c-format
+msgid ""
+"You can use \"%d\", \"%m\" and \"%u\" character sequences as arguments for "
+"your command. These will be replaced respectively with the device path, the "
+"disc mount point and the disc UDI."
+msgstr ""
+"Vous pouvez utiliser les séquences de caractères \"%d\", \"%m\" et \"%u\" "
+"comme paramètres dans votre commande. Ceux-ci seront remplacés "
+"respectivement par le chemin du périphérique, le point de montage du disque "
+"et l'UDI du disque."
+
+#: ../panel-plugin/cddrive-dialogs.c:376
+msgid "Mounted disc icon color"
+msgstr "Couleur de l'icône du disque monté"
+
+#: ../panel-plugin/cddrive-dialogs.c:385
+msgid "Unmounted disc icon color"
+msgstr "Couleur de l'icône du disque démonté"
+
+#. --- "Drive" section  ---
+#: ../panel-plugin/cddrive-dialogs.c:447
+msgid "Drive"
+msgstr "Lecteur"
+
+#: ../panel-plugin/cddrive-dialogs.c:453
+msgid "CD-ROM drive detection failed !"
+msgstr "La détection du lecteur CD-ROM a échoué !"
+
+#: ../panel-plugin/cddrive-dialogs.c:458
+msgid "No CD-ROM drive detected"
+msgstr "Aucun lecteur de CD-ROM détecté"
+
+#. if some drives have been detected...
+#. --- "Commands" section ---
+#: ../panel-plugin/cddrive-dialogs.c:507
+msgid "Fallback Commands"
+msgstr "Commandes de rechange"
+
+#. --- "Display" section ---
+#. -- name config --
+#: ../panel-plugin/cddrive-dialogs.c:518
+msgid "Display"
+msgstr "Affichage"
+
+#: ../panel-plugin/cddrive-dialogs.c:523
+msgid "Name to display"
+msgstr "Nom à afficher"
+
+#: ../panel-plugin/cddrive-dialogs.c:547
+msgid "display in panel"
+msgstr "afficher dans le panneau"
+
+#: ../panel-plugin/cddrive-dialogs.c:558
+msgid "use in tooltip"
+msgstr "utiliser dans la bulle d'aide"
+
+#: ../panel-plugin/cddrive-dialogs.c:577
+msgid "Unmounted disc icon opacity"
+msgstr "Opacité de l'icône du disque démonté"
+
+#: ../panel-plugin/cddrive-dialogs.c:619
+#: ../panel-plugin/cddrive.desktop.in.in.h:2
+msgid "CD-ROM drive tray and content control"
+msgstr "Contrôle du plateau et du contenu d'un lecteur CD."
+
+#: ../panel-plugin/cddrive-dialogs.c:642
+msgid "Error"
+msgstr "Erreur"
+
+#: ../panel-plugin/cddrive-dialogs.c:662
+msgid "No error description available."
+msgstr "Pas de description d'erreur disponible."
+
+#: ../panel-plugin/cddrive-monitor.c:71
+msgid "cd-rom"
+msgstr "cd-rom"
+
+#: ../panel-plugin/cddrive-monitor.c:72
+msgid "cd-r"
+msgstr "cd-r"
+
+#: ../panel-plugin/cddrive-monitor.c:73
+msgid "cd-rw"
+msgstr "cd-rw"
+
+#: ../panel-plugin/cddrive-monitor.c:74
+msgid "dvd"
+msgstr "dvd"
+
+#. dvd-rom
+#: ../panel-plugin/cddrive-monitor.c:75
+msgid "dvd-ram"
+msgstr "dvd-ram"
+
+#: ../panel-plugin/cddrive-monitor.c:76
+msgid "dvd-r"
+msgstr "dvd-r"
+
+#: ../panel-plugin/cddrive-monitor.c:77
+msgid "dvd-rw"
+msgstr "dvd-rw"
+
+#: ../panel-plugin/cddrive-monitor.c:78
+msgid "dvd+r"
+msgstr "dvd+r"
+
+#: ../panel-plugin/cddrive-monitor.c:79
+msgid "dvd+rw"
+msgstr "dvd+rw"
+
+#: ../panel-plugin/cddrive-monitor.c:80
+msgid "dvd+r dl"
+msgstr "dvd+r dl"
+
+#: ../panel-plugin/cddrive-monitor.c:81
+msgid "bd-rom"
+msgstr "bd-rom"
+
+#: ../panel-plugin/cddrive-monitor.c:82
+msgid "bd-r"
+msgstr "bd-r"
+
+#: ../panel-plugin/cddrive-monitor.c:83
+msgid "bd-re"
+msgstr "bd-re"
+
+#: ../panel-plugin/cddrive-monitor.c:84
+msgid "hddvd"
+msgstr "hddvd"
+
+#. hddvd-rom
+#: ../panel-plugin/cddrive-monitor.c:85
+msgid "hddvd-r"
+msgstr "hddvd-r"
+
+#: ../panel-plugin/cddrive-monitor.c:86
+msgid "hddvd-rw"
+msgstr "hddvd-rw"
+
+#: ../panel-plugin/cddrive-monitor.c:161
+#, c-format
+msgid "The disc is locked by a process (pid: %llu)."
+msgstr "Le disque est verrouillé par un processus (pid: %llu)."
+
+#: ../panel-plugin/cddrive-monitor.c:167
+#, c-format
+msgid "The disc is locked by the program '%s' (pid: %llu)."
+msgstr "Le disque est verrouillé par le programme '%s' (pid: %llu)."
+
+#: ../panel-plugin/cddrive-monitor.c:211
+msgid "Failed to set the D-BUS connection of HAL context."
+msgstr "L'affectation de la connection D-BUS du contexte HAL a échoué."
+
+#: ../panel-plugin/cddrive-monitor.c:317
+#, c-format
+msgid "Failed to retrieve drive from device path '%s'."
+msgstr "Échec de la récupération du lecteur pour le périphérique '%s'."
+
+#: ../panel-plugin/cddrive-monitor.c:343
+#, c-format
+msgid "Failed to retrieve disc from UDI '%s'."
+msgstr "Échec de la récupération du disque d'UDI '%s'."
+
+#: ../panel-plugin/cddrive-monitor.c:400
+msgid "Failed to set drive's status change callback."
+msgstr "Échec de l'affectation du callback de changement d'état du lecteur."
+
+#: ../panel-plugin/cddrive-monitor.c:518
+msgid "Failed to register drive addition callback."
+msgstr "Échec de l'enregistrement du callback d'ajout du lecteur."
+
+#: ../panel-plugin/cddrive-monitor.c:527
+msgid "Failed to register drive removal callback."
+msgstr "Échec de l'enregistrement du callback d'enlèvement du lecteur."
+
+#: ../panel-plugin/cddrive-monitor.c:550
+msgid "Failed to unregister drive addition callback."
+msgstr "Échec du désenregistrement du callback d'ajout du lecteur."
+
+#: ../panel-plugin/cddrive-monitor.c:558
+msgid "Failed to unregister drive removal callback."
+msgstr "Échec du désenregistrement du callback d'enlèvement du lecteur."
+
+#: ../panel-plugin/cddrive-monitor.c:690
+msgid "Failed to store monitor in HAL context."
+msgstr "Le stockage du moniteur dans le contexte HAL a échoué."

Added: xfce4-cddrive-plugin/trunk/po/xfce4-cddrive-plugin.pot
===================================================================
--- xfce4-cddrive-plugin/trunk/po/xfce4-cddrive-plugin.pot	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/po/xfce4-cddrive-plugin.pot	2007-06-13 21:14:28 UTC (rev 2824)
@@ -0,0 +1,404 @@
+# 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.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-05-22 14:49+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../panel-plugin/cddrive.c:183
+msgid "Drive status is unavailable... is HAL installed and hald running ?"
+msgstr ""
+
+#: ../panel-plugin/cddrive.c:192
+msgid "Close tray"
+msgstr ""
+
+#: ../panel-plugin/cddrive.c:194
+msgid "Open tray"
+msgstr ""
+
+#. drive is not ejectable
+#: ../panel-plugin/cddrive.c:198
+msgid "No disc in the drive"
+msgstr ""
+
+#. translation note: "Eject blank <disc type>" (e.g. "Eject blank cd-rw")
+#: ../panel-plugin/cddrive.c:211
+#, c-format
+msgid "Eject blank %s"
+msgstr ""
+
+#. translation note: "Eject \"<disc title>\""
+#: ../panel-plugin/cddrive.c:215
+#, c-format
+msgid "Eject \"%s\""
+msgstr ""
+
+#. translation note: "Eject audio <disc type>"
+#: ../panel-plugin/cddrive.c:219
+#, c-format
+msgid "Eject audio %s"
+msgstr ""
+
+#. translation note: "Eject <disc type>" (e.g. "Eject dvd")
+#: ../panel-plugin/cddrive.c:222
+#, c-format
+msgid "Eject %s"
+msgstr ""
+
+#. translation note: "Blank <disc type>" (e.g. "Blank cd-rw")
+#: ../panel-plugin/cddrive.c:229
+#, c-format
+msgid "Blank %s"
+msgstr ""
+
+#. translation note: "\"<disc title>\" (made translatable in case translation
+#. do not use the '"' character to enclose the title)
+#: ../panel-plugin/cddrive.c:234
+#, c-format
+msgid "\"%s\""
+msgstr ""
+
+#. translation note: "Audio <disc type>"
+#: ../panel-plugin/cddrive.c:238
+#, c-format
+msgid "Audio %s"
+msgstr ""
+
+#: ../panel-plugin/cddrive.c:258
+#, c-format
+msgid "%s status is unavailable... is HAL installed and hald running ?"
+msgstr ""
+
+#. translation note: "Close <drive name>"
+#: ../panel-plugin/cddrive.c:269
+#, c-format
+msgid "Close %s"
+msgstr ""
+
+#. translation note: "Open <drive name>"
+#: ../panel-plugin/cddrive.c:272
+#, c-format
+msgid "Open %s"
+msgstr ""
+
+#. drive is not ejectable
+#. translation note: "No disc in <drive name>"
+#: ../panel-plugin/cddrive.c:278
+#, c-format
+msgid "No disc in %s"
+msgstr ""
+
+#. translation note: "Eject blank <disc type> from <drive name>" (e.g. "Eject blank cd-rw from cdrom1")
+#: ../panel-plugin/cddrive.c:291
+#, c-format
+msgid "Eject blank %s from %s"
+msgstr ""
+
+#. translation note: "Eject \"<disc title>\" from <drive name>"
+#: ../panel-plugin/cddrive.c:295
+#, c-format
+msgid "Eject \"%s\" from %s"
+msgstr ""
+
+#. translation note: "Eject audio <disc type> from <drive name>"
+#: ../panel-plugin/cddrive.c:299
+#, c-format
+msgid "Eject audio %s from %s"
+msgstr ""
+
+#. translation note: "Eject <disc type> from <drive name>" (e.g. "Eject dvd from my-dvd-drive")
+#: ../panel-plugin/cddrive.c:302
+#, c-format
+msgid "Eject %s from %s"
+msgstr ""
+
+#. translation note: "Blank <disc type> in <drive name>" (e.g. "Blank cd-rw in cdrom1")
+#: ../panel-plugin/cddrive.c:309
+#, c-format
+msgid "Blank %s in %s"
+msgstr ""
+
+#. translation note: "\"<disc title>\" in <drive name>" (e.g. ""Backup #36" in cdrom1")
+#: ../panel-plugin/cddrive.c:313
+#, c-format
+msgid "\"%s\" in %s"
+msgstr ""
+
+#. translation note: "Audio <disc type> in <drive name>"
+#: ../panel-plugin/cddrive.c:317
+#, c-format
+msgid "Audio %s in %s"
+msgstr ""
+
+#. translation note: "<disc type> in <drive name>" (e.g. "dvd in cdrom1")
+#: ../panel-plugin/cddrive.c:320
+#, c-format
+msgid "%s in %s"
+msgstr ""
+
+#: ../panel-plugin/cddrive.c:422
+msgid "Unmount disc"
+msgstr ""
+
+#: ../panel-plugin/cddrive.c:424
+msgid "Mount disc"
+msgstr ""
+
+#: ../panel-plugin/cddrive.c:429
+#, c-format
+msgid "Unmount \"%s\""
+msgstr ""
+
+#: ../panel-plugin/cddrive.c:431
+#, c-format
+msgid "Mount \"%s\""
+msgstr ""
+
+#: ../panel-plugin/cddrive-error.c:41
+msgid "Configuration error"
+msgstr ""
+
+#: ../panel-plugin/cddrive-error.c:42
+msgid "System error"
+msgstr ""
+
+#: ../panel-plugin/cddrive-error.c:43
+msgid "Eject failed"
+msgstr ""
+
+#: ../panel-plugin/cddrive-error.c:44
+msgid "Close failed"
+msgstr ""
+
+#: ../panel-plugin/cddrive-error.c:45
+msgid "Mount failed"
+msgstr ""
+
+#: ../panel-plugin/cddrive-error.c:46
+msgid "Unmount failed"
+msgstr ""
+
+#: ../panel-plugin/cddrive-error.c:47
+msgid "Busy disc"
+msgstr ""
+
+#: ../panel-plugin/cddrive-error.c:57
+msgid "Not enough memory to perform the operation."
+msgstr ""
+
+#: ../panel-plugin/cddrive-dialogs.c:31
+#: ../panel-plugin/cddrive.desktop.in.in.h:1
+msgid "CD Drive Monitor"
+msgstr ""
+
+#: ../panel-plugin/cddrive-dialogs.c:325
+msgid "Mounting"
+msgstr ""
+
+#: ../panel-plugin/cddrive-dialogs.c:326
+msgid "Enter a command to use if HAL system fails to mount the disc."
+msgstr ""
+
+#: ../panel-plugin/cddrive-dialogs.c:333
+msgid "Unmounting"
+msgstr ""
+
+#: ../panel-plugin/cddrive-dialogs.c:334
+msgid "Enter a command to use if the HAL system fails to unmount the disc."
+msgstr ""
+
+#: ../panel-plugin/cddrive-dialogs.c:352
+#, c-format
+msgid ""
+"You can use \"%d\", \"%m\" and \"%u\" character sequences as arguments for "
+"your command. These will be replaced respectively with the device path, the "
+"disc mount point and the disc UDI."
+msgstr ""
+
+#: ../panel-plugin/cddrive-dialogs.c:376
+msgid "Mounted disc icon color"
+msgstr ""
+
+#: ../panel-plugin/cddrive-dialogs.c:385
+msgid "Unmounted disc icon color"
+msgstr ""
+
+#. --- "Drive" section  ---
+#: ../panel-plugin/cddrive-dialogs.c:447
+msgid "Drive"
+msgstr ""
+
+#: ../panel-plugin/cddrive-dialogs.c:453
+msgid "CD-ROM drive detection failed !"
+msgstr ""
+
+#: ../panel-plugin/cddrive-dialogs.c:458
+msgid "No CD-ROM drive detected"
+msgstr ""
+
+#. if some drives have been detected...
+#. --- "Commands" section ---
+#: ../panel-plugin/cddrive-dialogs.c:507
+msgid "Fallback Commands"
+msgstr ""
+
+#. --- "Display" section ---
+#. -- name config --
+#: ../panel-plugin/cddrive-dialogs.c:518
+msgid "Display"
+msgstr ""
+
+#: ../panel-plugin/cddrive-dialogs.c:523
+msgid "Name to display"
+msgstr ""
+
+#: ../panel-plugin/cddrive-dialogs.c:547
+msgid "display in panel"
+msgstr ""
+
+#: ../panel-plugin/cddrive-dialogs.c:558
+msgid "use in tooltip"
+msgstr ""
+
+#: ../panel-plugin/cddrive-dialogs.c:577
+msgid "Unmounted disc icon opacity"
+msgstr ""
+
+#: ../panel-plugin/cddrive-dialogs.c:619
+#: ../panel-plugin/cddrive.desktop.in.in.h:2
+msgid "CD-ROM drive tray and content control"
+msgstr ""
+
+#: ../panel-plugin/cddrive-dialogs.c:642
+msgid "Error"
+msgstr ""
+
+#: ../panel-plugin/cddrive-dialogs.c:662
+msgid "No error description available."
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:71
+msgid "cd-rom"
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:72
+msgid "cd-r"
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:73
+msgid "cd-rw"
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:74
+msgid "dvd"
+msgstr ""
+
+#. dvd-rom
+#: ../panel-plugin/cddrive-monitor.c:75
+msgid "dvd-ram"
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:76
+msgid "dvd-r"
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:77
+msgid "dvd-rw"
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:78
+msgid "dvd+r"
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:79
+msgid "dvd+rw"
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:80
+msgid "dvd+r dl"
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:81
+msgid "bd-rom"
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:82
+msgid "bd-r"
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:83
+msgid "bd-re"
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:84
+msgid "hddvd"
+msgstr ""
+
+#. hddvd-rom
+#: ../panel-plugin/cddrive-monitor.c:85
+msgid "hddvd-r"
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:86
+msgid "hddvd-rw"
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:161
+#, c-format
+msgid "The disc is locked by a process (pid: %llu)."
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:167
+#, c-format
+msgid "The disc is locked by the program '%s' (pid: %llu)."
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:211
+msgid "Failed to set the D-BUS connection of HAL context."
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:317
+#, c-format
+msgid "Failed to retrieve drive from device path '%s'."
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:343
+#, c-format
+msgid "Failed to retrieve disc from UDI '%s'."
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:400
+msgid "Failed to set drive's status change callback."
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:518
+msgid "Failed to register drive addition callback."
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:527
+msgid "Failed to register drive removal callback."
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:550
+msgid "Failed to unregister drive addition callback."
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:558
+msgid "Failed to unregister drive removal callback."
+msgstr ""
+
+#: ../panel-plugin/cddrive-monitor.c:690
+msgid "Failed to store monitor in HAL context."
+msgstr ""




More information about the Goodies-commits mailing list