Audio Recorder Applet <https://launchpad.net/rec-applet>
Author: Osmo Antero Maatta <osmoma@gmail.com>

This is an audio recording applet for the GNOME-desktop. This toolbar-applet allows you to record 
your favourite music or audio to a file. It can record audio from your system soundcard, microphones, 
browsers, webcams & more. Put simply; if it plays out of your loudspeakers you can record it. 

The applet has a timer that can stop the recording at "silence" or given clock time, after time duration 
or file size. It supports several audio (output) formats such as OGG audio, Flac, MP3 and WAV. The MP3-format 
requires gstreamer0.10-plugins-ugly* (or newer) packages.

Please read the README and INSTALL files before compilation. 

Important files:
****************
README	- This file.
INSTALL	- Compilation from source and installation.
COPYING	- The license text.
AUTHORS	- Authors and contributors.
NEWS	- Recent news, releases.
debian/README - Instructions to create a Debian/Ubuntu package.

Compilation from source and installation:
*****************************************
Read the INSTALL file for detailed information about compilation of this program.

Runtime:
********
Runtime (running this program) has currently these dependencies. The package names are from 
Debian/Ubuntu but you should find similar packages in any other Linux-distribution.

libgtk2.0-dev  (gtk+-2.0, gdk-2.0 and gthread-2.0 libraries)
libglib2.0-dev (glib-2.0 library)
libgconf2-dev  (gconf-2.0 library)
libpanel-applet2-dev (libpanelapplet-2.0 library)
libgstreamer0.10-dev (gstreamer-0.10 library)
libgstreamer-plugins-base0.10-dev  (gstreamer-interfaces-0.10 library)
libgnome-media-dev - (gnome-media-profiles library)
libpulse-dev (PulseAudio's pulse library)

For developers:
***************
The configuration uses Automake/Autoconf tools. The most important files are: 

Makefile.am  - General build and installation instructions.
configure.in  - Configuration of source with library existens and error check.
pixmaps/Makefile.am - Installation of icons.  
src/Makefile.am - Build and installation instructions. Contains list of all source files.
po/POTFILES.in - Language support. List of source files that has translatable text.

The general sequence of commands to re-configure the source is:
cd rec-audio*
autoheader
aclocal
autoconf
automake -a 

./configure  #configure produces the final Makefile (food for make).
make
make install  #run this as root or sudo!

File locations:
***************
Make install will copy the rec-audio executable to /usr/bin directory.
This default locations can be changed during the ./configure phase.
Run ./configure --help for more instructions.

Pixmap images are copied to /usr/share/pixmaps/rec-applet/.
Icons are installed to /usr/share/icons/hicolor/48x48/apps/.

The HTML help files from rec-applet/data/ are copied to /usr/share/rec-applet/.

The applet's server file is copied from "rec-applet/data/rec-applet.server.in.in" 
to /usr/lib/bonobo/servers/rec-applet.server. 

Run "pkill gnome-panel" to make GNOME reload the applets configurations.
The applet will then become visible in the "Add to panel" list.
-------------

If you plan to create a Debian/Ubuntu package of this program, 
read the rec-applet*/debian/README file.
-------------

Language support by gettext:
****************************

1) First, translate the "rec-applet.server.in.in" file.
You can find this file in the source's rec-applet/data/ folder.
The installer vil rename and copy this file to /usr/lib/bonobo/servers/rec-applet.server.

2) Tanslate the applet/program itself.
The language files are saved in the source's po/ directory.

Each translatable file should be listed in the po/POTFILES.in file. Add names of new code-files there.

Translating rec-applet.pot to a new language.

Translate on the Launchpad.
Use Launchpad for the translations. Browse to https://translations.launchpad.net/rec-applet
Login and open a new language file.

Important: The translations from the Launchpad are automatically copied/synchronized to the source code's po/ directory. 
They appear in the http://bazaar.launchpad.net/~osmoma/rec-applet/trunk/files/head:/po/ directory.
Launchpad does this transfer once a day.

3) Add a new language code to "rec-applet/configure.in" file, change the ALL_LINGUAS variable.
ALL_LINGUAS="de en_AU fi_FI fr hu nb_NO pt pt_BR ru"
 
cd rec-applet*
gedit configure.in 

Run these command after you edited the configure.in.
cd rec-audio*
autoconf
autoheader
automake -a

Then update the "rec-applet.pot" file by running "make update-po" in the po/ directory. 
rec-applet.pot contains all translatable _("xxx") strings found in the code. Do:

cd rec-audio*
cd po
make update-po

It creates binary language files (*.gmo) of each *.po.

4) You may also translate the HTML-files (help files) in the rec-applet/data directory.
If not translated, the program will show the original english text.

Send new language files to developers for inclusion in the package.
See: https://launchpad.net/rec-applet

Development:
************
First of all, install necessary development (*-dev) packages as instructed in the INSTALL file. 
Of cource you will also need the compiler (gcc) and Automake tools. 
In Ubuntu you should simply get the "build-essential", "automake" and "autoconf" packages.

The code is written in c with GDK/GTK+ libraries and it is hosted on the Launchpad at address:
https://launchpad.net/rec-applet

Launchpad uses Bazar (bzr) as the code versioning system. In Ubuntu you should install the "bzr" package. 

Then (very important!) read the README and INSTALL files for further instructions.
----

I use the Gedit for code editing. In the the preferences I set:
Tab-stops width to 4, and checkmark the "Insert spaces instead of tabs" option.
----

The program's about-dialog vill show details about the installation directories and locations.
Run the program and check the about-dialog.

You can clean up binary and object (*.o) files with "make clean".
make clean
----

To test the applet on the panel, I find this command line very quick & useful
$ make && sudo make install; pkill rec-applet
Let it reload the applet.

It compiles and installs the applet + reloads it.

You can also reset the entire panel
$ make && sudo make install; pkill gnome-panel
-------------

Debugging:
**********
You may enable the AUDIO_REC_APPLET_DEBUG directive in the main.c file. 
It allows you to test the applet in an ordinary GTK-window, instead of toolbar panel.

You can also activate the ACTIVE_DEBUGGING directive in the log.h file.
Run the src/rec-applet from a terminal window and it vill output debug-information on the command prompt. 
$ src/rec-applet
----

Important resources on the web:
http://live.gnome.org/GnomeLove/PanelAppletTutorial
----

Ready-made Debian/Ubuntu packages:
**********************************
See: https://launchpad.net/~osmoma/+archive/rec-applet

-- end --

