From: Stu T. <nos...@us...> - 2005-05-14 13:52:13
|
Update of /cvsroot/gaim/gaim/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30274 Modified Files: gtkpounce.c Log Message: Fix 1196574 - invalid charset when executing commands Could someone check that this doesn't break anything on windows please? Index: gtkpounce.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkpounce.c,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -p -r1.72 -r1.73 --- gtkpounce.c 28 Apr 2005 01:06:31 -0000 1.72 +++ gtkpounce.c 14 May 2005 13:52:03 -0000 1.73 @@ -1014,11 +1014,13 @@ pounce_cb(GaimPounce *pounce, GaimPounce if (gaim_pounce_action_is_enabled(pounce, "execute-command")) { const char *command; + char *localecmd; command = gaim_pounce_action_get_attribute(pounce, "execute-command", "command"); + localecmd = g_locale_from_utf8(command, -1, NULL, NULL, NULL); - if (command != NULL) + if (localecmd != NULL) { #ifndef _WIN32 int pid = fork(); @@ -1028,7 +1030,7 @@ pounce_cb(GaimPounce *pounce, GaimPounce args[0] = "sh"; args[1] = "-c"; - args[2] = (char *)command; + args[2] = (char *)localecmd; args[3] = NULL; execvp(args[0], args); @@ -1049,6 +1051,7 @@ pounce_cb(GaimPounce *pounce, GaimPounce command); #endif /* !_WIN32 */ } + g_free(localecmd); } if (gaim_pounce_action_is_enabled(pounce, "play-sound")) |