Mercurial > audlegacy-plugins
changeset 1300:c198ae31bb74
Automated merge with ssh://hg.atheme.org//hg/audacious-plugins
author | William Pitcock <nenolod@atheme-project.org> |
---|---|
date | Thu, 19 Jul 2007 12:56:04 -0500 |
parents | 7184bbd63761 (current diff) 94eee8a16189 (diff) |
children | df5d07d7ca7c 51bf0e431e02 |
files | |
diffstat | 22 files changed, 522 insertions(+), 397 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac Thu Jul 19 12:55:56 2007 -0500 +++ b/configure.ac Thu Jul 19 12:56:04 2007 -0500 @@ -1316,6 +1316,10 @@ if test "$have_projectm" = "yes"; then PKG_CHECK_MODULES(LIBPROJECTM, libprojectM >= 0.0.0, [have_projectm="yes"], [have_projectm="no"]) + AM_PATH_SDL(1.2.5, , [ + AC_MSG_WARN([*** SDL is not installed. projectM will not be built. ***]) + have_projectm="no" + ]) if test x$libprjM = xno; then AC_MSG_WARN([*** libprojectM not found. libprojectM is needed to build this package.
--- a/src/adplug/adplug-xmms.cc Thu Jul 19 12:55:56 2007 -0500 +++ b/src/adplug/adplug-xmms.cc Thu Jul 19 12:56:04 2007 -0500 @@ -256,7 +256,7 @@ GtkTooltips *tooltips = gtk_tooltips_new (); GPtrArray *rblist = g_ptr_array_new (); - gtk_window_set_title (GTK_WINDOW (config_dlg), "AdPlug :: Configuration"); + gtk_window_set_title (GTK_WINDOW (config_dlg), _("AdPlug :: Configuration")); gtk_window_set_policy (GTK_WINDOW (config_dlg), FALSE, FALSE, TRUE); // Window is auto sized gtk_window_set_modal (GTK_WINDOW (config_dlg), TRUE); gtk_container_add (GTK_CONTAINER (config_dlg->vbox), GTK_WIDGET (notebook)); @@ -265,7 +265,7 @@ { GtkWidget *button; - button = gtk_button_new_with_label ("Ok"); + button = gtk_button_new_with_label (_("Ok")); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (close_config_box_ok), (gpointer) rblist); g_signal_connect_data (G_OBJECT (button), "clicked", @@ -275,7 +275,7 @@ G_CONNECT_SWAPPED)); gtk_container_add (GTK_CONTAINER (config_dlg->action_area), button); - button = gtk_button_new_with_label ("Cancel"); + button = gtk_button_new_with_label (_("Cancel")); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (close_config_box_cancel), (gpointer) rblist); @@ -291,7 +291,7 @@ gtk_table_set_row_spacings (table, 5); gtk_table_set_col_spacings (table, 5); gtk_notebook_append_page (notebook, GTK_WIDGET (table), - print_left ("General")); + print_left (_("General"))); // Add "Sound quality" section { @@ -303,19 +303,19 @@ gtk_table_set_col_spacings (sqt, 5); gtk_table_attach_defaults (table, make_framed (GTK_WIDGET (sqt), - "Sound quality"), 0, 1, 0, 1); + _("Sound quality")), 0, 1, 0, 1); // Add "Resolution" section fvb = GTK_VBOX (gtk_vbox_new (TRUE, 0)); gtk_table_attach_defaults (sqt, - make_framed (GTK_WIDGET (fvb), "Resolution"), + make_framed (GTK_WIDGET (fvb), _("Resolution")), 0, 1, 0, 1); - rb = GTK_RADIO_BUTTON (gtk_radio_button_new_with_label (NULL, "8bit")); + rb = GTK_RADIO_BUTTON (gtk_radio_button_new_with_label (NULL, _("8bit"))); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), !cfg.bit16); gtk_container_add (GTK_CONTAINER (fvb), GTK_WIDGET (rb)); rb = GTK_RADIO_BUTTON (gtk_radio_button_new_with_label_from_widget - (rb, "16bit")); + (rb, _("16bit"))); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), cfg.bit16); gtk_container_add (GTK_CONTAINER (fvb), GTK_WIDGET (rb)); g_ptr_array_add (rblist, (gpointer) rb); @@ -323,49 +323,49 @@ // Add "Channels" section fvb = GTK_VBOX (gtk_vbox_new (TRUE, 0)); gtk_table_attach_defaults (sqt, - make_framed (GTK_WIDGET (fvb), "Channels"), 0, + make_framed (GTK_WIDGET (fvb), _("Channels")), 0, 1, 1, 2); - rb = GTK_RADIO_BUTTON (gtk_radio_button_new_with_label (NULL, "Mono")); + rb = GTK_RADIO_BUTTON (gtk_radio_button_new_with_label (NULL, _("Mono"))); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), !cfg.stereo); gtk_container_add (GTK_CONTAINER (fvb), GTK_WIDGET (rb)); rb = GTK_RADIO_BUTTON (gtk_radio_button_new_with_label_from_widget - (rb, "Stereo")); + (rb, _("Stereo"))); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), cfg.stereo); gtk_container_add (GTK_CONTAINER (fvb), GTK_WIDGET (rb)); gtk_tooltips_set_tip (tooltips, GTK_WIDGET (rb), - "Setting stereo is not recommended, unless you need to. " + _("Setting stereo is not recommended, unless you need to. " "This won't add any stereo effects to the sound - OPL2 " - "is just mono - but eats up more CPU power!", NULL); + "is just mono - but eats up more CPU power!"), NULL); g_ptr_array_add (rblist, (gpointer) rb); // Add "Frequency" section fvb = GTK_VBOX (gtk_vbox_new (TRUE, 0)); gtk_table_attach_defaults (sqt, - make_framed (GTK_WIDGET (fvb), "Frequency"), 1, + make_framed (GTK_WIDGET (fvb), _("Frequency")), 1, 2, 0, 2); - rb = GTK_RADIO_BUTTON (gtk_radio_button_new_with_label (NULL, "11025")); + rb = GTK_RADIO_BUTTON (gtk_radio_button_new_with_label (NULL, _("11025"))); if (cfg.freq == 11025) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), TRUE); gtk_container_add (GTK_CONTAINER (fvb), GTK_WIDGET (rb)); g_ptr_array_add (rblist, (gpointer) rb); rb = GTK_RADIO_BUTTON (gtk_radio_button_new_with_label_from_widget - (rb, "22050")); + (rb, _("22050"))); if (cfg.freq == 22050) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), TRUE); gtk_container_add (GTK_CONTAINER (fvb), GTK_WIDGET (rb)); g_ptr_array_add (rblist, (gpointer) rb); rb = GTK_RADIO_BUTTON (gtk_radio_button_new_with_label_from_widget - (rb, "44100")); + (rb, _("44100"))); if (cfg.freq == 44100) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), TRUE); gtk_container_add (GTK_CONTAINER (fvb), GTK_WIDGET (rb)); g_ptr_array_add (rblist, (gpointer) rb); rb = GTK_RADIO_BUTTON (gtk_radio_button_new_with_label_from_widget - (rb, "48000")); + (rb, _("48000"))); if (cfg.freq == 48000) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), TRUE); gtk_container_add (GTK_CONTAINER (fvb), GTK_WIDGET (rb)); @@ -378,18 +378,18 @@ GtkCheckButton *cb; gtk_table_attach_defaults (table, - make_framed (GTK_WIDGET (vb), "Playback"), 1, + make_framed (GTK_WIDGET (vb), _("Playback")), 1, 2, 0, 1); cb = - GTK_CHECK_BUTTON (gtk_check_button_new_with_label ("Detect songend")); + GTK_CHECK_BUTTON (gtk_check_button_new_with_label (_("Detect songend"))); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cb), !cfg.endless); gtk_container_add (GTK_CONTAINER (vb), GTK_WIDGET (cb)); gtk_tooltips_set_tip (tooltips, GTK_WIDGET (cb), - "If enabled, XMMS will detect a song's ending, stop " + _("If enabled, XMMS will detect a song's ending, stop " "it and advance in the playlist. If disabled, XMMS " "won't take notice of a song's ending and loop it all " - "over again and again.", NULL); + "over again and again."), NULL); g_ptr_array_add (rblist, (gpointer) cb); } @@ -397,17 +397,17 @@ table = GTK_TABLE (gtk_table_new (1, 1, TRUE)); gtk_notebook_append_page (notebook, GTK_WIDGET (table), - print_left ("Formats")); + print_left (_("Formats"))); // Add "Format selection" section { GtkHBox *vb = GTK_HBOX (gtk_hbox_new (FALSE, 0)); gtk_table_attach_defaults (table, make_framed (GTK_WIDGET (vb), - "Format selection"), 0, 1, 0, 1); + _("Format selection")), 0, 1, 0, 1); // Add scrollable list { - const gchar *rowstr[] = { "Format", "Extension" }; + const gchar *rowstr[] = { _("Format"), _("Extension") }; GtkEventBox *eventbox = GTK_EVENT_BOX (gtk_event_box_new ()); GtkScrolledWindow *formatswnd = GTK_SCROLLED_WINDOW (gtk_scrolled_window_new (NULL, NULL)); @@ -447,10 +447,10 @@ gtk_container_add (GTK_CONTAINER (eventbox), GTK_WIDGET (formatswnd)); gtk_container_add (GTK_CONTAINER (vb), GTK_WIDGET (eventbox)); gtk_tooltips_set_tip (tooltips, GTK_WIDGET (eventbox), - "Selected file types will be recognized and played " + _("Selected file types will be recognized and played " "back by this plugin. Deselected types will be " "ignored to make room for other plugins to play " - "these files.", NULL); + "these files."), NULL); g_ptr_array_add (rblist, pl); } } @@ -526,14 +526,14 @@ std::ostringstream infotext; unsigned int i; GtkDialog *infobox = GTK_DIALOG (gtk_dialog_new ()); - GtkButton *okay_button = GTK_BUTTON (gtk_button_new_with_label ("Ok")); + GtkButton *okay_button = GTK_BUTTON (gtk_button_new_with_label (_("Ok"))); GtkVBox *box = GTK_VBOX (gtk_vbox_new (TRUE, 2)); GtkHBox *hbox = GTK_HBOX (gtk_hbox_new (TRUE, 2)); GtkHBox *hbox2 = GTK_HBOX (gtk_hbox_new (TRUE, 2)); // Build file info box - gtk_window_set_title (GTK_WINDOW (infobox), "AdPlug :: File Info"); + gtk_window_set_title (GTK_WINDOW (infobox), _("AdPlug :: File Info")); gtk_window_set_policy (GTK_WINDOW (infobox), FALSE, FALSE, TRUE); // Window is auto sized gtk_container_add (GTK_CONTAINER (infobox->vbox), GTK_WIDGET (box)); @@ -555,25 +555,25 @@ // GTK_SIDE_TOP, GTK_ANCHOR_CENTER, GTK_FILL_X); gtk_box_pack_end (GTK_BOX (box), GTK_WIDGET (hbox2), TRUE, TRUE, 2); gtk_box_pack_end (GTK_BOX (box), - make_framed (print_left (filename), "Filename"), TRUE, + make_framed (print_left (filename), _("Filename")), TRUE, TRUE, 2); // Add "Song info" section - infotext << "Title: " << p->gettitle () << std::endl << - "Author: " << p->getauthor () << std::endl << - "File Type: " << p->gettype () << std::endl << - "Subsongs: " << p->getsubsongs () << std::endl << - "Instruments: " << p->getinstruments (); + infotext << _("Title: ") << p->gettitle () << std::endl << + _("Author: ") << p->getauthor () << std::endl << + _("File Type: ") << p->gettype () << std::endl << + _("Subsongs: ") << p->getsubsongs () << std::endl << + _("Instruments: ") << p->getinstruments (); if (plr.p == p) infotext << std::ends; else { - infotext << std::endl << "Orders: " << p->getorders () << std::endl << - "Patterns: " << p->getpatterns () << std::ends; + infotext << std::endl << _("Orders: ") << p->getorders () << std::endl << + _("Patterns: ") << p->getpatterns () << std::ends; } gtk_container_add (GTK_CONTAINER (hbox), make_framed (print_left (infotext.str ().c_str ()), - "Song")); + _("Song"))); // Add "Playback info" section if currently playing if (plr.p == p) @@ -582,7 +582,7 @@ gtk_label_set_justify (plr.infobox, GTK_JUSTIFY_LEFT); gtk_misc_set_padding (GTK_MISC (plr.infobox), 2, 2); gtk_container_add (GTK_CONTAINER (hbox), - make_framed (GTK_WIDGET (plr.infobox), "Playback")); + make_framed (GTK_WIDGET (plr.infobox), _("Playback"))); } // Former packer layout, for future reproduction @@ -599,7 +599,7 @@ gchar tmpstr[10]; { - const gchar *rowstr[] = { "#", "Instrument name" }; + const gchar *rowstr[] = { _("#"), _("Instrument name") }; instnames = GTK_CLIST (gtk_clist_new_with_titles (2, (gchar **)rowstr)); } gtk_clist_set_column_justification (instnames, 0, GTK_JUSTIFY_RIGHT); @@ -641,7 +641,7 @@ // gtk_packer_add(packer, make_framed(GTK_WIDGET(msgwnd), "Song message"), // GTK_SIDE_TOP, GTK_ANCHOR_CENTER, GTK_FILL_X, 2, 0, 0, 200, 50); gtk_box_pack_end (GTK_BOX (hbox2), - make_framed (GTK_WIDGET (msgwnd), "Song message"), TRUE, + make_framed (GTK_WIDGET (msgwnd), _("Song message")), TRUE, TRUE, 2); } @@ -663,7 +663,7 @@ // gtk_packer_add_defaults(packer, make_framed(GTK_WIDGET(slider), "Subsong selection"), // GTK_SIDE_TOP, GTK_ANCHOR_CENTER, GTK_FILL_X); gtk_box_pack_end (GTK_BOX (hbox2), - make_framed (GTK_WIDGET (slider), "Subsong selection"), + make_framed (GTK_WIDGET (slider), _("Subsong selection")), TRUE, TRUE, 2); } @@ -685,13 +685,13 @@ std::ostringstream infotext; // Recreate info string - infotext << "Order: " << plr.p->getorder () << " / " << plr.p-> - getorders () << std::endl << "Pattern: " << plr.p-> - getpattern () << " / " << plr.p-> - getpatterns () << std::endl << "Row: " << plr.p-> - getrow () << std::endl << "Speed: " << plr.p-> - getspeed () << std::endl << "Timer: " << plr.p-> - getrefresh () << "Hz" << std::ends; + infotext << _("Order: ") << plr.p->getorder () << _(" / ") << plr.p-> + getorders () << std::endl << _("Pattern: ") << plr.p-> + getpattern () << _(" / ") << plr.p-> + getpatterns () << std::endl << _("Row: ") << plr.p-> + getrow () << std::endl << _("Speed: ") << plr.p-> + getspeed () << std::endl << _("Timer: ") << plr.p-> + getrefresh () << _("Hz") << std::ends; GDK_THREADS_ENTER (); gtk_label_set_text (plr.infobox, infotext.str ().c_str ());
--- a/src/alac/plugin.c Thu Jul 19 12:55:56 2007 -0500 +++ b/src/alac/plugin.c Thu Jul 19 12:56:04 2007 -0500 @@ -71,19 +71,19 @@ if (ext != NULL) ++ext; - return ext; + return ext; } static void alac_about(void) { static GtkWidget *aboutbox; - + if(aboutbox != NULL) return; - aboutbox = xmms_show_message("About Apple Lossless Audio Plugin", - "Copyright (c) 2006 Audacious team\n" - "Portions (c) 2005-2006 David Hammerton <crazney -at- crazney.net>", + aboutbox = xmms_show_message(_("About Apple Lossless Audio Plugin"), + _("Copyright (c) 2006 Audacious team\n" + "Portions (c) 2005-2006 David Hammerton <crazney -at- crazney.net>"), _("Ok"), FALSE, NULL, NULL); g_signal_connect(G_OBJECT(aboutbox), "destroy", @@ -102,7 +102,7 @@ if (!input_stream) return FALSE; - + /* if qtmovie_read returns successfully, the stream is up to * the movie data, which can be used directly by the decoder */ if (!qtmovie_read(input_stream, &demux_res)) @@ -156,7 +156,7 @@ vfs_fclose(input_file); return NULL; } - + /* if qtmovie_read returns successfully, the stream is up to * the movie data, which can be used directly by the decoder */ if (!qtmovie_read(input_stream, &demux_res))
--- a/src/alarm/interface.c Thu Jul 19 12:55:56 2007 -0500 +++ b/src/alarm/interface.c Thu Jul 19 12:56:04 2007 -0500 @@ -18,6 +18,8 @@ #include "interface.h" #include "support.h" +#include <audacious/i18n.h> + GtkWidget* create_about_dialog (void) { @@ -31,7 +33,7 @@ about_dialog = gtk_dialog_new (); gtk_widget_set_name (about_dialog, "about_dialog"); gtk_object_set_data (GTK_OBJECT (about_dialog), "about_dialog", about_dialog); - gtk_window_set_title (GTK_WINDOW (about_dialog), "About XMMS Alarm"); + gtk_window_set_title (GTK_WINDOW (about_dialog), _("About XMMS Alarm")); /* * GTK2 hack * GTK_WINDOW (about_dialog)->type = GTK_WINDOW_DIALOG; @@ -44,7 +46,7 @@ gtk_object_set_data (GTK_OBJECT (about_dialog), "dialog_vbox2", dialog_vbox2); gtk_widget_show (dialog_vbox2); - frame6 = gtk_frame_new ("XMMS Alarm"); + frame6 = gtk_frame_new (_("XMMS Alarm")); gtk_widget_set_name (frame6, "frame6"); gtk_widget_ref (frame6); gtk_object_set_data_full (GTK_OBJECT (about_dialog), "frame6", frame6, @@ -53,7 +55,7 @@ gtk_box_pack_start (GTK_BOX (dialog_vbox2), frame6, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame6), 10); - label18 = gtk_label_new ("An XMMS plugin which can be used\nto start playing at a certain time.\n\nSend all complaints to:\nAdam Feakin <adamf@snika.uklinux.net>\nDaniel Stodden <stodden@in.tum.de>\n\nhttp://www.snika.uklinux.net/xmms-alarm/"); + label18 = gtk_label_new (_("An XMMS plugin which can be used\nto start playing at a certain time.\n\nSend all complaints to:\nAdam Feakin <adamf@snika.uklinux.net>\nDaniel Stodden <stodden@in.tum.de>\n\nhttp://www.snika.uklinux.net/xmms-alarm/")); gtk_widget_set_name (label18, "label18"); gtk_widget_ref (label18); gtk_object_set_data_full (GTK_OBJECT (about_dialog), "label18", label18, @@ -68,7 +70,7 @@ gtk_widget_show (dialog_action_area2); gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area2), 10); - close = gtk_button_new_with_label ("Close"); + close = gtk_button_new_with_label (_("Close")); gtk_widget_set_name (close, "close"); gtk_widget_ref (close); gtk_object_set_data_full (GTK_OBJECT (about_dialog), "close", close, @@ -98,7 +100,7 @@ alarm_dialog = gtk_dialog_new (); gtk_widget_set_name (alarm_dialog, "alarm_dialog"); gtk_object_set_data (GTK_OBJECT (alarm_dialog), "alarm_dialog", alarm_dialog); - gtk_window_set_title (GTK_WINDOW (alarm_dialog), "Alarm"); + gtk_window_set_title (GTK_WINDOW (alarm_dialog), _("Alarm")); gtk_window_set_policy (GTK_WINDOW (alarm_dialog), FALSE, FALSE, FALSE); dialog_vbox3 = GTK_DIALOG (alarm_dialog)->vbox; @@ -106,7 +108,7 @@ gtk_object_set_data (GTK_OBJECT (alarm_dialog), "dialog_vbox3", dialog_vbox3); gtk_widget_show (dialog_vbox3); - label19 = gtk_label_new ("This is your wakeup call."); + label19 = gtk_label_new (_("This is your wakeup call.")); gtk_widget_set_name (label19, "label19"); gtk_widget_ref (label19); gtk_object_set_data_full (GTK_OBJECT (alarm_dialog), "label19", label19, @@ -121,7 +123,7 @@ gtk_widget_show (dialog_action_area3); gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area3), 10); - button9 = gtk_button_new_with_label ("OK"); + button9 = gtk_button_new_with_label (_("OK")); gtk_widget_set_name (button9, "button9"); gtk_widget_ref (button9); gtk_object_set_data_full (GTK_OBJECT (alarm_dialog), "button9", button9, @@ -149,7 +151,7 @@ GtkWidget *ok_button1; GtkWidget *cancel_button1; - playlist_fileselection = gtk_file_selection_new ("Select Playlist"); + playlist_fileselection = gtk_file_selection_new (_("Select Playlist")); gtk_widget_set_name (playlist_fileselection, "playlist_fileselection"); gtk_object_set_data (GTK_OBJECT (playlist_fileselection), "playlist_fileselection", playlist_fileselection); gtk_container_set_border_width (GTK_CONTAINER (playlist_fileselection), 10); @@ -193,7 +195,7 @@ warning_dialog = gtk_dialog_new (); gtk_widget_set_name (warning_dialog, "warning_dialog"); gtk_object_set_data (GTK_OBJECT (warning_dialog), "warning_dialog", warning_dialog); - gtk_window_set_title (GTK_WINDOW (warning_dialog), "Sorry"); + gtk_window_set_title (GTK_WINDOW (warning_dialog), _("Sorry")); gtk_window_set_policy (GTK_WINDOW (warning_dialog), FALSE, FALSE, FALSE); dialog_vbox4 = GTK_DIALOG (warning_dialog)->vbox; @@ -201,7 +203,7 @@ gtk_object_set_data (GTK_OBJECT (warning_dialog), "dialog_vbox4", dialog_vbox4); gtk_widget_show (dialog_vbox4); - frame9 = gtk_frame_new ("Warning"); + frame9 = gtk_frame_new (_("Warning")); gtk_widget_set_name (frame9, "frame9"); gtk_widget_ref (frame9); gtk_object_set_data_full (GTK_OBJECT (warning_dialog), "frame9", frame9, @@ -210,7 +212,7 @@ gtk_box_pack_start (GTK_BOX (dialog_vbox4), frame9, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame9), 10); - label70 = gtk_label_new ("For safety reasons the \"quiet\" time must be at least 65 seconds longer than the fading time, it must also be more than 10 seconds. This basically means that there is a bug in the code and until I find a way of really fixing it this message will appear :)\n\nYour fading settings have NOT been saved\n\n--\nAdam"); + label70 = gtk_label_new (_("For safety reasons the \"quiet\" time must be at least 65 seconds longer than the fading time, it must also be more than 10 seconds. This basically means that there is a bug in the code and until I find a way of really fixing it this message will appear :)\n\nYour fading settings have NOT been saved\n\n--\nAdam")); gtk_widget_set_name (label70, "label70"); gtk_widget_ref (label70); gtk_object_set_data_full (GTK_OBJECT (warning_dialog), "label70", label70, @@ -226,7 +228,7 @@ gtk_widget_show (dialog_action_area4); gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area4), 10); - button10 = gtk_button_new_with_label ("Oh Well"); + button10 = gtk_button_new_with_label (_("Oh Well")); gtk_widget_set_name (button10, "button10"); gtk_widget_ref (button10); gtk_object_set_data_full (GTK_OBJECT (warning_dialog), "button10", button10, @@ -385,7 +387,7 @@ config_dialog = gtk_dialog_new (); gtk_widget_set_name (config_dialog, "config_dialog"); gtk_object_set_data (GTK_OBJECT (config_dialog), "config_dialog", config_dialog); - gtk_window_set_title (GTK_WINDOW (config_dialog), "Alarm Settings"); + gtk_window_set_title (GTK_WINDOW (config_dialog), _("Alarm Settings")); gtk_window_set_policy (GTK_WINDOW (config_dialog), FALSE, FALSE, FALSE); dialog_vbox5 = GTK_DIALOG (config_dialog)->vbox; @@ -401,7 +403,7 @@ gtk_widget_show (notebook1); gtk_box_pack_start (GTK_BOX (dialog_vbox5), notebook1, TRUE, TRUE, 0); - frame10 = gtk_frame_new ("Time"); + frame10 = gtk_frame_new (_("Time")); gtk_widget_set_name (frame10, "frame10"); gtk_widget_ref (frame10); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "frame10", frame10, @@ -442,7 +444,7 @@ gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (stop_h_spin), TRUE); gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (stop_h_spin), GTK_UPDATE_IF_VALID); - label75 = gtk_label_new ("hours"); + label75 = gtk_label_new (_("hours")); gtk_widget_set_name (label75, "label75"); gtk_widget_ref (label75); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label75", label75, @@ -472,7 +474,7 @@ gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (alarm_h_spin), GTK_UPDATE_IF_VALID); gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (alarm_h_spin), TRUE); - label76 = gtk_label_new (":"); + label76 = gtk_label_new (_(":")); gtk_widget_set_name (label76, "label76"); gtk_widget_ref (label76); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label76", label76, @@ -503,7 +505,7 @@ gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (alarm_m_spin), GTK_UPDATE_IF_VALID); gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (alarm_m_spin), TRUE); - label77 = gtk_label_new ("h"); + label77 = gtk_label_new (_("h")); gtk_widget_set_name (label77, "label77"); gtk_widget_ref (label77); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label77", label77, @@ -551,7 +553,7 @@ (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); - label79 = gtk_label_new ("Quiet after:"); + label79 = gtk_label_new (_("Quiet after:")); gtk_widget_set_name (label79, "label79"); gtk_widget_ref (label79); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label79", label79, @@ -561,7 +563,7 @@ gtk_label_set_justify (GTK_LABEL (label79), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label79), 0, 0.5); - label80 = gtk_label_new ("Alarm at (default):"); + label80 = gtk_label_new (_("Alarm at (default):")); gtk_widget_set_name (label80, "label80"); gtk_widget_ref (label80); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label80", label80, @@ -573,7 +575,7 @@ gtk_label_set_justify (GTK_LABEL (label80), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label80), 0, 0.5); - label71 = gtk_label_new ("Time"); + label71 = gtk_label_new (_("Time")); gtk_widget_set_name (label71, "label71"); gtk_widget_ref (label71); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label71", label71, @@ -581,7 +583,7 @@ gtk_widget_show (label71); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label71); - frame15 = gtk_frame_new ("Choose the days for the alarm to come on"); + frame15 = gtk_frame_new (_("Choose the days for the alarm to come on")); gtk_widget_set_name (frame15, "frame15"); gtk_widget_ref (frame15); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "frame15", frame15, @@ -609,7 +611,7 @@ (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); - mon_def = gtk_check_button_new_with_label ("Default"); + mon_def = gtk_check_button_new_with_label (_("Default")); gtk_widget_set_name (mon_def, "mon_def"); gtk_widget_ref (mon_def); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "mon_def", mon_def, @@ -628,7 +630,7 @@ gtk_box_pack_start (GTK_BOX (hbox31), mon_h, TRUE, TRUE, 0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (mon_h), TRUE); - label89 = gtk_label_new (":"); + label89 = gtk_label_new (_(":")); gtk_widget_set_name (label89, "label89"); gtk_widget_ref (label89); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label89", label89, @@ -657,7 +659,7 @@ (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); - tue_def = gtk_check_button_new_with_label ("Default"); + tue_def = gtk_check_button_new_with_label (_("Default")); gtk_widget_set_name (tue_def, "tue_def"); gtk_widget_ref (tue_def); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "tue_def", tue_def, @@ -676,7 +678,7 @@ gtk_box_pack_start (GTK_BOX (hbox32), tue_h, TRUE, TRUE, 0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (tue_h), TRUE); - label90 = gtk_label_new (":"); + label90 = gtk_label_new (_(":")); gtk_widget_set_name (label90, "label90"); gtk_widget_ref (label90); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label90", label90, @@ -705,7 +707,7 @@ (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); - wed_def = gtk_check_button_new_with_label ("Default"); + wed_def = gtk_check_button_new_with_label (_("Default")); gtk_widget_set_name (wed_def, "wed_def"); gtk_widget_ref (wed_def); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "wed_def", wed_def, @@ -724,7 +726,7 @@ gtk_box_pack_start (GTK_BOX (hbox33), wed_h, TRUE, TRUE, 0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wed_h), TRUE); - label91 = gtk_label_new (":"); + label91 = gtk_label_new (_(":")); gtk_widget_set_name (label91, "label91"); gtk_widget_ref (label91); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label91", label91, @@ -753,7 +755,7 @@ (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); - thu_def = gtk_check_button_new_with_label ("Default"); + thu_def = gtk_check_button_new_with_label (_("Default")); gtk_widget_set_name (thu_def, "thu_def"); gtk_widget_ref (thu_def); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "thu_def", thu_def, @@ -772,7 +774,7 @@ gtk_box_pack_start (GTK_BOX (hbox34), thu_h, TRUE, TRUE, 0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (thu_h), TRUE); - label92 = gtk_label_new (":"); + label92 = gtk_label_new (_(":")); gtk_widget_set_name (label92, "label92"); gtk_widget_ref (label92); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label92", label92, @@ -801,7 +803,7 @@ (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); - fri_def = gtk_check_button_new_with_label ("Default"); + fri_def = gtk_check_button_new_with_label (_("Default")); gtk_widget_set_name (fri_def, "fri_def"); gtk_widget_ref (fri_def); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "fri_def", fri_def, @@ -820,7 +822,7 @@ gtk_box_pack_start (GTK_BOX (hbox35), fri_h, TRUE, TRUE, 0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (fri_h), TRUE); - label93 = gtk_label_new (":"); + label93 = gtk_label_new (_(":")); gtk_widget_set_name (label93, "label93"); gtk_widget_ref (label93); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label93", label93, @@ -849,7 +851,7 @@ (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); - sat_def = gtk_check_button_new_with_label ("Default"); + sat_def = gtk_check_button_new_with_label (_("Default")); gtk_widget_set_name (sat_def, "sat_def"); gtk_widget_ref (sat_def); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "sat_def", sat_def, @@ -868,7 +870,7 @@ gtk_box_pack_start (GTK_BOX (hbox36), sat_h, TRUE, TRUE, 0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (sat_h), TRUE); - label94 = gtk_label_new (":"); + label94 = gtk_label_new (_(":")); gtk_widget_set_name (label94, "label94"); gtk_widget_ref (label94); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label94", label94, @@ -897,7 +899,7 @@ (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); - sun_def = gtk_check_button_new_with_label ("Default"); + sun_def = gtk_check_button_new_with_label (_("Default")); gtk_widget_set_name (sun_def, "sun_def"); gtk_widget_ref (sun_def); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "sun_def", sun_def, @@ -916,7 +918,7 @@ gtk_box_pack_start (GTK_BOX (hbox37), sun_h, TRUE, TRUE, 0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (sun_h), TRUE); - label95 = gtk_label_new (":"); + label95 = gtk_label_new (_(":")); gtk_widget_set_name (label95, "label95"); gtk_widget_ref (label95); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label95", label95, @@ -935,7 +937,7 @@ gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (sun_m), TRUE); gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (sun_m), TRUE); - label87 = gtk_label_new ("Day"); + label87 = gtk_label_new (_("Day")); gtk_widget_set_name (label87, "label87"); gtk_widget_ref (label87); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label87", label87, @@ -945,7 +947,7 @@ (GtkAttachOptions) (0), (GtkAttachOptions) (0), 0, 0); - label88 = gtk_label_new ("Time"); + label88 = gtk_label_new (_("Time")); gtk_widget_set_name (label88, "label88"); gtk_widget_ref (label88); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label88", label88, @@ -955,7 +957,7 @@ (GtkAttachOptions) (0), (GtkAttachOptions) (0), 0, 0); - tue_cb = gtk_check_button_new_with_label ("Tuesday"); + tue_cb = gtk_check_button_new_with_label (_("Tuesday")); gtk_widget_set_name (tue_cb, "tue_cb"); gtk_widget_ref (tue_cb); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "tue_cb", tue_cb, @@ -966,7 +968,7 @@ (GtkAttachOptions) (0), 0, 0); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tue_cb), TRUE); - wed_cb = gtk_check_button_new_with_label ("Wednesday"); + wed_cb = gtk_check_button_new_with_label (_("Wednesday")); gtk_widget_set_name (wed_cb, "wed_cb"); gtk_widget_ref (wed_cb); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "wed_cb", wed_cb, @@ -977,7 +979,7 @@ (GtkAttachOptions) (0), 0, 0); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wed_cb), TRUE); - thu_cb = gtk_check_button_new_with_label ("Thursday"); + thu_cb = gtk_check_button_new_with_label (_("Thursday")); gtk_widget_set_name (thu_cb, "thu_cb"); gtk_widget_ref (thu_cb); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "thu_cb", thu_cb, @@ -988,7 +990,7 @@ (GtkAttachOptions) (0), 0, 0); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (thu_cb), TRUE); - fri_cb = gtk_check_button_new_with_label ("Friday"); + fri_cb = gtk_check_button_new_with_label (_("Friday")); gtk_widget_set_name (fri_cb, "fri_cb"); gtk_widget_ref (fri_cb); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "fri_cb", fri_cb, @@ -999,7 +1001,7 @@ (GtkAttachOptions) (0), 0, 0); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fri_cb), TRUE); - sat_cb = gtk_check_button_new_with_label ("Saturday"); + sat_cb = gtk_check_button_new_with_label (_("Saturday")); gtk_widget_set_name (sat_cb, "sat_cb"); gtk_widget_ref (sat_cb); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "sat_cb", sat_cb, @@ -1010,7 +1012,7 @@ (GtkAttachOptions) (0), 0, 0); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sat_cb), TRUE); - sun_cb = gtk_check_button_new_with_label ("Sunday"); + sun_cb = gtk_check_button_new_with_label (_("Sunday")); gtk_widget_set_name (sun_cb, "sun_cb"); gtk_widget_ref (sun_cb); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "sun_cb", sun_cb, @@ -1020,7 +1022,7 @@ (GtkAttachOptions) (0), (GtkAttachOptions) (0), 0, 0); - mon_cb = gtk_check_button_new_with_label ("Monday"); + mon_cb = gtk_check_button_new_with_label (_("Monday")); gtk_widget_set_name (mon_cb, "mon_cb"); gtk_widget_ref (mon_cb); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "mon_cb", mon_cb, @@ -1031,7 +1033,7 @@ (GtkAttachOptions) (0), 0, 0); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mon_cb), TRUE); - label72 = gtk_label_new ("Days"); + label72 = gtk_label_new (_("Days")); gtk_widget_set_name (label72, "label72"); gtk_widget_ref (label72); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label72", label72, @@ -1047,7 +1049,7 @@ gtk_widget_show (vbox8); gtk_container_add (GTK_CONTAINER (notebook1), vbox8); - frame11 = gtk_frame_new ("Fading"); + frame11 = gtk_frame_new (_("Fading")); gtk_widget_set_name (frame11, "frame11"); gtk_widget_ref (frame11); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "frame11", frame11, @@ -1084,7 +1086,7 @@ gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (fading_spin), TRUE); gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (fading_spin), GTK_UPDATE_IF_VALID); - label81 = gtk_label_new ("seconds"); + label81 = gtk_label_new (_("seconds")); gtk_widget_set_name (label81, "label81"); gtk_widget_ref (label81); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label81", label81, @@ -1092,7 +1094,7 @@ gtk_widget_show (label81); gtk_box_pack_start (GTK_BOX (hbox25), label81, FALSE, TRUE, 0); - frame12 = gtk_frame_new ("Volume"); + frame12 = gtk_frame_new (_("Volume")); gtk_widget_set_name (frame12, "frame12"); gtk_widget_ref (frame12); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "frame12", frame12, @@ -1118,16 +1120,16 @@ gtk_widget_show (alignment11); gtk_box_pack_end (GTK_BOX (vbox9), alignment11, FALSE, FALSE, 0); - current_button = gtk_button_new_with_label ("Current"); + current_button = gtk_button_new_with_label (_("Current")); gtk_widget_set_name (current_button, "current_button"); gtk_widget_ref (current_button); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "current_button", current_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (current_button); gtk_container_add (GTK_CONTAINER (alignment11), current_button); - gtk_tooltips_set_tip (tooltips, current_button, "reset to current output volume", NULL); + gtk_tooltips_set_tip (tooltips, current_button, _("reset to current output volume"), NULL); - label82 = gtk_label_new ("Start at"); + label82 = gtk_label_new (_("Start at")); gtk_widget_set_name (label82, "label82"); gtk_widget_ref (label82); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label82", label82, @@ -1155,7 +1157,7 @@ gtk_scale_set_value_pos (GTK_SCALE (quiet_vol_scale), GTK_POS_RIGHT); gtk_scale_set_digits (GTK_SCALE (quiet_vol_scale), 0); - label83 = gtk_label_new ("%"); + label83 = gtk_label_new (_("%")); gtk_widget_set_name (label83, "label83"); gtk_widget_ref (label83); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label83", label83, @@ -1171,7 +1173,7 @@ gtk_widget_show (hseparator2); gtk_box_pack_start (GTK_BOX (vbox9), hseparator2, TRUE, TRUE, 0); - label84 = gtk_label_new ("Final"); + label84 = gtk_label_new (_("Final")); gtk_widget_set_name (label84, "label84"); gtk_widget_ref (label84); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label84", label84, @@ -1199,7 +1201,7 @@ gtk_scale_set_value_pos (GTK_SCALE (vol_scale), GTK_POS_RIGHT); gtk_scale_set_digits (GTK_SCALE (vol_scale), 0); - label85 = gtk_label_new ("%"); + label85 = gtk_label_new (_("%")); gtk_widget_set_name (label85, "label85"); gtk_widget_ref (label85); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label85", label85, @@ -1208,7 +1210,7 @@ gtk_box_pack_start (GTK_BOX (hbox27), label85, FALSE, TRUE, 0); gtk_label_set_justify (GTK_LABEL (label85), GTK_JUSTIFY_FILL); - label73 = gtk_label_new ("Volume"); + label73 = gtk_label_new (_("Volume")); gtk_widget_set_name (label73, "label73"); gtk_widget_ref (label73); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label73", label73, @@ -1224,7 +1226,7 @@ gtk_widget_show (vbox10); gtk_container_add (GTK_CONTAINER (notebook1), vbox10); - frame13 = gtk_frame_new ("Additional Command"); + frame13 = gtk_frame_new (_("Additional Command")); gtk_widget_set_name (frame13, "frame13"); gtk_widget_ref (frame13); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "frame13", frame13, @@ -1250,7 +1252,7 @@ gtk_widget_show (cmd_entry); gtk_box_pack_start (GTK_BOX (hbox28), cmd_entry, TRUE, TRUE, 0); - cmd_checkb = gtk_check_button_new_with_label ("enable"); + cmd_checkb = gtk_check_button_new_with_label (_("enable")); gtk_widget_set_name (cmd_checkb, "cmd_checkb"); gtk_widget_ref (cmd_checkb); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "cmd_checkb", cmd_checkb, @@ -1258,7 +1260,7 @@ gtk_widget_show (cmd_checkb); gtk_box_pack_start (GTK_BOX (hbox28), cmd_checkb, FALSE, FALSE, 0); - frame14 = gtk_frame_new ("Playlist (optional)"); + frame14 = gtk_frame_new (_("Playlist (optional)")); gtk_widget_set_name (frame14, "frame14"); gtk_widget_ref (frame14); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "frame14", frame14, @@ -1284,7 +1286,7 @@ gtk_widget_show (playlist); gtk_box_pack_start (GTK_BOX (hbox29), playlist, TRUE, TRUE, 0); - playlist_browse_button = gtk_button_new_with_label ("Browse..."); + playlist_browse_button = gtk_button_new_with_label (_("Browse...")); gtk_widget_set_name (playlist_browse_button, "playlist_browse_button"); gtk_widget_ref (playlist_browse_button); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "playlist_browse_button", playlist_browse_button, @@ -1292,7 +1294,7 @@ gtk_widget_show (playlist_browse_button); gtk_box_pack_start (GTK_BOX (hbox29), playlist_browse_button, FALSE, FALSE, 0); - frame18 = gtk_frame_new ("Reminder"); + frame18 = gtk_frame_new (_("Reminder")); gtk_widget_set_name (frame18, "frame18"); gtk_widget_ref (frame18); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "frame18", frame18, @@ -1309,7 +1311,7 @@ gtk_widget_show (hbox38); gtk_container_add (GTK_CONTAINER (frame18), hbox38); - reminder_cb = gtk_check_button_new_with_label ("Use reminder"); + reminder_cb = gtk_check_button_new_with_label (_("Use reminder")); gtk_widget_set_name (reminder_cb, "reminder_cb"); gtk_widget_ref (reminder_cb); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "reminder_cb", reminder_cb, @@ -1325,7 +1327,7 @@ gtk_widget_show (reminder_text); gtk_box_pack_start (GTK_BOX (hbox38), reminder_text, TRUE, TRUE, 5); - label74 = gtk_label_new ("Options"); + label74 = gtk_label_new (_("Options")); gtk_widget_set_name (label74, "label74"); gtk_widget_ref (label74); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label74", label74, @@ -1333,7 +1335,7 @@ gtk_widget_show (label74); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 3), label74); - frame16 = gtk_frame_new ("What do these options mean?"); + frame16 = gtk_frame_new (_("What do these options mean?")); gtk_widget_set_name (frame16, "frame16"); gtk_widget_ref (frame16); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "frame16", frame16, @@ -1361,9 +1363,9 @@ gtk_widget_show (text1); gtk_container_add (GTK_CONTAINER (scrolledwindow1), text1); gtk_text_buffer_insert (text1buffer, &iter, - "Time\n Alarm at: \n The time for the alarm to come on.\n\n Quiet After: \n Stop alarm after this amount of time.\n (if the wakeup dialog is not closed)\n\n\nDays\n Day:\n Select the days for the alarm to activate.\n\n Time:\n Choose the time for the alarm on each day,\n or select the toggle button to use the default\n time.\n\n\nVolume\n Fading: \n Fade the volume up to the chosen volume \n for this amount of time.\n\n Start at: \n Start fading from this volume.\n\n Final: \n The volume to stop fading at. If the fading\n time is 0 then set volume to this and start\n playing.\n\n\nOptions:\n Additional Command:\n Run this command at the alarm time.\n\n Playlist: \n Load this playlist for playing songs from \n (must have .m3u extension). If no playlist\n is given then the songs which are currently\n in the list will be used.\n The URL of an mp3/ogg stream can also be\n entered here, but loading of playlists from\n URLs is not currently supported by xmms.\n\n Reminder:\n Display a reminder when the alarm goes off,\n type the reminder in the box and turn on the\n toggle button if you want it to be shown.", 1143); + _("\nTime\n Alarm at: \n The time for the alarm to come on.\n\n Quiet After: \n Stop alarm after this amount of time.\n (if the wakeup dialog is not closed)\n\n\nDays\n Day:\n Select the days for the alarm to activate.\n\n Time:\n Choose the time for the alarm on each day,\n or select the toggle button to use the default\n time.\n\n\nVolume\n Fading: \n Fade the volume up to the chosen volume \n for this amount of time.\n\n Start at: \n Start fading from this volume.\n\n Final: \n The volume to stop fading at. If the fading\n time is 0 then set volume to this and start\n playing.\n\n\nOptions:\n Additional Command:\n Run this command at the alarm time.\n\n Playlist: \n Load this playlist for playing songs from \n (must have .m3u extension). If no playlist\n is given then the songs which are currently\n in the list will be used.\n The URL of an mp3/ogg stream can also be\n entered here, but loading of playlists from\n URLs is not currently supported by xmms.\n\n Reminder:\n Display a reminder when the alarm goes off,\n type the reminder in the box and turn on the\n toggle button if you want it to be shown.\n"), -1); - label86 = gtk_label_new ("Help"); + label86 = gtk_label_new (_("Help")); gtk_widget_set_name (label86, "label86"); gtk_widget_ref (label86); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label86", label86, @@ -1386,7 +1388,7 @@ gtk_box_pack_start (GTK_BOX (dialog_action_area5), hbox20, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox20), 10); - ok_button = gtk_button_new_with_label ("OK"); + ok_button = gtk_button_new_with_label (_("OK")); gtk_widget_set_name (ok_button, "ok_button"); gtk_widget_ref (ok_button); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "ok_button", ok_button, @@ -1395,7 +1397,7 @@ gtk_box_pack_start (GTK_BOX (hbox20), ok_button, FALSE, TRUE, 0); GTK_WIDGET_SET_FLAGS (ok_button, GTK_CAN_DEFAULT); - cancel_button = gtk_button_new_with_label ("Cancel"); + cancel_button = gtk_button_new_with_label (_("Cancel")); gtk_widget_set_name (cancel_button, "cancel_button"); gtk_widget_ref (cancel_button); gtk_object_set_data_full (GTK_OBJECT (config_dialog), "cancel_button", cancel_button, @@ -1457,7 +1459,7 @@ reminder_dialog = gtk_dialog_new (); gtk_widget_set_name (reminder_dialog, "reminder_dialog"); gtk_object_set_data (GTK_OBJECT (reminder_dialog), "reminder_dialog", reminder_dialog); - gtk_window_set_title (GTK_WINDOW (reminder_dialog), "Reminder"); + gtk_window_set_title (GTK_WINDOW (reminder_dialog), _("Reminder")); gtk_window_set_policy (GTK_WINDOW (reminder_dialog), TRUE, TRUE, FALSE); dialog_vbox6 = GTK_DIALOG (reminder_dialog)->vbox; @@ -1465,7 +1467,7 @@ gtk_object_set_data (GTK_OBJECT (reminder_dialog), "dialog_vbox6", dialog_vbox6); gtk_widget_show (dialog_vbox6); - frame19 = gtk_frame_new ("Your reminder for today is.."); + frame19 = gtk_frame_new (_("Your reminder for today is..")); gtk_widget_set_name (frame19, "frame19"); gtk_widget_ref (frame19); gtk_object_set_data_full (GTK_OBJECT (reminder_dialog), "frame19", frame19, @@ -1490,7 +1492,7 @@ gtk_widget_show (dialog_action_area6); gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area6), 10); - button11 = gtk_button_new_with_label ("Thankyou"); + button11 = gtk_button_new_with_label (_("Thankyou")); gtk_widget_set_name (button11, "button11"); gtk_widget_ref (button11); gtk_object_set_data_full (GTK_OBJECT (reminder_dialog), "button11", button11,
--- a/src/amidi-plug/backend-alsa/b-alsa.c Thu Jul 19 12:55:56 2007 -0500 +++ b/src/amidi-plug/backend-alsa/b-alsa.c Thu Jul 19 12:56:04 2007 -0500 @@ -32,7 +32,7 @@ if ( name != NULL ) *name = g_strdup( "alsa" ); if ( longname != NULL ) - *longname = g_strdup( "ALSA Backend " AMIDIPLUG_VERSION ); + *longname = g_strjoin( "", _("ALSA Backend "), AMIDIPLUG_VERSION, NULL ); if ( desc != NULL ) *desc = g_strdup( _("This backend sends MIDI events to a group of user-chosen " "ALSA sequencer ports. The ALSA sequencer interface is very "
--- a/src/amidi-plug/backend-dummy/b-dummy.c Thu Jul 19 12:55:56 2007 -0500 +++ b/src/amidi-plug/backend-dummy/b-dummy.c Thu Jul 19 12:56:04 2007 -0500 @@ -32,7 +32,7 @@ if ( name != NULL ) *name = g_strdup( "dummy" ); if ( longname != NULL ) - *longname = g_strdup( "Dummy Backend " AMIDIPLUG_VERSION ); + *longname = g_strjoin( "", _("Dummy Backend "), AMIDIPLUG_VERSION, NULL ); if ( desc != NULL ) *desc = g_strdup( _("This backend does not produce audio at all. It is mostly " "useful for analysis and testing purposes, as it can log " @@ -292,7 +292,7 @@ /* unimplemented (useless for dummy backend) */ gint audio_volume_get( gint * left_volume , gint * right_volume ) { - return 0; + return 0; } gint audio_volume_set( gint left_volume , gint right_volume ) {
--- a/src/amidi-plug/backend-fluidsynth/b-fluidsynth.c Thu Jul 19 12:55:56 2007 -0500 +++ b/src/amidi-plug/backend-fluidsynth/b-fluidsynth.c Thu Jul 19 12:56:04 2007 -0500 @@ -32,7 +32,7 @@ if ( name != NULL ) *name = g_strdup( "fluidsynth" ); if ( longname != NULL ) - *longname = g_strdup( "FluidSynth Backend " AMIDIPLUG_VERSION ); + *longname = g_strjoin( "", _("FluidSynth Backend "), AMIDIPLUG_VERSION, NULL ); if ( desc != NULL ) *desc = g_strdup( _("This backend produces audio by sending MIDI events " "to FluidSynth, a real-time software synthesizer based " @@ -277,7 +277,7 @@ gint sequencer_output( gpointer * buffer , gint * len ) { gdouble current_time = g_timer_elapsed( sc.timer_sample , NULL ); - if (( current_time > 0.000500 ) && + if (( current_time > 0.000500 ) && ( (current_time - sc.last_sample_time) * 1000000 >= ((gdouble)amidiplug_cfg_fsyn.fsyn_buffer_size * 1000000 / sc.sample_rate) )) { @@ -311,7 +311,7 @@ output plugin mixer controls and is not handled by input plugins */ gint audio_volume_get( gint * left_volume , gint * right_volume ) { - return 0; + return 0; } gint audio_volume_set( gint left_volume , gint right_volume ) {
--- a/src/amidi-plug/i_common.h Thu Jul 19 12:55:56 2007 -0500 +++ b/src/amidi-plug/i_common.h Thu Jul 19 12:56:04 2007 -0500 @@ -28,8 +28,8 @@ #include <strings.h> #include <glib.h> -#define _(String) (String) -#define N_(String) String +#include <audacious/i18n.h> + #define textdomain(Domain) #define bindtextdomain(Package, Directory)
--- a/src/amidi-plug/i_configure-alsa.c Thu Jul 19 12:55:56 2007 -0500 +++ b/src/amidi-plug/i_configure-alsa.c Thu Jul 19 12:56:04 2007 -0500 @@ -460,7 +460,7 @@ pagelabel_image_pix = gdk_pixbuf_new_from_xpm_data( (const gchar **)backend_alsa_icon_xpm ); pagelabel_image = gtk_image_new_from_pixbuf( pagelabel_image_pix ); g_object_unref( pagelabel_image_pix ); pagelabel_label = gtk_label_new( "" ); - gtk_label_set_markup( GTK_LABEL(pagelabel_label) , "<span size=\"smaller\">ALSA\nbackend</span>" ); + gtk_label_set_markup( GTK_LABEL(pagelabel_label) , _("<span size=\"smaller\">ALSA\nbackend</span>") ); gtk_label_set_justify( GTK_LABEL(pagelabel_label) , GTK_JUSTIFY_CENTER ); gtk_box_pack_start( GTK_BOX(pagelabel_vbox) , pagelabel_image , FALSE , FALSE , 1 ); gtk_box_pack_start( GTK_BOX(pagelabel_vbox) , pagelabel_label , FALSE , FALSE , 1 );
--- a/src/amidi-plug/i_configure-ap.c Thu Jul 19 12:55:56 2007 -0500 +++ b/src/amidi-plug/i_configure-ap.c Thu Jul 19 12:56:04 2007 -0500 @@ -372,7 +372,7 @@ pagelabel_image_pix = gdk_pixbuf_new_from_xpm_data( (const gchar **)amidi_plug_icon_xpm ); pagelabel_image = gtk_image_new_from_pixbuf( pagelabel_image_pix ); g_object_unref( pagelabel_image_pix ); pagelabel_label = gtk_label_new( "" ); - gtk_label_set_markup( GTK_LABEL(pagelabel_label) , "<span size=\"smaller\">AMIDI\nPlug</span>" ); + gtk_label_set_markup( GTK_LABEL(pagelabel_label) , _("<span size=\"smaller\">AMIDI\nPlug</span>") ); gtk_label_set_justify( GTK_LABEL(pagelabel_label) , GTK_JUSTIFY_CENTER ); gtk_box_pack_start( GTK_BOX(pagelabel_vbox) , pagelabel_image , FALSE , FALSE , 1 ); gtk_box_pack_start( GTK_BOX(pagelabel_vbox) , pagelabel_label , FALSE , FALSE , 1 );
--- a/src/amidi-plug/i_configure-dummy.c Thu Jul 19 12:55:56 2007 -0500 +++ b/src/amidi-plug/i_configure-dummy.c Thu Jul 19 12:56:04 2007 -0500 @@ -345,7 +345,7 @@ pagelabel_image_pix = gdk_pixbuf_new_from_xpm_data( (const gchar **)backend_dummy_icon_xpm ); pagelabel_image = gtk_image_new_from_pixbuf( pagelabel_image_pix ); g_object_unref( pagelabel_image_pix ); pagelabel_label = gtk_label_new( "" ); - gtk_label_set_markup( GTK_LABEL(pagelabel_label) , "<span size=\"smaller\">Dummy\nbackend</span>" ); + gtk_label_set_markup( GTK_LABEL(pagelabel_label) , _("<span size=\"smaller\">Dummy\nbackend</span>") ); gtk_label_set_justify( GTK_LABEL(pagelabel_label) , GTK_JUSTIFY_CENTER ); gtk_box_pack_start( GTK_BOX(pagelabel_vbox) , pagelabel_image , FALSE , FALSE , 1 ); gtk_box_pack_start( GTK_BOX(pagelabel_vbox) , pagelabel_label , FALSE , FALSE , 1 );
--- a/src/amidi-plug/i_configure-fluidsynth.c Thu Jul 19 12:55:56 2007 -0500 +++ b/src/amidi-plug/i_configure-fluidsynth.c Thu Jul 19 12:56:04 2007 -0500 @@ -650,13 +650,13 @@ gtk_container_set_border_width( GTK_CONTAINER(synth_samplerate_vbox), 6 ); gtk_container_add( GTK_CONTAINER(synth_samplerate_frame) , synth_samplerate_vbox ); gtk_box_pack_start( GTK_BOX(synth_rightcol_vbox) , synth_samplerate_frame , FALSE , FALSE , 0 ); - synth_samplerate_option[0] = gtk_radio_button_new_with_label( NULL , "22050 Hz " ); + synth_samplerate_option[0] = gtk_radio_button_new_with_label( NULL , _("22050 Hz ") ); g_object_set_data( G_OBJECT(synth_samplerate_option[0]) , "val" , GINT_TO_POINTER(22050) ); synth_samplerate_option[1] = gtk_radio_button_new_with_label_from_widget( - GTK_RADIO_BUTTON(synth_samplerate_option[0]) , "44100 Hz " ); + GTK_RADIO_BUTTON(synth_samplerate_option[0]) , _("44100 Hz ") ); g_object_set_data( G_OBJECT(synth_samplerate_option[1]) , "val" , GINT_TO_POINTER(44100) ); synth_samplerate_option[2] = gtk_radio_button_new_with_label_from_widget( - GTK_RADIO_BUTTON(synth_samplerate_option[0]) , "96000 Hz " ); + GTK_RADIO_BUTTON(synth_samplerate_option[0]) , _("96000 Hz ") ); g_object_set_data( G_OBJECT(synth_samplerate_option[2]) , "val" , GINT_TO_POINTER(96000) ); synth_samplerate_option[3] = gtk_radio_button_new_with_label_from_widget( GTK_RADIO_BUTTON(synth_samplerate_option[0]) , _("custom ") ); @@ -668,7 +668,7 @@ g_object_set_data( G_OBJECT(synth_samplerate_option[3]) , "customentry" , synth_samplerate_optionentry ); g_signal_connect( G_OBJECT(synth_samplerate_option[3]) , "toggled" , G_CALLBACK(i_configure_ev_sysamplerate_togglecustom) , synth_samplerate_optionentry ); - synth_samplerate_optionlabel = gtk_label_new( "Hz " ); + synth_samplerate_optionlabel = gtk_label_new( _("Hz ") ); gtk_box_pack_start( GTK_BOX(synth_samplerate_optionhbox) , synth_samplerate_optionentry , TRUE , TRUE , 0 ); gtk_box_pack_start( GTK_BOX(synth_samplerate_optionhbox) , synth_samplerate_optionlabel , FALSE , FALSE , 0 ); switch ( fsyncfg->fsyn_synth_samplerate ) @@ -806,7 +806,7 @@ gtk_tooltips_set_tip( GTK_TOOLTIPS(tips) , soundfont_file_lv , _("* Select SoundFont files *\n" "In order to play MIDI with FluidSynth, you need to specify at " - "least one valid SoundFont file here (use absolute paths). The " + "least one valid SoundFont file here (use absolute paths). The " "loading order is from the top (first) to the bottom (last).") , "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS(tips) , soundfont_load_option[0] , _("* Load SoundFont on player start *\n" @@ -953,7 +953,7 @@ pagelabel_image_pix = gdk_pixbuf_new_from_xpm_data( (const gchar **)backend_fluidsynth_icon_xpm ); pagelabel_image = gtk_image_new_from_pixbuf( pagelabel_image_pix ); g_object_unref( pagelabel_image_pix ); pagelabel_label = gtk_label_new( "" ); - gtk_label_set_markup( GTK_LABEL(pagelabel_label) , "<span size=\"smaller\">FluidSynth\nbackend</span>" ); + gtk_label_set_markup( GTK_LABEL(pagelabel_label) , _("<span size=\"smaller\">FluidSynth\nbackend</span>") ); gtk_label_set_justify( GTK_LABEL(pagelabel_label) , GTK_JUSTIFY_CENTER ); gtk_box_pack_start( GTK_BOX(pagelabel_vbox) , pagelabel_image , FALSE , FALSE , 1 ); gtk_box_pack_start( GTK_BOX(pagelabel_vbox) , pagelabel_label , FALSE , FALSE , 1 );
--- a/src/amidi-plug/i_configure-timidity.c Thu Jul 19 12:55:56 2007 -0500 +++ b/src/amidi-plug/i_configure-timidity.c Thu Jul 19 12:56:04 2007 -0500 @@ -61,7 +61,7 @@ { /* display "not available" information */ GtkWidget * info_label; - info_label = gtk_label_new( "TiMidity Backend not loaded or not available" ); + info_label = gtk_label_new( _("TiMidity Backend not loaded or not available") ); gtk_box_pack_start( GTK_BOX(timi_page_vbox) , info_label , FALSE , FALSE , 2 ); } @@ -80,7 +80,7 @@ pagelabel_image_pix = gdk_pixbuf_new_from_xpm_data( (const gchar **)backend_timidity_icon_xpm ); pagelabel_image = gtk_image_new_from_pixbuf( pagelabel_image_pix ); g_object_unref( pagelabel_image_pix ); pagelabel_label = gtk_label_new( "" ); - gtk_label_set_markup( GTK_LABEL(pagelabel_label) , "<span size=\"smaller\">TiMidity\nbackend</span>" ); + gtk_label_set_markup( GTK_LABEL(pagelabel_label) , _("<span size=\"smaller\">TiMidity\nbackend</span>") ); gtk_label_set_justify( GTK_LABEL(pagelabel_label) , GTK_JUSTIFY_CENTER ); gtk_box_pack_start( GTK_BOX(pagelabel_vbox) , pagelabel_image , FALSE , FALSE , 1 ); gtk_box_pack_start( GTK_BOX(pagelabel_vbox) , pagelabel_label , FALSE , FALSE , 1 );
--- a/src/amidi-plug/i_utils.c Thu Jul 19 12:55:56 2007 -0500 +++ b/src/amidi-plug/i_utils.c Thu Jul 19 12:56:04 2007 -0500 @@ -39,7 +39,7 @@ aboutwin = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_type_hint( GTK_WINDOW(aboutwin), GDK_WINDOW_TYPE_HINT_DIALOG ); - gtk_window_set_title( GTK_WINDOW(aboutwin), "AMIDI-Plug - about" ); + gtk_window_set_title( GTK_WINDOW(aboutwin), _("AMIDI-Plug - about") ); gtk_window_set_resizable( GTK_WINDOW(aboutwin) , FALSE ); gtk_container_set_border_width( GTK_CONTAINER(aboutwin), 10 ); g_signal_connect( G_OBJECT(aboutwin) , "destroy" , G_CALLBACK(gtk_widget_destroyed) , &aboutwin ); @@ -130,7 +130,7 @@ gtk_window_set_title( GTK_WINDOW(win) , title ); g_signal_connect_swapped( G_OBJECT(win) , "response" , G_CALLBACK(gtk_widget_destroy) , win ); - + if ( show_win == TRUE ) gtk_widget_show_all( win );
--- a/src/audiocompress/audacious-glue.c Thu Jul 19 12:55:56 2007 -0500 +++ b/src/audiocompress/audacious-glue.c Thu Jul 19 12:56:04 2007 -0500 @@ -255,7 +255,7 @@ look = lookup_widget(prefs->dialog, "anticlip"); gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(look), FALSE); - + look = lookup_widget(prefs->dialog, "target"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(look),(gfloat)TARGET); @@ -289,8 +289,8 @@ GtkWidget *look; - /* Set values */ - + /* Set values */ + look = lookup_widget(prefs->dialog, "anticlip"); gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(look), prefs->anticlip); @@ -321,18 +321,18 @@ /* Preferences dialog */ gchar *clip_tip = - "If checked, when the sound peaks the volume will be " + _("If checked, when the sound peaks the volume will be " "cut instantly; otherwise, it will ramp down just in time " - "for the peak (but some minor clipping may still occur)."; + "for the peak (but some minor clipping may still occur)."); gchar *gainmax_tip = - "The maximum amount to amplify the audio by"; + _("The maximum amount to amplify the audio by"); gchar *gainsmooth_tip = - "Defines how smoothly the volume will ramp up"; + _("Defines how smoothly the volume will ramp up"); gchar *target_tip = - "The target audio level for ramping up. Lowering the " + _("The target audio level for ramping up. Lowering the " "value gives a bit more dynamic range for peaks, but " - "will make the overall sound quieter."; - gchar *hist_text = "How long of a window to maintain"; + "will make the overall sound quieter."); + gchar *hist_text = _("How long of a window to maintain"); GtkWidget *preferences; GtkWidget *vbox2; @@ -373,7 +373,7 @@ preferences); gtk_container_set_border_width(GTK_CONTAINER(preferences), 10); gtk_window_set_title(GTK_WINDOW(preferences), - "AudioCompress preferences"); + _("AudioCompress preferences")); gtk_window_set_policy(GTK_WINDOW(preferences), TRUE, TRUE, FALSE); gtk_window_set_wmclass(GTK_WINDOW(preferences), "prefs", "xmms"); @@ -390,12 +390,12 @@ gtk_container_add(GTK_CONTAINER(notebook1), vbox5); gtk_container_set_border_width(GTK_CONTAINER(vbox5), 5); - frame1 = gtk_frame_new(" Quality Options "); + frame1 = gtk_frame_new(_(" Quality Options ")); gtk_widget_show(frame1); gtk_box_pack_start(GTK_BOX(vbox5), frame1, FALSE, FALSE, 0); clipping = gtk_check_button_new_with_label - (" Aggressively prevent clipping"); + (_(" Aggressively prevent clipping")); gtk_widget_ref(clipping); g_object_set_data_full(G_OBJECT(preferences), "anticlip", clipping, @@ -407,7 +407,7 @@ gtk_container_set_border_width(GTK_CONTAINER(clipping), 5); gtk_tooltips_set_tip(tooltips, clipping, clip_tip, NULL); - frame2 = gtk_frame_new(" Target & gain"); + frame2 = gtk_frame_new(_(" Target & gain")); gtk_widget_show(frame2); gtk_box_pack_start(GTK_BOX(vbox5), frame2, TRUE, TRUE, 0); @@ -418,7 +418,7 @@ gtk_table_set_row_spacings(GTK_TABLE(table1), 5); gtk_table_set_col_spacings(GTK_TABLE(table1), 5); - label5 = gtk_label_new("Target audio level:"); + label5 = gtk_label_new(_("Target audio level:")); gtk_widget_show(label5); gtk_table_attach(GTK_TABLE(table1), label5, 0, 1, 0, 1, (GtkAttachOptions)(GTK_FILL), @@ -426,7 +426,7 @@ gtk_label_set_justify(GTK_LABEL(label5), GTK_JUSTIFY_RIGHT); gtk_misc_set_alignment(GTK_MISC(label5), 0, 0.5); - label6 = gtk_label_new("Maximum gain:"); + label6 = gtk_label_new(_("Maximum gain:")); gtk_widget_show(label6); gtk_table_attach(GTK_TABLE(table1), label6, 0, 1, 1, 2, (GtkAttachOptions)(GTK_FILL), @@ -434,7 +434,7 @@ gtk_label_set_justify(GTK_LABEL(label6), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment(GTK_MISC(label6), 0, 0.5); - label7 = gtk_label_new("Gain smooth:"); + label7 = gtk_label_new(_("Gain smooth:")); gtk_widget_show(label7); gtk_table_attach(GTK_TABLE(table1), label7, 0, 1, 2, 3, (GtkAttachOptions)(GTK_FILL), @@ -486,7 +486,7 @@ gtk_tooltips_set_tip(tooltips, target_sp, target_tip, NULL); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(target_sp), TRUE); - frame3 = gtk_frame_new(" History "); + frame3 = gtk_frame_new(_(" History ")); gtk_widget_show(frame3); gtk_box_pack_start(GTK_BOX(vbox5), frame3, TRUE, TRUE, 0); @@ -518,9 +518,9 @@ (GtkAttachOptions)(0), 0, 0); gtk_tooltips_set_tip(tooltips, buckets_sp, - "How long of a history to maintain. " + _("How long of a history to maintain. " "A higher number will make the volume changes " - "less responsive.", + "less responsive."), NULL); hbuttonbox7 = gtk_hbutton_box_new(); @@ -529,12 +529,12 @@ gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox7), GTK_BUTTONBOX_END); - button8 = gtk_button_new_with_label("Load default values"); + button8 = gtk_button_new_with_label(_("Load default values")); gtk_widget_show(button8); gtk_container_add(GTK_CONTAINER(hbuttonbox7), button8); GTK_WIDGET_SET_FLAGS(button8, GTK_CAN_DEFAULT); - label4 = gtk_label_new("Audio values"); + label4 = gtk_label_new(_("Audio values")); gtk_widget_show(label4); gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook1), gtk_notebook_get_nth_page(GTK_NOTEBOOK @@ -553,17 +553,17 @@ gtk_button_box_set_child_ipadding(GTK_BUTTON_BOX(hbuttonbox2), 0, 0); - button3 = gtk_button_new_with_label("Ok"); + button3 = gtk_button_new_with_label(_("Ok")); gtk_widget_show(button3); gtk_container_add(GTK_CONTAINER(hbuttonbox2), button3); GTK_WIDGET_SET_FLAGS(button3, GTK_CAN_DEFAULT); - button4 = gtk_button_new_with_label("Cancel"); + button4 = gtk_button_new_with_label(_("Cancel")); gtk_widget_show(button4); gtk_container_add(GTK_CONTAINER(hbuttonbox2), button4); GTK_WIDGET_SET_FLAGS(button4, GTK_CAN_DEFAULT); - button7 = gtk_button_new_with_label("Apply"); + button7 = gtk_button_new_with_label(_("Apply")); gtk_widget_show(button7); gtk_container_add(GTK_CONTAINER(hbuttonbox2), button7); GTK_WIDGET_SET_FLAGS(button7, GTK_CAN_DEFAULT);
--- a/src/cdaudio-ng/cdaudio-ng.c Thu Jul 19 12:55:56 2007 -0500 +++ b/src/cdaudio-ng/cdaudio-ng.c Thu Jul 19 12:56:04 2007 -0500 @@ -2,13 +2,12 @@ /* todo: - vis_pcm...?! - - limit cd read speed - - cddb - fileinfo dialog - about dialog - remove //'s & todo's - additional comments - stop playback when configure + - configuration for cddb (server, port) */ #include <string.h> @@ -24,6 +23,7 @@ #include <cdio/audio.h> #include <cdio/sector.h> #include <cdio/cd_types.h> +#include <cddb/cddb.h> #include <glib.h> @@ -41,7 +41,7 @@ static int lasttrackno = -1; static CdIo_t *pcdio = NULL; static trackinfo_t *trackinfo = NULL; -static char album_name[DEF_STRING_LEN]; + static gboolean use_dae = TRUE; static gboolean use_cdtext = TRUE; static gboolean use_cddb = TRUE; @@ -74,11 +74,9 @@ 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 = { @@ -124,7 +122,9 @@ cleanup_on_error(); return; } - + + libcddb_init(); + ConfigDb *db = bmp_cfg_db_open(); gchar *string = NULL; @@ -218,8 +218,13 @@ } /* find an available, audio capable, cd drive */ - if (device != NULL && strlen(device) > 0) + if (device != NULL && strlen(device) > 0) { pcdio = cdio_open(device, DRIVER_UNKNOWN); + if (pcdio == NULL) { + fprintf(stderr, "cdaudio-ng: failed to open cd device \"%s\"\n", device); + return NULL; + } + } else { char **ppcd_drives = cdio_get_devices_with_cap(NULL, CDIO_FS_AUDIO, false); if (ppcd_drives != NULL) { /* we have at least one audio capable cd drive */ @@ -241,67 +246,164 @@ } /* limit read speed */ - if (limitspeed > 0) { + if (limitspeed > 0 && !use_dae) { if (debug) printf("cdaudio-ng: setting drive speed limit to %dx\n", limitspeed); if (cdio_set_speed(pcdio, limitspeed) != DRIVER_OP_SUCCESS) fprintf(stderr, "cdaudio-ng: failed to set drive speed to %dx\n", limitspeed); } - /* get track information */ + + /* get general track initialization */ cdrom_drive_t *pcdrom_drive = cdio_cddap_identify_cdio(pcdio, 1, NULL); // todo : check return / NULL firsttrackno = cdio_get_first_track_num(pcdrom_drive->p_cdio); lasttrackno = cdio_get_last_track_num(pcdrom_drive->p_cdio); if (firsttrackno == CDIO_INVALID_TRACK || lasttrackno == CDIO_INVALID_TRACK) { - fprintf(stderr, "cdaudio-ng: failed to retrieve first/last track number"); + fprintf(stderr, "cdaudio-ng: failed to retrieve first/last track number\n"); cleanup_on_error(); return NULL; } if (debug) printf("cdaudio-ng: first track is %d and last track is %d\n", firsttrackno, lasttrackno); - /* add track "file" names to the list */ - GList *list = NULL; if (trackinfo != NULL) /* if a previously allocated track information exists, we free it */ free(trackinfo); trackinfo = (trackinfo_t *) malloc(sizeof(trackinfo_t) * (lasttrackno + 1)); int trackno; + + 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); + + 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); + cleanup_on_error(); + return NULL; + } + } + + /* initialize de cddb subsystem */ + cddb_conn_t *pcddb_conn = NULL; + cddb_disc_t *pcddb_disc = NULL; + cddb_track_t *pcddb_track = NULL; + + if (use_cddb) { + pcddb_conn = cddb_new(); + if (pcddb_conn == NULL) + fprintf(stderr, "cdaudio-ng: failed to create the cddb connection\n"); + else { + if (debug) + printf("cdaudio-ng: getting cddb info\n"); + + // todo: change the default cddb settings + + pcddb_disc = cddb_disc_new(); + for (trackno = firsttrackno; trackno <= lasttrackno; trackno++) { + pcddb_track = cddb_track_new(); + cddb_track_set_frame_offset(pcddb_track, trackinfo[trackno].startlsn); + cddb_disc_add_track(pcddb_disc, pcddb_track); + } + + msf_t startmsf, endmsf; + cdio_get_track_msf(pcdio, 1, &startmsf); + cdio_get_track_msf(pcdio, CDIO_CDROM_LEADOUT_TRACK, &endmsf); + cddb_disc_set_length(pcddb_disc, cdio_audio_get_msf_seconds(&endmsf) - cdio_audio_get_msf_seconds(&startmsf)); + + int matches; + if ((matches = cddb_query(pcddb_conn, pcddb_disc)) == -1) { + fprintf(stderr, "cdaudio-ng: failed to query the cddb server: %s\n", cddb_error_str(cddb_errno(pcddb_conn))); + cddb_disc_destroy(pcddb_disc); + pcddb_disc = NULL; + } + else { + if (debug) + printf("cdaudio-ng: discid = %X, category = \"%s\"\n", cddb_disc_get_discid(pcddb_disc), cddb_disc_get_category_str(pcddb_disc)); + + cddb_read(pcddb_conn, pcddb_disc); + if (cddb_errno(pcddb_conn) != CDDB_ERR_OK) { + fprintf(stderr, "cdaudio-ng: failed to read the cddb info: %s\n", cddb_error_str(cddb_errno(pcddb_conn))); + cddb_disc_destroy(pcddb_disc); + pcddb_disc = NULL; + } + else { + if (debug) + printf("cdaudio-ng: we have got the cddb info\n"); + + strcpy(trackinfo[0].performer, cddb_disc_get_artist(pcddb_disc)); + strcpy(trackinfo[0].name, cddb_disc_get_title(pcddb_disc)); + strcpy(trackinfo[0].genre, cddb_disc_get_genre(pcddb_disc)); + } + } + } + } + + /* adding trackinfo[0] information (the disc) */ + if (use_cdtext) { + if (debug) + printf("cdaudio-ng: getting cd-text information for disc\n"); + cdtext_t *pcdtext = cdio_get_cdtext(pcdrom_drive->p_cdio, 0); + if (pcdtext == NULL || pcdtext->field[CDTEXT_TITLE] == NULL) { + if (debug) + printf("cdaudio-ng: no cd-text available for disc\n"); + } + else { + strcpy(trackinfo[0].performer, pcdtext->field[CDTEXT_PERFORMER] != NULL ? pcdtext->field[CDTEXT_PERFORMER] : ""); + strcpy(trackinfo[0].name, pcdtext->field[CDTEXT_TITLE] != NULL ? pcdtext->field[CDTEXT_TITLE] : ""); + strcpy(trackinfo[0].genre, pcdtext->field[CDTEXT_GENRE] != NULL ? pcdtext->field[CDTEXT_GENRE] : ""); + } + } + + /* add track "file" names to the list */ + GList *list = NULL; for (trackno = firsttrackno; trackno <= lasttrackno; trackno++) { list = g_list_append(list, g_strdup_printf("track%02u.cda", trackno)); cdtext_t *pcdtext = NULL; - if (use_cdtext) + if (use_cdtext) { + if (debug) + printf("cdaudio-ng: getting cd-text information for track %d\n", trackno); pcdtext = cdio_get_cdtext(pcdrom_drive->p_cdio, trackno); + if (pcdtext == NULL || pcdtext->field[CDTEXT_PERFORMER] == NULL) { + if (debug) + printf("cdaudio-ng: no cd-text available for track %d\n", trackno); + pcdtext = NULL; + } + } if (pcdtext != NULL) { strcpy(trackinfo[trackno].performer, pcdtext->field[CDTEXT_PERFORMER] != NULL ? pcdtext->field[CDTEXT_PERFORMER] : ""); strcpy(trackinfo[trackno].name, pcdtext->field[CDTEXT_TITLE] != NULL ? pcdtext->field[CDTEXT_TITLE] : ""); strcpy(trackinfo[trackno].genre, pcdtext->field[CDTEXT_GENRE] != NULL ? pcdtext->field[CDTEXT_GENRE] : ""); } - else { - strcpy(trackinfo[trackno].performer, ""); - strcpy(trackinfo[trackno].name, ""); - strcpy(trackinfo[trackno].genre, ""); - } - - // todo: implement cddb - + else + if (pcddb_disc != NULL) { + cddb_track_t *pcddb_track = cddb_disc_get_track(pcddb_disc, trackno - 1); + strcpy(trackinfo[trackno].performer, cddb_track_get_artist(pcddb_track)); + strcpy(trackinfo[trackno].name, cddb_track_get_title(pcddb_track)); + strcpy(trackinfo[trackno].genre, cddb_disc_get_genre(pcddb_disc)); + } + else { + strcpy(trackinfo[trackno].performer, ""); + strcpy(trackinfo[trackno].name, ""); + strcpy(trackinfo[trackno].genre, ""); + } + if (strlen(trackinfo[trackno].name) == 0) sprintf(trackinfo[trackno].name, "CD Audio Track %02u", 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); - - 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); - g_list_free(list); - cleanup_on_error(); - return NULL; + } + + if (debug) { + printf("cdaudio-ng: disc has : performer = \"%s\", name = \"%s\", genre = \"%s\"\n", + trackinfo[0].performer, trackinfo[0].name, trackinfo[0].genre); + for (trackno = firsttrackno; trackno <= lasttrackno; trackno++) { + printf("cdaudio-ng: track %d has : performer = \"%s\", name = \"%s\", genre = \"%s\", startlsn = %d, endlsn = %d\n", + trackno, trackinfo[trackno].performer, trackinfo[trackno].name, trackinfo[trackno].genre, trackinfo[trackno].startlsn, trackinfo[trackno].endlsn); } + } - if (debug) - printf("cdaudio-ng: track %d has : performer = \"%s\", name = \"%s\", genre = \"%s\", startlsn = %d, endlsn = %d\n", - trackno, trackinfo[trackno].performer, trackinfo[trackno].name, trackinfo[trackno].genre, trackinfo[trackno].startlsn, trackinfo - [trackno].endlsn); - } + if (pcddb_disc != NULL) + cddb_disc_destroy(pcddb_disc); + if (pcddb_conn != NULL) + cddb_destroy(pcddb_conn); return list; } @@ -543,6 +645,8 @@ if (debug) printf("cdaudio-ng: cdaudio_cleanup()\n"); + libcddb_shutdown(); + if (pcdio!= NULL) { if (playing_track != -1 && !use_dae) cdio_audio_stop(pcdio); @@ -554,7 +658,7 @@ trackinfo = NULL; } playing_track = -1; - + // todo: destroy the gui ConfigDb *db = bmp_cfg_db_open(); @@ -606,7 +710,7 @@ return NULL; tuple->performer = strlen(trackinfo[trackno].performer) > 0 ? g_strdup(trackinfo[trackno].performer) : NULL; - tuple->album_name = strlen(album_name) > 0 ? g_strdup(album_name) : NULL; + tuple->album_name = strlen(trackinfo[0].name) > 0 ? g_strdup(trackinfo[0].name) : NULL; tuple->track_name = strlen(trackinfo[trackno].name) > 0 ? g_strdup(trackinfo[trackno].name) : NULL; tuple->track_number = trackno; tuple->file_name = g_strdup(basename(filename)); @@ -622,7 +726,7 @@ /* auxiliar functions */ -/* + static int calculate_digit_sum(int n) { int ret = 0; @@ -634,9 +738,9 @@ return ret; } } -*/ + -/* + static unsigned long calculate_cddb_discid() { int trackno, t, n = 0; @@ -644,18 +748,18 @@ msf_t msf; for (trackno = firsttrackno; trackno <= lasttrackno; trackno++) { - cdio_get_track_msf(pcdrom_drive->p_cdio, trackno, &msf); + cdio_get_track_msf(pcdio, trackno, &msf); n += calculate_digit_sum(cdio_audio_get_msf_seconds(&msf)); } - cdio_get_track_msf(pcdrom_drive->p_cdio, 1, &startmsf); - cdio_get_track_msf(pcdrom_drive->p_cdio, CDIO_CDROM_LEADOUT_TRACK, &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) {
--- a/src/filewriter/filewriter.c Thu Jul 19 12:55:56 2007 -0500 +++ b/src/filewriter/filewriter.c Thu Jul 19 12:56:04 2007 -0500 @@ -164,8 +164,8 @@ if (dialog != NULL) return; - dialog = xmms_show_message("About FileWriter-Plugin", - "FileWriter-Plugin\n\n" + dialog = xmms_show_message(_("About FileWriter-Plugin"), + _("FileWriter-Plugin\n\n" "This program is free software; you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation; either version 2 of the License, or\n" @@ -179,7 +179,7 @@ "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,\n" - "USA.", "Ok", FALSE, NULL, NULL); + "USA."), _("Ok"), FALSE, NULL, NULL); gtk_signal_connect(GTK_OBJECT(dialog), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &dialog); } @@ -334,11 +334,11 @@ new_channels = input.channels; ep = get_current_effect_plugin(); - if ( effects_enabled() && ep && ep->query_format ) { + if ( effects_enabled() && ep && ep->query_format ) { ep->query_format(&new_format,&new_frequency,&new_channels); } - if ( effects_enabled() && ep && ep->mod_samples ) { + if ( effects_enabled() && ep && ep->mod_samples ) { length = ep->mod_samples(&ptr,length, input.format, input.frequency, @@ -575,7 +575,7 @@ gtk_box_pack_start(GTK_BOX(path_hbox), path_label, FALSE, FALSE, 0); path_dirbrowser = - gtk_file_chooser_button_new ("Pick a folder", + gtk_file_chooser_button_new (_("Pick a folder"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(path_dirbrowser), file_path); @@ -618,7 +618,7 @@ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(use_suffix_toggle), use_suffix); gtk_box_pack_start(GTK_BOX(configure_vbox), use_suffix_toggle, FALSE, FALSE, 0); use_suffix_tooltips = gtk_tooltips_new(); - gtk_tooltips_set_tip(use_suffix_tooltips, use_suffix_toggle, "If enabled, the extension from the original filename will not be stripped before adding the .wav extension to the end.", NULL); + gtk_tooltips_set_tip(use_suffix_tooltips, use_suffix_toggle, _("If enabled, the extension from the original filename will not be stripped before adding the .wav extension to the end."), NULL); gtk_tooltips_enable(use_suffix_tooltips); if (filenamefromtags)
--- a/src/filewriter/mp3.c Thu Jul 19 12:55:56 2007 -0500 +++ b/src/filewriter/mp3.c Thu Jul 19 12:56:04 2007 -0500 @@ -305,7 +305,7 @@ encout = lame_encode_flush_nogap(gfp, encbuffer, ENCBUFFER_SIZE); vfs_fwrite(encbuffer, 1, encout, output_file); - // lame_mp3_tags_fid(gfp, output_file); // will erase id3v2 tag?? + // lame_mp3_tags_fid(gfp, output_file); // will erase id3v2 tag?? lame_close(gfp); @@ -322,7 +322,7 @@ static gint mp3_playing(void) { -#ifdef DEBUG +#ifdef DEBUG printf("lame: buffer_playing = %d\n", encout ? 1 : 0); #endif return encout ? 1 : 0; @@ -664,7 +664,7 @@ GTK_SIGNAL_FUNC(gtk_widget_destroyed), &configure_win); gtk_window_set_title(GTK_WINDOW(configure_win), - "MP3 Configuration"); + _("MP3 Configuration")); gtk_window_set_position(GTK_WINDOW(configure_win), GTK_WIN_POS_MOUSE); gtk_window_set_policy(GTK_WINDOW(configure_win), FALSE, TRUE, @@ -691,7 +691,7 @@ /* Algorithm Quality */ - alg_quality_frame = gtk_frame_new("Algorithm Quality:"); + alg_quality_frame = gtk_frame_new(_("Algorithm Quality:")); gtk_container_set_border_width(GTK_CONTAINER(alg_quality_frame), 5); gtk_box_pack_start(GTK_BOX(quality_hbox1), alg_quality_frame, @@ -713,7 +713,7 @@ GTK_SIGNAL_FUNC(algo_qual), NULL); gtk_tooltips_set_tip(GTK_TOOLTIPS(quality_tips), alg_quality_spin, - "best/slowest:0;\nworst/fastest:9;\nrecommended:2;\ndefault:5;", + _("best/slowest:0;\nworst/fastest:9;\nrecommended:2;\ndefault:5;"), ""); gtk_spin_button_set_value(GTK_SPIN_BUTTON(alg_quality_spin), @@ -721,7 +721,7 @@ /* Output Samplerate */ - samplerate_frame = gtk_frame_new("Output Samplerate:"); + samplerate_frame = gtk_frame_new(_("Output Samplerate:")); gtk_container_set_border_width(GTK_CONTAINER(samplerate_frame), 5); gtk_box_pack_start(GTK_BOX(quality_hbox1), samplerate_frame, FALSE, FALSE, 0); @@ -732,62 +732,62 @@ samplerate_hbox); samplerate_option_menu = gtk_option_menu_new(); samplerate_menu = gtk_menu_new(); - samplerate_menu_item = gtk_menu_item_new_with_label("Auto"); + samplerate_menu_item = gtk_menu_item_new_with_label(_("Auto")); gtk_signal_connect(GTK_OBJECT(samplerate_menu_item), "activate", GTK_SIGNAL_FUNC(samplerate_activate), GINT_TO_POINTER(0)); gtk_menu_append(GTK_MENU(samplerate_menu), samplerate_menu_item); - samplerate_menu_item = gtk_menu_item_new_with_label("8"); + samplerate_menu_item = gtk_menu_item_new_with_label(_("8000")); gtk_signal_connect(GTK_OBJECT(samplerate_menu_item), "activate", GTK_SIGNAL_FUNC(samplerate_activate), GINT_TO_POINTER(8000)); gtk_menu_append(GTK_MENU(samplerate_menu), samplerate_menu_item); - samplerate_menu_item = gtk_menu_item_new_with_label("11.025"); + samplerate_menu_item = gtk_menu_item_new_with_label(_("11025")); gtk_signal_connect(GTK_OBJECT(samplerate_menu_item), "activate", GTK_SIGNAL_FUNC(samplerate_activate), GINT_TO_POINTER(11025)); gtk_menu_append(GTK_MENU(samplerate_menu), samplerate_menu_item); - samplerate_menu_item = gtk_menu_item_new_with_label("12"); + samplerate_menu_item = gtk_menu_item_new_with_label(_("12000")); gtk_signal_connect(GTK_OBJECT(samplerate_menu_item), "activate", GTK_SIGNAL_FUNC(samplerate_activate), GINT_TO_POINTER(12000)); gtk_menu_append(GTK_MENU(samplerate_menu), samplerate_menu_item); - samplerate_menu_item = gtk_menu_item_new_with_label("16"); + samplerate_menu_item = gtk_menu_item_new_with_label(_("16000")); gtk_signal_connect(GTK_OBJECT(samplerate_menu_item), "activate", GTK_SIGNAL_FUNC(samplerate_activate), GINT_TO_POINTER(16000)); gtk_menu_append(GTK_MENU(samplerate_menu), samplerate_menu_item); - samplerate_menu_item = gtk_menu_item_new_with_label("22.05"); + samplerate_menu_item = gtk_menu_item_new_with_label(_("22050")); gtk_signal_connect(GTK_OBJECT(samplerate_menu_item), "activate", GTK_SIGNAL_FUNC(samplerate_activate), GINT_TO_POINTER(22050)); gtk_menu_append(GTK_MENU(samplerate_menu), samplerate_menu_item); - samplerate_menu_item = gtk_menu_item_new_with_label("24"); + samplerate_menu_item = gtk_menu_item_new_with_label(_("24000")); gtk_signal_connect(GTK_OBJECT(samplerate_menu_item), "activate", GTK_SIGNAL_FUNC(samplerate_activate), GINT_TO_POINTER(24000)); gtk_menu_append(GTK_MENU(samplerate_menu), samplerate_menu_item); - samplerate_menu_item = gtk_menu_item_new_with_label("32"); + samplerate_menu_item = gtk_menu_item_new_with_label(_("32000")); gtk_signal_connect(GTK_OBJECT(samplerate_menu_item), "activate", GTK_SIGNAL_FUNC(samplerate_activate), GINT_TO_POINTER(32000)); gtk_menu_append(GTK_MENU(samplerate_menu), samplerate_menu_item); - samplerate_menu_item = gtk_menu_item_new_with_label("44.1"); + samplerate_menu_item = gtk_menu_item_new_with_label(_("44100")); gtk_signal_connect(GTK_OBJECT(samplerate_menu_item), "activate", GTK_SIGNAL_FUNC(samplerate_activate), GINT_TO_POINTER(44100)); gtk_menu_append(GTK_MENU(samplerate_menu), samplerate_menu_item); - samplerate_menu_item = gtk_menu_item_new_with_label("48"); + samplerate_menu_item = gtk_menu_item_new_with_label(_("48000")); gtk_signal_connect(GTK_OBJECT(samplerate_menu_item), "activate", GTK_SIGNAL_FUNC(samplerate_activate), GINT_TO_POINTER(48000)); gtk_menu_append(GTK_MENU(samplerate_menu), samplerate_menu_item); gtk_option_menu_set_menu(GTK_OPTION_MENU(samplerate_option_menu), samplerate_menu); - gtk_widget_set_usize(samplerate_option_menu, 70, 28); + gtk_widget_set_usize(samplerate_option_menu, 75, 28); gtk_box_pack_start(GTK_BOX(samplerate_hbox), samplerate_option_menu, FALSE, FALSE, 0); - samplerate_label = gtk_label_new("(kHz)"); + samplerate_label = gtk_label_new(_("(Hz)")); gtk_misc_set_alignment(GTK_MISC(samplerate_label), 0, 0.5); gtk_box_pack_start(GTK_BOX(samplerate_hbox), samplerate_label, FALSE, FALSE, 0); @@ -839,7 +839,7 @@ /* Encoder Quality */ - enc_quality_frame = gtk_frame_new("Bitrate / Compression ratio:"); + enc_quality_frame = gtk_frame_new(_("Bitrate / Compression ratio:")); gtk_container_set_border_width(GTK_CONTAINER(enc_quality_frame), 5); gtk_box_pack_start(GTK_BOX(quality_vbox), enc_quality_frame, FALSE, @@ -865,48 +865,48 @@ gtk_box_pack_start(GTK_BOX(hbox1), enc_radio1, FALSE, FALSE, 0); // label 1 - enc_quality_label1 = gtk_label_new("Bitrate (kbps):"); + enc_quality_label1 = gtk_label_new(_("Bitrate (kbps):")); gtk_box_pack_start(GTK_BOX(hbox1), enc_quality_label1, FALSE, FALSE, 0); // bitrate menu bitrate_option_menu = gtk_option_menu_new(); bitrate_menu = gtk_menu_new(); - bitrate_menu_item = gtk_menu_item_new_with_label("8"); + bitrate_menu_item = gtk_menu_item_new_with_label(_("8")); gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate", GTK_SIGNAL_FUNC(bitrate_activate), GINT_TO_POINTER(8)); gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item); - bitrate_menu_item = gtk_menu_item_new_with_label("16"); + bitrate_menu_item = gtk_menu_item_new_with_label(_("16")); gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate", GTK_SIGNAL_FUNC(bitrate_activate), GINT_TO_POINTER(16)); gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item); - bitrate_menu_item = gtk_menu_item_new_with_label("24"); + bitrate_menu_item = gtk_menu_item_new_with_label(_("24")); gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate", GTK_SIGNAL_FUNC(bitrate_activate), GINT_TO_POINTER(24)); gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item); - bitrate_menu_item = gtk_menu_item_new_with_label("32"); + bitrate_menu_item = gtk_menu_item_new_with_label(_("32")); gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate", GTK_SIGNAL_FUNC(bitrate_activate), GINT_TO_POINTER(32)); gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item); - bitrate_menu_item = gtk_menu_item_new_with_label("40"); + bitrate_menu_item = gtk_menu_item_new_with_label(_("40")); gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate", GTK_SIGNAL_FUNC(bitrate_activate), GINT_TO_POINTER(40)); gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item); - bitrate_menu_item = gtk_menu_item_new_with_label("48"); + bitrate_menu_item = gtk_menu_item_new_with_label(_("48")); gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate", GTK_SIGNAL_FUNC(bitrate_activate), GINT_TO_POINTER(48)); gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item); - bitrate_menu_item = gtk_menu_item_new_with_label("56"); + bitrate_menu_item = gtk_menu_item_new_with_label(_("56")); gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate", GTK_SIGNAL_FUNC(bitrate_activate), GINT_TO_POINTER(56)); gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item); - bitrate_menu_item = gtk_menu_item_new_with_label("64"); + bitrate_menu_item = gtk_menu_item_new_with_label(_("64")); gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate", GTK_SIGNAL_FUNC(bitrate_activate), GINT_TO_POINTER(64)); @@ -916,42 +916,42 @@ GTK_SIGNAL_FUNC(bitrate_activate), GINT_TO_POINTER(80)); gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item); - bitrate_menu_item = gtk_menu_item_new_with_label("96"); + bitrate_menu_item = gtk_menu_item_new_with_label(_("96")); gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate", GTK_SIGNAL_FUNC(bitrate_activate), GINT_TO_POINTER(96)); gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item); - bitrate_menu_item = gtk_menu_item_new_with_label("112"); + bitrate_menu_item = gtk_menu_item_new_with_label(_("112")); gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate", GTK_SIGNAL_FUNC(bitrate_activate), GINT_TO_POINTER(112)); gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item); - bitrate_menu_item = gtk_menu_item_new_with_label("128"); + bitrate_menu_item = gtk_menu_item_new_with_label(_("128")); gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate", GTK_SIGNAL_FUNC(bitrate_activate), GINT_TO_POINTER(128)); gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item); - bitrate_menu_item = gtk_menu_item_new_with_label("160"); + bitrate_menu_item = gtk_menu_item_new_with_label(_("160")); gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate", GTK_SIGNAL_FUNC(bitrate_activate), GINT_TO_POINTER(160)); gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item); - bitrate_menu_item = gtk_menu_item_new_with_label("192"); + bitrate_menu_item = gtk_menu_item_new_with_label(_("192")); gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate", GTK_SIGNAL_FUNC(bitrate_activate), GINT_TO_POINTER(192)); gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item); - bitrate_menu_item = gtk_menu_item_new_with_label("224"); + bitrate_menu_item = gtk_menu_item_new_with_label(_("224")); gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate", GTK_SIGNAL_FUNC(bitrate_activate), GINT_TO_POINTER(224)); gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item); - bitrate_menu_item = gtk_menu_item_new_with_label("256"); + bitrate_menu_item = gtk_menu_item_new_with_label(_("256")); gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate", GTK_SIGNAL_FUNC(bitrate_activate), GINT_TO_POINTER(256)); gtk_menu_append(GTK_MENU(bitrate_menu), bitrate_menu_item); - bitrate_menu_item = gtk_menu_item_new_with_label("320"); + bitrate_menu_item = gtk_menu_item_new_with_label(_("320")); gtk_signal_connect(GTK_OBJECT(bitrate_menu_item), "activate", GTK_SIGNAL_FUNC(bitrate_activate), GINT_TO_POINTER(320)); @@ -1037,7 +1037,7 @@ // hbox2 for compression ratio hbox2 = gtk_hbox_new(FALSE, 5); - gtk_container_add(GTK_CONTAINER(enc_quality_vbox), hbox2); + gtk_container_add(GTK_CONTAINER(enc_quality_vbox), hbox2); // radio 2 enc_radio2 = gtk_radio_button_new_from_widget(GTK_RADIO_BUTTON(enc_radio1)); @@ -1048,7 +1048,7 @@ gtk_box_pack_start(GTK_BOX(hbox2), enc_radio2, FALSE, FALSE, 0); // label - enc_quality_label2 = gtk_label_new("Compression ratio:"); + enc_quality_label2 = gtk_label_new(_("Compression ratio:")); gtk_box_pack_start(GTK_BOX(hbox2), enc_quality_label2, FALSE, FALSE, 0); // comp-ratio spin @@ -1078,7 +1078,7 @@ /* Audio Mode */ - mode_frame = gtk_frame_new("Audio Mode:"); + mode_frame = gtk_frame_new(_("Audio Mode:")); gtk_container_set_border_width(GTK_CONTAINER(mode_frame), 5); gtk_box_pack_start(GTK_BOX(quality_vbox), mode_frame, FALSE, FALSE, 0); @@ -1088,22 +1088,22 @@ gtk_container_add(GTK_CONTAINER(mode_frame), mode_hbox); mode_option_menu = gtk_option_menu_new(); mode_menu = gtk_menu_new(); - mode_menu_item = gtk_menu_item_new_with_label("Auto"); + mode_menu_item = gtk_menu_item_new_with_label(_("Auto")); gtk_signal_connect(GTK_OBJECT(mode_menu_item), "activate", GTK_SIGNAL_FUNC(mode_activate), GINT_TO_POINTER(4)); gtk_menu_append(GTK_MENU(mode_menu), mode_menu_item); - mode_menu_item = gtk_menu_item_new_with_label("Joint-Stereo"); + mode_menu_item = gtk_menu_item_new_with_label(_("Joint-Stereo")); gtk_signal_connect(GTK_OBJECT(mode_menu_item), "activate", GTK_SIGNAL_FUNC(mode_activate), GINT_TO_POINTER(1)); gtk_menu_append(GTK_MENU(mode_menu), mode_menu_item); - mode_menu_item = gtk_menu_item_new_with_label("Stereo"); + mode_menu_item = gtk_menu_item_new_with_label(_("Stereo")); gtk_signal_connect(GTK_OBJECT(mode_menu_item), "activate", GTK_SIGNAL_FUNC(mode_activate), GINT_TO_POINTER(0)); gtk_menu_append(GTK_MENU(mode_menu), mode_menu_item); - mode_menu_item = gtk_menu_item_new_with_label("Mono"); + mode_menu_item = gtk_menu_item_new_with_label(_("Mono")); gtk_signal_connect(GTK_OBJECT(mode_menu_item), "activate", GTK_SIGNAL_FUNC(mode_activate), GINT_TO_POINTER(3)); @@ -1134,7 +1134,7 @@ break; } - ms_mode_toggle = gtk_check_button_new_with_label("auto-M/S mode"); + ms_mode_toggle = gtk_check_button_new_with_label(_("auto-M/S mode")); gtk_box_pack_start(GTK_BOX(mode_hbox), ms_mode_toggle, TRUE, TRUE, 5); gtk_signal_connect(GTK_OBJECT(ms_mode_toggle), "toggled", @@ -1146,7 +1146,7 @@ /* Misc */ - misc_frame = gtk_frame_new("Misc:"); + misc_frame = gtk_frame_new(_("Misc:")); gtk_container_set_border_width(GTK_CONTAINER(misc_frame), 5); gtk_box_pack_start(GTK_BOX(quality_vbox), misc_frame, FALSE, FALSE, 0); @@ -1157,7 +1157,7 @@ enforce_iso_toggle = gtk_check_button_new_with_label - ("Enforce strict ISO complience"); + (_("Enforce strict ISO complience")); gtk_box_pack_start(GTK_BOX(misc_vbox), enforce_iso_toggle, TRUE, TRUE, 2); gtk_signal_connect(GTK_OBJECT(enforce_iso_toggle), "toggled", @@ -1168,7 +1168,7 @@ (enforce_iso_toggle), TRUE); error_protection_toggle = - gtk_check_button_new_with_label("Error protection"); + gtk_check_button_new_with_label(_("Error protection")); gtk_box_pack_start(GTK_BOX(misc_vbox), error_protection_toggle, TRUE, TRUE, 2); gtk_signal_connect(GTK_OBJECT(error_protection_toggle), "toggled", @@ -1180,12 +1180,12 @@ gtk_tooltips_set_tip(GTK_TOOLTIPS(quality_tips), error_protection_toggle, - "Adds 16 bit checksum to every frame", ""); + _("Adds 16 bit checksum to every frame"), ""); /* Add the Notebook */ gtk_notebook_append_page(GTK_NOTEBOOK(notebook), quality_vbox, - gtk_label_new("Quality")); + gtk_label_new(_("Quality"))); /* VBR/ABR */ @@ -1197,7 +1197,7 @@ /* Toggle VBR */ - vbr_toggle = gtk_check_button_new_with_label("Enable VBR/ABR"); + vbr_toggle = gtk_check_button_new_with_label(_("Enable VBR/ABR")); gtk_widget_set_usize(vbr_toggle, 60, 30); gtk_box_pack_start(GTK_BOX(vbr_vbox), vbr_toggle, FALSE, FALSE, 2); gtk_signal_connect(GTK_OBJECT(vbr_toggle), "toggled", @@ -1209,7 +1209,7 @@ /* Choose VBR/ABR */ - vbr_type_frame = gtk_frame_new("Type:"); + vbr_type_frame = gtk_frame_new(_("Type:")); gtk_container_set_border_width(GTK_CONTAINER(vbr_type_frame), 5); gtk_box_pack_start(GTK_BOX(vbr_options_vbox), vbr_type_frame, FALSE, FALSE, 2); @@ -1220,7 +1220,7 @@ vbr_type_radio1 = gtk_radio_button_new_with_label(NULL, "VBR"); gtk_tooltips_set_tip(GTK_TOOLTIPS(vbr_tips), vbr_type_radio1, - "Variable bitrate", ""); + _("Variable bitrate"), ""); gtk_box_pack_start(GTK_BOX(vbr_type_hbox), vbr_type_radio1, TRUE, TRUE, 2); if (vbr_type == 0) @@ -1232,7 +1232,7 @@ (vbr_type_radio1), "ABR"); gtk_tooltips_set_tip(GTK_TOOLTIPS(vbr_tips), vbr_type_radio2, - "Average bitrate", ""); + _("Average bitrate"), ""); gtk_box_pack_start(GTK_BOX(vbr_type_hbox), vbr_type_radio2, TRUE, TRUE, 2); if (vbr_type == 1) @@ -1246,7 +1246,7 @@ /* VBR Options */ - vbr_frame = gtk_frame_new("VBR Options:"); + vbr_frame = gtk_frame_new(_("VBR Options:")); gtk_container_set_border_width(GTK_CONTAINER(vbr_frame), 5); gtk_box_pack_start(GTK_BOX(vbr_options_vbox), vbr_frame, FALSE, FALSE, 2); @@ -1269,87 +1269,87 @@ vbr_min_option_menu = gtk_option_menu_new(); vbr_min_menu = gtk_menu_new(); - vbr_min_menu_item = gtk_menu_item_new_with_label("8"); + vbr_min_menu_item = gtk_menu_item_new_with_label(_("8")); gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_min_activate), GINT_TO_POINTER(8)); gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item); - vbr_min_menu_item = gtk_menu_item_new_with_label("16"); + vbr_min_menu_item = gtk_menu_item_new_with_label(_("16")); gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_min_activate), GINT_TO_POINTER(16)); gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item); - vbr_min_menu_item = gtk_menu_item_new_with_label("24"); + vbr_min_menu_item = gtk_menu_item_new_with_label(_("24")); gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_min_activate), GINT_TO_POINTER(24)); gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item); - vbr_min_menu_item = gtk_menu_item_new_with_label("32"); + vbr_min_menu_item = gtk_menu_item_new_with_label(_("32")); gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_min_activate), GINT_TO_POINTER(32)); gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item); - vbr_min_menu_item = gtk_menu_item_new_with_label("40"); + vbr_min_menu_item = gtk_menu_item_new_with_label(_("40")); gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_min_activate), GINT_TO_POINTER(40)); gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item); - vbr_min_menu_item = gtk_menu_item_new_with_label("48"); + vbr_min_menu_item = gtk_menu_item_new_with_label(_("48")); gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_min_activate), GINT_TO_POINTER(48)); gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item); - vbr_min_menu_item = gtk_menu_item_new_with_label("56"); + vbr_min_menu_item = gtk_menu_item_new_with_label(_("56")); gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_min_activate), GINT_TO_POINTER(56)); gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item); - vbr_min_menu_item = gtk_menu_item_new_with_label("64"); + vbr_min_menu_item = gtk_menu_item_new_with_label(_("64")); gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_min_activate), GINT_TO_POINTER(64)); gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item); - vbr_min_menu_item = gtk_menu_item_new_with_label("80"); + vbr_min_menu_item = gtk_menu_item_new_with_label(_("80")); gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_min_activate), GINT_TO_POINTER(80)); gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item); - vbr_min_menu_item = gtk_menu_item_new_with_label("96"); + vbr_min_menu_item = gtk_menu_item_new_with_label(_("96")); gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_min_activate), GINT_TO_POINTER(96)); gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item); - vbr_min_menu_item = gtk_menu_item_new_with_label("112"); + vbr_min_menu_item = gtk_menu_item_new_with_label(_("112")); gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_min_activate), GINT_TO_POINTER(112)); gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item); - vbr_min_menu_item = gtk_menu_item_new_with_label("128"); + vbr_min_menu_item = gtk_menu_item_new_with_label(_("128")); gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_min_activate), GINT_TO_POINTER(128)); gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item); - vbr_min_menu_item = gtk_menu_item_new_with_label("160"); + vbr_min_menu_item = gtk_menu_item_new_with_label(_("160")); gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_min_activate), GINT_TO_POINTER(160)); gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item); - vbr_min_menu_item = gtk_menu_item_new_with_label("192"); + vbr_min_menu_item = gtk_menu_item_new_with_label(_("192")); gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_min_activate), GINT_TO_POINTER(192)); gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item); - vbr_min_menu_item = gtk_menu_item_new_with_label("224"); + vbr_min_menu_item = gtk_menu_item_new_with_label(_("224")); gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_min_activate), GINT_TO_POINTER(224)); gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item); - vbr_min_menu_item = gtk_menu_item_new_with_label("256"); + vbr_min_menu_item = gtk_menu_item_new_with_label(_("256")); gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_min_activate), GINT_TO_POINTER(256)); gtk_menu_append(GTK_MENU(vbr_min_menu), vbr_min_menu_item); - vbr_min_menu_item = gtk_menu_item_new_with_label("320"); + vbr_min_menu_item = gtk_menu_item_new_with_label(_("320")); gtk_signal_connect(GTK_OBJECT(vbr_min_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_min_activate), GINT_TO_POINTER(320)); @@ -1439,94 +1439,94 @@ gtk_container_add(GTK_CONTAINER(vbr_options_vbox2), vbr_options_hbox2); - vbr_max_label = gtk_label_new("Maximum bitrate (kbps):"); + vbr_max_label = gtk_label_new(_("Maximum bitrate (kbps):")); gtk_misc_set_alignment(GTK_MISC(vbr_max_label), 0, 0.5); gtk_box_pack_start(GTK_BOX(vbr_options_hbox2), vbr_max_label, TRUE, TRUE, 0); vbr_max_option_menu = gtk_option_menu_new(); vbr_max_menu = gtk_menu_new(); - vbr_max_menu_item = gtk_menu_item_new_with_label("8"); + vbr_max_menu_item = gtk_menu_item_new_with_label(_("8")); gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_max_activate), GINT_TO_POINTER(8)); gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item); - vbr_max_menu_item = gtk_menu_item_new_with_label("16"); + vbr_max_menu_item = gtk_menu_item_new_with_label(_("16")); gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_max_activate), GINT_TO_POINTER(16)); gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item); - vbr_max_menu_item = gtk_menu_item_new_with_label("24"); + vbr_max_menu_item = gtk_menu_item_new_with_label(_("24")); gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_max_activate), GINT_TO_POINTER(24)); gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item); - vbr_max_menu_item = gtk_menu_item_new_with_label("32"); + vbr_max_menu_item = gtk_menu_item_new_with_label(_("32")); gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_max_activate), GINT_TO_POINTER(32)); gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item); - vbr_max_menu_item = gtk_menu_item_new_with_label("40"); + vbr_max_menu_item = gtk_menu_item_new_with_label(_("40")); gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_max_activate), GINT_TO_POINTER(40)); gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item); - vbr_max_menu_item = gtk_menu_item_new_with_label("48"); + vbr_max_menu_item = gtk_menu_item_new_with_label(_("48")); gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_max_activate), GINT_TO_POINTER(48)); gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item); - vbr_max_menu_item = gtk_menu_item_new_with_label("56"); + vbr_max_menu_item = gtk_menu_item_new_with_label(_("56")); gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_max_activate), GINT_TO_POINTER(56)); gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item); - vbr_max_menu_item = gtk_menu_item_new_with_label("64"); + vbr_max_menu_item = gtk_menu_item_new_with_label(_("64")); gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_max_activate), GINT_TO_POINTER(64)); gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item); - vbr_max_menu_item = gtk_menu_item_new_with_label("80"); + vbr_max_menu_item = gtk_menu_item_new_with_label(_("80")); gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_max_activate), GINT_TO_POINTER(80)); gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item); - vbr_max_menu_item = gtk_menu_item_new_with_label("96"); + vbr_max_menu_item = gtk_menu_item_new_with_label(_("96")); gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_max_activate), GINT_TO_POINTER(96)); gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item); - vbr_max_menu_item = gtk_menu_item_new_with_label("112"); + vbr_max_menu_item = gtk_menu_item_new_with_label(_("112")); gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_max_activate), GINT_TO_POINTER(112)); gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item); - vbr_max_menu_item = gtk_menu_item_new_with_label("128"); + vbr_max_menu_item = gtk_menu_item_new_with_label(_("128")); gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_max_activate), GINT_TO_POINTER(128)); gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item); - vbr_max_menu_item = gtk_menu_item_new_with_label("160"); + vbr_max_menu_item = gtk_menu_item_new_with_label(_("160")); gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_max_activate), GINT_TO_POINTER(160)); gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item); - vbr_max_menu_item = gtk_menu_item_new_with_label("192"); + vbr_max_menu_item = gtk_menu_item_new_with_label(_("192")); gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_max_activate), GINT_TO_POINTER(192)); gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item); - vbr_max_menu_item = gtk_menu_item_new_with_label("224"); + vbr_max_menu_item = gtk_menu_item_new_with_label(_("224")); gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_max_activate), GINT_TO_POINTER(224)); gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item); - vbr_max_menu_item = gtk_menu_item_new_with_label("256"); + vbr_max_menu_item = gtk_menu_item_new_with_label(_("256")); gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_max_activate), GINT_TO_POINTER(256)); gtk_menu_append(GTK_MENU(vbr_max_menu), vbr_max_menu_item); - vbr_max_menu_item = gtk_menu_item_new_with_label("320"); + vbr_max_menu_item = gtk_menu_item_new_with_label(_("320")); gtk_signal_connect(GTK_OBJECT(vbr_max_menu_item), "activate", GTK_SIGNAL_FUNC(vbr_max_activate), GINT_TO_POINTER(320)); @@ -1612,9 +1612,9 @@ enforce_min_toggle = gtk_check_button_new_with_label - ("Strictly enforce minimum bitrate"); + (_("Strictly enforce minimum bitrate")); gtk_tooltips_set_tip(GTK_TOOLTIPS(vbr_tips), enforce_min_toggle, - "For use with players that do not support low bitrate mp3 (Apex AD600-A DVD/mp3 player)", + _("For use with players that do not support low bitrate mp3 (Apex AD600-A DVD/mp3 player)"), ""); gtk_box_pack_start(GTK_BOX(vbr_options_vbox2), enforce_min_toggle, FALSE, FALSE, 2); @@ -1627,7 +1627,7 @@ /* ABR Options */ - abr_frame = gtk_frame_new("ABR Options:"); + abr_frame = gtk_frame_new(_("ABR Options:")); gtk_container_set_border_width(GTK_CONTAINER(abr_frame), 5); gtk_box_pack_start(GTK_BOX(vbr_options_vbox), abr_frame, FALSE, FALSE, 2); @@ -1637,93 +1637,93 @@ gtk_container_set_border_width(GTK_CONTAINER(abr_hbox), 5); gtk_container_add(GTK_CONTAINER(abr_frame), abr_hbox); - abr_label = gtk_label_new("Average bitrate (kbps):"); + abr_label = gtk_label_new(_("Average bitrate (kbps):")); gtk_misc_set_alignment(GTK_MISC(abr_label), 0, 0.5); gtk_box_pack_start(GTK_BOX(abr_hbox), abr_label, TRUE, TRUE, 0); abr_option_menu = gtk_option_menu_new(); abr_menu = gtk_menu_new(); - abr_menu_item = gtk_menu_item_new_with_label("8"); + abr_menu_item = gtk_menu_item_new_with_label(_("8")); gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate", GTK_SIGNAL_FUNC(abr_activate), GINT_TO_POINTER(8)); gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item); - abr_menu_item = gtk_menu_item_new_with_label("16"); + abr_menu_item = gtk_menu_item_new_with_label(_("16")); gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate", GTK_SIGNAL_FUNC(abr_activate), GINT_TO_POINTER(16)); gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item); - abr_menu_item = gtk_menu_item_new_with_label("24"); + abr_menu_item = gtk_menu_item_new_with_label(_("24")); gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate", GTK_SIGNAL_FUNC(abr_activate), GINT_TO_POINTER(24)); gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item); - abr_menu_item = gtk_menu_item_new_with_label("32"); + abr_menu_item = gtk_menu_item_new_with_label(_("32")); gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate", GTK_SIGNAL_FUNC(abr_activate), GINT_TO_POINTER(32)); gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item); - abr_menu_item = gtk_menu_item_new_with_label("40"); + abr_menu_item = gtk_menu_item_new_with_label(_("40")); gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate", GTK_SIGNAL_FUNC(abr_activate), GINT_TO_POINTER(40)); gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item); - abr_menu_item = gtk_menu_item_new_with_label("48"); + abr_menu_item = gtk_menu_item_new_with_label(_("48")); gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate", GTK_SIGNAL_FUNC(abr_activate), GINT_TO_POINTER(48)); gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item); - abr_menu_item = gtk_menu_item_new_with_label("56"); + abr_menu_item = gtk_menu_item_new_with_label(_("56")); gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate", GTK_SIGNAL_FUNC(abr_activate), GINT_TO_POINTER(56)); gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item); - abr_menu_item = gtk_menu_item_new_with_label("64"); + abr_menu_item = gtk_menu_item_new_with_label(_("64")); gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate", GTK_SIGNAL_FUNC(abr_activate), GINT_TO_POINTER(64)); gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item); - abr_menu_item = gtk_menu_item_new_with_label("80"); + abr_menu_item = gtk_menu_item_new_with_label(_("80")); gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate", GTK_SIGNAL_FUNC(abr_activate), GINT_TO_POINTER(80)); gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item); - abr_menu_item = gtk_menu_item_new_with_label("96"); + abr_menu_item = gtk_menu_item_new_with_label(_("96")); gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate", GTK_SIGNAL_FUNC(abr_activate), GINT_TO_POINTER(96)); gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item); - abr_menu_item = gtk_menu_item_new_with_label("112"); + abr_menu_item = gtk_menu_item_new_with_label(_("112")); gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate", GTK_SIGNAL_FUNC(abr_activate), GINT_TO_POINTER(112)); gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item); - abr_menu_item = gtk_menu_item_new_with_label("128"); + abr_menu_item = gtk_menu_item_new_with_label(_("128")); gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate", GTK_SIGNAL_FUNC(abr_activate), GINT_TO_POINTER(128)); gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item); - abr_menu_item = gtk_menu_item_new_with_label("160"); + abr_menu_item = gtk_menu_item_new_with_label(_("160")); gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate", GTK_SIGNAL_FUNC(abr_activate), GINT_TO_POINTER(160)); gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item); - abr_menu_item = gtk_menu_item_new_with_label("192"); + abr_menu_item = gtk_menu_item_new_with_label(_("192")); gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate", GTK_SIGNAL_FUNC(abr_activate), GINT_TO_POINTER(192)); gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item); - abr_menu_item = gtk_menu_item_new_with_label("224"); + abr_menu_item = gtk_menu_item_new_with_label(_("224")); gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate", GTK_SIGNAL_FUNC(abr_activate), GINT_TO_POINTER(224)); gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item); - abr_menu_item = gtk_menu_item_new_with_label("256"); + abr_menu_item = gtk_menu_item_new_with_label(_("256")); gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate", GTK_SIGNAL_FUNC(abr_activate), GINT_TO_POINTER(256)); gtk_menu_append(GTK_MENU(abr_menu), abr_menu_item); - abr_menu_item = gtk_menu_item_new_with_label("320"); + abr_menu_item = gtk_menu_item_new_with_label(_("320")); gtk_signal_connect(GTK_OBJECT(abr_menu_item), "activate", GTK_SIGNAL_FUNC(abr_activate), GINT_TO_POINTER(320)); @@ -1815,7 +1815,7 @@ gtk_container_add(GTK_CONTAINER(vbr_options_vbox), vbr_options_hbox3); - vbr_quality_label = gtk_label_new("VBR quality level:"); + vbr_quality_label = gtk_label_new(_("VBR quality level:")); gtk_misc_set_alignment(GTK_MISC(vbr_quality_label), 0, 0.5); gtk_box_pack_start(GTK_BOX(vbr_options_hbox3), vbr_quality_label, TRUE, TRUE, 0); @@ -1830,7 +1830,7 @@ GTK_SIGNAL_FUNC(vbr_qual), NULL); gtk_tooltips_set_tip(GTK_TOOLTIPS(vbr_tips), vbr_quality_spin, - "highest:0;\nlowest:9;\ndefault:4;", ""); + _("highest:0;\nlowest:9;\ndefault:4;"), ""); gtk_spin_button_set_value(GTK_SPIN_BUTTON(vbr_quality_spin), vbr_quality_val); @@ -1838,7 +1838,7 @@ /* Xing Header */ xing_header_toggle = - gtk_check_button_new_with_label("Don't write Xing VBR header"); + gtk_check_button_new_with_label(_("Don't write Xing VBR header")); gtk_box_pack_start(GTK_BOX(vbr_options_vbox), xing_header_toggle, FALSE, FALSE, 2); gtk_signal_connect(GTK_OBJECT(xing_header_toggle), "toggled", @@ -1853,7 +1853,7 @@ /* Add the Notebook */ gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbr_vbox, - gtk_label_new("VBR/ABR")); + gtk_label_new(_("VBR/ABR"))); /* Tags */ @@ -1865,7 +1865,7 @@ /* Frame Params */ - tags_frames_frame = gtk_frame_new("Frame params:"); + tags_frames_frame = gtk_frame_new(_("Frame params:")); gtk_container_set_border_width(GTK_CONTAINER(tags_frames_frame), 5); gtk_box_pack_start(GTK_BOX(tags_vbox), tags_frames_frame, FALSE, @@ -1877,7 +1877,7 @@ tags_frames_hbox); tags_copyright_toggle = - gtk_check_button_new_with_label("Mark as copyright"); + gtk_check_button_new_with_label(_("Mark as copyright")); gtk_box_pack_start(GTK_BOX(tags_frames_hbox), tags_copyright_toggle, FALSE, FALSE, 2); gtk_signal_connect(GTK_OBJECT(tags_copyright_toggle), "toggled", @@ -1888,7 +1888,7 @@ (tags_copyright_toggle), TRUE); tags_original_toggle = - gtk_check_button_new_with_label("Mark as original"); + gtk_check_button_new_with_label(_("Mark as original")); gtk_box_pack_start(GTK_BOX(tags_frames_hbox), tags_original_toggle, FALSE, FALSE, 2); gtk_signal_connect(GTK_OBJECT(tags_original_toggle), "toggled", @@ -1900,7 +1900,7 @@ /* ID3 Params */ - tags_id3_frame = gtk_frame_new("ID3 params:"); + tags_id3_frame = gtk_frame_new(_("ID3 params:")); gtk_container_set_border_width(GTK_CONTAINER(tags_id3_frame), 5); gtk_box_pack_start(GTK_BOX(tags_vbox), tags_id3_frame, FALSE, FALSE, 2); @@ -1911,7 +1911,7 @@ tags_force_id3v2_toggle = gtk_check_button_new_with_label - ("Force addition of version 2 tag"); + (_("Force addition of version 2 tag")); gtk_box_pack_start(GTK_BOX(tags_id3_vbox), tags_force_id3v2_toggle, FALSE, FALSE, 2); gtk_signal_connect(GTK_OBJECT(tags_force_id3v2_toggle), "toggled", @@ -1921,14 +1921,14 @@ gtk_container_add(GTK_CONTAINER(tags_id3_vbox), tags_id3_hbox); tags_only_v1_toggle = - gtk_check_button_new_with_label("Only add v1 tag"); + gtk_check_button_new_with_label(_("Only add v1 tag")); gtk_box_pack_start(GTK_BOX(tags_id3_hbox), tags_only_v1_toggle, FALSE, FALSE, 2); gtk_signal_connect(GTK_OBJECT(tags_only_v1_toggle), "toggled", GTK_SIGNAL_FUNC(id3_only_version), "v1"); tags_only_v2_toggle = - gtk_check_button_new_with_label("Only add v2 tag"); + gtk_check_button_new_with_label(_("Only add v2 tag")); gtk_box_pack_start(GTK_BOX(tags_id3_hbox), tags_only_v2_toggle, FALSE, FALSE, 2); gtk_signal_connect(GTK_OBJECT(tags_only_v2_toggle), "toggled", @@ -1949,7 +1949,7 @@ /* Add the Notebook */ gtk_notebook_append_page(GTK_NOTEBOOK(notebook), tags_vbox, - gtk_label_new("Tags")); + gtk_label_new(_("Tags")));
--- a/src/metronom/metronom.c Thu Jul 19 12:55:56 2007 -0500 +++ b/src/metronom/metronom.c Thu Jul 19 12:56:04 2007 -0500 @@ -19,11 +19,12 @@ #include <audacious/plugin.h> #include <audacious/util.h> +#include <audacious/i18n.h> #include "../../config.h" #include <glib.h> #include <string.h> -#define MIN_BPM 1 +#define MIN_BPM 1 #define MAX_BPM 512 static InputPlugin metronom_ip; @@ -77,8 +78,8 @@ { static GtkWidget *box; box = xmms_show_message( - "About Metronom", - "A Tact Generator by Martin Strau? <mys@faveve.uni-stuttgart.de>\n\nTo use it, add a URL: tact://beats*num/den\ne.g. tact://77 to play 77 beats per minute\nor tact://60*3/4 to play 60 bpm in 3/4 tacts", "Ok", + _("About Metronom"), + _("A Tact Generator by Martin Strauss <mys@faveve.uni-stuttgart.de>\n\nTo use it, add a URL: tact://beats*num/den\ne.g. tact://77 to play 77 beats per minute\nor tact://60*3/4 to play 60 bpm in 3/4 tacts"), _("Ok"), FALSE, NULL, NULL); gtk_signal_connect(GTK_OBJECT(box), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &box); @@ -101,14 +102,14 @@ InputPlayback *playback = arg; metronom_t *pmetronom=(metronom_t *)playback->data; gint i; - + gint16 t = 0,tact; gint16 datagoal = 0; gint16 datamiddle = 0; gint16 datacurrent = datamiddle; gint16 datalast = datamiddle; gint16 data_form[tact_form_max]; - gint num; + gint num; tact = 60*44100/pmetronom->bpm; /* prepare weighted amplitudes */ @@ -132,8 +133,8 @@ /* circle through weighted amplitudes */ num++; if(num==pmetronom->num)num=0; - } - /* makes curve a little bit smoother */ + } + /* makes curve a little bit smoother */ data[i]=(datalast+datacurrent+datagoal)/3; datalast=datacurrent; datacurrent=data[i]; @@ -156,7 +157,7 @@ { char *filename = playback->filename; gchar *name; - size_t count; + size_t count; metronom_t *pmetronom; gint flag,id; @@ -181,7 +182,7 @@ } if(!flag)return; } - + going = TRUE; audio_error = FALSE; if (playback->output->open_audio(FMT_S16_LE, 44100, 1) == 0) @@ -191,9 +192,9 @@ return; } if(pmetronom->num==1 && pmetronom->den==1){ - name = g_strdup_printf("Tact generator: %d bpm", pmetronom->bpm); + name = g_strdup_printf(_("Tact generator: %d bpm"), pmetronom->bpm); } else { - name = g_strdup_printf("Tact generator: %d bpm %d/%d", pmetronom->bpm,pmetronom->num,pmetronom->den); + name = g_strdup_printf(_("Tact generator: %d bpm %d/%d"), pmetronom->bpm,pmetronom->num,pmetronom->den); } metronom_ip.set_info(name, -1, 16 * 44100, 44100, 1); g_free(name); @@ -253,15 +254,15 @@ } if(pmetronom->num==1 && pmetronom->den==1){ - *title = g_strdup_printf("Tact generator: %d bpm", pmetronom->bpm); + *title = g_strdup_printf(_("Tact generator: %d bpm"), pmetronom->bpm); } else { - *title = g_strdup_printf("Tact generator: %d bpm %d/%d", pmetronom->bpm,pmetronom->num,pmetronom->den); + *title = g_strdup_printf(_("Tact generator: %d bpm %d/%d"), pmetronom->bpm,pmetronom->num,pmetronom->den); } } - - - -static InputPlugin metronom_ip = + + + +static InputPlugin metronom_ip = { NULL, NULL,
--- a/src/scrobbler/gtkstuff.c Thu Jul 19 12:55:56 2007 -0500 +++ b/src/scrobbler/gtkstuff.c Thu Jul 19 12:56:04 2007 -0500 @@ -17,10 +17,10 @@ if (aboutbox) return; - tmp = g_strdup_printf("Audacious AudioScrobbler Plugin\n\n" - "Originally created by Audun Hove <audun@nlc.no> and Pipian <pipian@pipian.com>\n"); + tmp = g_strdup_printf(_("Audacious AudioScrobbler Plugin\n\n" + "Originally created by Audun Hove <audun@nlc.no> and Pipian <pipian@pipian.com>\n")); aboutbox = xmms_show_message(_("About Scrobbler Plugin"), - _(tmp), + tmp, _("Ok"), FALSE, NULL, NULL); g_free(tmp); @@ -32,14 +32,14 @@ { gchar *tmp; - tmp = g_strdup_printf("There has been an error" + tmp = g_strdup_printf(_("There has been an error" " that may require your attention.\n\n" "Contents of server error:\n\n" - "%s\n", + "%s\n"), errortxt); - xmms_show_message("Scrobbler Error", + xmms_show_message(_("Scrobbler Error"), tmp, - "OK", FALSE, NULL, NULL); + _("OK"), FALSE, NULL, NULL); g_free(tmp); }
--- a/src/tta/libtta.c Thu Jul 19 12:55:56 2007 -0500 +++ b/src/tta/libtta.c Thu Jul 19 12:56:04 2007 -0500 @@ -300,6 +300,7 @@ tta_info ttainfo; char *title; gchar *utf_filename = NULL; + gchar *realfn = NULL; if (!window) { GtkWidget *vbox, *hbox, *left_vbox, *table; @@ -422,8 +423,9 @@ gtk_widget_show_all (window); } - - utf_filename = str_to_utf8(filename); + realfn = g_filename_from_uri(filename, NULL, NULL); + utf_filename = str_to_utf8(realfn ? realfn : filename); + g_free(realfn); realfn = NULL; title = g_strdup_printf(_("File Info - %s"), g_basename(utf_filename)); gtk_window_set_title(GTK_WINDOW(window), title); g_free(title); @@ -467,7 +469,7 @@ play_file (InputPlayback *playback) { gchar *filename = playback->filename; - char *title; + char *title = NULL; int datasize, origsize, bitrate; TitleInput *tuple = NULL; @@ -569,6 +571,7 @@ TitleInput *tuple = NULL; tta_info *ttainfo; VFSFile *file; + gchar *realfn = NULL; ttainfo = g_malloc0(sizeof(tta_info)); @@ -576,10 +579,12 @@ if(open_tta_file(filename, ttainfo, 0) >= 0) { tuple = bmp_title_input_new(); - tuple->file_name = g_path_get_basename(filename); - tuple->file_path = g_path_get_dirname(filename); - tuple->file_ext = extname(filename); + realfn = g_filename_from_uri(filename, NULL, NULL); + tuple->file_name = g_path_get_basename(realfn ? realfn : filename); + tuple->file_path = g_path_get_dirname(realfn ? realfn : filename); + tuple->file_ext = extname(realfn ? realfn : filename); tuple->length = ttainfo->LENGTH * 1000; + g_free(realfn); realfn = NULL; if (ttainfo->ID3.id3has) { if(ttainfo->ID3.artist && strlen((char *)ttainfo->ID3.artist)) @@ -822,11 +827,14 @@ int get_id3_tags (const char *filename, tta_info *ttainfo) { int id3v2_size = 0; gchar *str = NULL; + gchar *realfn = NULL; struct id3_file *id3file = NULL; struct id3_tag *tag = NULL; - id3file = id3_file_open (filename, ID3_FILE_MODE_READONLY); + realfn = g_filename_from_uri(filename, NULL, NULL); + id3file = id3_file_open (realfn ? realfn : filename, ID3_FILE_MODE_READONLY); + g_free(realfn); realfn = NULL; if (id3file) { tag = id3_file_tag (id3file);
--- a/src/wav/wav-sndfile.c Thu Jul 19 12:55:56 2007 -0500 +++ b/src/wav/wav-sndfile.c Thu Jul 19 12:56:04 2007 -0500 @@ -95,9 +95,15 @@ { SNDFILE *tmp_sndfile; SF_INFO tmp_sfinfo; + gchar *realfn = NULL; - if (! (tmp_sndfile = sf_open (filename, SFM_READ, &tmp_sfinfo))) + realfn = g_filename_from_uri(filename, NULL, NULL); + tmp_sndfile = sf_open (realfn ? realfn : filename, SFM_READ, &tmp_sfinfo); + g_free(realfn); realfn = NULL; + + if (!tmp_sndfile) { return 0; + } sf_close (tmp_sndfile); tmp_sndfile = NULL; @@ -111,7 +117,11 @@ static gchar *get_title(char *filename) { gchar *title; - title = g_path_get_basename(filename); + gchar *realfn = NULL; + + realfn = g_filename_from_uri(filename, NULL, NULL); + title = g_path_get_basename(realfn ? realfn : filename); + g_free(realfn); realfn = NULL; return title; } @@ -132,25 +142,25 @@ } static int -is_our_file (char *fileuri) +is_our_file (char *filename) { SNDFILE *tmp_sndfile; SF_INFO tmp_sfinfo; - gchar *filename = g_filename_from_uri(fileuri, NULL, NULL); + gchar *realfn = NULL; - if (filename == NULL) - return FALSE; + realfn = g_filename_from_uri(filename, NULL, NULL); /* Have to open the file to see if libsndfile can handle it. */ - if (! (tmp_sndfile = sf_open (filename, SFM_READ, &tmp_sfinfo))) { - g_free(filename); + tmp_sndfile = sf_open (realfn ? realfn : filename, SFM_READ, &tmp_sfinfo); + g_free(realfn); realfn = NULL; + + if (!tmp_sndfile) { return FALSE; } /* It can so close file and return TRUE. */ sf_close (tmp_sndfile); tmp_sndfile = NULL; - g_free(filename); return TRUE; } @@ -229,21 +239,21 @@ static void play_start (InputPlayback *playback) { - gchar *filename = g_filename_from_uri(playback->filename, NULL, NULL); + gchar *realfn = NULL; int pcmbitwidth; gchar *song_title; - if (filename == NULL) - return; - - if (sndfile) + if (sndfile) /* already opened */ return; pcmbitwidth = 32; + song_title = get_title(playback->filename); - song_title = get_title(filename); + realfn = g_filename_from_uri(playback->filename, NULL, NULL); + sndfile = sf_open (realfn ? realfn : playback->filename, SFM_READ, &sfinfo); + g_free(realfn); realfn = NULL; - if (! (sndfile = sf_open (filename, SFM_READ, &sfinfo))) + if (!sndfile) return; bit_rate = sfinfo.samplerate * pcmbitwidth; @@ -313,14 +323,10 @@ } static void -get_song_info (char *fileuri, char **title, int *length) +get_song_info (char *filename, char **title, int *length) { - gchar *filename = g_filename_from_uri(fileuri, NULL, NULL); - if (filename == NULL) - return; (*length) = get_song_length(filename); (*title) = get_title(filename); - g_free(filename); } static void wav_about(void)