# HG changeset patch # User masneyb # Date 1162523264 0 # Node ID 77660334b282574bec7acb06bbd0b1fccd81f0c5 # Parent 8263cc35c027305aeb1aad305ec735d0079ef1f9 2006-11-2 Brian Masney * src/text/gftp-text.c src/text/gftp-text.h src/text/textui.c - use gftp_string_from_utf8() for the conversion between the various character sets. diff -r 8263cc35c027 -r 77660334b282 ChangeLog --- a/ChangeLog Fri Nov 03 03:02:51 2006 +0000 +++ b/ChangeLog Fri Nov 03 03:07:44 2006 +0000 @@ -1,4 +1,8 @@ 2006-11-2 Brian Masney + * src/text/gftp-text.c src/text/gftp-text.h src/text/textui.c - + use gftp_string_from_utf8() for the conversion between the + various character sets. + * lib/gftp.h lib/local.c lib/misc.c lib/protocols.c lib/rfc959.c lib/sshv2.c - added gftp_filename_to_utf8() and gftp_filename_from_utf8(). @@ -3689,7 +3693,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.495 2006/11/03 03:02:47 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.496 2006/11/03 03:07:40 masneyb Exp $ tags * debian/* - updated files from Debian maintainer diff -r 8263cc35c027 -r 77660334b282 src/text/gftp-text.c --- a/src/text/gftp-text.c Fri Nov 03 03:02:51 2006 +0000 +++ b/src/text/gftp-text.c Fri Nov 03 03:07:44 2006 +0000 @@ -44,7 +44,7 @@ sw = gftp_text_get_win_size (); - locale_str = gftp_string_from_utf8 (request, string, &destlen); + locale_str = gftp_string_from_utf8 (request, 1, string, &destlen); if (locale_str == NULL) stpos = string; else @@ -140,7 +140,8 @@ char * -gftp_text_ask_question (const char *question, int echo, char *buf, size_t size) +gftp_text_ask_question (gftp_request * request, const char *question, int echo, + char *buf, size_t size) { struct termios term, oldterm; gchar *locale_question; @@ -174,12 +175,7 @@ else infd = stdin; -#if GLIB_MAJOR_VERSION > 1 - locale_question = g_locale_from_utf8 (question, -1, NULL, NULL, NULL); -#else - locale_question = NULL; -#endif - + locale_question = gftp_string_from_utf8 (request, 1, question, &destlen); if (locale_question != NULL) { printf ("%s%s%s ", GFTPUI_COMMON_COLOR_BLUE, locale_question, diff -r 8263cc35c027 -r 77660334b282 src/text/gftp-text.h --- a/src/text/gftp-text.h Fri Nov 03 03:02:51 2006 +0000 +++ b/src/text/gftp-text.h Fri Nov 03 03:07:44 2006 +0000 @@ -32,7 +32,8 @@ unsigned int gftp_text_get_win_size ( void ); -char * gftp_text_ask_question ( const char *question, +char * gftp_text_ask_question ( gftp_request * request, + const char *question, int echo, char *buf, size_t size ); diff -r 8263cc35c027 -r 77660334b282 src/text/textui.c --- a/src/text/textui.c Fri Nov 03 03:02:51 2006 +0000 +++ b/src/text/textui.c Fri Nov 03 03:07:44 2006 +0000 @@ -76,7 +76,8 @@ char tempstr[256]; gftp_set_username (request, - gftp_text_ask_question (_("Username [anonymous]:"), 1, + gftp_text_ask_question (request, + _("Username [anonymous]:"), 1, tempstr, sizeof (tempstr))); } @@ -88,7 +89,7 @@ char tempstr[256]; gftp_set_password (request, - gftp_text_ask_question (_("Password:"), 0, + gftp_text_ask_question (request, _("Password:"), 0, tempstr, sizeof (tempstr))); } @@ -147,7 +148,7 @@ g_snprintf (question, sizeof (question), _("%s already exists. (%s source size, %s destination size):\n(o)verwrite, (r)esume, (s)kip, (O)verwrite All, (R)esume All, (S)kip All: (%c)"), pos, srcsize, destsize, defaction); - gftp_text_ask_question (question, 1, &buf, 1); + gftp_text_ask_question (tdata->fromreq, question, 1, &buf, 1); switch (buf) { @@ -261,7 +262,7 @@ do { - gftp_text_ask_question (question, 1, buf, sizeof (buf)); + gftp_text_ask_question (request, question, 1, buf, sizeof (buf)); if (strcasecmp (buf, "yes") == 0) ret = 1; else if (strcasecmp (buf, "no") == 0) @@ -283,7 +284,7 @@ do { - gftp_text_ask_question (question, shown, buf, sizeof (buf)); + gftp_text_ask_question (request, question, shown, buf, sizeof (buf)); } while (*buf == '\0');