Package: gqmpeg
Version: 0.90.0-2
Severity: important
Tags: patch l10n

GTK2 needs UTF-8 strings. So we must call :

    bind_textdomain_codeset(PACKAGE, "UTF-8") ;

to ensure internal strings will be retrieved and converted from .po
files to UTF-8 codeset.

When we do that, menus and widgets will be ok, but messages printed on
stdout will be in UTF-8 altogether, which is ugly if your locale is
different.

So we must change all printf(_(...)) calls to g_print(_(...)) calls.
For consistency we can remove the print_term() function, and replace it
also by g_print.

I include a "diff -ru" of the corrections.

Hope this helps.


-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.8.custom
Locale: LANG=fr_FR, LC_CTYPE=fr_FR (charmap=ISO-8859-1)

Versions of packages gqmpeg depends on:
ii  libatk1.0-0            1.8.0-4           The ATK accessibility
toolkit ii  libc6                  2.3.2.ds1-22      GNU C Library:
Shared libraries an ii  libglib2.0-0           2.6.4-1           The
GLib library of C routines ii  libgtk2.0-0            2.6.4-3          
The GTK+ graphical user interface  ii  libpango1.0-0          1.8.1-1   
       Layout and rendering of internatio ii  libpng12-0            
1.2.8rel-1        PNG library - runtime ii  libx11-6              
4.3.0.dfsg.1-14   X Window System protocol client li ii  mpg321 [mpg123]
       0.2.10.3          A Free command-line mp3 player, co ii 
vorbis-tools           1.0.1-1.3         Several Ogg Vorbis Tools ii 
xlibs                  4.3.0.dfsg.1-14   X Keyboard Extension (XKB)
configu ii  zlib1g                 1:1.2.2-4.sarge.2 compression library
- runtime

-- no debconf information
diff -ru gqmpeg-0.90.0/src/io_mpg123.c gqmpeg-0.90.0.new/src/io_mpg123.c
--- gqmpeg-0.90.0/src/io_mpg123.c       2004-03-13 12:00:11.000000000 +0100
+++ gqmpeg-0.90.0.new/src/io_mpg123.c   2005-07-23 13:22:57.000000000 +0200
@@ -156,9 +156,9 @@
                        mpg123_version = MPG123_VER_0_59O;
                        if (debug_mode || !warning_done)
                                {
-                               printf(_("mpg123 version prior to 0.59o 
found!\n"));
-                               printf(_("assuming 0.59o compatible\n"));
-                               printf(_("The version line reported 
was:\n%s\n"), text);
+                               g_print(_("mpg123 version prior to 0.59o 
found!\n"));
+                               g_print(_("assuming 0.59o compatible\n"));
+                               g_print(_("The version line reported 
was:\n%s\n"), text);
                                }
                        warning_done = TRUE;
                        }
@@ -168,13 +168,13 @@
                        mpg123_version = MPG123_VER_UNKNOWN;
                        if (debug_mode || !warning_done)
                                {
-                               printf(_("unknown version of mpg123, assuming 
%s compatible\n"), MPG123_VER_STRING);
-                               printf(_("(GQmpeg requires mpg123 0.59o or 
later)\n"));
-                               printf(_("The version line reported 
was:\n%s\n"), text);
+                               g_print(_("unknown version of mpg123, assuming 
%s compatible\n"), MPG123_VER_STRING);
+                               g_print(_("(GQmpeg requires mpg123 0.59o or 
later)\n"));
+                               g_print(_("The version line reported 
was:\n%s\n"), text);
                                }
                        warning_done = TRUE;
                        }
-               if (debug_mode) printf(_("mpg123 version detected: %d\n"), 
mpg123_version);
+               if (debug_mode) g_print(_("mpg123 version detected: %d\n"), 
mpg123_version);
 
                return TRUE;
                }
@@ -427,7 +427,7 @@
        /* ignore lines that begin with an escape sequence (0.59r) */
        if (text[0] == 27 && text[1] == ']') return;
 
-       printf(_("Warning, unrecognized mpg123 output:\"%s\"\n"), text);
+       g_print(_("Warning, unrecognized mpg123 output:\"%s\"\n"), text);
 
        if (debug_mode)
                {
@@ -497,7 +497,7 @@
                {
                gchar *buf;
 
-               printf(_("Error, mpg123 reported:\"%s\"\n"), text);
+               g_print(_("Error, mpg123 reported:\"%s\"\n"), text);
                buf = g_strdup_printf("mpg123: %s", text);
                warning_dialog(_("GQmpeg: mpg123 error"), buf);
                g_free(buf);
@@ -519,7 +519,7 @@
 
 static void handle_end_of_file(void)
 {
-       printf(_("mpg123 disappeared! (unexpected EOF)\n"));
+       g_print(_("mpg123 disappeared! (unexpected EOF)\n"));
        stop_playing_file();
        module_playback_error(current_sd);
        current_sd = NULL;
@@ -527,7 +527,7 @@
 
 static void handle_read_error(void)
 {
-       printf(_("error reading from mpg123!\n"));
+       g_print(_("error reading from mpg123!\n"));
        stop_playing_file();
        module_playback_error(current_sd);
        current_sd = NULL;
@@ -545,7 +545,7 @@
 
        if (new_time > mpg123_data_check_last_time + secs)
                {
-               printf(_("Error: mpg123 stopped sending data! (timeout)\n"));
+               g_print(_("Error: mpg123 stopped sending data! (timeout)\n"));
                stop_playing_file();
                module_playback_error(current_sd);
                current_sd = NULL;
@@ -860,7 +860,7 @@
                setsid();
 
                execvp(exec_bin, cmd_ptr);
-               printf(_("unable to run %s (in the path?)\n"), exec_bin);
+               g_print(_("unable to run %s (in the path?)\n"), exec_bin);
                _exit(1);
                }
        else if (frk_pid < (pid_t) 0)
@@ -904,7 +904,7 @@
                sleep(1);
                if (kill(-pid, SIGINT) == -1)
                        {
-                       printf(_("Failed to successfully send signal to pid = 
%d\n"), (int)pid);
+                       g_print(_("Failed to successfully send signal to pid = 
%d\n"), (int)pid);
                        }
                }
 
@@ -1199,7 +1199,7 @@
        if (debug_mode) printf("play stopped\n");
        if (sd != current_sd)
                {
-               printf(_("io_mpg123.c warning: attempt to stop playback of non 
matching file\n"));
+               g_print(_("io_mpg123.c warning: attempt to stop playback of non 
matching file\n"));
                }
        stop_playing_file();
        current_sd = NULL;
@@ -1212,7 +1212,7 @@
        if (debug_mode) printf("play paused at %d\n", seconds);
        if (sd != current_sd)
                {
-               printf(_("io_mpg123.c warning: attempt to pause playback of non 
matching file\n"));
+               g_print(_("io_mpg123.c warning: attempt to pause playback of 
non matching file\n"));
                }
        stop_playing_file();
        if (mpg123_extra_is_http(sd))
@@ -1231,7 +1231,7 @@
        if (debug_mode) printf("play restarted at %d\n", seconds);
        if (sd != current_sd)
                {
-               printf(_("io_mpg123.c warning: attempt to continue playback of 
non matching file\n"));
+               g_print(_("io_mpg123.c warning: attempt to continue playback of 
non matching file\n"));
                }
        current_sd = sd;
        if (mpg123_extra_is_http(sd))
@@ -1248,7 +1248,7 @@
        if (debug_mode) printf("play seeking to %d\n", position);
        if (sd != current_sd)
                {
-               printf(_("io_mpg123.c warning: attempt to seek in non matching 
file\n"));
+               g_print(_("io_mpg123.c warning: attempt to seek in non matching 
file\n"));
                }
        if (mpg123_extra_is_http(sd))
                {
@@ -1291,8 +1291,8 @@
        mpg123_enabled = file_in_path(MPG123_BINARY);
        if (!mpg123_enabled)
                {
-               printf(_("Failed to find mpg123 in your path!\n"));
-               printf(_("mpg123 player module disabled.\n"));
+               g_print(_("Failed to find mpg123 in your path!\n"));
+               g_print(_("mpg123 player module disabled.\n"));
                }
 
        imd = g_new0(IO_ModuleData, 1);
diff -ru gqmpeg-0.90.0/src/io_ogg123.c gqmpeg-0.90.0.new/src/io_ogg123.c
--- gqmpeg-0.90.0/src/io_ogg123.c       2004-03-13 12:14:31.000000000 +0100
+++ gqmpeg-0.90.0.new/src/io_ogg123.c   2005-07-23 13:22:56.000000000 +0200
@@ -76,7 +76,7 @@
                close(ogg_pipe[0]);
 
                execvp(ogg_argv[0], ogg_argv);
-               printf(_("unable to run %s (in the path?)\n"), ogg_argv[0]);
+               g_print(_("unable to run %s (in the path?)\n"), ogg_argv[0]);
                _exit(1);
                }
        else if (frk_pid < (pid_t) 0)
@@ -600,7 +600,7 @@
 
                if (kill(ogg123_child_pid, SIGINT) == -1)
                        {
-                       printf(_("Failed to successfully send signal to pid = 
%d\n"), ogg123_child_pid);
+                       g_print(_("Failed to successfully send signal to pid = 
%d\n"), ogg123_child_pid);
                        }
                
                t = waitpid(ogg123_child_pid, NULL, WNOHANG);
@@ -760,7 +760,7 @@
                /* device error */
                gchar *buf;
 
-               printf(_("Error, ogg123 reported:\"%s\")\n"), buffer);
+               g_print(_("Error, ogg123 reported:\"%s\")\n"), buffer);
                buf = g_strdup_printf("ogg123: %s", buffer);
                warning_dialog(_("GQmpeg: ogg123 error"), buf);
                g_free(buf);
@@ -798,7 +798,7 @@
                }
        if (r == 0)
                {
-               printf(_("ogg123 disappeared! (unexpected EOF)\n"));
+               g_print(_("ogg123 disappeared! (unexpected EOF)\n"));
                ogg123_input_end();
                ogg123_error();
                return;
@@ -1123,20 +1123,20 @@
        ogg123_enabled = file_in_path(OGG123_BINARY);
        if (!ogg123_enabled)
                {
-               printf(_("Failed to find %s in your path!\n"), OGG123_BINARY);
-               printf(_("ogg123 player module disabled.\n"));
+               g_print(_("Failed to find %s in your path!\n"), OGG123_BINARY);
+               g_print(_("ogg123 player module disabled.\n"));
                }
 
        ogg123_info_found = file_in_path(OGG123_BINARY_INFO);
        if (!ogg123_info_found)
                {
-               printf(_("\"%s\" not found.\n"), OGG123_BINARY_INFO);
+               g_print(_("\"%s\" not found.\n"), OGG123_BINARY_INFO);
                }
 
        ogg123_comment_found = file_in_path(OGG123_BINARY_COMMENT);
        if (!ogg123_comment_found)
                {
-               printf(_("\"%s\" not found, comment support disabled.\n"), 
OGG123_BINARY_COMMENT);
+               g_print(_("\"%s\" not found, comment support disabled.\n"), 
OGG123_BINARY_COMMENT);
                }
 
        imd = g_new0(IO_ModuleData, 1);
diff -ru gqmpeg-0.90.0/src/io_radio.c gqmpeg-0.90.0.new/src/io_radio.c
--- gqmpeg-0.90.0/src/io_radio.c        2004-03-13 12:19:47.000000000 +0100
+++ gqmpeg-0.90.0.new/src/io_radio.c    2005-07-23 13:22:55.000000000 +0200
@@ -265,7 +265,7 @@
 
        if (!isname(radio_device_get()))
                {
-               printf(_("Failed to find %s\n"), radio_device_get());
+               g_print(_("Failed to find %s\n"), radio_device_get());
                v4l_enabled = FALSE;
                return FALSE;
                }
@@ -421,7 +421,7 @@
 
        found = radio_real_test();
 
-       if (!found) printf(_("radio player module disabled. (failed check)\n"));
+       if (!found) g_print(_( (gchar*) "radio player module disabled. (failed 
check)\n"));
 
        return found;
 }
diff -ru gqmpeg-0.90.0/src/io_xmp.c gqmpeg-0.90.0.new/src/io_xmp.c
--- gqmpeg-0.90.0/src/io_xmp.c  2002-09-10 16:16:26.000000000 +0200
+++ gqmpeg-0.90.0.new/src/io_xmp.c      2005-07-23 13:22:56.000000000 +0200
@@ -209,7 +209,7 @@
                        {
                        if (kill(xmp_child_pid, SIGINT) ==-1)
                                {
-                               printf(_("Failed to successfully send signal to 
pid = %d\n"), xmp_child_pid);
+                               g_print(_("Failed to successfully send signal 
to pid = %d\n"), xmp_child_pid);
                                }
                        }
                waitpid (xmp_child_pid, NULL, 0); /* should be WNOHANG */
@@ -384,7 +384,7 @@
                }
        if (r == 0)
                {
-               printf(_("xmp disappeared! (unexpected EOF)\n"));
+               g_print(_("xmp disappeared! (unexpected EOF)\n"));
                xmp_child_gone();
                xmp_input_error();
                return;
@@ -558,7 +558,7 @@
                close(xmp_pipe_o[1]);
 
                execvp(exec_bin, cmd_ptr);
-               printf(_("unable to run %s (in the path?)\n"), exec_bin);
+               g_print(_("unable to run %s (in the path?)\n"), exec_bin);
                _exit(1);
                }
        else if (frk_pid < (pid_t) 0)
@@ -1008,8 +1008,8 @@
        xmp_enabled = file_in_path(XMP_BINARY);
        if (!xmp_enabled)
                {
-               printf(_("Failed to find %s in your path!\n"), XMP_BINARY);
-               printf(_("xmp player module disabled.\n"));
+               g_print(_("Failed to find %s in your path!\n"), XMP_BINARY);
+               g_print(_("xmp player module disabled.\n"));
                }
 
        imd = g_new0(IO_ModuleData, 1);
diff -ru gqmpeg-0.90.0/src/ipc.c gqmpeg-0.90.0.new/src/ipc.c
--- gqmpeg-0.90.0/src/ipc.c     2004-03-16 06:54:32.000000000 +0100
+++ gqmpeg-0.90.0.new/src/ipc.c 2005-07-23 13:23:02.000000000 +0200
@@ -66,7 +66,7 @@
        g_free(pathl);
        if (!f)
                {
-               printf(_("error opening file for write %s\n"), lock_file);
+               g_print(_("error opening file for write %s\n"), lock_file);
                g_free(lock_file);
                return FALSE;
                }
@@ -152,7 +152,7 @@
 
        if (!f)
                {
-               printf(_("error opening command file for write %s\n"), 
ipc_file);
+               g_print(_("error opening command file for write %s\n"), 
ipc_file);
                return;
                }
 
@@ -320,30 +320,30 @@
                        }
                else if (!strncmp(i_buf, "help", 4))
                        {
-                       print_term(_("available ipc commands:\n"));
-                       print_term(_("play, pause, stop, next, prev, quit\n"));
-                       print_term(_("seek [+|-]n                seek n seconds 
into file, or +/-n\n"));
-                       print_term(_("pladd {\"file\"|file}        add file to 
playlist\n"));
-                       print_term(_("pladd_play {\"file\"|file}   add file to 
playlist and play it\n"));
-                       print_term(_("plremove {\"file\"|file}     remove file 
from playlist\n"));
-                       print_term(_("plclr                      clear 
playlist\n"));
-                       print_term(_("plload {playlist}          load 
playlist\n"));
-                       print_term(_("plappend {playlist}        append 
playlist\n"));
-                       print_term(_("play_file {\"file\"|file}    play file, 
do not add to playlist\n"));
-                       print_term(_("                           or, if 
playlist, load playlist\n"));
-                       print_term(_("   file is a path or 
http://server:port\n";));
-                       print_term(_("skin \"file\"                set 
skin\n"));
-                       print_term(_("volume [+|-]n              set volume to 
n (0 - 100) or +/-n\n"));
-                       print_term(_("getting a status printed to a file is 
also possible:\n"));
-                       print_term(_("status_add \"key\" \"file\"    start 
status printing to file\n"));
-                       print_term(_("status_rm \"key\"|\"file\"     stop 
printing to file or key\n"));
-                       print_term(_("these commands open file requestors, 
windows, etc.\n"));
-                       print_term(_("show_playlist\n"));
-                       print_term(_("show_open_file, show_open_custom, 
show_open_playlist\n"));
+                       g_print(_("available ipc commands:\n"));
+                       g_print(_("play, pause, stop, next, prev, quit\n"));
+                       g_print(_("seek [+|-]n                seek n seconds 
into file, or +/-n\n"));
+                       g_print(_("pladd {\"file\"|file}        add file to 
playlist\n"));
+                       g_print(_("pladd_play {\"file\"|file}   add file to 
playlist and play it\n"));
+                       g_print(_("plremove {\"file\"|file}     remove file 
from playlist\n"));
+                       g_print(_("plclr                      clear 
playlist\n"));
+                       g_print(_("plload {playlist}          load 
playlist\n"));
+                       g_print(_("plappend {playlist}        append 
playlist\n"));
+                       g_print(_("play_file {\"file\"|file}    play file, do 
not add to playlist\n"));
+                       g_print(_("                           or, if playlist, 
load playlist\n"));
+                       g_print(_("   file is a path or http://server:port\n";));
+                       g_print(_("skin \"file\"                set skin\n"));
+                       g_print(_("volume [+|-]n              set volume to n 
(0 - 100) or +/-n\n"));
+                       g_print(_("getting a status printed to a file is also 
possible:\n"));
+                       g_print(_("status_add \"key\" \"file\"    start status 
printing to file\n"));
+                       g_print(_("status_rm \"key\"|\"file\"     stop printing 
to file or key\n"));
+                       g_print(_("these commands open file requestors, 
windows, etc.\n"));
+                       g_print(_("show_playlist\n"));
+                       g_print(_("show_open_file, show_open_custom, 
show_open_playlist\n"));
                        }
                else
                        {
-                       printf(_("unknown ipc command: [%s]\n"), i_buf);
+                       g_print(_("unknown ipc command: [%s]\n"), i_buf);
                        }
                }
 #if 0
@@ -363,7 +363,7 @@
 
        if (pid_lock_file_locked())
                {
-               printf(_("ipc command file already locked, ipc disabled\n"));
+               g_print(_("ipc command file already locked, ipc disabled\n"));
                return;
                }
 
@@ -376,7 +376,7 @@
        unlink(pathl);
        if (mkfifo(pathl, S_IRUSR | S_IWUSR) != 0)
                {
-               printf(_("Failed to mkfifo for %s\n"), ipc_file);
+               g_print(_("Failed to mkfifo for %s\n"), ipc_file);
                g_free(pathl);
                return;
                }
@@ -386,7 +386,7 @@
 
        if (ipc_fd_id == -1)
                {
-               printf(_("unable to open %s\n"), ipc_file);
+               g_print(_("unable to open %s\n"), ipc_file);
                return;
                }
        ipc_file_id = fdopen (ipc_fd_id, "r");
diff -ru gqmpeg-0.90.0/src/main.c gqmpeg-0.90.0.new/src/main.c
--- gqmpeg-0.90.0/src/main.c    2004-03-16 06:53:14.000000000 +0100
+++ gqmpeg-0.90.0.new/src/main.c        2005-07-23 13:40:47.000000000 +0200
@@ -597,7 +597,7 @@
                        if (debug_mode) printf("[%s]\n", exec_cmd);
                        if (system(exec_cmd) == -1)
                                {
-                               printf(_("execing gqmpeg failed\n"));
+                               g_print(_("execing gqmpeg failed\n"));
                                g_free(exec_cmd);
                                return TRUE;
                                }
@@ -610,7 +610,7 @@
                                }
                        if (!found)
                                {
-                               printf(_("Timeout waiting for ipc of spawned 
gqmpeg process\n"));
+                               g_print(_("Timeout waiting for ipc of spawned 
gqmpeg process\n"));
                                return TRUE;
                                }
                        }
@@ -654,7 +654,7 @@
                                }
                        else
                                {
-                               printf(_("ipc %s command requires data\n"), 
text);
+                               g_print(_("ipc %s command requires data\n"), 
text);
                                }
                        }
                else
@@ -803,10 +803,10 @@
        buf = g_strconcat(homedir(), "/", path, NULL);
        if (!isdir(buf))
                {
-               printf(_("Creating GQmpeg dir:%s\n"), buf);
+               g_print(_("Creating GQmpeg dir:%s\n"), buf);
                if (!mkdir_utf8(buf, 0755))
                        {
-                       printf(_("Could not create dir:%s\n"), buf);
+                       g_print(_("Could not create dir:%s\n"), buf);
                        }
                }
        g_free(buf);
@@ -896,37 +896,37 @@
 static void show_help(void)
 {
        printf("GQmpeg %s\n", VERSION);
-       print_term(_("usage: gqmpeg [option(s)] [file(s) | ipc_command(s)]\n"));
-       print_term(_(" standard options:\n"));
-       print_term(_("  --skin:<skindir>             load specified skin\n"));
-       print_term(_("  --dock                       enable docking 
behavior\n"));
-       print_term(_("  --dockwm                     enable Window Maker 
docking\n"));
-       print_term(_("  --skinhelp                   print mouse event 
coordinates\n"));
-       print_term(_("  --debug                      enable debug output\n"));
-       print_term(_("  -h,  --help                  displays this message\n"));
-       print_term(_("  -v,  --version               shows version info\n"));
-       print_term(_("  --blank                      start with empty 
playlist\n"));
-       print_term(_("  --geometry [+|-]xxx[+|-]yyy  specify window 
position\n"));
-       print_term(_("  --crack                      reserved\n"));
-       print_term(_(" available ipc_commands:\n"));
-       print_term(_("  -p          --play\n"));
-       print_term(_("  -s          --stop\n"));
-       print_term(_("  -n          --next\n"));
-       print_term(_("  -b          --back\n"));
-       print_term(_("  -ps         --pause\n"));
-       print_term(_("  -pladd      --playlist_add <f>[..]    add file to 
playlist\n"));
-       print_term(_("  -pladdplay  --playlist_add_play <f>   add file to 
playlist and play it\n"));
-       print_term(_("  -plrm       --playlist_remove <f>[..] remove file from 
playlist\n"));
-       print_term(_("  -plclr      --playlist_clear          clear 
playlist\n"));
-       print_term(_("  -pl         --playlist <f>            load 
playlist\n"));
-       print_term(_("  -plappend   --playlist_append <f>[..] append 
playlist\n"));
-       print_term(_("  -f          --file <f>[..]            play file, do not 
add to playlist\n"));
-       print_term(_("                                        or, if playlist, 
load playlist\n"));
-       print_term(_("  -q          --quit                    tell GQmpeg to 
quit\n"));
-       print_term(_("              --skin_set <f>            set skin\n"));
-       print_term(_("              --status                  print current 
status, song, time\n"));
-       print_term(_("              --volume [+|-]#           set, or increment 
volume (0-100)\n"));
-       print_term(_("              * files can also be of the format 
http://server:port\n";));
+       g_print(_("usage: gqmpeg [option(s)] [file(s) | ipc_command(s)]\n"));
+       g_print(_(" standard options:\n"));
+       g_print(_("  --skin:<skindir>             load specified skin\n"));
+       g_print(_("  --dock                       enable docking behavior\n"));
+       g_print(_("  --dockwm                     enable Window Maker 
docking\n"));
+       g_print(_("  --skinhelp                   print mouse event 
coordinates\n"));
+       g_print(_("  --debug                      enable debug output\n"));
+       g_print(_("  -h,  --help                  displays this message\n"));
+       g_print(_("  -v,  --version               shows version info\n"));
+       g_print(_("  --blank                      start with empty 
playlist\n"));
+       g_print(_("  --geometry [+|-]xxx[+|-]yyy  specify window position\n"));
+       g_print(_("  --crack                      reserved\n"));
+       g_print(_(" available ipc_commands:\n"));
+       g_print(_("  -p          --play\n"));
+       g_print(_("  -s          --stop\n"));
+       g_print(_("  -n          --next\n"));
+       g_print(_("  -b          --back\n"));
+       g_print(_("  -ps         --pause\n"));
+       g_print(_("  -pladd      --playlist_add <f>[..]    add file to 
playlist\n"));
+       g_print(_("  -pladdplay  --playlist_add_play <f>   add file to playlist 
and play it\n"));
+       g_print(_("  -plrm       --playlist_remove <f>[..] remove file from 
playlist\n"));
+       g_print(_("  -plclr      --playlist_clear          clear playlist\n"));
+       g_print(_("  -pl         --playlist <f>            load playlist\n"));
+       g_print(_("  -plappend   --playlist_append <f>[..] append playlist\n"));
+       g_print(_("  -f          --file <f>[..]            play file, do not 
add to playlist\n"));
+       g_print(_("                                        or, if playlist, 
load playlist\n"));
+       g_print(_("  -q          --quit                    tell GQmpeg to 
quit\n"));
+       g_print(_("              --skin_set <f>            set skin\n"));
+       g_print(_("              --status                  print current 
status, song, time\n"));
+       g_print(_("              --volume [+|-]#           set, or increment 
volume (0-100)\n"));
+       g_print(_("              * files can also be of the format 
http://server:port\n";));
 }
 
 /*
@@ -1011,6 +1011,7 @@
        /* setup locale, i18n */
        gtk_set_locale();
        bindtextdomain (PACKAGE, LOCALEDIR);
+       bind_textdomain_codeset(PACKAGE, "UTF-8") ;
        textdomain (PACKAGE);
 
        init_vars();
@@ -1022,12 +1023,12 @@
        cbuf = homedir();
        if (!cbuf)
                {
-               printf(_("Unable to determine the home directory\n"));
+               g_print(_("Unable to determine the home directory\n"));
                return 0;
                }
        else if (!isdir(cbuf))
                {
-               printf(_("Could not find home directory: %s\n"), cbuf);
+               g_print(_("Could not find home directory: %s\n"), cbuf);
                return 0;
                }
 
@@ -1103,9 +1104,9 @@
                                        }
                                else
                                        {
-                                       printf(_("--geometry missing 
argument\n"));
+                                       g_print(_("--geometry missing 
argument\n"));
                                        }
-                               if (!geometry_set) printf(_("Invalid geometry 
format ([+|-]xxx[+|-]yyy)\n"));
+                               if (!geometry_set) g_print(_("Invalid geometry 
format ([+|-]xxx[+|-]yyy)\n"));
                                }
                        else if (check_for_ipc_command(&i, argc, argv))
                                {
@@ -1129,7 +1130,7 @@
                                {
                                if (startup_skin_file)
                                        {
-                                       printf(_("Ignoring multiple skins!\n"));
+                                       g_print(_("Ignoring multiple 
skins!\n"));
                                        }
                                else
                                        {
@@ -1157,7 +1158,7 @@
                                }
                        else
                                {
-                               printf(_("unknown option: %s\nuse --help for 
options\n"),argv[i]);
+                               g_print(_("unknown option: %s\nuse --help for 
options\n"),argv[i]);
                                }
                        g_free(command_line_path);
                        i++;
@@ -1200,12 +1201,12 @@
                        {
                        if (!work->prev)
                                {
-                               printf(_("Loading playlist:%s\n"), (gchar 
*)work->data);
+                               g_print(_("Loading playlist:%s\n"), (gchar 
*)work->data);
                                playlist_load(work->data, FALSE, TRUE);
                                }
                        else
                                {
-                               printf(_("Appending playlist:%s\n"), (gchar 
*)work->data);
+                               g_print(_("Appending playlist:%s\n"), (gchar 
*)work->data);
                                playlist_load(work->data, TRUE, TRUE);
                                }
                        g_free(work->data);
@@ -1220,7 +1221,7 @@
                        {
                        if (typelist_determine_type_id(work->data) != -1 || 
isfile(work->data))
                                {
-                               printf(_("Adding song:%s\n"), (gchar 
*)work->data);
+                               g_print(_("Adding song:%s\n"), (gchar 
*)work->data);
                                playlist_add(work->data, TRUE);
                                if (current_song_get_number() == -1)
                                        {
@@ -1229,7 +1230,7 @@
                                }
                        else
                                {
-                               printf(_("Unable to determine type:%s\n"), 
(gchar *)work->data);
+                       g_print(_("Unable to determine type:%s\n"), (gchar 
*)work->data);
                                }
                        g_free(work->data);
                        work = work->next;
@@ -1263,7 +1264,7 @@
                        }
                else
                        {
-                       printf(_("Could not load session-playlist file\n"));
+                       g_print(_("Could not load session-playlist file\n"));
                        }
                g_free(session_file);
                g_free(playlist_pathname);
@@ -1289,7 +1290,7 @@
                        }
                else
                        {
-                       printf(_("config file contains invalid startup 
path:\n%s\n"), initial_directory_path);
+                       g_print(_("config file contains invalid startup 
path:\n%s\n"), initial_directory_path);
                        filelist_refresh();
                        }
                }
diff -ru gqmpeg-0.90.0/src/mixer.c gqmpeg-0.90.0.new/src/mixer.c
--- gqmpeg-0.90.0/src/mixer.c   2002-09-10 16:16:26.000000000 +0200
+++ gqmpeg-0.90.0.new/src/mixer.c       2005-07-23 13:23:01.000000000 +0200
@@ -109,7 +109,7 @@
        mf = open(mixer_device, O_RDWR);
        if(mf < 0)
                {
-               printf(_("unable to open %s\n"), mixer_device);
+               g_print(_("unable to open %s\n"), mixer_device);
                mixer_enabled = FALSE;
                return;
                }
@@ -119,7 +119,7 @@
        t|= ioctl(mf, SOUND_MIXER_READ_STEREODEVS, &stereo_mask);
        if (t!=0)
                {
-               printf(_("Unable to determine mixer devices\n"));
+               g_print(_("Unable to determine mixer devices\n"));
                close(mf);
                mixer_enabled = FALSE;
                return;
@@ -194,13 +194,13 @@
        mf = open(mixer_device, O_RDWR);
        if(mf < 0)
                {
-               printf(_("unable to open %s\n"), mixer_device);
+               g_print(_("unable to open %s\n"), mixer_device);
                return;
                }
 
        if(ioctl(mf, MIXER_WRITE(device->device_id), &new_vol)<0)
                {
-               printf(_("failed to set volume on %d\n"), device->device_id);
+               g_print(_("failed to set volume on %d\n"), device->device_id);
                }
 
        close(mf);
@@ -225,13 +225,13 @@
        mf = open(mixer_device, O_RDWR);
        if(mf < 0)
                {
-               printf(_("unable to open %s\n"), mixer_device);
+               g_print(_("unable to open %s\n"), mixer_device);
                return 0;
                }
 
        if(ioctl(mf, MIXER_READ(device->device_id), &vol)<0)
                {
-               printf(_("failed to get volume on %d\n"), device->device_id);
+               g_print(_("failed to get volume on %d\n"), device->device_id);
                vol = 0;
                }
 
@@ -905,7 +905,7 @@
 
        if ((max_indev <= 0) && (max_outdev <= 0))
                {
-               printf(_("no OSF MME devices found\n"));
+               g_print(_("no OSF MME devices found\n"));
                mixer_enabled = FALSE;
                return;
                }
diff -ru gqmpeg-0.90.0/src/mpg_hdrutil.c gqmpeg-0.90.0.new/src/mpg_hdrutil.c
--- gqmpeg-0.90.0/src/mpg_hdrutil.c     2004-03-16 02:12:29.000000000 +0100
+++ gqmpeg-0.90.0.new/src/mpg_hdrutil.c 2005-07-23 13:22:57.000000000 +0200
@@ -137,7 +137,7 @@
        g_free(pathl);
        if (!f)
                {
-               printf(_("unable to open file for read: %s\n"), path);
+               g_print(_("unable to open file for read: %s\n"), path);
                return NULL;
                }
 
diff -ru gqmpeg-0.90.0/src/mpg_tagutil.c gqmpeg-0.90.0.new/src/mpg_tagutil.c
--- gqmpeg-0.90.0/src/mpg_tagutil.c     2004-03-16 01:55:01.000000000 +0100
+++ gqmpeg-0.90.0.new/src/mpg_tagutil.c 2005-07-23 13:22:56.000000000 +0200
@@ -104,20 +104,20 @@
        g_free(pathl);
         if (!f)
                 {
-                printf(_("error opening file for tag: %s\n"), path);
+                printf(("error opening file for tag: %s\n"), path);
                 return NULL;
                 }
 
        if (fseek (f, -128, SEEK_END) != 0)
                {
-                printf(_("could not seek in file: %s\n"), path);
+                g_print(_("could not seek in file: %s\n"), path);
                fclose(f);
                return NULL;
                }
 
        if ( fread(buf, sizeof(gchar), 128, f) < 128)
                {
-                printf(_("could not read 128 bytes in file: %s\n"), path);
+                g_print(_("could not read 128 bytes in file: %s\n"), path);
                fclose(f);
                return NULL;
                }
@@ -172,7 +172,7 @@
        g_free(pathl);
         if (!f)
                 {
-                printf(_("error opening file for tag: %s\n"), path);
+                g_print(_("error opening file for tag: %s\n"), path);
                 return FALSE;
                 }
 
@@ -180,13 +180,13 @@
                {
                if (fseek (f, -128, SEEK_END) != 0)
                        {
-                       printf(_("could not seek in file: %s\n"), path);
+                       g_print(_("could not seek in file: %s\n"), path);
                        fclose(f);
                        return FALSE;
                        }
                if (fread(buf, sizeof(gchar), 128, f) < 128)
                        {
-                       printf(_("could not read 128 bytes in file: %s\n"), 
path);
+                       g_print(_("could not read 128 bytes in file: %s\n"), 
path);
                        fclose(f);
                        return FALSE;
                        }
@@ -195,7 +195,7 @@
                        /* file contains a TAG, overwrite starting here */
                        if (fseek (f, -128, SEEK_END) != 0)
                                {
-                               printf(_("could not seek in file: %s\n"), path);
+                               g_print(_("could not seek in file: %s\n"), 
path);
                                fclose(f);
                                return FALSE;
                                }
@@ -205,7 +205,7 @@
                        /* no tag found, seek to append tag to end of file */
                        if (fseek (f, 0, SEEK_END) != 0)
                                {
-                               printf(_("could not seek in file: %s\n"), path);
+                               g_print(_("could not seek in file: %s\n"), 
path);
                                fclose(f);
                                return FALSE;
                                }
@@ -216,7 +216,7 @@
                {
                if (fseek (f, 0, SEEK_END) != 0)
                        {
-                       printf(_("could not seek in file: %s\n"), path);
+                       g_print(_("could not seek in file: %s\n"), path);
                        fclose(f);
                        return FALSE;
                        }
@@ -252,7 +252,7 @@
 
        if (fwrite(buf, sizeof(gchar), 128, f) < 128)
                {
-               printf(_("could not write tag to file: %s\n"), path);
+               g_print(_("could not write tag to file: %s\n"), path);
                fclose(f);
                return FALSE;
                }
diff -ru gqmpeg-0.90.0/src/players.c gqmpeg-0.90.0.new/src/players.c
--- gqmpeg-0.90.0/src/players.c 2004-03-13 11:11:39.000000000 +0100
+++ gqmpeg-0.90.0.new/src/players.c     2005-07-23 13:23:01.000000000 +0200
@@ -204,7 +204,7 @@
 
        if (!imd)
                {
-               printf(_("No registered player types match: %s\n"), path);
+               g_print(_("No registered player types match: %s\n"), path);
                sd->flags |= SONG_FLAG_UNKNOWN_TYPE;
                }
 
@@ -261,7 +261,7 @@
 
        if (!current_imd || !current_imd->start_func)
                {
-               printf(_("No registered player types claim playback for: 
%s\n"), sd->path);
+               g_print(_("No registered player types claim playback for: 
%s\n"), sd->path);
                return FALSE;
                }
 
diff -ru gqmpeg-0.90.0/src/playlist.c gqmpeg-0.90.0.new/src/playlist.c
--- gqmpeg-0.90.0/src/playlist.c        2004-03-16 04:37:17.000000000 +0100
+++ gqmpeg-0.90.0.new/src/playlist.c    2005-07-23 13:23:00.000000000 +0200
@@ -452,13 +452,13 @@
                                                }
                                        else
                                                {
-                                               printf(_("undetermined 
type:%s\n"), s_buf);
+                                               g_print(_("undetermined 
type:%s\n"), s_buf);
                                                }
                                                g_free(buf);
                                        }
                                else
                                        {
-                                       printf(_("undetermined type:%s\n"), 
s_buf);
+                                       g_print(_("undetermined type:%s\n"), 
s_buf);
                                        }
                                }
                        }
@@ -597,7 +597,7 @@
        if (!playlist_load_fp)
                {
                /* file open failed */
-               printf(_("failed to open \"%s\"\n"), playlist_load_path);
+               g_print(_("failed to open \"%s\"\n"), playlist_load_path);
                return FALSE;
                }
        else
@@ -756,7 +756,7 @@
        if (!f)
                {
                /* file open failed */
-               printf(_("failed to open %s\n"),fn);
+               g_print(_("failed to open %s\n"),fn);
                return FALSE;
                }
 
diff -ru gqmpeg-0.90.0/src/preferences.c gqmpeg-0.90.0.new/src/preferences.c
--- gqmpeg-0.90.0/src/preferences.c     2004-03-16 11:25:40.000000000 +0100
+++ gqmpeg-0.90.0.new/src/preferences.c 2005-07-23 13:23:00.000000000 +0200
@@ -265,8 +265,8 @@
                                }
                        else
                                {
-                               printf(_("Valid skin not found in:%s\n"), path);
-                               printf(_("File named skindata (gqmpeg skins) or 
main.bmp (winamp skins) not found.\n"));
+                               g_print(_("Valid skin not found in:%s\n"), 
path);
+                               g_print(_("File named skindata (gqmpeg skins) 
or main.bmp (winamp skins) not found.\n"));
                                }
                        }
                g_free(skindata_file);
diff -ru gqmpeg-0.90.0/src/rcfile.c gqmpeg-0.90.0.new/src/rcfile.c
--- gqmpeg-0.90.0/src/rcfile.c  2004-03-16 01:51:14.000000000 +0100
+++ gqmpeg-0.90.0.new/src/rcfile.c      2005-07-23 13:22:59.000000000 +0200
@@ -116,11 +116,11 @@
        rcdir = g_strconcat(homedir(), "/", GQMPEG_RC_DIR, NULL);
        if (!isdir(rcdir))
                {
-               printf(_("Creating gqmpeg dir:%s\n"), rcdir);
+               g_print(_("Creating gqmpeg dir:%s\n"), rcdir);
                if (!mkdir_utf8(rcdir, 0755))
                        {
-                       printf(_("Could not create dir:%s\n"), rcdir);
-                       printf(_("Config not saved!\n"));
+                       g_print(_("Could not create dir:%s\n"), rcdir);
+                       g_print(_("Config not saved!\n"));
                        g_free(rcdir);
                        return;
                        }
@@ -134,7 +134,7 @@
        g_free(rc_pathl);
        if (!f)
                {
-               printf(_("error saving config file: %s\n"), rc_path);
+               g_print(_("error saving config file: %s\n"), rc_path);
                g_free(rc_path);
                return;
                }
diff -ru gqmpeg-0.90.0/src/skin_compat.c gqmpeg-0.90.0.new/src/skin_compat.c
--- gqmpeg-0.90.0/src/skin_compat.c     2004-03-16 01:43:56.000000000 +0100
+++ gqmpeg-0.90.0.new/src/skin_compat.c 2005-07-23 13:22:58.000000000 +0200
@@ -101,7 +101,7 @@
                }
        else
                {
-               printf(_("Unable to create button from: %s\n"), filename);
+               g_print(_("Unable to create button from: %s\n"), filename);
                }
 
        g_free(filename);
@@ -193,7 +193,7 @@
                wd = skin_widget_get_by_key(skin, digit_id, digit_type_id());
                if (!wd)
                        {
-                       printf(_("Large digit specified, but not defined\n"));
+                       g_print(_("Large digit specified, but not defined\n"));
                        return;
                        }
                else
@@ -211,7 +211,7 @@
 
                if (!wd)
                        {
-                       printf(_("Small digit specified, but not defined\n"));
+                       g_print(_("Small digit specified, but not defined\n"));
                        return;
                        }
                else
@@ -227,7 +227,7 @@
                digit = digit_new_from_file(filename);
                if (!digit)
                        {
-                       printf(_("Unable to load number file: %s"), filename);
+                       g_print(_("Unable to load number file: %s"), filename);
                        g_free(filename);
                        return;
                        }
@@ -293,7 +293,7 @@
                }
        else
                {
-               printf(_("Unable to load item file: %s\n"), filename);
+               g_print(_("Unable to load item file: %s\n"), filename);
                }       
 
        g_free(filename);
@@ -350,7 +350,7 @@
                }
        else
                {
-               printf(_("Unable to load font file: %s\n"), filename);
+               g_print(_("Unable to load font file: %s\n"), filename);
                }
 
        g_free(filename);
@@ -410,7 +410,7 @@
                }
        else
                {
-               printf(_("Unable to create slider from: %s\n"), filename);
+               g_print(_("Unable to create slider from: %s\n"), filename);
                }
 
        g_free(filename);
@@ -489,7 +489,7 @@
                }
        else
                {
-               printf(_("Unable to create dial from: %s\n"), filename);
+               g_print(_("Unable to create dial from: %s\n"), filename);
                }
 
        g_free(filename);
@@ -726,7 +726,7 @@
 
        if (!s->real_overlay)
                {
-               printf(_("No background image from: %s\n"), skin_path);
+               g_print(_("No background image from: %s\n"), skin_path);
                skin_free(s);
                return NULL;
                }
diff -ru gqmpeg-0.90.0/src/ui2_parse.c gqmpeg-0.90.0.new/src/ui2_parse.c
--- gqmpeg-0.90.0/src/ui2_parse.c       2004-03-16 05:24:27.000000000 +0100
+++ gqmpeg-0.90.0.new/src/ui2_parse.c   2005-07-23 13:23:04.000000000 +0200
@@ -510,7 +510,7 @@
 
        if (!s->overlay && !s->real_overlay)
                {
-               printf(_("No background image from: %s\n"), skin_dir);
+               g_print(_("No background image from: %s\n"), skin_dir);
                skin_free(s);
                return NULL;
                }
diff -ru gqmpeg-0.90.0/src/ui2_util.c gqmpeg-0.90.0.new/src/ui2_util.c
--- gqmpeg-0.90.0/src/ui2_util.c        2004-03-16 01:38:37.000000000 +0100
+++ gqmpeg-0.90.0.new/src/ui2_util.c    2005-07-23 13:23:03.000000000 +0200
@@ -486,7 +486,7 @@
        g_free(pathl);
        if (!f)
                {
-               printf(_("Unable to save skin state information to: %s\n"), 
path);
+               g_print(_("Unable to save skin state information to: %s\n"), 
path);
                return FALSE;
                }
 
diff -ru gqmpeg-0.90.0/src/ui_bookmark.c gqmpeg-0.90.0.new/src/ui_bookmark.c
--- gqmpeg-0.90.0/src/ui_bookmark.c     2004-03-16 04:23:10.000000000 +0100
+++ gqmpeg-0.90.0.new/src/ui_bookmark.c 2005-07-23 13:42:49.733978624 +0200
@@ -142,11 +142,7 @@
        g_free(pathl);
        if (!f)
                {
-               gchar *buf;
-
-               buf = g_strdup_printf(_("Unable to write history lists to: 
%s\n"), path);
-               print_term(buf);
-               g_free(buf);
+               g_print(_("Unable to write history lists to: %s\n"), path);
 
                return FALSE;
                }
diff -ru gqmpeg-0.90.0/src/ui_fileops.c gqmpeg-0.90.0.new/src/ui_fileops.c
--- gqmpeg-0.90.0/src/ui_fileops.c      2004-03-16 05:07:26.000000000 +0100
+++ gqmpeg-0.90.0.new/src/ui_fileops.c  2005-07-23 13:43:16.254946824 +0200
@@ -41,16 +41,6 @@
 /* file sorting method (case) */
 gint file_sort_case_sensitive = FALSE;
 
-
-void print_term(const gchar *text_utf8)
-{
-       gchar *text_l;
-
-       text_l = g_locale_from_utf8(text_utf8, -1, NULL, NULL, NULL);
-       printf((text_l) ? text_l : text_utf8);
-       g_free(text_l);
-}
-
 static void encoding_dialog(const gchar *path)
 {
        static gint warned_user = FALSE;
diff -ru gqmpeg-0.90.0/src/ui_fileops.h gqmpeg-0.90.0.new/src/ui_fileops.h
--- gqmpeg-0.90.0/src/ui_fileops.h      2004-03-13 10:18:34.000000000 +0100
+++ gqmpeg-0.90.0.new/src/ui_fileops.h  2005-07-23 13:23:53.000000000 +0200
@@ -21,8 +21,6 @@
 
 extern gint file_sort_case_sensitive;
 
-void print_term(const gchar *text_utf8);
-
 gchar *path_to_utf8(const gchar *path);
 gchar *path_from_utf8(const gchar *path);
 
diff -ru gqmpeg-0.90.0/src/window.c gqmpeg-0.90.0.new/src/window.c
--- gqmpeg-0.90.0/src/window.c  2004-03-16 06:42:30.000000000 +0100
+++ gqmpeg-0.90.0.new/src/window.c      2005-07-23 13:22:58.000000000 +0200
@@ -412,20 +412,20 @@
 
        if (skin_path)
                {
-               printf(_("loading skin..\n"));
+               g_print(_("loading skin..\n"));
                if (!ui_skin_load(ui, skin_path, NULL))
                        {
                        if (skin_default_path)
                                {
                                if (!ui_skin_load(ui, skin_default_path, 
skin_mode_key))
                                        {
-                                       printf(_("Default skin not loaded, 
using built-in default\n"));
+                                       g_print(_("Default skin not loaded, 
using built-in default\n"));
                                        ui_skin_load(ui, NULL, NULL);
                                        }
                                }
                        else
                                {
-                               printf(_("Skin not loaded, using built-in 
default\n"));
+                               g_print(_("Skin not loaded, using built-in 
default\n"));
                                ui_skin_load(ui, NULL, NULL);
                                }
                        }
@@ -434,7 +434,7 @@
                {
                if (!ui_skin_load(ui, skin_default_path, skin_mode_key))
                        {
-                       printf(_("Skin in config file not loaded, using 
built-in default\n"));
+                       g_print(_("Skin in config file not loaded, using 
built-in default\n"));
                        ui_skin_load(ui, NULL, NULL);
                        }
                }

Reply via email to