[Xfce4-commits] [panel-plugins/xfce4-pulseaudio-plugin] 01/12: Initial version
noreply at xfce.org
noreply at xfce.org
Tue Feb 17 00:12:40 CET 2015
This is an automated email from the git hooks/post-receive script.
andrzejr pushed a commit to branch master
in repository panel-plugins/xfce4-pulseaudio-plugin.
commit 6d5680f733ce6bc1ee6bf60dd6d2e4b427ada70c
Author: Andrzej <ndrwrdck at gmail.com>
Date: Thu Apr 24 23:32:18 2014 +0100
Initial version
Button with an icon reacting to volume changes and to mouse wheel events.
---
COPYING | 340 +++++++++++++++++++++++
INSTALL | 370 +++++++++++++++++++++++++
Makefile.am | 26 ++
autogen.sh | 19 ++
configure.ac.in | 134 +++++++++
icons/48x48/Makefile.am | 10 +
icons/48x48/xfce4-pulseaudio-plugin.png | Bin 0 -> 3537 bytes
icons/Makefile.am | 20 ++
icons/scalable/Makefile.am | 10 +
icons/scalable/xfce4-pulseaudio-plugin.svg | 203 ++++++++++++++
panel-plugin/Makefile.am | 88 ++++++
panel-plugin/pulseaudio-button.c | 357 ++++++++++++++++++++++++
panel-plugin/pulseaudio-button.h | 48 ++++
panel-plugin/pulseaudio-dialog.glade | 413 ++++++++++++++++++++++++++++
panel-plugin/pulseaudio-plugin.c | 247 +++++++++++++++++
panel-plugin/pulseaudio-plugin.h | 42 +++
panel-plugin/pulseaudio-volume.c | 394 ++++++++++++++++++++++++++
panel-plugin/pulseaudio-volume.h | 46 ++++
panel-plugin/pulseaudio.desktop.in.in | 9 +
po/Makefile.in.in | 223 +++++++++++++++
po/POTFILES.in | 3 +
po/POTFILES.skip | 1 +
22 files changed, 3003 insertions(+)
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..e69de29
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..4bf08ae
--- /dev/null
+++ b/COPYING
@@ -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.
+
+ Xfce panel plugin for indicator-applet
+ Copyright (C) 2009 Mark Trompell
+
+ 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.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..e69de29
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..2099840
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,370 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
+Inc.
+
+ Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without warranty of any kind.
+
+Basic Installation
+==================
+
+ Briefly, the shell command `./configure && make && make install'
+should configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package. Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below. The lack of an optional feature in a given package is not
+necessarily a bug. More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+ The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system.
+
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package, generally using the just-built uninstalled binaries.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation. When installing into a prefix owned by root, it is
+ recommended that the package be configured and built as a regular
+ user, and only the `make install' phase executed with root
+ privileges.
+
+ 5. Optionally, type `make installcheck' to repeat any self-tests, but
+ this time using the binaries in their final installed location.
+ This target does not install anything. Running this target as a
+ regular user, particularly if the prior `make install' required
+ root privileges, verifies that the installation completed
+ correctly.
+
+ 6. 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.
+
+ 7. Often, you can also type `make uninstall' to remove the installed
+ files again. In practice, not all packages have tested that
+ uninstallation works correctly, even though it is required by the
+ GNU Coding Standards.
+
+ 8. Some packages, particularly those that use Automake, provide `make
+ distcheck', which can by used by developers to test that all other
+ targets like `make install' and `make uninstall' work correctly.
+ This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you can use GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'. This
+is known as a "VPATH" build.
+
+ With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+ On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor. Like
+this:
+
+ ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CPP="gcc -E" CXXCPP="g++ -E"
+
+ This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+ By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them. In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+ The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+ The first method involves providing an override variable for each
+affected directory. For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'. Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated. The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+ The second method involves providing the `DESTDIR' variable. For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names. The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters. On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
+
+ 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'.
+
+ 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.
+
+ Some packages offer the ability to configure how verbose the
+execution of `make' will be. For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+ ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+ HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved. Use GNU `make'
+instead.
+
+ On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file. The option `-nodtk' can be used as
+a workaround. If GNU CC is not installed, it is therefore recommended
+to try
+
+ ./configure CC="cc"
+
+and if that doesn't work, try
+
+ ./configure CC="cc -nodtk"
+
+ On Solaris, don't put `/usr/ucb' early in your `PATH'. This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+ On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'. It is recommended to use the following options:
+
+ ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS
+ KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf limitation. Until the limitation is lifted, you can use
+this workaround:
+
+ CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+ Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+ Print a summary of the options unique to this package's
+ `configure', and exit. The `short' variant lists options used
+ only in the top level, while the `recursive' variant lists options
+ also present in any nested packages.
+
+`--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.
+
+`--prefix=DIR'
+ Use DIR as the installation prefix. *note Installation Names::
+ for more details, including other options available for fine-tuning
+ the installation locations.
+
+`--no-create'
+`-n'
+ Run the configure checks, but stop before creating any output
+ files.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..a3fd5a0
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,26 @@
+SUBDIRS = \
+ icons \
+ panel-plugin \
+ po
+
+distclean-local:
+ rm -rf *.cache *~
+
+distuninstallcheck_listfiles = \
+ find . -type f -print | grep -v ./share/icons/hicolor/icon-theme.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:
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..e69de29
diff --git a/README b/README
new file mode 100644
index 0000000..e69de29
diff --git a/THANKS b/THANKS
new file mode 100644
index 0000000..e69de29
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..04afe68
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# $Id: autogen.sh 2398 2007-01-17 17:47:38Z nick $
+#
+# 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
+}
+
+XDT_AUTOGEN_REQUIRED_VERSION="4.7.3" exec xdt-autogen $@
diff --git a/configure.ac.in b/configure.ac.in
new file mode 100644
index 0000000..8029211
--- /dev/null
+++ b/configure.ac.in
@@ -0,0 +1,134 @@
+dnl xfce4-pulseaudio-plugin - A pulseaudio plugin for the Xfce panel
+dnl
+dnl 2009 Mark Trompell <mark at foresightlinux.org>
+dnl
+
+dnl ***************************
+dnl *** Version information ***
+dnl ***************************
+m4_define([pulseaudio_version_major], [0])
+m4_define([pulseaudio_version_minor], [1])
+m4_define([pulseaudio_version_micro], [0])
+m4_define([pulseaudio_version_nano], []) dnl leave this empty to have no nano version
+m4_define([pulseaudio_version_build], [@REVISION@])
+m4_define([pulseaudio_version_tag], [git])
+m4_define([pulseaudio_version], [pulseaudio_version_major().pulseaudio_version_minor().pulseaudio_version_micro()ifelse(pulseaudio_version_nano(), [], [], [.pulseaudio_version_nano()])ifelse(pulseaudio_version_tag(), [git], [pulseaudio_version_tag()-pulseaudio_version_build()], [pulseaudio_version_tag()])])
+
+dnl ***************************
+dnl *** Initialize autoconf ***
+dnl ***************************
+AC_COPYRIGHT([Copyright (c) 2014
+ The Xfce development team. All rights reserved.])
+AC_INIT([xfce4-pulseaudio-plugin], [pulseaudio_version], [http://bugzilla.xfce.org/], [xfce4-pulseaudio-plugin])
+AC_PREREQ([2.50])
+AC_CONFIG_HEADERS([config.h])
+AC_CANONICAL_TARGET()
+AC_REVISION([@REVISION@])
+
+dnl ***************************
+dnl *** Initialize automake ***
+dnl ***************************
+AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar])
+AM_MAINTAINER_MODE()
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+dnl ********************************
+dnl *** Check for basic programs ***
+dnl ********************************
+AC_PROG_CC()
+AC_PROG_LD()
+AC_PROG_INSTALL()
+AC_PROG_INTLTOOL()
+LT_PREREQ([2.2.6])
+LT_INIT([disable-static])
+
+dnl **************************
+dnl *** Initialize libtool ***
+dnl **************************
+LT_PREREQ([2.2.6])
+LT_INIT([disable-static])
+
+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 ***********************************
+m4_define([libxfce4panel_version_api], [2.0])
+LIBXFCE4PANEL_VERSION_API=libxfce4panel_version_api()
+AC_DEFINE([LIBXFCE4PANEL_VERSION_API], "libxfce4panel_version_api()", [libxfce4panel api version])
+AC_SUBST([LIBXFCE4PANEL_VERSION_API])
+
+XDT_CHECK_PACKAGE([PULSEAUDIO], [libpulse-mainloop-glib], [0.9.19])
+XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.24.0])
+XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.6.0])
+dnl XDT_CHECK_PACKAGE([EXO], [exo-1], [0.6.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.9.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.11.0])
+XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-${LIBXFCE4PANEL_VERSION_API}], [4.11.0])
+XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.6.0])
+
+dnl ****************************
+dnl *** Optional IDO library ***
+dnl ****************************
+XDT_CHECK_OPTIONAL_PACKAGE([IDO], [libido3-0.1], [13.10.0], [ido], [IDO library])
+
+dnl ***********************************
+dnl *** Check for debugging support ***
+dnl ***********************************
+XDT_FEATURE_DEBUG()
+
+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
+icons/Makefile
+icons/48x48/Makefile
+icons/scalable/Makefile
+panel-plugin/Makefile
+panel-plugin/pulseaudio.desktop.in
+po/Makefile.in
+])
+
+dnl ***************************
+dnl *** Print configuration ***
+dnl ***************************
+echo
+echo "Build Configuration:"
+echo
+echo "* Debug Support: $enable_debug"
+if test x"$IDO_FOUND" = x"yes"; then
+echo "* Use IDO library: yes"
+else
+echo "* Use IDO library: no"
+fi
+echo
diff --git a/icons/48x48/Makefile.am b/icons/48x48/Makefile.am
new file mode 100644
index 0000000..17527be
--- /dev/null
+++ b/icons/48x48/Makefile.am
@@ -0,0 +1,10 @@
+# $Id: Makefile.am 2257 2006-12-19 19:49:00Z nick $
+
+iconsdir = $(datadir)/icons/hicolor/48x48/apps
+icons_DATA = \
+ xfce4-pulseaudio-plugin.png
+
+EXTRA_DIST = \
+ $(icons_DATA)
+
+# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff --git a/icons/48x48/xfce4-pulseaudio-plugin.png b/icons/48x48/xfce4-pulseaudio-plugin.png
new file mode 100644
index 0000000..2e6dec7
Binary files /dev/null and b/icons/48x48/xfce4-pulseaudio-plugin.png differ
diff --git a/icons/Makefile.am b/icons/Makefile.am
new file mode 100644
index 0000000..1c486e5
--- /dev/null
+++ b/icons/Makefile.am
@@ -0,0 +1,20 @@
+# $Id: Makefile.am 2257 2006-12-19 19:49:00Z nick $
+
+SUBDIRS = \
+ 48x48 \
+ scalable
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
+
+install-data-hook:
+ @-if test -z "$(DESTDIR)"; then \
+ echo "Updating Gtk icon cache."; \
+ $(gtk_update_icon_cache); \
+ else \
+ echo "*** Icon cache not updated. Remember to run:"; \
+ echo "***"; \
+ echo "*** $(gtk_update_icon_cache)"; \
+ echo "***"; \
+ fi
+
+# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff --git a/icons/scalable/Makefile.am b/icons/scalable/Makefile.am
new file mode 100644
index 0000000..27ad19a
--- /dev/null
+++ b/icons/scalable/Makefile.am
@@ -0,0 +1,10 @@
+# $Id: Makefile.am 2257 2006-12-19 19:49:00Z nick $
+
+iconsdir = $(datadir)/icons/hicolor/scalable/apps
+icons_DATA = \
+ xfce4-pulseaudio-plugin.svg
+
+EXTRA_DIST = \
+ $(icons_DATA)
+
+# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff --git a/icons/scalable/xfce4-pulseaudio-plugin.svg b/icons/scalable/xfce4-pulseaudio-plugin.svg
new file mode 100644
index 0000000..5e9beed
--- /dev/null
+++ b/icons/scalable/xfce4-pulseaudio-plugin.svg
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="32px"
+ height="32px"
+ id="svg3499"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="add-notification-applet.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs3501">
+ <linearGradient
+ id="linearGradient3547">
+ <stop
+ style="stop-color:#cfcfcf;stop-opacity:1;"
+ offset="0"
+ id="stop3549" />
+ <stop
+ id="stop3553"
+ offset="0.46295282"
+ style="stop-color:#8e8e92;stop-opacity:1;" />
+ <stop
+ style="stop-color:#f5f5f5;stop-opacity:1;"
+ offset="1"
+ id="stop3557" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3245">
+ <stop
+ style="stop-color:#414141;stop-opacity:1;"
+ offset="0"
+ id="stop3247" />
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="1"
+ id="stop3249" />
+ </linearGradient>
+ <filter
+ inkscape:collect="always"
+ id="filter3374"
+ x="-0.21687568"
+ width="1.4337514"
+ y="-0.10843168"
+ height="1.2168634">
+ <feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="0.99401352"
+ id="feGaussianBlur3376" />
+ </filter>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3547"
+ id="linearGradient3565"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(0,39)"
+ x1="-230.10732"
+ y1="54"
+ x2="-229.75377"
+ y2="-2" />
+ <filter
+ inkscape:collect="always"
+ id="filter4144">
+ <feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="0.7"
+ id="feGaussianBlur4146" />
+ </filter>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3245"
+ id="linearGradient4153"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.7000187,0,0,0.7000187,-65.177182,5.3745318)"
+ x1="119.7433"
+ y1="17.315649"
+ x2="111.59486"
+ y2="12.926581" />
+ <filter
+ inkscape:collect="always"
+ id="filter4158"
+ x="-0.24"
+ width="1.48"
+ y="-0.24"
+ height="1.48">
+ <feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="0.66262488"
+ id="feGaussianBlur4160" />
+ </filter>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1"
+ inkscape:cx="15.532905"
+ inkscape:cy="14.679277"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:grid-bbox="true"
+ inkscape:document-units="px"
+ showborder="false">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3605"
+ visible="true"
+ enabled="true" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata3504">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <path
+ style="opacity:0.4;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;filter:url(#filter4144);enable-background:accumulate"
+ d="M 16.000005,2 C 8.2720052,2 2.0000052,8.271999 2.0000052,16 C 2.0000052,23.728 8.2720062,30 16.000005,30 C 23.728005,30 30.000006,23.727999 30.000005,16 C 30.000005,8.272 23.728006,2.000001 16.000005,2 z M 16.000005,3 C 23.176003,3.000002 29.000005,8.824 29.000005,16 C 29.000005,23.175999 23.176003,29 16.000005,29 C 8.8240062,29 3.0000052,23.176 3.0000052,16 C 3.0000052,8.824 8.8240072,3 16.000005,3 z"
+ id="path4138" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;fill:url(#linearGradient3565);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path3539"
+ sodipodi:cx="-227"
+ sodipodi:cy="65"
+ sodipodi:rx="28"
+ sodipodi:ry="28"
+ d="M -199,65 A 28,28 0 1 1 -255,65 A 28,28 0 1 1 -199,65 z"
+ transform="matrix(0.5,0,0,0.5,129.5,-16.499999)" />
+ <path
+ style="opacity:0.22999998;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="M 16.000005,2 C 8.2720052,2 2.0000052,8.271999 2.0000052,16 C 2.0000052,23.728 8.2720062,30 16.000005,30 C 23.728005,30 30.000006,23.727999 30.000005,16 C 30.000005,8.272 23.728006,2.000001 16.000005,2 z M 16.000005,3 C 23.176003,3.000002 29.000005,8.824 29.000005,16 C 29.000005,23.175999 23.176003,29 16.000005,29 C 8.8240062,29 3.0000052,23.176 3.0000052,16 C 3.0000052,8.824 8.8240072,3 16.000005,3 z"
+ id="path3541" />
+ <path
+ style="opacity:1;fill:#ffffff;fill-opacity:0.53731346;fill-rule:evenodd;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="M 16.000005,3 C 8.8240072,3 3.0000052,8.824 3.0000052,16 C 3.0000052,16.167008 3.0250052,16.334513 3.0312552,16.5 C 3.2936652,9.554839 8.9910152,4 16.000005,4 C 23.008995,4.000002 28.706345,9.554839 28.968755,16.5 C 28.975008,16.334513 29.000005,16.167008 29.000005,16 C 29.000005,8.824 23.176003,3.000002 16.000005,3 z"
+ id="path3543" />
+ <path
+ style="opacity:1;fill:#ffffff;fill-opacity:0.34199135;fill-rule:evenodd;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="M 16.000005,29 C 8.8240072,29 3.0000052,23.176 3.0000052,16 C 3.0000052,15.832992 3.0250052,15.665487 3.0312552,15.5 C 3.2936652,22.445161 8.9910152,28 16.000005,28 C 23.008995,27.999998 28.706345,22.445161 28.968755,15.5 C 28.975008,15.665487 29.000005,15.832992 29.000005,16 C 29.000005,23.176 23.176003,28.999998 16.000005,29 z"
+ id="path3545" />
+ <path
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;filter:url(#filter4158);enable-background:accumulate"
+ d="M -109,4 C -110.656,4 -112,5.344 -112,7 C -112,7.0538767 -112.00281,7.1030693 -112,7.15625 C -112.00255,7.2095519 -112,7.2585695 -112,7.3125 C -112,9.1410001 -110.516,10.625 -108.6875,10.625 C -106.859,10.625 -105.375,9.1410003 -105.375,7.3125 C -105.375,5.4839999 -106.859,4.0000001 -108.6875,4 C -108.74143,4 -108.79045,3.9974473 -108.84375,4 C -108.89693,3.9971904 -108.94612,4 -109,4 z"
+ id="path3549"
+ transform="matrix(0.7000187,0,0,0.7000187,92.327025,5.3745318)" />
+ <path
+ style="opacity:0.67346939;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;filter:url(#filter3374);enable-background:accumulate"
+ d="M -114,12 L -114,14 L -114,14.5 C -113.99997,14.776131 -113.77613,14.999972 -113.5,15 L -112,15 L -112,23 L -114,23 L -114,25 L -114,25.5 C -113.99997,25.776131 -113.77613,25.999972 -113.5,26 L -103.5,26 C -103.22387,25.999972 -103.00003,25.776131 -103,25.5 L -103,23.5 C -103.00003,23.223869 -103.22387,23.000028 -103.5,23 L -104,23 L -105,23 L -105,14.5 L -105,12.5 C -105.00003,12.223869 -105.22387,12.000028 -105.5,12 L -106,12 L -114,12 z"
+ id="path3551"
+ transform="matrix(0.7000187,0,0,0.7000187,92.327025,5.3745318)" />
+ <path
+ style="opacity:0.15;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="M 12.809276,13.774756 C 12.641943,13.806685 12.52189,13.95444 12.524893,14.124766 L 12.524893,15.524803 C 12.524914,15.7181 12.681606,15.874793 12.874903,15.874812 L 13.924931,15.874812 L 13.924931,21.474962 L 12.874903,21.474962 C 12.681606,21.474982 12.524914,21.631674 12.524893,21.824971 L 12.524893,23.225009 C 12.524914,23.418306 12.681606,23.574998 12.874903,23.575018 L 19.87509,23.575018 C 20.068386,23.574998 20.225078,23.418306 20.225099,23.225009 L 20.225099,21.824971 C [...]
+ id="path3553" />
+ <path
+ style="fill:url(#linearGradient4153);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.33333337;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="M 12.524893,13.774756 L 12.524893,15.174794 L 13.924931,15.174794 L 13.924931,21.474962 L 12.524893,21.474962 L 12.524893,22.874999 L 19.52508,22.874999 L 19.52508,21.474962 L 18.125043,21.474962 L 18.125043,15.174794 L 18.125043,13.774756 L 12.524893,13.774756 z"
+ id="path3555" />
+ <path
+ style="opacity:0.56734691;fill:#606060;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="M 13.224912,14.49665 L 18.125043,14.49665 L 18.125043,15.546679 L 18.125043,21.846847 C 18.125064,22.040144 18.281756,22.196837 18.475052,22.196856 L 19.52508,22.196856 L 19.52508,22.896875 L 13.224912,22.896875 L 13.224912,22.196856 L 14.27494,22.196856 C 14.468236,22.196837 14.624928,22.040144 14.624949,21.846847 L 14.624949,15.546679 C 14.624928,15.353382 14.468236,15.196689 14.27494,15.196669 L 13.224912,15.196669 L 13.224912,14.49665 z"
+ id="path3557" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:0.43000004;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path3559"
+ sodipodi:cx="116.5"
+ sodipodi:cy="7.5"
+ sodipodi:rx="3.5"
+ sodipodi:ry="3.5"
+ d="M 120,7.5 A 3.5,3.5 0 1 1 113,7.5 A 3.5,3.5 0 1 1 120,7.5 z"
+ transform="matrix(0.6625177,0,0,0.6625177,-60.93957,5.5245358)" />
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.33333337;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="M 16.024987,8.1746066 C 14.865756,8.1746066 13.924931,9.1154317 13.924931,10.274663 C 13.924931,11.433894 14.865756,12.374719 16.024987,12.374719 C 17.184218,12.374719 18.125043,11.433894 18.125043,10.274663 C 18.125043,9.1154317 17.184218,8.1746066 16.024987,8.1746066 z"
+ id="path3561" />
+ <path
+ style="opacity:0.56734691;fill:#606060;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="M 16.19353,8.6818428 C 15.19564,8.6818428 14.38576,9.4917224 14.38576,10.48961 C 14.38576,11.487497 15.19564,12.297377 16.19353,12.297377 C 17.191414,12.297377 18.001293,11.487497 18.001293,10.48961 C 18.001293,9.4917224 17.191414,8.6818428 16.19353,8.6818428 z"
+ id="path3563" />
+ </g>
+</svg>
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
new file mode 100644
index 0000000..5c7b203
--- /dev/null
+++ b/panel-plugin/Makefile.am
@@ -0,0 +1,88 @@
+
+INCLUDES = \
+ -I$(top_srcdir) \
+ -DG_LOG_DOMAIN=\"libpulseaudio-plugin\" \
+ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
+ $(PLATFORM_CPPFLAGS)
+
+#
+# PulseAudio plugin
+#
+plugindir = \
+ $(libdir)/xfce4/panel/plugins
+
+plugin_LTLIBRARIES = \
+ libpulseaudio-plugin.la
+
+libpulseaudio_built_sources = \
+ pulseaudio-dialog_ui.h
+
+libpulseaudio_plugin_la_SOURCES = \
+ $(libpulseaudio_built_sources) \
+ pulseaudio-volume.c \
+ pulseaudio-volume.h \
+ pulseaudio-button.c \
+ pulseaudio-button.h \
+ pulseaudio-plugin.c \
+ pulseaudio-plugin.h
+
+libpulseaudio_plugin_la_CFLAGS = \
+ $(PULSEAUDIO_CFLAGS) \
+ $(GLIB_CFLAGS) \
+ $(GTK_CFLAGS) \
+ $(LIBXFCE4UTIL_CFLAGS) \
+ $(LIBXFCE4UI_CFLAGS) \
+ $(LIBXFCE4PANEL_CFLAGS) \
+ $(XFCONF_CFLAGS) \
+ $(IDO_CFLAGS) \
+ $(PLATFORM_CFLAGS) \
+ -DDATADIR=\""$(datadir)"\"
+
+libpulseaudio_plugin_la_LDFLAGS = \
+ -avoid-version \
+ -module \
+ -no-undefined \
+ -export-symbols-regex '^xfce_panel_module_(preinit|init|construct)' \
+ $(PLATFORM_LDFLAGS)
+
+libpulseaudio_plugin_la_LIBADD = \
+ $(PULSEAUDIO_LIBS) \
+ $(GLIB_LIBS) \
+ $(GTK_LIBS) \
+ $(LIBXFCE4UTIL_LIBS) \
+ $(LIBXFCE4UI_LIBS) \
+ $(LIBXFCE4PANEL_LIBS) \
+ $(XFCONF_LIBS) \
+ $(IDO_LIBS)
+
+#
+# Desktop file
+#
+desktopdir = \
+ $(datadir)/xfce4/panel/plugins
+
+desktop_in_files = \
+ pulseaudio.desktop.in.in
+
+desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
+
+ at INTLTOOL_DESKTOP_RULE@
+
+EXTRA_DIST = \
+ $(desktop_in_files)
+
+DISTCLEANFILES = \
+ $(desktop_DATA)
+
+if MAINTAINER_MODE
+BUILT_SOURCES = \
+ $(libpulseaudio_built_sources)
+
+DISTCLEANFILES += \
+ $(libpulseaudio_built_sources)
+
+pulseaudio-dialog_ui.h: pulseaudio-dialog.glade
+ $(AM_V_GEN) xdt-csource --static --strip-comments --strip-content --name=pulseaudio-dialog_ui $< >$@
+endif
+
+# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff --git a/panel-plugin/pulseaudio-button.c b/panel-plugin/pulseaudio-button.c
new file mode 100644
index 0000000..eed39b2
--- /dev/null
+++ b/panel-plugin/pulseaudio-button.c
@@ -0,0 +1,357 @@
+/* Copyright (c) 2014 Andrzej <ndrwrdck at gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU 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.
+ */
+
+
+
+/*
+ * This file implements a pulseaudio button class controlling
+ * and displaying pulseaudio volume.
+ *
+ */
+
+
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <libxfce4panel/libxfce4panel.h>
+
+#include "pulseaudio-button.h"
+
+#define V_MUTED 0
+#define V_ZERO 1
+#define V_LOW 2
+#define V_MEDIUM 3
+#define V_HIGH 4
+
+#define STEP 0.06
+
+
+/* Icons for different volume levels */
+static const char *icons[] = {
+ "audio-volume-muted-panel",
+ "audio-volume-low-zero-panel",
+ "audio-volume-low-panel",
+ "audio-volume-medium-panel",
+ "audio-volume-high-panel",
+ NULL
+};
+
+
+
+static void pulseaudio_button_finalize (GObject *object);
+static gboolean pulseaudio_button_button_press (GtkWidget *widget,
+ GdkEventButton *event);
+static gboolean pulseaudio_button_button_release (GtkWidget *widget,
+ GdkEventButton *event);
+static gboolean pulseaudio_button_scroll_event (GtkWidget *widget,
+ GdkEventScroll *event);
+static void pulseaudio_button_menu_deactivate (PulseaudioButton *button,
+ GtkMenu *menu);
+static void pulseaudio_button_update_icons (PulseaudioButton *button);
+static void pulseaudio_button_update (PulseaudioButton *button,
+ gboolean force_update);
+
+
+struct _PulseaudioButton
+{
+ GtkToggleButton __parent__;
+
+ PulseaudioVolume *volume;
+
+ GtkWidget *image;
+
+ /* Icon size currently used */
+ gint icon_size;
+
+ /* Array of preloaded icons */
+ guint pixbuf_idx;
+ GdkPixbuf **pixbufs;
+
+ GtkMenu *menu;
+
+ gulong volume_changed_id;
+ gulong deactivate_id;
+};
+
+struct _PulseaudioButtonClass
+{
+ GtkToggleButtonClass __parent__;
+};
+
+
+
+
+G_DEFINE_TYPE (PulseaudioButton, pulseaudio_button, GTK_TYPE_TOGGLE_BUTTON)
+
+static void
+pulseaudio_button_class_init (PulseaudioButtonClass *klass)
+{
+ GObjectClass *gobject_class;
+ GtkWidgetClass *gtkwidget_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = pulseaudio_button_finalize;
+
+ gtkwidget_class = GTK_WIDGET_CLASS (klass);
+ gtkwidget_class->button_press_event = pulseaudio_button_button_press;
+ gtkwidget_class->button_release_event = pulseaudio_button_button_release;
+ gtkwidget_class->scroll_event = pulseaudio_button_scroll_event;
+}
+
+
+
+static void
+pulseaudio_button_init (PulseaudioButton *button)
+{
+ GtkCssProvider *css_provider;
+
+ gtk_widget_set_can_focus(GTK_WIDGET(button), FALSE);
+ gtk_widget_set_can_default (GTK_WIDGET (button), FALSE);
+ gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
+ gtk_button_set_use_underline (GTK_BUTTON (button),TRUE);
+ gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
+ gtk_widget_set_name (GTK_WIDGET (button), "pulseaudio-button");
+
+ /* Preload icons */
+ button->pixbuf_idx = 0;
+ button->pixbufs = g_new0 (GdkPixbuf*, G_N_ELEMENTS (icons)-1);
+ pulseaudio_button_update_icons (button);
+
+ /* Setup Gtk style */
+ css_provider = gtk_css_provider_new ();
+ gtk_css_provider_load_from_data (css_provider, "#pulseaudio-button { -GtkWidget-focus-padding: 0; -GtkWidget-focus-line-width: 0; -GtkButton-default-border: 0; -GtkButton-inner-border: 0; padding: 1px; border-width: 1px;}", -1, NULL);
+ gtk_style_context_add_provider (GTK_STYLE_CONTEXT (gtk_widget_get_style_context (GTK_WIDGET (button))), GTK_STYLE_PROVIDER (css_provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+
+ /* Intercept scroll events */
+ gtk_widget_add_events (GTK_WIDGET (button), GDK_SCROLL_MASK);
+
+ button->volume = NULL;
+
+ button->menu = NULL;
+ button->volume_changed_id = 0;
+ button->deactivate_id = 0;
+
+ button->image = xfce_panel_image_new ();
+ gtk_container_add (GTK_CONTAINER (button), button->image);
+ gtk_widget_show (button->image);
+
+ pulseaudio_button_update (button, TRUE);
+
+ //button->align_box = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
+ //gtk_container_add (GTK_CONTAINER (button), button->align_box);
+ //gtk_widget_show (button->align_box);
+}
+
+
+
+static void
+pulseaudio_button_finalize (GObject *object)
+{
+ PulseaudioButton *button = PULSEAUDIO_BUTTON (object);
+ guint i;
+
+ /* Free pre-allocated icon pixbufs */
+ for (i = 0; i < G_N_ELEMENTS (icons)-1; ++i)
+ if (GDK_IS_PIXBUF (button->pixbufs[i]))
+ g_object_unref (G_OBJECT (button->pixbufs[i]));
+ g_free (button->pixbufs);
+
+ if (button->menu != NULL)
+ {
+ gtk_menu_detach (button->menu);
+ gtk_menu_popdown (button->menu);
+ button->menu = NULL;
+ }
+
+ (*G_OBJECT_CLASS (pulseaudio_button_parent_class)->finalize) (object);
+}
+
+
+static gboolean
+pulseaudio_button_button_press (GtkWidget *widget,
+ GdkEventButton *event)
+{
+ PulseaudioButton *button = PULSEAUDIO_BUTTON (widget);
+
+ if(event->button == 1 && button->menu != NULL) /* left click only */
+ {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget),TRUE);
+ //button->deactivate_id = g_signal_connect_swapped
+ // (G_OBJECT (button->menu), "deactivate",
+ // G_CALLBACK (pulseaudio_button_menu_deactivate), button);
+ //gtk_menu_reposition (GTK_MENU (button->menu));
+ //gtk_menu_popup (button->menu, NULL, NULL,
+ // xfce_panel_plugin_position_menu, button->plugin,
+ // event->button, event->time);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+
+static gboolean
+pulseaudio_button_button_release (GtkWidget *widget,
+ GdkEventButton *event)
+{
+ PulseaudioButton *button = PULSEAUDIO_BUTTON (widget);
+
+ if (event->button == 2) /* middle button */
+ {
+ // toggle mute
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+
+static gboolean
+pulseaudio_button_scroll_event (GtkWidget *widget, GdkEventScroll *event)
+{
+ PulseaudioButton *button = PULSEAUDIO_BUTTON (widget);
+ gdouble volume = pulseaudio_volume_get_volume (button->volume);
+ gdouble new_volume;
+
+ if (pulseaudio_volume_get_muted (button->volume))
+ volume = 0.0;
+
+ new_volume = MIN (MAX (volume + (1.0 - 2.0 * event->direction) * STEP, 0.0), 1.0);
+ pulseaudio_volume_set_volume (button->volume, new_volume);
+ //g_debug ("dir: %d %f -> %f", event->direction, volume, new_volume);
+
+ return TRUE;
+}
+
+
+static void
+pulseaudio_button_menu_deactivate (PulseaudioButton *button,
+ GtkMenu *menu)
+{
+ g_return_if_fail (IS_PULSEAUDIO_BUTTON (button));
+ g_return_if_fail (GTK_IS_MENU (menu));
+
+ if (button->deactivate_id)
+ {
+ g_signal_handler_disconnect (menu, button->deactivate_id);
+ button->deactivate_id = 0;
+ }
+
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), FALSE);
+}
+
+
+static void
+pulseaudio_button_update_icons (PulseaudioButton *button)
+{
+ GtkIconTheme *icon_theme;
+ guint i;
+
+ g_return_if_fail (IS_PULSEAUDIO_BUTTON (button));
+
+ icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (button)));
+
+ /* Pre-load all icons */
+ for (i = 0; i < G_N_ELEMENTS (icons)-1; ++i)
+ {
+ if (GDK_IS_PIXBUF (button->pixbufs[i]))
+ g_object_unref (G_OBJECT (button->pixbufs[i]));
+
+ button->pixbufs[i] = gtk_icon_theme_load_icon (icon_theme,
+ icons[i],
+ button->icon_size,
+ GTK_ICON_LOOKUP_USE_BUILTIN,
+ NULL);
+ }
+
+ /* Update the state of the button */
+ pulseaudio_button_update (button, TRUE);
+}
+
+
+static void
+pulseaudio_button_update (PulseaudioButton *button,
+ gboolean force_update)
+{
+ guint idx;
+ gdouble volume;
+
+ g_return_if_fail (IS_PULSEAUDIO_BUTTON (button));
+
+ volume = pulseaudio_volume_get_volume (button->volume);
+ if (pulseaudio_volume_get_muted (button->volume))
+ idx = V_MUTED;
+ else if (volume <= 0.0)
+ idx = V_ZERO;
+ else if (volume <= 0.3)
+ idx = V_LOW;
+ else if (volume <= 0.7)
+ idx = V_MEDIUM;
+ else
+ idx = V_HIGH;
+
+ if (force_update || button->pixbuf_idx != idx)
+ {
+ button->pixbuf_idx = idx;
+ xfce_panel_image_set_from_pixbuf (XFCE_PANEL_IMAGE (button->image), button->pixbufs[button->pixbuf_idx]);
+ }
+}
+
+
+void
+pulseaudio_button_set_size (PulseaudioButton *button,
+ gint size)
+{
+ g_return_if_fail (IS_PULSEAUDIO_BUTTON (button));
+ g_return_if_fail (size > 0);
+
+ button->icon_size = size - 2;
+ gtk_widget_set_size_request (GTK_WIDGET (button), size, size);
+ pulseaudio_button_update_icons (button);
+}
+
+
+
+static void
+pulseaudio_button_volume_changed (PulseaudioButton *button,
+ PulseaudioVolume *volume)
+{
+ g_return_if_fail (IS_PULSEAUDIO_BUTTON (button));
+
+ pulseaudio_button_update (button, FALSE);
+}
+
+
+
+GtkWidget *
+pulseaudio_button_new (PulseaudioVolume *volume)
+{
+ PulseaudioButton *button;
+
+ g_return_val_if_fail (IS_PULSEAUDIO_VOLUME (volume), NULL);
+
+ button = g_object_new (TYPE_PULSEAUDIO_BUTTON, NULL);
+
+ button->volume = volume;
+ button->volume_changed_id =
+ g_signal_connect_swapped (G_OBJECT (button->volume), "volume-changed",
+ G_CALLBACK (pulseaudio_button_volume_changed), button);
+
+ return GTK_WIDGET (button);
+}
+
+
diff --git a/panel-plugin/pulseaudio-button.h b/panel-plugin/pulseaudio-button.h
new file mode 100644
index 0000000..2082d3c
--- /dev/null
+++ b/panel-plugin/pulseaudio-button.h
@@ -0,0 +1,48 @@
+/* Copyright (c) 2014 Andrzej <ndrwrdck at gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU 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 __PULSEAUDIO_BUTTON_H__
+#define __PULSEAUDIO_BUTTON_H__
+
+#include <glib.h>
+#include <gtk/gtk.h>
+
+#include "pulseaudio-volume.h"
+//#include "pulseaudio-config.h"
+
+G_BEGIN_DECLS
+
+GType pulseaudio_button_get_type (void);
+
+#define TYPE_PULSEAUDIO_BUTTON (pulseaudio_button_get_type())
+#define PULSEAUDIO_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_PULSEAUDIO_BUTTON, PulseaudioButton))
+#define PULSEAUDIO_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_PULSEAUDIO_BUTTON, PulseaudioButtonClass))
+#define IS_PULSEAUDIO_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_PULSEAUDIO_BUTTON))
+#define IS_PULSEAUDIO_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), TYPE_PULSEAUDIO_BUTTON))
+#define PULSEAUDIO_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_PULSEAUDIO_BUTTON, PulseaudioButtonClass))
+
+typedef struct _PulseaudioButton PulseaudioButton;
+typedef struct _PulseaudioButtonClass PulseaudioButtonClass;
+
+GtkWidget *pulseaudio_button_new (PulseaudioVolume *volume);
+
+void pulseaudio_button_set_size (PulseaudioButton *button,
+ gint size);
+
+G_END_DECLS
+
+#endif /* !__PULSEAUDIO_BUTTON_H__ */
diff --git a/panel-plugin/pulseaudio-dialog.glade b/panel-plugin/pulseaudio-dialog.glade
new file mode 100644
index 0000000..d1a4c5a
--- /dev/null
+++ b/panel-plugin/pulseaudio-dialog.glade
@@ -0,0 +1,413 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.14"/>
+ <!-- interface-requires libxfce4ui 0.0 -->
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="XfceTitledDialog" id="dialog">
+ <property name="can_focus">False</property>
+ <property name="title" translatable="yes">Indicators</property>
+ <property name="default_width">425</property>
+ <property name="default_height">525</property>
+ <property name="icon_name">gtk-properties</property>
+ <property name="type_hint">normal</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="close-button">
+ <property name="label">gtk-close</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help-button">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkFrame" id="frame3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton-single-row">
+ <property name="label" translatable="yes">Arrange indicators in a single row</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">If enabled, ensure that the indicators are laid out in a single row or column.</property>
+ <property name="use_action_appearance">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton-align-left">
+ <property name="label" translatable="yes">Align left in deskbar mode</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Controls the indicator button layout when the panel is in a Deskbar mode. Possible choices are "centered" or "aligned left".</property>
+ <property name="use_action_appearance">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Appearance</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton-whitelist">
+ <property name="label" translatable="yes">Hide indicators by default</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">When enabled, only indicators marked "Visible" are shown. Otherwise, all indicators not marked "Hidden" are displayed.</property>
+ <property name="use_action_appearance">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTreeView" id="indicators-treeview">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="model">indicators-store</property>
+ <property name="headers_clickable">False</property>
+ <property name="rules_hint">True</property>
+ <property name="enable_search">False</property>
+ <child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn-icon">
+ <property name="min_width">24</property>
+ <child>
+ <object class="GtkCellRendererPixbuf" id="cellrendererpixbuf1"/>
+ <attributes>
+ <attribute name="pixbuf">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn-name">
+ <property name="title" translatable="yes">Indicator</property>
+ <property name="expand">True</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <attributes>
+ <attribute name="text">1</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn-blacklist">
+ <property name="title" translatable="yes">Hidden</property>
+ <child>
+ <object class="GtkCellRendererToggle" id="hidden-toggle"/>
+ <attributes>
+ <attribute name="active">2</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn-whitelist">
+ <property name="title" translatable="yes">Visible</property>
+ <child>
+ <object class="GtkCellRendererToggle" id="visible-toggle"/>
+ <attributes>
+ <attribute name="active">3</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkButton" id="item-up">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Move the selected indicator one row up.</property>
+ <property name="use_action_appearance">False</property>
+ <child>
+ <object class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-go-up</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="item-down">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Move the selected indicator one row down.</property>
+ <property name="use_action_appearance">False</property>
+ <child>
+ <object class="GtkImage" id="image3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-go-down</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="xpad">20</property>
+ <property name="ypad">6</property>
+ <property name="label" translatable="yes"><i>Please restart the panel for visibility changes to take effect.</i></property>
+ <property name="use_markup">True</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHButtonBox" id="hbuttonbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="indicators-clear">
+ <property name="label" translatable="yes">C_lear known indicators</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Resets the list of indicators and their visibility settings.</property>
+ <property name="use_action_appearance">False</property>
+ <property name="image">image1</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Known Indicators</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">close-button</action-widget>
+ <action-widget response="0">help-button</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-clear</property>
+ </object>
+ <object class="GtkListStore" id="indicators-store">
+ <columns>
+ <!-- column-name icon -->
+ <column type="GdkPixbuf"/>
+ <!-- column-name title -->
+ <column type="gchararray"/>
+ <!-- column-name hidden -->
+ <column type="gboolean"/>
+ <!-- column-name visible -->
+ <column type="gboolean"/>
+ <!-- column-name tooltip -->
+ <column type="gchararray"/>
+ </columns>
+ </object>
+ <object class="GtkAdjustment" id="size-adjustment">
+ <property name="lower">12</property>
+ <property name="upper">64</property>
+ <property name="value">32</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">2</property>
+ </object>
+</interface>
diff --git a/panel-plugin/pulseaudio-plugin.c b/panel-plugin/pulseaudio-plugin.c
new file mode 100644
index 0000000..9a7f611
--- /dev/null
+++ b/panel-plugin/pulseaudio-plugin.c
@@ -0,0 +1,247 @@
+/* Copyright (c) 2014 Andrzej <ndrwrdck at gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU 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.
+ */
+
+
+
+/*
+ * This file implements the main plugin class.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <libxfce4util/libxfce4util.h>
+#include <libxfce4panel/xfce-panel-plugin.h>
+
+#include "pulseaudio-plugin.h"
+#include "pulseaudio-volume.h"
+#include "pulseaudio-button.h"
+
+#ifdef HAVE_IDO
+#include <libido/libido.h>
+#endif
+
+/* prototypes */
+static void pulseaudio_plugin_construct (XfcePanelPlugin *plugin);
+static void pulseaudio_plugin_free (XfcePanelPlugin *plugin);
+static void pulseaudio_plugin_show_about (XfcePanelPlugin *plugin);
+static void pulseaudio_plugin_configure_plugin (XfcePanelPlugin *plugin);
+static gboolean pulseaudio_plugin_size_changed (XfcePanelPlugin *plugin,
+ gint size);
+
+
+struct _PulseaudioPluginClass
+{
+ XfcePanelPluginClass __parent__;
+};
+
+/* plugin structure */
+struct _PulseaudioPlugin
+{
+ XfcePanelPlugin __parent__;
+
+ PulseaudioVolume *volume;
+
+ /* panel widgets */
+ GtkWidget *button;
+
+ /* log file */
+ FILE *logfile;
+};
+
+
+/* define the plugin */
+XFCE_PANEL_DEFINE_PLUGIN (PulseaudioPlugin, pulseaudio_plugin)
+
+
+
+
+static void
+pulseaudio_plugin_class_init (PulseaudioPluginClass *klass)
+{
+ XfcePanelPluginClass *plugin_class;
+
+ plugin_class = XFCE_PANEL_PLUGIN_CLASS (klass);
+ plugin_class->construct = pulseaudio_plugin_construct;
+ plugin_class->free_data = pulseaudio_plugin_free;
+ plugin_class->about = pulseaudio_plugin_show_about;
+ plugin_class->configure_plugin = pulseaudio_plugin_configure_plugin;
+ plugin_class->size_changed = pulseaudio_plugin_size_changed;
+}
+
+
+
+static void
+pulseaudio_plugin_init (PulseaudioPlugin *pulseaudio_plugin)
+{
+ g_log_set_always_fatal (G_LOG_LEVEL_ERROR);
+
+ pulseaudio_plugin->volume = NULL;
+ pulseaudio_plugin->button = NULL;
+ pulseaudio_plugin->logfile = NULL;
+}
+
+
+
+static void
+pulseaudio_plugin_free (XfcePanelPlugin *plugin)
+{
+}
+
+
+
+static void
+pulseaudio_plugin_show_about (XfcePanelPlugin *plugin)
+{
+ GdkPixbuf *icon;
+
+ const gchar *auth[] =
+ {
+ "Andrzej Radecki <ndrwrdck at gmail.com>",
+ NULL
+ };
+
+ g_return_if_fail (IS_PULSEAUDIO_PLUGIN (plugin));
+
+ icon = xfce_panel_pixbuf_from_source ("xfce4-pulseaudio-plugin", NULL, 32);
+ gtk_show_about_dialog (NULL,
+ "logo", icon,
+ "license", xfce_get_license_text (XFCE_LICENSE_TEXT_GPL),
+ "version", PACKAGE_VERSION,
+ "program-name", PACKAGE_NAME,
+ "comments", _("A panel plugin for controlling PulseAudio mixer."),
+ "website", "http://goodies.xfce.org/projects/panel-plugins/xfce4-pulseaudio-plugin",
+ "copyright", _("Copyright (c) 2014\n"),
+ "authors", auth, NULL);
+
+ if (icon)
+ g_object_unref (G_OBJECT (icon));
+}
+
+
+
+static void
+pulseaudio_plugin_configure_plugin (XfcePanelPlugin *plugin)
+{
+ PulseaudioPlugin *pulseaudio_plugin = PULSEAUDIO_PLUGIN (plugin);
+
+ //pulseaudio_dialog_show (pulseaudio_plugin->dialog, gtk_widget_get_screen (GTK_WIDGET (plugin)));
+}
+
+
+
+
+static void
+pulseaudio_plugin_log_handler (const gchar *domain,
+ GLogLevelFlags level,
+ const gchar *message,
+ gpointer data)
+{
+ PulseaudioPlugin *pulseaudio_plugin = PULSEAUDIO_PLUGIN (data);
+ gchar *path;
+ const gchar *prefix;
+
+ if (pulseaudio_plugin->logfile == NULL)
+ {
+ g_mkdir_with_parents (g_get_user_cache_dir (), 0755);
+ path = g_build_filename (g_get_user_cache_dir (), "xfce4-pulseaudio-plugin.log", NULL);
+ pulseaudio_plugin->logfile = fopen (path, "w");
+ g_free (path);
+ }
+
+ if (pulseaudio_plugin->logfile)
+ {
+ switch (level & G_LOG_LEVEL_MASK)
+ {
+ case G_LOG_LEVEL_ERROR: prefix = "ERROR"; break;
+ case G_LOG_LEVEL_CRITICAL: prefix = "CRITICAL"; break;
+ case G_LOG_LEVEL_WARNING: prefix = "WARNING"; break;
+ case G_LOG_LEVEL_MESSAGE: prefix = "MESSAGE"; break;
+ case G_LOG_LEVEL_INFO: prefix = "INFO"; break;
+ case G_LOG_LEVEL_DEBUG: prefix = "DEBUG"; break;
+ default: prefix = "LOG"; break;
+ }
+
+ fprintf (pulseaudio_plugin->logfile, "%-10s %-25s %s\n", prefix, domain, message);
+ fflush (pulseaudio_plugin->logfile);
+ }
+
+ /* print log to the stdout */
+ if (level & G_LOG_LEVEL_ERROR || level & G_LOG_LEVEL_CRITICAL)
+ g_log_default_handler (domain, level, message, NULL);
+}
+
+
+
+static gboolean
+pulseaudio_plugin_size_changed (XfcePanelPlugin *plugin,
+ gint size)
+{
+ PulseaudioPlugin *pulseaudio_plugin = PULSEAUDIO_PLUGIN (plugin);
+
+ /* The plugin only occupies a single row */
+ size /= xfce_panel_plugin_get_nrows (plugin);
+
+ pulseaudio_button_set_size (PULSEAUDIO_BUTTON (pulseaudio_plugin->button), size);
+
+ return TRUE;
+}
+
+
+
+static void
+pulseaudio_plugin_construct (XfcePanelPlugin *plugin)
+{
+ PulseaudioPlugin *pulseaudio_plugin = PULSEAUDIO_PLUGIN (plugin);
+
+ #ifdef HAVE_IDO
+ ido_init();
+ #endif
+
+ xfce_panel_plugin_menu_show_configure (plugin);
+ xfce_panel_plugin_menu_show_about (plugin);
+
+ xfce_panel_plugin_set_small (plugin, TRUE);
+
+ /* setup transation domain */
+ xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
+
+ /* log messages to a file */
+ g_log_set_default_handler (pulseaudio_plugin_log_handler, plugin);
+
+ /* initialize xfconf */
+ //pulseaudio_plugin->config = pulseaudio_config_new (xfce_panel_plugin_get_property_base (plugin));
+
+ /* instantiate preference dialog builder */
+ //pulseaudio_plugin->dialog = pulseaudio_dialog_new (pulseaudio_plugin->config);
+
+ /* volume controller */
+ pulseaudio_plugin->volume = pulseaudio_volume_new ();
+
+ /* instantiate a button box */
+ pulseaudio_plugin->button = pulseaudio_button_new (pulseaudio_plugin->volume);
+ gtk_container_add (GTK_CONTAINER (plugin), GTK_WIDGET (pulseaudio_plugin->button));
+ gtk_widget_show (GTK_WIDGET (pulseaudio_plugin->button));
+}
+
diff --git a/panel-plugin/pulseaudio-plugin.h b/panel-plugin/pulseaudio-plugin.h
new file mode 100644
index 0000000..082b8ce
--- /dev/null
+++ b/panel-plugin/pulseaudio-plugin.h
@@ -0,0 +1,42 @@
+/* Copyright (c) 2014 Andrzej <ndrwrdck at gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU 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 __PULSEAUDIO_PLUGIN_H__
+#define __PULSEAUDIO_PLUGIN_H__
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <libxfce4panel/libxfce4panel.h>
+
+G_BEGIN_DECLS
+typedef struct _PulseaudioPluginClass PulseaudioPluginClass;
+typedef struct _PulseaudioPlugin PulseaudioPlugin;
+
+#define TYPE_PULSEAUDIO_PLUGIN (pulseaudio_plugin_get_type ())
+#define PULSEAUDIO_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PULSEAUDIO_PLUGIN, PulseaudioPlugin))
+#define PULSEAUDIO_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PULSEAUDIO_PLUGIN, PulseaudioPluginClass))
+#define IS_PULSEAUDIO_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PULSEAUDIO_PLUGIN))
+#define IS_PULSEAUDIO_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PULSEAUDIO_PLUGIN))
+#define PULSEAUDIO_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PULSEAUDIO_PLUGIN, PulseaudioPluginClass))
+
+GType pulseaudio_plugin_get_type (void) G_GNUC_CONST;
+
+void pulseaudio_plugin_register_type (XfcePanelTypeModule *type_module);
+
+G_END_DECLS
+
+#endif /* !__PULSEAUDIO_PLUGIN_H__ */
diff --git a/panel-plugin/pulseaudio-volume.c b/panel-plugin/pulseaudio-volume.c
new file mode 100644
index 0000000..dba4f73
--- /dev/null
+++ b/panel-plugin/pulseaudio-volume.c
@@ -0,0 +1,394 @@
+/* Copyright (c) 2014 Andrzej <ndrwrdck at gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU 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.
+ */
+
+
+
+/*
+ * This file implements a pulseaudio volume class abstracting out
+ * operations on pulseaudio mixer.
+ *
+ */
+
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <pulse/pulseaudio.h>
+#include <pulse/glib-mainloop.h>
+
+#include "pulseaudio-volume.h"
+
+
+static void pulseaudio_volume_finalize (GObject *object);
+static void pulseaudio_volume_connect (PulseaudioVolume *volume);
+static gdouble pulseaudio_volume_v2d (pa_volume_t vol);
+
+
+struct _PulseaudioVolume
+{
+ GObject __parent__;
+
+ pa_glib_mainloop *pa_mainloop;
+ pa_context *pa_context;
+ gboolean connected;
+
+ gdouble volume;
+ gboolean muted;
+
+ gdouble volume_mic;
+ gboolean muted_mic;
+
+
+};
+
+struct _PulseaudioVolumeClass
+{
+ GObjectClass __parent__;
+};
+
+
+
+
+enum
+{
+ VOLUME_CHANGED,
+ LAST_SIGNAL
+};
+
+static guint pulseaudio_volume_signals[LAST_SIGNAL] = { 0, };
+
+
+
+
+G_DEFINE_TYPE (PulseaudioVolume, pulseaudio_volume, G_TYPE_OBJECT)
+
+static void
+pulseaudio_volume_class_init (PulseaudioVolumeClass *klass)
+{
+ GObjectClass *gobject_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = pulseaudio_volume_finalize;
+
+ pulseaudio_volume_signals[VOLUME_CHANGED] =
+ g_signal_new (g_intern_static_string ("volume-changed"),
+ G_TYPE_FROM_CLASS (gobject_class),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL,
+ g_cclosure_marshal_VOID__DOUBLE,
+ G_TYPE_NONE, 1, G_TYPE_DOUBLE);
+
+}
+
+
+
+static void
+pulseaudio_volume_init (PulseaudioVolume *volume)
+{
+ volume->connected = FALSE;
+ volume->volume = 0.0;
+
+ volume->pa_mainloop = pa_glib_mainloop_new (NULL);
+
+ pulseaudio_volume_connect (volume);
+}
+
+
+
+static void
+pulseaudio_volume_finalize (GObject *object)
+{
+ PulseaudioVolume *volume = PULSEAUDIO_VOLUME (object);
+
+ pa_glib_mainloop_free (volume->pa_mainloop);
+
+ (*G_OBJECT_CLASS (pulseaudio_volume_parent_class)->finalize) (object);
+}
+
+
+
+
+/* sink event callbacks */
+static void
+pulseaudio_volume_sink_info_cb (pa_context *context,
+ const pa_sink_info *i,
+ int eol,
+ void *userdata)
+{
+ gboolean muted;
+ gdouble vol;
+
+ PulseaudioVolume *volume = PULSEAUDIO_VOLUME (userdata);
+ if (i == NULL) return;
+
+ muted = (gboolean) i->mute;
+ vol = pulseaudio_volume_v2d (i->volume.values[0]);
+
+ if (volume->muted != muted)
+ {
+ volume->muted = muted;
+ g_signal_emit (G_OBJECT (volume), pulseaudio_volume_signals [VOLUME_CHANGED], 0, volume->volume);
+ //g_debug ("Muted: %d", muted);
+ }
+
+ if (volume->volume != vol)
+ {
+ volume->volume = vol;
+ g_signal_emit (G_OBJECT (volume), pulseaudio_volume_signals [VOLUME_CHANGED], 0, volume->volume);
+ //g_debug ("Volume: %f", vol);
+ }
+}
+
+
+
+static void
+pulseaudio_volume_server_info_cb (pa_context *context,
+ const pa_server_info *i,
+ void *userdata)
+{
+ PulseaudioVolume *volume = PULSEAUDIO_VOLUME (userdata);
+ if (i == NULL) return;
+
+ pa_context_get_sink_info_by_name (context, i->default_sink_name, pulseaudio_volume_sink_info_cb, volume);
+}
+
+
+
+
+static void
+pulseaudio_volume_subscribe_cb (pa_context *context,
+ pa_subscription_event_type_t t,
+ uint32_t idx,
+ void *userdata)
+{
+ PulseaudioVolume *volume = PULSEAUDIO_VOLUME (userdata);
+
+ switch (t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK)
+ {
+ case PA_SUBSCRIPTION_EVENT_SINK :
+ pa_context_get_server_info (context, pulseaudio_volume_server_info_cb, volume);
+ //g_debug ("PulseAudio sink event");
+ break;
+
+ case PA_SUBSCRIPTION_EVENT_SOURCE :
+ g_debug ("PulseAudio source event");
+ break;
+
+ case PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT :
+ g_debug ("PulseAudio source output event");
+ break;
+
+ default :
+ g_debug ("Unknown PulseAudio event");
+ break;
+ }
+}
+
+
+
+
+static void
+pulseaudio_volume_context_state_cb (pa_context *context,
+ void *userdata)
+{
+ PulseaudioVolume *volume = PULSEAUDIO_VOLUME (userdata);
+
+ switch (pa_context_get_state (context))
+ {
+ case PA_CONTEXT_READY :
+ pa_context_subscribe (context, PA_SUBSCRIPTION_MASK_SINK | PA_SUBSCRIPTION_MASK_SOURCE | PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT, NULL, NULL);
+ pa_context_set_subscribe_callback (context, pulseaudio_volume_subscribe_cb, volume);
+
+ g_debug ("PulseAudio connection established");
+ volume->connected = TRUE;
+ break;
+
+ case PA_CONTEXT_FAILED :
+ case PA_CONTEXT_TERMINATED :
+ g_warning ("Disconected from PulseAudio server");
+ break;
+
+ case PA_CONTEXT_CONNECTING :
+ g_debug ("Connecting to PulseAudio server");
+ break;
+
+ case PA_CONTEXT_SETTING_NAME :
+ g_debug ("Setting application name");
+ break;
+
+ case PA_CONTEXT_AUTHORIZING :
+ g_debug ("Authorizing");
+ break;
+
+ case PA_CONTEXT_UNCONNECTED :
+ g_debug ("Not connected to PulseAudio server");
+ break;
+
+ default :
+ g_warning ("Unknown pulseaudio context state");
+ break;
+ }
+}
+
+
+
+static void
+pulseaudio_volume_connect (PulseaudioVolume *volume)
+{
+ pa_proplist *proplist;
+ gint err;
+
+ g_return_if_fail (IS_PULSEAUDIO_VOLUME (volume));
+ g_return_if_fail (!volume->connected);
+
+ proplist = pa_proplist_new ();
+#ifdef HAVE_CONFIG_H
+ pa_proplist_sets (proplist, PA_PROP_APPLICATION_NAME, PACKAGE_NAME);
+ pa_proplist_sets (proplist, PA_PROP_APPLICATION_VERSION, PACKAGE_VERSION);
+ pa_proplist_sets (proplist, PA_PROP_APPLICATION_ID, "org.xfce.pulseaudio-plugin");
+ pa_proplist_sets (proplist, PA_PROP_APPLICATION_ICON_NAME, "multimedia-volume-control");
+#endif
+
+ volume->pa_context = pa_context_new_with_proplist (pa_glib_mainloop_get_api (volume->pa_mainloop), NULL, proplist);
+ pa_context_set_state_callback(volume->pa_context, pulseaudio_volume_context_state_cb, volume);
+
+ err = pa_context_connect (volume->pa_context, NULL, PA_CONTEXT_NOFAIL, NULL);
+ if (err < 0)
+ g_warning ("pa_context_connect() failed: %s", pa_strerror (err));
+ //g_warning ("pa_context_connect() failed: %s", pa_strerror (pa_context_errno (volume->pa_context)));
+}
+
+
+
+
+static gdouble
+pulseaudio_volume_v2d (pa_volume_t vol)
+{
+ gdouble volume;
+
+ volume = (gdouble) vol - PA_VOLUME_MUTED;
+ volume /= (gdouble) (PA_VOLUME_NORM - PA_VOLUME_MUTED);
+ return volume;
+}
+
+
+
+static pa_volume_t
+pulseaudio_volume_d2v (gdouble vol)
+{
+ gdouble volume;
+
+ volume = (PA_VOLUME_NORM - PA_VOLUME_MUTED) * vol;
+ volume = (pa_volume_t) volume + PA_VOLUME_MUTED;
+ return volume;
+}
+
+
+
+
+gboolean
+pulseaudio_volume_get_muted (PulseaudioVolume *volume)
+{
+ g_return_val_if_fail (IS_PULSEAUDIO_VOLUME (volume), 0.0);
+
+ return volume->muted;
+}
+
+
+
+gdouble
+pulseaudio_volume_get_volume (PulseaudioVolume *volume)
+{
+ g_return_val_if_fail (IS_PULSEAUDIO_VOLUME (volume), 0.0);
+
+ return volume->volume;
+}
+
+
+
+/* volume setting callbacks */
+/* pa_context_success_cb_t */
+static void
+pulseaudio_volume_set_volume_cb3 (pa_context *context,
+ int success,
+ void *userdata)
+{
+ PulseaudioVolume *volume = PULSEAUDIO_VOLUME (userdata);
+
+ if (success)
+ g_signal_emit (G_OBJECT (volume), pulseaudio_volume_signals [VOLUME_CHANGED], 0, volume->volume);
+}
+
+/* pa_sink_info_cb_t */
+static void
+pulseaudio_volume_set_volume_cb2 (pa_context *context,
+ const pa_sink_info *i,
+ int eol,
+ void *userdata)
+{
+ //char st[PA_CVOLUME_SNPRINT_MAX];
+
+ PulseaudioVolume *volume = PULSEAUDIO_VOLUME (userdata);
+ if (i == NULL) return;
+
+ //g_debug ("*** %s", pa_cvolume_snprint (st, sizeof (st), &i->volume));
+ pa_cvolume_set (&i->volume, 1, pulseaudio_volume_d2v (volume->volume));
+ pa_context_set_sink_volume_by_index (context, i->index, &i->volume, pulseaudio_volume_set_volume_cb3, volume);
+}
+
+
+
+/* pa_server_info_cb_t */
+static void
+pulseaudio_volume_set_volume_cb1 (pa_context *context,
+ const pa_server_info *i,
+ void *userdata)
+{
+ PulseaudioVolume *volume = PULSEAUDIO_VOLUME (userdata);
+ if (i == NULL) return;
+
+ pa_context_get_sink_info_by_name (context, i->default_sink_name, pulseaudio_volume_set_volume_cb2, volume);
+}
+
+
+void
+pulseaudio_volume_set_volume (PulseaudioVolume *volume,
+ gdouble vol)
+{
+ g_return_if_fail (IS_PULSEAUDIO_VOLUME (volume));
+ g_return_if_fail (pa_context_get_state (volume->pa_context) == PA_CONTEXT_READY);
+
+ if (volume->volume != vol)
+ {
+ volume->volume = vol;
+ pa_context_get_server_info (volume->pa_context, pulseaudio_volume_set_volume_cb1, volume);
+ }
+}
+
+
+
+PulseaudioVolume *
+pulseaudio_volume_new (void)
+{
+ PulseaudioVolume *volume = g_object_new (TYPE_PULSEAUDIO_VOLUME, NULL);
+
+ return volume;
+}
+
+
diff --git a/panel-plugin/pulseaudio-volume.h b/panel-plugin/pulseaudio-volume.h
new file mode 100644
index 0000000..b240cd4
--- /dev/null
+++ b/panel-plugin/pulseaudio-volume.h
@@ -0,0 +1,46 @@
+/* Copyright (c) 2014 Andrzej <ndrwrdck at gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU 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 __PULSEAUDIO_VOLUME_H__
+#define __PULSEAUDIO_VOLUME_H__
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define TYPE_PULSEAUDIO_VOLUME (pulseaudio_volume_get_type ())
+#define PULSEAUDIO_VOLUME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PULSEAUDIO_VOLUME, PulseaudioVolume))
+#define PULSEAUDIO_VOLUME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PULSEAUDIO_VOLUME, PulseaudioVolumeClass))
+#define IS_PULSEAUDIO_VOLUME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PULSEAUDIO_VOLUME))
+#define IS_PULSEAUDIO_VOLUME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PULSEAUDIO_VOLUME))
+#define PULSEAUDIO_VOLUME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PULSEAUDIO_VOLUME, PulseaudioVolumeClass))
+
+typedef struct _PulseaudioVolume PulseaudioVolume;
+typedef struct _PulseaudioVolumeClass PulseaudioVolumeClass;
+
+GType pulseaudio_volume_get_type (void) G_GNUC_CONST;
+
+PulseaudioVolume *pulseaudio_volume_new ();
+
+gdouble pulseaudio_volume_get_volume (PulseaudioVolume *volume);
+void pulseaudio_volume_set_volume (PulseaudioVolume *volume, gdouble vol);
+
+gboolean pulseaudio_volume_get_muted (PulseaudioVolume *volume);
+
+G_END_DECLS
+
+#endif /* !__PULSEAUDIO_VOLUME_H__ */
diff --git a/panel-plugin/pulseaudio.desktop.in.in b/panel-plugin/pulseaudio.desktop.in.in
new file mode 100644
index 0000000..9077b76
--- /dev/null
+++ b/panel-plugin/pulseaudio.desktop.in.in
@@ -0,0 +1,9 @@
+[Xfce Panel]
+Type=X-XFCE-PanelPlugin
+Encoding=UTF-8
+_Name=PulseAudio Plugin
+_Comment=A panel plugin for controlling PulseAudio mixer.
+Icon=xfce4-pulseaudio-plugin
+X-XFCE-Module=pulseaudio-plugin
+X-XFCE-Internal=FALSE
+X-XFCE-API=@LIBXFCE4PANEL_VERSION_API@
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
new file mode 100644
index 0000000..0b4c992
--- /dev/null
+++ b/po/Makefile.in.in
@@ -0,0 +1,223 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper at gnu.ai.mit.edu>
+# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns at gmail.com>
+#
+# This file may be copied and used freely without restrictions. It may
+# be used in projects which are not available under a GNU Public License,
+# but which still want to provide support for the GNU gettext functionality.
+#
+# - 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.pwns at gmail.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 = @SHELL@
+
+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)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
+GENPOT = XGETTEXT_ARGS="$(XGETTEXT_ARGS)" INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" 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; else echo "$(ALL_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 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi)
+
+USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(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="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
+
+DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
+EXTRA_DISTFILES = ChangeLog 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
+
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+INTLTOOL_V_MSGFMT = $(INTLTOOL__v_MSGFMT_$(V))
+INTLTOOL__v_MSGFMT_= $(INTLTOOL__v_MSGFMT_$(AM_DEFAULT_VERBOSITY))
+INTLTOOL__v_MSGFMT_0 = @echo " MSGFMT" $@;
+
+.po.pox:
+ $(MAKE) $(GETTEXT_PACKAGE).pot
+ $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
+
+.po.mo:
+ $(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $<
+
+.po.gmo:
+ $(INTLTOOL_V_MSGFMT)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
+ 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 ctags tags CTAGS TAGS ID:
+
+# Define this as empty until I found a useful application.
+install-exec 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:
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..d4e23fb
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,3 @@
+panel-plugin/pulseaudio.desktop.in.in
+panel-plugin/pulseaudio.c
+panel-plugin/pulseaudio-dialog.glade
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
new file mode 100644
index 0000000..9077845
--- /dev/null
+++ b/po/POTFILES.skip
@@ -0,0 +1 @@
+panel-plugin/pulseaudio.desktop.in
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list