changeset 1307:fbeb9446aa2e audacious-plugins-1.4.0-DR1

Automated merge with ssh://hg.atheme.org//hg/audacious-plugins
author William Pitcock <nenolod@atheme-project.org>
date Fri, 20 Jul 2007 10:30:28 -0500
parents cbccccf7ea84 (current diff) f34112ab9101 (diff)
children 6b73228c7448
files
diffstat 13 files changed, 240 insertions(+), 209 deletions(-) [+]
line wrap: on
line diff
--- a/src/aac/src/libmp4.c	Fri Jul 20 10:30:22 2007 -0500
+++ b/src/aac/src/libmp4.c	Fri Jul 20 10:30:28 2007 -0500
@@ -105,7 +105,7 @@
 
 static gchar *
 extname(const char *filename)
-{   
+{
     gchar *ext = strrchr(filename, '.');
 
     if (ext != NULL)
@@ -218,7 +218,7 @@
       break;
     }
 #ifdef DEBUG
-    g_print("AUDIO PAYLOAD: %x %x %x %x\n", 
+    g_print("AUDIO PAYLOAD: %x %x %x %x\n",
 	buffer[i], buffer[i+1], buffer[i+2], buffer[i+3]);
 #endif
     i++;
@@ -293,14 +293,21 @@
 static void mp4_about(void)
 {
     static GtkWidget *aboutbox = NULL;
-    aboutbox = xmms_show_message("About MP4 AAC player plugin",
-                   "Using libfaad2-" FAAD2_VERSION " for decoding.\n"
-		   "FAAD2 AAC/HE-AAC/HE-AACv2/DRM decoder (c) Nero AG, www.nero.com\n"
-                   "Copyright (c) 2005-2006 Audacious team",
-                   "Ok", FALSE, NULL, NULL);
+    gchar *about_text;
+
+    about_text = g_strjoin ("", _("Using libfaad2-"), FAAD2_VERSION,
+				_(" for decoding.\n"
+				  "FAAD2 AAC/HE-AAC/HE-AACv2/DRM decoder (c) Nero AG, www.nero.com\n"
+				  "Copyright (c) 2005-2006 Audacious team"), NULL);
+
+    aboutbox = xmms_show_message(_("About MP4 AAC player plugin"),
+				 about_text,
+				 _("Ok"), FALSE, NULL, NULL);
+
+    g_free(about_text);
+
     g_signal_connect(G_OBJECT(aboutbox), "destroy",
-                     G_CALLBACK(gtk_widget_destroyed),
-                     &aboutbox);
+                     G_CALLBACK(gtk_widget_destroyed), &aboutbox);
 }
 
 static void mp4_pause(InputPlayback *playback, short flag)
@@ -355,7 +362,7 @@
 
     mp4cb->read = mp4_read_callback;
     mp4cb->seek = mp4_seek_callback;
-    mp4cb->user_data = mp4fh;   
+    mp4cb->user_data = mp4fh;
 
     if (!(mp4file = mp4ff_open_read(mp4cb))) {
         g_free(mp4cb);
@@ -383,7 +390,7 @@
             faacDecClose(decoder);
             return FALSE;
         }
-        if ( faacDecInit2(decoder, buffer, bufferSize, 
+        if ( faacDecInit2(decoder, buffer, bufferSize,
                   &samplerate, &channels) < 0 ) {
             faacDecClose(decoder);
 
@@ -395,7 +402,7 @@
             if (mp4ASC.frameLengthFlag == 1) framesize = 960;
             if (mp4ASC.sbr_present_flag == 1) framesize *= 2;
         }
-            
+
         g_free(buffer);
 
         faacDecClose(decoder);
@@ -444,7 +451,7 @@
     mp4fh = vfs_fopen(filename, "rb");
     mp4cb->read = mp4_read_callback;
     mp4cb->seek = mp4_seek_callback;
-    mp4cb->user_data = mp4fh;   
+    mp4cb->user_data = mp4fh;
 
     if (!(mp4file = mp4ff_open_read(mp4cb))) {
         g_free(mp4cb);
@@ -527,7 +534,7 @@
         faacDecClose(decoder);
         return FALSE;
     }
-    if ( faacDecInit2(decoder, buffer, bufferSize, 
+    if ( faacDecInit2(decoder, buffer, bufferSize,
               &samplerate, &channels) < 0 ) {
         faacDecClose(decoder);
 
@@ -539,7 +546,7 @@
         if (mp4ASC.frameLengthFlag == 1) framesize = 960;
         if (mp4ASC.sbr_present_flag == 1) framesize *= 2;
     }
-        
+
     g_free(buffer);
     if( !channels ) {
         faacDecClose(decoder);
@@ -551,13 +558,13 @@
     playback->output->open_audio(FMT_S16_NE, samplerate, channels);
     playback->output->flush(0);
 
-    mp4_ip.set_info(xmmstitle, msDuration, 
-            mp4ff_get_avg_bitrate( mp4file, mp4track ), 
+    mp4_ip.set_info(xmmstitle, msDuration,
+            mp4ff_get_avg_bitrate( mp4file, mp4track ),
             samplerate,channels);
 
     while ( buffer_playing ) {
         void*           sampleBuffer;
-        faacDecFrameInfo    frameInfo;    
+        faacDecFrameInfo    frameInfo;
         gint            rc;
 
         /* Seek if seek position has changed */
@@ -591,7 +598,7 @@
 
             return FALSE;
         }
-        rc= mp4ff_read_sample(mp4file, mp4track, 
+        rc= mp4ff_read_sample(mp4file, mp4track,
                   sampleID++, &buffer, &bufferSize);
 
         /*g_print(":: %d/%d\n", sampleID-1, numSamples);*/
@@ -611,9 +618,9 @@
 
 /*          g_print(" :: %d/%d\n", bufferSize, BUFFER_SIZE); */
 
-        sampleBuffer= faacDecDecode(decoder, 
-                        &frameInfo, 
-                        buffer, 
+        sampleBuffer= faacDecDecode(decoder,
+                        &frameInfo,
+                        buffer,
                         bufferSize);
 
         /* If there was an error decoding, we're done. */
@@ -684,7 +691,7 @@
         gint size = 0;
 
         vfs_fseek(file, 0, SEEK_SET);
-        size = (streambuffer[6]<<21) | (streambuffer[7]<<14) | 
+        size = (streambuffer[6]<<21) | (streambuffer[7]<<14) |
 		(streambuffer[8]<<7) | streambuffer[9];
         size+=10;
         vfs_fread(streambuffer, 1, size, file);
@@ -858,7 +865,7 @@
     mp4cb->user_data = mp4fh;
 
     mp4file= mp4ff_open_read(mp4cb);
-  
+
     if( ret == TRUE ) {
         g_free(mp4cb);
         my_decode_aac( playback, filename, mp4fh );
--- a/src/adplug/adplug-xmms.cc	Fri Jul 20 10:30:22 2007 -0500
+++ b/src/adplug/adplug-xmms.cc	Fri Jul 20 10:30:28 2007 -0500
@@ -1064,15 +1064,10 @@
 
     if (homedir)
     {
-      char *userdb =
-        (char *) malloc (strlen (homedir) + strlen (ADPLUG_CONFDIR) +
-                         strlen (ADPLUGDB_FILE) + 3);
-      strcpy (userdb, homedir);
-      strcat (userdb, "/" ADPLUG_CONFDIR "/");
-      strcat (userdb, ADPLUGDB_FILE);
+      std::string userdb;
+      userdb = "file://" + std::string(g_get_home_dir()) + "/" ADPLUG_CONFDIR "/" + ADPLUGDB_FILE;
       plr.db->load (userdb);    // load user's database
-      dbg_printf (" (userdb=\"%s\")", userdb);
-      free (userdb);
+      dbg_printf (" (userdb=\"%s\")", userdb.c_str());
     }
   }
   CAdPlug::set_database (plr.db);
--- a/src/cdaudio-ng/cdaudio-ng.c	Fri Jul 20 10:30:22 2007 -0500
+++ b/src/cdaudio-ng/cdaudio-ng.c	Fri Jul 20 10:30:28 2007 -0500
@@ -1,13 +1,8 @@
 
 /*
 	todo: 
-		- vis_pcm...?!
 		- fileinfo dialog
 		- about dialog
-		- remove //'s & todo's
-		- additional comments
-		- stop playback when configure
-		- configuration for cddb (server, port)
 */
 
 #include <string.h>
@@ -30,6 +25,7 @@
 #include <audacious/i18n.h>
 #include <audacious/configdb.h>
 #include <audacious/plugin.h>
+//#include <audacious/playback.h>	// todo: this should be available soon (by 1.4)
 #include <audacious/util.h>
 #include <audacious/output.h>
 
@@ -51,6 +47,8 @@
 static int				playing_track = -1;
 static dae_params_t		*pdae_params = NULL;
 static gboolean			debug = FALSE;
+static char				cddb_server[DEF_STRING_LEN];
+static int				cddb_port;
 
 static void				cdaudio_init();
 static void				cdaudio_about();
@@ -74,17 +72,13 @@
 static int				find_trackno_from_filename(char *filename);
 static void				cleanup_on_error();
 
-static int				calculate_digit_sum(int n);
-static unsigned long	calculate_cddb_discid();
-
-
 
 static InputPlugin inputplugin = {
 	NULL,
 	NULL,
 	"CD Audio Plugin NG",
 	cdaudio_init,
-	cdaudio_about,
+	NULL /*cdaudio_about*/,	// todo: implement an about dialog
 	cdaudio_configure,
 	cdaudio_is_our_file,
 	cdaudio_scan_dir,
@@ -102,7 +96,7 @@
 	NULL,
 	NULL,
 	cdaudio_get_song_info,
-	cdaudio_file_info_box,
+	NULL /*cdaudio_file_info_box*/,	// todo: implement a file info dialog
 	NULL,
 	cdaudio_get_song_tuple
 };
@@ -136,6 +130,12 @@
 		use_cdtext = TRUE;
 	if (!bmp_cfg_db_get_bool(db, "CDDA", "use_cddb", &use_cddb))
 		use_cddb = TRUE;
+	if (!bmp_cfg_db_get_string(db, "CDDA", "cddbserver", &string))
+		strcpy(cddb_server, "");
+	else
+		strcpy(cddb_server, string);
+	if (!bmp_cfg_db_get_int(db, "CDDA", "cddbport", &cddb_port))
+		cddb_port = 1;
 	if (!bmp_cfg_db_get_string(db, "CDDA", "device", &string))
 		strcpy(device, "");
 	else
@@ -146,9 +146,9 @@
 	bmp_cfg_db_close(db);
 
 	if (debug)
-		printf("cdaudio-ng: configuration: use_dae = %d, limitspeed = %d, use_cdtext = %d, use_cddb = %d, device = \"%s\", debug = %d\n", use_dae, limitspeed, use_cdtext, use_cddb, device, debug);
+		printf("cdaudio-ng: configuration: use_dae = %d, limitspeed = %d, use_cdtext = %d, use_cddb = %d, cddbserver = \"%s\", cddbport = %d, device = \"%s\", debug = %d\n", use_dae, limitspeed, use_cdtext, use_cddb, cddb_server, cddb_port, device, debug);
 
-	configure_set_variables(&use_dae, &limitspeed, &use_cdtext, &use_cddb, device, &debug);
+	configure_set_variables(&use_dae, &limitspeed, &use_cdtext, &use_cddb, device, &debug, cddb_server, &cddb_port);
 	configure_create_gui();
 }
 
@@ -163,6 +163,10 @@
 	if (debug)
 		printf("cdaudio-ng: cdaudio_configure()\n");
 
+		/* if playback is started, we stop it */
+	if (playing_track != -1)
+		playback_stop();
+
 	configure_show_gui();
 }
 
@@ -270,9 +274,17 @@
 	trackinfo = (trackinfo_t *) malloc(sizeof(trackinfo_t) * (lasttrackno + 1));
 	int trackno;
 
+	trackinfo[0].startlsn = cdio_get_track_lsn(pcdrom_drive->p_cdio, trackno);
+	trackinfo[0].endlsn = cdio_get_track_last_lsn(pcdrom_drive->p_cdio, CDIO_CDROM_LEADOUT_TRACK);
+	strcpy(trackinfo[0].performer, "");
+	strcpy(trackinfo[0].name, "");
+	strcpy(trackinfo[0].genre, "");
 	for (trackno = firsttrackno; trackno <= lasttrackno; trackno++) {
 		trackinfo[trackno].startlsn = cdio_get_track_lsn(pcdrom_drive->p_cdio, trackno);
 		trackinfo[trackno].endlsn = cdio_get_track_last_lsn(pcdrom_drive->p_cdio, trackno);
+		strcpy(trackinfo[trackno].performer, "");
+		strcpy(trackinfo[trackno].name, "");
+		strcpy(trackinfo[trackno].genre, "");
 
 		if (trackinfo[trackno].startlsn == CDIO_INVALID_LSN || trackinfo[trackno].endlsn == CDIO_INVALID_LSN) {
 			fprintf(stderr, "cdaudio-ng: failed to retrieve stard/end lsn for track %d\n", trackno);
@@ -294,7 +306,8 @@
 			if (debug)
 				printf("cdaudio-ng: getting cddb info\n");
 
-			// todo: change the default cddb settings
+			cddb_set_server_name(pcddb_conn, cddb_server);
+			cddb_set_server_port(pcddb_conn, cddb_port);
 
 			pcddb_disc = cddb_disc_new();
 			for (trackno = firsttrackno; trackno <= lasttrackno; trackno++) {
@@ -491,9 +504,10 @@
 void cdaudio_stop(InputPlayback *pinputplayback)
 {
 	if (debug)
-		printf("cdaudio-ng: cdaudio_stop(\"%s\")\n", pinputplayback->filename);
+		printf("cdaudio-ng: cdaudio_stop(\"%s\")\n", pinputplayback != NULL ? pinputplayback->filename : "N/A");
 
-	pinputplayback->playing = FALSE;
+	if (pinputplayback != NULL)
+		pinputplayback->playing = FALSE;
 	playing_track = -1;
 	is_paused = FALSE;
 
@@ -666,6 +680,8 @@
 	bmp_cfg_db_set_int(db, "CDDA", "limitspeed", limitspeed);
 	bmp_cfg_db_set_bool(db, "CDDA", "use_cdtext", use_cdtext);
 	bmp_cfg_db_set_bool(db, "CDDA", "use_cddb", use_cddb);
+	bmp_cfg_db_set_string(db, "CDDA", "cddbserver", cddb_server);
+	bmp_cfg_db_set_int(db, "CDDA", "cddbport", cddb_port);
 	bmp_cfg_db_set_string(db, "CDDA", "device", device);
 	bmp_cfg_db_set_bool(db, "CDDA", "debug", debug);
 	bmp_cfg_db_close(db);
@@ -726,41 +742,6 @@
 
 	/* auxiliar functions */
 
-
-static int calculate_digit_sum(int n)
-{
-	int ret = 0;
-
-	while (1) {
-		ret += n % 10;
-		n    = n / 10;
-		if (n == 0)
-			return ret;
-	}
-}
-
-
-
-static unsigned long calculate_cddb_discid()
-{
-	int trackno, t, n = 0;
-	msf_t startmsf;
-	msf_t msf;
-	
-	for (trackno = firsttrackno; trackno <= lasttrackno; trackno++) {
-		cdio_get_track_msf(pcdio, trackno, &msf);
-		n += calculate_digit_sum(cdio_audio_get_msf_seconds(&msf));
-	}
-	
-	cdio_get_track_msf(pcdio, 1, &startmsf);
-	cdio_get_track_msf(pcdio, CDIO_CDROM_LEADOUT_TRACK, &msf);
-	
-	t = cdio_audio_get_msf_seconds(&msf) - cdio_audio_get_msf_seconds(&startmsf);
-	
-	return ((n % 0xFF) << 24 | t << 8 | (lasttrackno - firsttrackno + 1));
-}
-
-
 void *dae_playing_thread_core(dae_params_t *pdae_params)
 {
 	unsigned char *buffer = (unsigned char *) malloc(CDDA_DAE_FRAMES * CDIO_CD_FRAMESIZE_RAW);
--- a/src/cdaudio-ng/configure.c	Fri Jul 20 10:30:22 2007 -0500
+++ b/src/cdaudio-ng/configure.c	Fri Jul 20 10:30:28 2007 -0500
@@ -1,5 +1,6 @@
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <gtk/gtk.h>
 
@@ -20,6 +21,10 @@
 static GtkWidget		*limitcheckbutton;
 static GtkWidget		*usecdtextcheckbutton;
 static GtkWidget		*usecddbcheckbutton;
+static GtkWidget		*cddbserverlabel;
+static GtkWidget		*cddbportlabel;
+static GtkWidget		*cddbserverentry;
+static GtkWidget		*cddbportentry;
 static GtkWidget		*usedevicecheckbutton;
 static GtkWidget		*buttonbox;
 static GtkWidget		*limitspinbutton;
@@ -32,6 +37,8 @@
 static gboolean			*usecddb;
 static char				*device;
 static gboolean			*debug;
+static char				*cddbserver;
+static int				*cddbport;
 
 static gboolean			delete_window(GtkWidget *widget, GdkEvent *event, gpointer data);
 static void				button_clicked(GtkWidget *widget, gpointer data);
@@ -40,7 +47,7 @@
 static void				gui_to_values();
 
 
-void configure_set_variables(gboolean *_usedae, int *_limitspeed, gboolean *_usecdtext, gboolean *_usecddb, char *_device, gboolean *_debug)
+void configure_set_variables(gboolean *_usedae, int *_limitspeed, gboolean *_usecdtext, gboolean *_usecddb, char *_device, gboolean *_debug, char *_cddbserver, int *_cddbport)
 {
 	usedae = _usedae;
 	limitspeed = _limitspeed;
@@ -48,6 +55,8 @@
 	usecddb = _usecddb;
 	device = _device;
 	debug = _debug;
+	cddbserver = _cddbserver;
+	cddbport = _cddbport;
 }
 
 void configure_create_gui()
@@ -60,6 +69,7 @@
 	g_signal_connect(G_OBJECT(configwindow), "delete_event", G_CALLBACK(delete_window), NULL);
 
 	maintable = gtk_table_new(4, 2, TRUE);
+	gtk_table_set_homogeneous(GTK_TABLE(maintable), FALSE);
 	gtk_container_add(GTK_CONTAINER(configwindow), maintable);
 
 	daeframe = gtk_frame_new("Digital audio extraction");
@@ -96,6 +106,19 @@
 	usecddbcheckbutton = gtk_check_button_new_with_label("Use CDDB if available");
 	g_signal_connect(G_OBJECT(usecddbcheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL);
 	gtk_table_attach_defaults(GTK_TABLE(titleinfotable), usecddbcheckbutton, 0, 2, 1, 2);
+	
+	cddbserverlabel = gtk_label_new("Server: ");
+	gtk_table_attach_defaults(GTK_TABLE(titleinfotable), cddbserverlabel, 0, 1, 2, 3);
+	
+	cddbportlabel = gtk_label_new("Port: ");
+	gtk_table_attach_defaults(GTK_TABLE(titleinfotable), cddbportlabel, 0, 1, 3, 4);
+	
+	cddbserverentry = gtk_entry_new();
+	gtk_table_attach_defaults(GTK_TABLE(titleinfotable), cddbserverentry, 1, 2, 2, 3);
+	
+	cddbportentry = gtk_entry_new();
+	gtk_table_attach_defaults(GTK_TABLE(titleinfotable), cddbportentry, 1, 2, 3, 4);
+
 
 	usedevicecheckbutton = gtk_check_button_new_with_label("Override default device: ");
 	g_signal_connect(G_OBJECT(usedevicecheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL);
@@ -128,6 +151,10 @@
 	gtk_widget_show(limitspinbutton);
 	gtk_widget_show(usecdtextcheckbutton);
 	gtk_widget_show(usecddbcheckbutton);
+	gtk_widget_show(cddbserverentry);
+	gtk_widget_show(cddbportentry);
+	gtk_widget_show(cddbserverlabel);
+	gtk_widget_show(cddbportlabel);
 	gtk_widget_show(usedevicecheckbutton);
 	gtk_widget_show(deviceentry);
 	gtk_widget_show(debugcheckbutton);
@@ -175,6 +202,9 @@
 		gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(limitcheckbutton)) && 
 		GTK_WIDGET_IS_SENSITIVE(limitcheckbutton));
 
+	gtk_widget_set_sensitive(cddbserverentry, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usecddbcheckbutton)));
+	gtk_widget_set_sensitive(cddbportentry, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usecddbcheckbutton)));
+
 	gtk_widget_set_sensitive(deviceentry, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usedevicecheckbutton)));
 }
 
@@ -191,6 +221,13 @@
 	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(usecdtextcheckbutton), *usecdtext);
 	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(usecddbcheckbutton), *usecddb);
 
+	char portstr[10];
+	sprintf(portstr, "%d", *cddbport);
+	gtk_entry_set_text(GTK_ENTRY(cddbserverentry), cddbserver);
+	gtk_entry_set_text(GTK_ENTRY(cddbportentry), portstr);
+	gtk_widget_set_sensitive(cddbserverentry, *usecddb);
+	gtk_widget_set_sensitive(cddbportentry, *usecddb);
+
 	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(usedevicecheckbutton), strlen(device) > 0);
 
 	gtk_widget_set_sensitive(deviceentry, strlen(device) > 0);
@@ -208,6 +245,8 @@
 		*limitspeed = 0;
 	*usecdtext = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usecdtextcheckbutton));
 	*usecddb = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usecddbcheckbutton));
+	strcpy(cddbserver, gtk_entry_get_text(GTK_ENTRY(cddbserverentry)));
+	*cddbport = strtol(gtk_entry_get_text(GTK_ENTRY(cddbportentry)), NULL, 10);
 	if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usedevicecheckbutton)))
 		strcpy(device, gtk_entry_get_text(GTK_ENTRY(deviceentry)));
 	else
--- a/src/cdaudio-ng/configure.h	Fri Jul 20 10:30:22 2007 -0500
+++ b/src/cdaudio-ng/configure.h	Fri Jul 20 10:30:28 2007 -0500
@@ -2,7 +2,7 @@
 #ifndef CONFIGURE_H
 #define CONFIGURE_H
 
-void				configure_set_variables(gboolean *usedae, int *limitspeed, gboolean *usecdtext, gboolean *usecddb, char *device, gboolean *debug);
+void				configure_set_variables(gboolean *usedae, int *limitspeed, gboolean *usecdtext, gboolean *usecddb, char *device, gboolean *debug, char *cddbserver, int *cddbport);
 void				configure_create_gui();
 void				configure_show_gui();
 
--- a/src/ladspa/ladspa.c	Fri Jul 20 10:30:22 2007 -0500
+++ b/src/ladspa/ladspa.c	Fri Jul 20 10:30:28 2007 -0500
@@ -29,6 +29,7 @@
 
 #include <audacious/plugin.h>
 #include <audacious/configdb.h>
+#include <audacious/i18n.h>
 
 #include "../../config.h"
 #include "ladspa.h"
@@ -217,7 +218,7 @@
   plugin_instance *instance;
 
   instance = g_new0(plugin_instance, 1);
-  
+
   instance->filename = filename;
   instance->library = dlopen(filename, RTLD_NOW);
   if (instance->library == NULL) {
@@ -442,7 +443,7 @@
         if (instance->handle2)
           plugin->connect_port(instance->handle2, port, trash);
       }
-      
+
     } else if (LADSPA_IS_PORT_AUDIO(plugin->PortDescriptors[port])) {
 
       if (LADSPA_IS_PORT_INPUT(plugin->PortDescriptors[port])) {
@@ -490,7 +491,7 @@
   struct dirent *dirent;
   long int k;
   unsigned long int port, input, output;
-  
+
   dir= opendir(path_entry);
   if (dir == NULL) return;
 
@@ -720,7 +721,7 @@
   }
 
   if (no_ui) {
-    widget = gtk_label_new("This LADSPA plugin has no user controls");
+    widget = gtk_label_new(_("This LADSPA plugin has no user controls"));
     gtk_container_add(GTK_CONTAINER(vbox), widget);
   }
 
@@ -765,7 +766,7 @@
 
 static void make_run_clist(void)
 {
-  char * titles[1] = { "Name" };
+  char * titles[1] = { _("Name") };
   GSList *list;
 
   run_clist = gtk_clist_new_with_titles(1, titles);
@@ -851,10 +852,10 @@
   GSList *list;
   GtkWidget *clist;
   char number[14];
-  char * titles[2] = { "UID", "Name" };
+  char * titles[2] = { _("UID"), _("Name") };
   char * line[2];
   gint row;
-  
+
   find_all_plugins();
 
   clist = gtk_clist_new_with_titles(2, titles);
@@ -926,7 +927,7 @@
   vbox= gtk_vbox_new(FALSE, 0);
   hbox= gtk_hbox_new(TRUE, 0);
 
-  frame= gtk_frame_new("Installed plugins");
+  frame= gtk_frame_new(_("Installed plugins"));
   widget = gtk_scrolled_window_new(NULL, NULL);
   gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(widget),
                                  GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
@@ -935,7 +936,7 @@
   gtk_container_add(GTK_CONTAINER(hbox), frame);
 
 
-  frame= gtk_frame_new("Running plugins");
+  frame= gtk_frame_new(_("Running plugins"));
   widget = gtk_scrolled_window_new(NULL, NULL);
   gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(widget),
                                  GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
@@ -950,15 +951,15 @@
   /* Buttons */
   bbox = gtk_hbutton_box_new();
   gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_SPREAD);
-  widget = gtk_button_new_with_label("Add");
+  widget = gtk_button_new_with_label(_("Add"));
   g_signal_connect(G_OBJECT(widget), "clicked",
                      G_CALLBACK(add_plugin_clicked), NULL);
   gtk_box_pack_end_defaults(GTK_BOX(bbox), widget);
-  widget = gtk_button_new_with_label("Remove");
+  widget = gtk_button_new_with_label(_("Remove"));
   g_signal_connect(G_OBJECT(widget), "clicked",
                      G_CALLBACK(remove_plugin_clicked), NULL);
   gtk_box_pack_end_defaults(GTK_BOX(bbox), widget);
-  widget = gtk_button_new_with_label("Configure");
+  widget = gtk_button_new_with_label(_("Configure"));
   g_signal_connect(G_OBJECT(widget), "clicked",
                      G_CALLBACK(configure_plugin_clicked), NULL);
   gtk_box_pack_end_defaults(GTK_BOX(bbox), widget);
@@ -967,7 +968,7 @@
 
   gtk_container_add(GTK_CONTAINER(config_window), vbox);
 
-  gtk_window_set_title(GTK_WINDOW(config_window), "LADSPA Plugin Catalog");
+  gtk_window_set_title(GTK_WINDOW(config_window), _("LADSPA Plugin Catalog"));
   gtk_widget_set_usize(config_window, 380, 400);
   g_signal_connect (G_OBJECT (config_window), "delete_event",
                       G_CALLBACK (gtk_widget_hide_on_delete), NULL);
--- a/src/madplug/configure.c	Fri Jul 20 10:30:22 2007 -0500
+++ b/src/madplug/configure.c	Fri Jul 20 10:30:28 2007 -0500
@@ -51,7 +51,7 @@
         gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sjis));
     audmad_config.show_avg_vbr_bitrate =
         gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(show_avg));
-    audmad_config.force_reopen_audio = 
+    audmad_config.force_reopen_audio =
         gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(reopen));
 
     audmad_config.replaygain.enable =
@@ -174,7 +174,7 @@
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(use_xing),
                                  audmad_config.use_xing);
 
-    sjis = gtk_check_button_new_with_label("Use SJIS to write ID3 tags instead of UTF-8");
+    sjis = gtk_check_button_new_with_label(_("Use SJIS to write ID3 tags instead of UTF-8"));
     gtk_box_pack_start(GTK_BOX(vbox2), sjis, TRUE, TRUE, 0);
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(sjis), audmad_config.sjis);
 
@@ -230,7 +230,7 @@
     gtk_box_pack_start(GTK_BOX(pregain_hbox), label, FALSE, TRUE, 0);
     gtk_box_pack_start(GTK_BOX(pregain_hbox), pregain, FALSE, TRUE, 0);
 
-    gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox2, gtk_label_new("ReplayGain"));
+    gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox2, gtk_label_new(_("ReplayGain")));
 
     vbox2 = gtk_vbox_new(FALSE, 5);
 
--- a/src/madplug/fileinfo.c	Fri Jul 20 10:30:22 2007 -0500
+++ b/src/madplug/fileinfo.c	Fri Jul 20 10:30:28 2007 -0500
@@ -99,7 +99,7 @@
     field = id3_frame_field(frame, 0);
     id3_field_settextencoding(field, audmad_config.sjis ? ID3_FIELD_TEXTENCODING_ISO_8859_1 :
 			      ID3_FIELD_TEXTENCODING_UTF_8);
-        
+
     // setup genre code
     if (!strcmp(frame_name, ID3_FRAME_GENRE)) {
         char *tmp;
@@ -116,7 +116,7 @@
             tmp = g_strdup_printf("%d", index);
             ucs4 = id3_latin1_ucs4duplicate((unsigned char *) tmp);
         }
-        
+
     }
 
     // write string
@@ -154,7 +154,7 @@
     /* read tag from file */
     id3file = id3_file_open(info.filename, ID3_FILE_MODE_READWRITE);
     if (!id3file) {
-        xmms_show_message("File Info", "Couldn't open file!", "Ok",
+        xmms_show_message(_("File Info"), _("Couldn't open file!"), _("Ok"),
                           FALSE, NULL, NULL);
         return;
     }
@@ -176,7 +176,7 @@
 
     text = gtk_editable_get_chars(GTK_EDITABLE(title_entry), 0, -1);
     text2 = g_convert(text, strlen(text), encoding, "UTF-8", NULL, NULL, NULL);
-    
+
     update_id3_frame(id3tag, ID3_FRAME_TITLE, text2);
     free(text);
     free(text2);
@@ -232,7 +232,7 @@
     printf("about to write id3tag\n");
 #endif
     if (id3_file_update(id3file) != 0) {
-        xmms_show_message("File Info", "Couldn't write tag!", "Ok", FALSE,
+        xmms_show_message(_("File Info"), _("Couldn't write tag!"), _("Ok"), FALSE,
                           NULL, NULL);
     }
     id3_file_close(id3file);
@@ -309,7 +309,7 @@
     gtk_box_pack_start(GTK_BOX(filename_hbox), pixmapwid, FALSE, FALSE,
                        0);
 
-    label = gtk_label_new("<b>Name:</b>");
+    label = gtk_label_new(_("<b>Name:</b>"));
     gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
     gtk_box_pack_start(GTK_BOX(filename_hbox), label, FALSE, TRUE, 0);
     filename_entry = gtk_entry_new();
@@ -404,7 +404,7 @@
     gtk_container_set_border_width(GTK_CONTAINER(table), 5);
     gtk_container_add(GTK_CONTAINER(id3_frame), table);
 
-    label = gtk_label_new("Title:");
+    label = gtk_label_new(_("Title:"));
     gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
     gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, GTK_FILL,
                      GTK_FILL, 5, 5);
@@ -414,7 +414,7 @@
                      GTK_FILL | GTK_EXPAND | GTK_SHRINK,
                      GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 5);
 
-    label = gtk_label_new("Artist:");
+    label = gtk_label_new(_("Artist:"));
     gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
     gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, GTK_FILL,
                      GTK_FILL, 5, 5);
@@ -424,7 +424,7 @@
                      GTK_FILL | GTK_EXPAND | GTK_SHRINK,
                      GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 5);
 
-    label = gtk_label_new("Album:");
+    label = gtk_label_new(_("Album:"));
     gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
     gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, GTK_FILL,
                      GTK_FILL, 5, 5);
@@ -434,7 +434,7 @@
                      GTK_FILL | GTK_EXPAND | GTK_SHRINK,
                      GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 5);
 
-    label = gtk_label_new("Comment:");
+    label = gtk_label_new(_("Comment:"));
     gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
     gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4, GTK_FILL,
                      GTK_FILL, 5, 5);
@@ -444,7 +444,7 @@
                      GTK_FILL | GTK_EXPAND | GTK_SHRINK,
                      GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 5);
 
-    label = gtk_label_new("Year:");
+    label = gtk_label_new(_("Year:"));
     gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
     gtk_table_attach(GTK_TABLE(table), label, 0, 1, 4, 5, GTK_FILL,
                      GTK_FILL, 5, 5);
@@ -455,7 +455,7 @@
                      GTK_FILL | GTK_EXPAND | GTK_SHRINK,
                      GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 5);
 
-    label = gtk_label_new("Track number:");
+    label = gtk_label_new(_("Track number:"));
     gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
     gtk_table_attach(GTK_TABLE(table), label, 2, 3, 4, 5, GTK_FILL,
                      GTK_FILL, 5, 5);
@@ -466,7 +466,7 @@
                      GTK_FILL | GTK_EXPAND | GTK_SHRINK,
                      GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 5);
 
-    label = gtk_label_new("Genre:");
+    label = gtk_label_new(_("Genre:"));
     gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
     gtk_table_attach(GTK_TABLE(table), label, 0, 1, 5, 6, GTK_FILL,
                      GTK_FILL, 5, 5);
@@ -479,7 +479,7 @@
         const id3_ucs4_t *ucs4 = id3_genre_index(i);
 
         //add "Unknown" to the first. we must shift index.
-        genre_list = g_list_append(genre_list, "Unknown");
+        genre_list = g_list_append(genre_list, _("Unknown"));
 
         while (ucs4) {
             genre_list =
@@ -520,7 +520,7 @@
                              G_CALLBACK(change_buttons), save);
     g_signal_connect_swapped(G_OBJECT(tracknum_entry), "changed",
                              G_CALLBACK(change_buttons), save);
-        
+
     g_signal_connect_swapped(G_OBJECT(GTK_COMBO(genre_combo)->entry), "changed",
                                  G_CALLBACK(change_buttons), save);
 
@@ -608,7 +608,7 @@
     info.fileinfo_request = TRUE;
     input_get_info(&info, info.remote ? TRUE : FALSE);
 
-    title = g_strdup_printf("File Info - %s", g_basename(utf_filename));
+    title = g_strdup_printf(_("File Info - %s"), g_basename(utf_filename));
     gtk_window_set_title(GTK_WINDOW(window), title);
     g_free(title);
 
@@ -638,19 +638,19 @@
 
     id3_frame_to_entry(ID3_FRAME_TRACK, GTK_ENTRY(tracknum_entry));
     id3_frame_to_entry(ID3_FRAME_COMMENT, GTK_ENTRY(comment_entry));
-    snprintf(message, 127, "Layer %s", layer_str[info.mpeg_layer - 1]);
+    snprintf(message, 127, _("Layer %s"), layer_str[info.mpeg_layer - 1]);
     gtk_label_set_text(GTK_LABEL(mpeg_level), message);
     if (info.vbr) {
-        snprintf(message, 127, "VBR (avg. %d kbps)", info.bitrate / 1000);
+        snprintf(message, 127, _("VBR (avg. %d kbps)"), info.bitrate / 1000);
     }
     else {
         snprintf(message, 127, "%d kbps", info.bitrate / 1000);
     }
     gtk_label_set_text(GTK_LABEL(mpeg_bitrate), message);
-    snprintf(message, 127, "%d Hz", info.freq);
+    snprintf(message, 127, _("%d Hz"), info.freq);
     gtk_label_set_text(GTK_LABEL(mpeg_samplerate), message);
     if (info.frames != -1) {
-        snprintf(message, 127, "%d frames", info.frames);
+        snprintf(message, 127, _("%d frames"), info.frames);
         gtk_label_set_text(GTK_LABEL(mpeg_frames), message);
     }
     else {
@@ -659,12 +659,12 @@
     gtk_label_set_text(GTK_LABEL(mpeg_flags), mode_str[info.mode]);
     {
         guint sec = mad_timer_count(info.duration, MAD_UNITS_SECONDS);
-        snprintf(message, 127, "%d:%02d (%d seconds)", sec /60 ,sec % 60, sec);
+        snprintf(message, 127, _("%d:%02d (%d seconds)"), sec /60 ,sec % 60, sec);
     }
     gtk_label_set_text(GTK_LABEL(mpeg_duration), message);
 
     if (info.replaygain_album_str != NULL) {
-        snprintf(message, 127, "RG_album=%4s (x%4.2f)",
+        snprintf(message, 127, _("RG_album=%4s (x%4.2f)"),
                  info.replaygain_album_str, info.replaygain_album_scale);
         gtk_label_set_text(GTK_LABEL(mpeg_replaygain), message);
     }
@@ -672,7 +672,7 @@
         gtk_label_set_text(GTK_LABEL(mpeg_replaygain), "");
 
     if (info.replaygain_track_str != NULL) {
-        snprintf(message, 127, "RG_track=%4s (x%4.2f)",
+        snprintf(message, 127, _("RG_track=%4s (x%4.2f)"),
                  info.replaygain_track_str, info.replaygain_track_scale);
         gtk_label_set_text(GTK_LABEL(mpeg_replaygain2), message);
     }
@@ -680,7 +680,7 @@
         gtk_label_set_text(GTK_LABEL(mpeg_replaygain2), "");
 
     if (info.replaygain_album_peak_str != NULL) {
-        snprintf(message, 127, "Peak album=%4s (%+5.3fdBFS)",
+        snprintf(message, 127, _("Peak album=%4s (%+5.3fdBFS)"),
                  info.replaygain_album_peak_str,
                  20 * log10(info.replaygain_album_peak));
         gtk_label_set_text(GTK_LABEL(mpeg_replaygain3), message);
@@ -689,7 +689,7 @@
         gtk_label_set_text(GTK_LABEL(mpeg_replaygain3), "");
 
     if (info.replaygain_track_peak_str != NULL) {
-        snprintf(message, 127, "Peak track=%4s (%+5.3fdBFS)",
+        snprintf(message, 127, _("Peak track=%4s (%+5.3fdBFS)"),
                  info.replaygain_track_peak_str,
                  20 * log10(info.replaygain_track_peak));
         gtk_label_set_text(GTK_LABEL(mpeg_replaygain4), message);
@@ -698,7 +698,7 @@
         gtk_label_set_text(GTK_LABEL(mpeg_replaygain3), "");
 
     if (info.mp3gain_undo_str != NULL) {
-        snprintf(message, 127, "mp3gain undo=%4s (%+5.3fdB)",
+        snprintf(message, 127, _("mp3gain undo=%4s (%+5.3fdB)"),
                  info.mp3gain_undo_str, info.mp3gain_undo);
         gtk_label_set_text(GTK_LABEL(mp3gain1), message);
     }
@@ -706,7 +706,7 @@
         gtk_label_set_text(GTK_LABEL(mp3gain1), "");
 
     if (info.mp3gain_minmax_str != NULL) {
-        snprintf(message, 127, "mp3gain minmax=%4s (max-min=%+6.3fdB)",
+        snprintf(message, 127, _("mp3gain minmax=%4s (max-min=%+6.3fdB)"),
                  info.mp3gain_minmax_str, info.mp3gain_minmax);
         gtk_label_set_text(GTK_LABEL(mp3gain2), message);
     }
--- a/src/madplug/plugin.c	Fri Jul 20 10:30:22 2007 -0500
+++ b/src/madplug/plugin.c	Fri Jul 20 10:30:28 2007 -0500
@@ -89,7 +89,7 @@
 
 void audmad_config_compute(struct audmad_config_t *config)
 {
-    /* set some config parameters by parsing text fields 
+    /* set some config parameters by parsing text fields
        (RG default gain, etc..)
      */
     const gchar *text;
@@ -218,7 +218,7 @@
     sampleIndex = (head >> 10) & 0x3;
     if (sampleIndex == 0x3)
         return FALSE;
-    
+
     /* check version bits (19-20) and get bitRate */
     version = (head >> 19) & 0x03;
     switch (version) {
@@ -229,22 +229,22 @@
             else
                 bitRate = mp3_bitrate_table[4][bitIndex];
             break;
-             
+
         case 1: /* 01 = reserved */
             return FALSE;
-        
+
         case 3: /* 11 = MPEG Version 1 */
             bitRate = mp3_bitrate_table[layer][bitIndex];
             break;
-        
+
         default:
             return FALSE;
     }
-    
+
     /* check layer II restrictions vs. bitrate */
     if (layer == 2) {
         gint chanMode = (head >> 6) & 0x3;
-        
+
         if (chanMode == 0x3) {
             /* single channel with bitrate > 192 */
             if (bitRate > 192)
@@ -258,15 +258,15 @@
                 return FALSE;
         }
     }
-    
+
     /* calculate approx. frame size */
     padding = (head >> 9) & 1;
     sampleRate = mp3_samplerate_table[version][sampleIndex];
     if (layer == 1)
-        *frameSize = ((12 * bitRate * 1000 / sampleRate) + padding) * 4; 
+        *frameSize = ((12 * bitRate * 1000 / sampleRate) + padding) * 4;
     else
         *frameSize = (144 * bitRate * 1000) / (sampleRate + padding);
-    
+
     /* check if bits 16 - 19 are all set (MPEG 1 Layer I, not protected?) */
     if (((head >> 19) & 1) == 1 &&
         ((head >> 17) & 3) == 3 && ((head >> 16) & 1) == 1)
@@ -288,9 +288,9 @@
 
 gboolean audmad_is_remote(gchar *url)
 {
-    if (!strncasecmp("http://", url, 7) 
+    if (!strncasecmp("http://", url, 7)
         || !strncasecmp("https://", url, 8)
-        || !strncasecmp("lastfm://", url, 9)) 
+        || !strncasecmp("lastfm://", url, 9))
         return TRUE;
     else
         return FALSE;
@@ -313,7 +313,7 @@
 
     /* I've seen some flac files beginning with id3 frames..
        so let's exclude known non-mp3 filename extensions */
-    if ((ext != NULL) && 
+    if ((ext != NULL) &&
         (!strcasecmp("flac", ext) || !strcasecmp("mpc", ext) ||
          !strcasecmp("tta", ext)  || !strcasecmp("ogg", ext) ||
          !strcasecmp("wma", ext) )
@@ -342,7 +342,7 @@
     {
         vfs_fseek(fin, 4, SEEK_CUR);
         if(vfs_fread(buf, 1, 4, fin) == 0) {
-            gchar *tmp = g_filename_to_utf8(filename, -1, NULL, NULL, NULL);            
+            gchar *tmp = g_filename_to_utf8(filename, -1, NULL, NULL, NULL);
             g_message("vfs_fread failed @2 %s", tmp);
             g_free(tmp);
             return 0;
@@ -458,9 +458,9 @@
     if (rtn == FALSE) {
         g_message("error reading input info");
         /*
-         * return; 
-         * commenting this return seems to be a hacky fix for the damn lastfm plugin playback 
-         * that used to work only for nenolod because of his fsck-ing lastfm subscription :p 
+         * return;
+         * commenting this return seems to be a hacky fix for the damn lastfm plugin playback
+         * that used to work only for nenolod because of his fsck-ing lastfm subscription :p
         */
     }
     g_mutex_lock(pb_mutex);
@@ -542,7 +542,7 @@
         return;
 
     scratch = g_strdup_printf(
-	"Audacious MPEG Audio Plugin\n"
+	_("Audacious MPEG Audio Plugin\n"
 	"\n"
 	"Compiled against libMAD version: %d.%d.%d%s\n"
 	"\n"
@@ -554,13 +554,13 @@
 	"    Sam Clegg\n"
 	"\n"
 	"ReplayGain support by:\n"
-	"    Samuel Krempp",
+	"    Samuel Krempp"),
 	MAD_VERSION_MAJOR, MAD_VERSION_MINOR, MAD_VERSION_PATCH,
 	MAD_VERSION_EXTRA);
 
-    aboutbox = xmms_show_message("About MPEG Audio Plugin",
+    aboutbox = xmms_show_message(_("About MPEG Audio Plugin"),
                                  scratch,
-                                 "Ok", FALSE, NULL, NULL);
+                                 _("Ok"), FALSE, NULL, NULL);
 
     g_free(scratch);
 
@@ -583,7 +583,7 @@
         va_end(args);
         GDK_THREADS_ENTER();
         error_dialog =
-            xmms_show_message("Error", string, "Ok", FALSE, 0, 0);
+            xmms_show_message(_("Error"), string, _("Ok"), FALSE, 0, 0);
         gtk_signal_connect(GTK_OBJECT(error_dialog), "destroy",
                            GTK_SIGNAL_FUNC(gtk_widget_destroyed),
                            &error_dialog);
@@ -693,7 +693,7 @@
                 tuple->length = atoi(string);
 #ifdef DEBUG
                 g_message("get_song_tuple: TLEN = %d", tuple->length);
-#endif	
+#endif
                 g_free(string);
                 string = NULL;
             }
--- a/src/modplug/gui/interface.cxx	Fri Jul 20 10:30:22 2007 -0500
+++ b/src/modplug/gui/interface.cxx	Fri Jul 20 10:30:28 2007 -0500
@@ -113,7 +113,7 @@
 
   Config = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   gtk_object_set_data (GTK_OBJECT (Config), "Config", Config);
-  gtk_widget_set_usize (Config, 350, -2);
+  gtk_widget_set_usize (Config, -1, -1);
   gtk_window_set_title (GTK_WINDOW (Config), _("ModPlug Configuration"));
   gtk_window_set_policy (GTK_WINDOW (Config), FALSE, FALSE, FALSE);
 
@@ -789,7 +789,7 @@
 
   Info = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   gtk_object_set_data (GTK_OBJECT (Info), "Info", Info);
-  gtk_widget_set_usize (Info, 290, 264);
+  gtk_widget_set_usize (Info, -1, 264);
   gtk_window_set_title (GTK_WINDOW (Info), _("MOD Info"));
 
   vbox14 = gtk_vbox_new (FALSE, 0);
--- a/src/musepack/libmpc.cxx	Fri Jul 20 10:30:22 2007 -0500
+++ b/src/musepack/libmpc.cxx	Fri Jul 20 10:30:28 2007 -0500
@@ -142,9 +142,9 @@
         gdk_window_raise(aboutBox->window);
     else
     {
-        char* titleText      = g_strdup_printf("Musepack Decoder Plugin 1.2");
-        const char* contentText = "Plugin code by\nBenoit Amiaux\nMartin Spuler\nKuniklo\n\nGet latest version at http://musepack.net\n";
-        const char* buttonText  = "Nevermind";
+        char* titleText      = g_strdup_printf(_("Musepack Decoder Plugin 1.2"));
+        const char* contentText = _("Plugin code by\nBenoit Amiaux\nMartin Spuler\nKuniklo\n\nGet latest version at http://musepack.net\n");
+        const char* buttonText  = _("Nevermind");
         aboutBox = xmms_show_message(titleText, contentText, buttonText, FALSE, NULL, NULL);
         widgets.aboutBox = aboutBox;
         g_signal_connect(G_OBJECT(aboutBox), "destroy", G_CALLBACK(gtk_widget_destroyed), &widgets.aboutBox);
@@ -162,7 +162,7 @@
         gtk_window_set_type_hint(GTK_WINDOW(configBox), GDK_WINDOW_TYPE_HINT_DIALOG);
         widgets.configBox = configBox;
         g_signal_connect(G_OBJECT(configBox), "destroy", G_CALLBACK(gtk_widget_destroyed), &widgets.configBox);
-        gtk_window_set_title(GTK_WINDOW(configBox), "Musepack Decoder Configuration");
+        gtk_window_set_title(GTK_WINDOW(configBox), _("Musepack Decoder Configuration"));
         gtk_window_set_policy(GTK_WINDOW(configBox), FALSE, FALSE, FALSE);
         gtk_container_border_width(GTK_CONTAINER(configBox), 10);
 
@@ -172,38 +172,38 @@
         gtk_container_add(GTK_CONTAINER(configBox), vbox);
 
         //General Settings Tab
-        GtkWidget* generalSet = gtk_frame_new("General Settings");
+        GtkWidget* generalSet = gtk_frame_new(_("General Settings"));
         gtk_container_border_width(GTK_CONTAINER(generalSet), 5);
 
         GtkWidget* gSvbox = gtk_vbox_new(FALSE, 10);
         gtk_container_border_width(GTK_CONTAINER(gSvbox), 5);
         gtk_container_add(GTK_CONTAINER(generalSet), gSvbox);
 
-        GtkWidget* bitrateCheck = gtk_check_button_new_with_label("Enable Dynamic Bitrate Display");
+        GtkWidget* bitrateCheck = gtk_check_button_new_with_label(_("Enable Dynamic Bitrate Display"));
         widgets.bitrateCheck = bitrateCheck;
         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(bitrateCheck), pluginConfig.dynamicBitrate);
         gtk_box_pack_start(GTK_BOX(gSvbox), bitrateCheck, FALSE, FALSE, 0);
-        gtk_notebook_append_page(GTK_NOTEBOOK(notebook), generalSet, gtk_label_new("Plugin"));
+        gtk_notebook_append_page(GTK_NOTEBOOK(notebook), generalSet, gtk_label_new(_("Plugin")));
 
         //ReplayGain Settings Tab
-        GtkWidget* replaygainSet = gtk_frame_new("ReplayGain Settings");
+        GtkWidget* replaygainSet = gtk_frame_new(_("ReplayGain Settings"));
         gtk_container_border_width(GTK_CONTAINER(replaygainSet), 5);
 
         GtkWidget* rSVbox = gtk_vbox_new(FALSE, 10);
         gtk_container_border_width(GTK_CONTAINER(rSVbox), 5);
         gtk_container_add(GTK_CONTAINER(replaygainSet), rSVbox);
 
-        GtkWidget* clippingCheck = gtk_check_button_new_with_label("Enable Clipping Prevention");
+        GtkWidget* clippingCheck = gtk_check_button_new_with_label(_("Enable Clipping Prevention"));
         widgets.clippingCheck = clippingCheck;
         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(clippingCheck), pluginConfig.clipPrevention);
         gtk_box_pack_start(GTK_BOX(rSVbox), clippingCheck, FALSE, FALSE, 0);
 
-        GtkWidget* replaygainCheck = gtk_check_button_new_with_label("Enable ReplayGain");
+        GtkWidget* replaygainCheck = gtk_check_button_new_with_label(_("Enable ReplayGain"));
         widgets.replaygainCheck = replaygainCheck;
         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(replaygainCheck), pluginConfig.replaygain);
         gtk_box_pack_start(GTK_BOX(rSVbox), replaygainCheck, FALSE, FALSE, 0);
 
-        GtkWidget* replaygainType = gtk_frame_new("ReplayGain Type");
+        GtkWidget* replaygainType = gtk_frame_new(_("ReplayGain Type"));
         gtk_box_pack_start(GTK_BOX(rSVbox), replaygainType, FALSE, FALSE, 0);
         g_signal_connect(G_OBJECT(replaygainCheck), "toggled", G_CALLBACK(toggleSwitch), replaygainType);
 
@@ -211,16 +211,16 @@
         gtk_container_set_border_width(GTK_CONTAINER(rgVbox), 5);
         gtk_container_add(GTK_CONTAINER(replaygainType), rgVbox);
 
-        GtkWidget* trackCheck = gtk_radio_button_new_with_label(NULL, "Use Track Gain");
+        GtkWidget* trackCheck = gtk_radio_button_new_with_label(NULL, _("Use Track Gain"));
         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(trackCheck), !pluginConfig.albumGain);
         gtk_box_pack_start(GTK_BOX(rgVbox), trackCheck, FALSE, FALSE, 0);
 
-        GtkWidget* albumCheck = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(trackCheck)), "Use Album Gain");
+        GtkWidget* albumCheck = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(trackCheck)), _("Use Album Gain"));
         widgets.albumCheck = albumCheck;
         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(albumCheck), pluginConfig.albumGain);
         gtk_box_pack_start(GTK_BOX(rgVbox), albumCheck, FALSE, FALSE, 0);
         gtk_widget_set_sensitive(replaygainType, pluginConfig.replaygain);
-        gtk_notebook_append_page(GTK_NOTEBOOK(notebook), replaygainSet, gtk_label_new("ReplayGain"));
+        gtk_notebook_append_page(GTK_NOTEBOOK(notebook), replaygainSet, gtk_label_new(_("ReplayGain")));
 
         //Buttons
         GtkWidget* buttonBox = gtk_hbutton_box_new();
@@ -228,12 +228,12 @@
         gtk_button_box_set_spacing(GTK_BUTTON_BOX(buttonBox), 5);
         gtk_box_pack_start(GTK_BOX(vbox), buttonBox, FALSE, FALSE, 0);
 
-        GtkWidget* okButton = gtk_button_new_with_label("Ok");
+        GtkWidget* okButton = gtk_button_new_with_label(_("Ok"));
         g_signal_connect(G_OBJECT(okButton), "clicked", G_CALLBACK(saveConfigBox), NULL);
         GTK_WIDGET_SET_FLAGS(okButton, GTK_CAN_DEFAULT);
         gtk_box_pack_start(GTK_BOX(buttonBox), okButton, TRUE, TRUE, 0);
 
-        GtkWidget* cancelButton = gtk_button_new_with_label("Cancel");
+        GtkWidget* cancelButton = gtk_button_new_with_label(_("Cancel"));
         g_signal_connect_swapped(G_OBJECT(cancelButton), "clicked", G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(widgets.configBox));
         GTK_WIDGET_SET_FLAGS(cancelButton, GTK_CAN_DEFAULT);
         gtk_widget_grab_default(cancelButton);
@@ -479,7 +479,7 @@
         GtkWidget* filenameHbox = gtk_hbox_new(FALSE, 5);
         gtk_box_pack_start(GTK_BOX(iVbox), filenameHbox, FALSE, TRUE, 0);
 
-        GtkWidget* fileLabel = gtk_label_new("Filename:");
+        GtkWidget* fileLabel = gtk_label_new(_("Filename:"));
         gtk_box_pack_start(GTK_BOX(filenameHbox), fileLabel, FALSE, TRUE, 0);
 
         GtkWidget* fileEntry = gtk_entry_new();
@@ -494,7 +494,7 @@
         gtk_box_pack_start(GTK_BOX(iHbox), leftBox, FALSE, FALSE, 0);
 
         //Tag labels
-        GtkWidget* tagFrame = gtk_frame_new("Musepack Tag");
+        GtkWidget* tagFrame = gtk_frame_new(_("Musepack Tag"));
         gtk_box_pack_start(GTK_BOX(leftBox), tagFrame, FALSE, FALSE, 0);
         gtk_widget_set_sensitive(tagFrame, TRUE);
 
@@ -502,33 +502,33 @@
         gtk_container_set_border_width(GTK_CONTAINER(iTable), 5);
         gtk_container_add(GTK_CONTAINER(tagFrame), iTable);
 
-        mpcGtkTagLabel("Title:", 0, 1, 0, 1, iTable);
+        mpcGtkTagLabel(_("Title:"), 0, 1, 0, 1, iTable);
         GtkWidget* titleEntry = mpcGtkTagEntry(1, 4, 0, 1, 0, iTable);
         widgets.titleEntry = titleEntry;
 
-        mpcGtkTagLabel("Artist:", 0, 1, 1, 2, iTable);
+        mpcGtkTagLabel(_("Artist:"), 0, 1, 1, 2, iTable);
         GtkWidget* artistEntry = mpcGtkTagEntry(1, 4, 1, 2, 0, iTable);
         widgets.artistEntry = artistEntry;
 
-        mpcGtkTagLabel("Album:", 0, 1, 2, 3, iTable);
+        mpcGtkTagLabel(_("Album:"), 0, 1, 2, 3, iTable);
         GtkWidget* albumEntry = mpcGtkTagEntry(1, 4, 2, 3, 0, iTable);
         widgets.albumEntry = albumEntry;
 
-        mpcGtkTagLabel("Comment:", 0, 1, 3, 4, iTable);
+        mpcGtkTagLabel(_("Comment:"), 0, 1, 3, 4, iTable);
         GtkWidget* commentEntry = mpcGtkTagEntry(1, 4, 3, 4, 0, iTable);
         widgets.commentEntry = commentEntry;
 
-        mpcGtkTagLabel("Year:", 0, 1, 4, 5, iTable);
+        mpcGtkTagLabel(_("Year:"), 0, 1, 4, 5, iTable);
         GtkWidget* yearEntry = mpcGtkTagEntry(1, 2, 4, 5, 4, iTable);
         widgets.yearEntry = yearEntry;
         gtk_widget_set_usize(yearEntry, 4, -1);
 
-        mpcGtkTagLabel("Track:", 2, 3, 4, 5, iTable);
+        mpcGtkTagLabel(_("Track:"), 2, 3, 4, 5, iTable);
         GtkWidget* trackEntry = mpcGtkTagEntry(3, 4, 4, 5, 4, iTable);
         widgets.trackEntry = trackEntry;
         gtk_widget_set_usize(trackEntry, 3, -1);
 
-        mpcGtkTagLabel("Genre:", 0, 1, 5, 6, iTable);
+        mpcGtkTagLabel(_("Genre:"), 0, 1, 5, 6, iTable);
         GtkWidget* genreEntry = mpcGtkTagEntry(1, 4, 5, 6, 0, iTable);
         widgets.genreEntry = genreEntry;
         gtk_widget_set_usize(genreEntry, 20, -1);
@@ -539,18 +539,18 @@
         gtk_button_box_set_spacing(GTK_BUTTON_BOX(buttonBox), 5);
         gtk_box_pack_start(GTK_BOX(leftBox), buttonBox, FALSE, FALSE, 0);
 
-        GtkWidget* saveButton = mpcGtkButton("Save", buttonBox);
+        GtkWidget* saveButton = mpcGtkButton(_("Save"), buttonBox);
         g_signal_connect(G_OBJECT(saveButton), "clicked", G_CALLBACK(saveTags), NULL);
 
-        GtkWidget* removeButton = mpcGtkButton("Remove Tag", buttonBox);
+        GtkWidget* removeButton = mpcGtkButton(_("Remove Tag"), buttonBox);
         g_signal_connect_swapped(G_OBJECT(removeButton), "clicked", G_CALLBACK(removeTags), NULL);
 
-        GtkWidget* cancelButton = mpcGtkButton("Cancel", buttonBox);
+        GtkWidget* cancelButton = mpcGtkButton(_("Cancel"), buttonBox);
         g_signal_connect_swapped(G_OBJECT(cancelButton), "clicked", G_CALLBACK(closeInfoBox), NULL);
         gtk_widget_grab_default(cancelButton);
 
         //File information
-        GtkWidget* infoFrame = gtk_frame_new("Musepack Info");
+        GtkWidget* infoFrame = gtk_frame_new(_("Musepack Info"));
         gtk_box_pack_start(GTK_BOX(iHbox), infoFrame, FALSE, FALSE, 0);
 
         GtkWidget* infoVbox = gtk_vbox_new(FALSE, 5);
@@ -583,18 +583,18 @@
             int minutes = time / 60;
             int seconds = time % 60;
 
-            mpcGtkPrintLabel(streamLabel,    "Streamversion %d", info.stream_version);
-            mpcGtkPrintLabel(encoderLabel,   "Encoder: \%s", info.encoder);
-            mpcGtkPrintLabel(profileLabel,   "Profile: \%s", info.profile_name);
-            mpcGtkPrintLabel(bitrateLabel,   "Average bitrate: \%6.1f kbps", info.average_bitrate * 1.e-3);
-            mpcGtkPrintLabel(rateLabel,      "Samplerate: \%d Hz", info.sample_freq);
-            mpcGtkPrintLabel(channelsLabel,  "Channels: \%d", info.channels);
-            mpcGtkPrintLabel(lengthLabel,    "Length: \%d:\%.2d", minutes, seconds);
-            mpcGtkPrintLabel(fileSizeLabel,  "File size: \%d Bytes", info.total_file_length);
-            mpcGtkPrintLabel(trackPeakLabel, "Track Peak: \%5u", info.peak_title);
-            mpcGtkPrintLabel(trackGainLabel, "Track Gain: \%-+2.2f dB", 0.01 * info.gain_title);
-            mpcGtkPrintLabel(albumPeakLabel, "Album Peak: \%5u", info.peak_album);
-            mpcGtkPrintLabel(albumGainLabel, "Album Gain: \%-+5.2f dB", 0.01 * info.gain_album);
+            mpcGtkPrintLabel(streamLabel,    _("Streamversion %d"), info.stream_version);
+            mpcGtkPrintLabel(encoderLabel,   _("Encoder: %s"), info.encoder);
+            mpcGtkPrintLabel(profileLabel,   _("Profile: %s"), info.profile_name);
+            mpcGtkPrintLabel(bitrateLabel,   _("Average bitrate: %6.1f kbps"), info.average_bitrate * 1.e-3);
+            mpcGtkPrintLabel(rateLabel,      _("Samplerate: %d Hz"), info.sample_freq);
+            mpcGtkPrintLabel(channelsLabel,  _("Channels: %d"), info.channels);
+            mpcGtkPrintLabel(lengthLabel,    _("Length: %d:\%.2d"), minutes, seconds);
+            mpcGtkPrintLabel(fileSizeLabel,  _("File size: %d Bytes"), info.total_file_length);
+            mpcGtkPrintLabel(trackPeakLabel, _("Track Peak: %5u"), info.peak_title);
+            mpcGtkPrintLabel(trackGainLabel, _("Track Gain: %-+2.2f dB"), 0.01 * info.gain_title);
+            mpcGtkPrintLabel(albumPeakLabel, _("Album Peak: %5u"), info.peak_album);
+            mpcGtkPrintLabel(albumGainLabel, _("Album Gain: %-+5.2f dB"), 0.01 * info.gain_album);
 
             MpcInfo tags = getTags(p_Filename);
             gtk_entry_set_text(GTK_ENTRY(titleEntry),   tags.title);
@@ -622,7 +622,7 @@
         }
 
 	char* name = g_filename_display_basename(p_Filename);
-        char* text = g_strdup_printf("File Info - %s", name);
+        char* text = g_strdup_printf(_("File Info - %s"), name);
         free(name);
         gtk_window_set_title(GTK_WINDOW(infoBox), text);
         free(text);
--- a/src/musepack/libmpc.h	Fri Jul 20 10:30:22 2007 -0500
+++ b/src/musepack/libmpc.h	Fri Jul 20 10:30:28 2007 -0500
@@ -10,6 +10,8 @@
 #include "audacious/configdb.h"
 #include "audacious/titlestring.h"
 #include "audacious/vfs.h"
+#include <audacious/i18n.h>
+#include "../../config.h"
 }
 
 //stdlib headers
--- a/src/null/null.c	Fri Jul 20 10:30:22 2007 -0500
+++ b/src/null/null.c	Fri Jul 20 10:30:28 2007 -0500
@@ -2,7 +2,7 @@
  *  Copyright 2006 Christian Birchinger <joker@netswarm.net>
  *
  *  Based on the XMMS plugin:
- *  Copyright 2000 Håvard Kvålen <havardk@sol.no>
+ *  Copyright 2000 H�vard Kv�len <havardk@sol.no>
  *
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -53,15 +53,21 @@
 static void null_about(void)
 {
 	static GtkWidget *about;
+	gchar *about_text;
 
 	if (about)
 		return;
+
+	about_text = g_strjoin("", _("Null output plugin "), VERSION,
+			           _(" by Christian Birchinger <joker@netswarm.net>\n"
+			             "based on the XMMS plugin by Håvard Kvål <havardk@xmms.org>"), NULL);
+
 	about = xmms_show_message(_("About Null Output"),
-				  _("Null output plugin " VERSION
-				  " by Christian Birchinger <joker@netswarm.net>\n"
-				  " based on the XMMS plugin by Håvard Kvål <havardk@xmms.org>"),
+				  about_text,
 				  _("Ok"), FALSE, NULL, NULL);
 
+	g_free(about_text);
+
 	g_signal_connect(G_OBJECT(about), "destroy",
 			 G_CALLBACK(gtk_widget_destroyed), &about);
 }
@@ -84,9 +90,9 @@
 
 	if (configurewin)
 		return;
-	
+
 	configurewin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-	gtk_window_set_title(GTK_WINDOW(configurewin), "Null output preferences");
+	gtk_window_set_title(GTK_WINDOW(configurewin), _("Null output preferences"));
 	gtk_window_set_policy(GTK_WINDOW(configurewin), FALSE, FALSE, FALSE);
 	gtk_container_set_border_width(GTK_CONTAINER(configurewin), 10);
 	gtk_signal_connect(GTK_OBJECT(configurewin), "destroy",
@@ -95,15 +101,15 @@
 	vbox = gtk_vbox_new(FALSE, 10);
 	gtk_container_add(GTK_CONTAINER(configurewin), vbox);
 
-	rt_btn = gtk_check_button_new_with_label("Run in real time");
+	rt_btn = gtk_check_button_new_with_label(_("Run in real time"));
 	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rt_btn), real_time);
 	gtk_box_pack_start(GTK_BOX(vbox), rt_btn, FALSE, FALSE, 0);
 	bbox = gtk_hbutton_box_new();
 	gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
 	gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5);
 	gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
-	ok_button = gtk_button_new_with_label("Ok");
-	cancel_button = gtk_button_new_with_label("Cancel");
+	ok_button = gtk_button_new_with_label(_("Ok"));
+	cancel_button = gtk_button_new_with_label(_("Cancel"));
 	GTK_WIDGET_SET_FLAGS(ok_button, GTK_CAN_DEFAULT);
 	GTK_WIDGET_SET_FLAGS(cancel_button, GTK_CAN_DEFAULT);
 	gtk_widget_grab_default(ok_button);
@@ -159,7 +165,7 @@
 		ep->mod_samples(&ptr, length, input_format.format,
 				input_format.frequency, input_format.channels);
 #endif
-	
+
 	written += length;
 }
 
@@ -183,7 +189,7 @@
 	paused = p;
 	if (!timer)
 		return;
-	
+
 	if (paused)
 		g_timer_stop(timer);
 	else
@@ -212,7 +218,7 @@
 {
 	if (!timer)
 		return FALSE;
-	
+
 	if ((gdouble)(written * 1000) / bps > ELAPSED_TIME)
 		return TRUE;
 	return FALSE;
@@ -229,7 +235,7 @@
 {
 	if (!timer)
 		return null_get_written_time();
-	
+
 	return ELAPSED_TIME;
 }
 
@@ -239,7 +245,7 @@
 	NULL,
 	"Null Output Plugin",
 	null_init,
-	NULL,			/* cleanup */ 
+	NULL,			/* cleanup */
 	null_about,
 	null_configure,
 	NULL,			/* Get volume */