comparison src/text/textui.c @ 846:77660334b282

2006-11-2 Brian Masney <masneyb@gftp.org> * 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.
author masneyb
date Fri, 03 Nov 2006 03:07:44 +0000
parents c1144630c4f4
children 2d4e6fca8e7c
comparison
equal deleted inserted replaced
845:8263cc35c027 846:77660334b282
74 gftpui_prompt_username (void *uidata, gftp_request * request) 74 gftpui_prompt_username (void *uidata, gftp_request * request)
75 { 75 {
76 char tempstr[256]; 76 char tempstr[256];
77 77
78 gftp_set_username (request, 78 gftp_set_username (request,
79 gftp_text_ask_question (_("Username [anonymous]:"), 1, 79 gftp_text_ask_question (request,
80 _("Username [anonymous]:"), 1,
80 tempstr, sizeof (tempstr))); 81 tempstr, sizeof (tempstr)));
81 } 82 }
82 83
83 84
84 85
86 gftpui_prompt_password (void *uidata, gftp_request * request) 87 gftpui_prompt_password (void *uidata, gftp_request * request)
87 { 88 {
88 char tempstr[256]; 89 char tempstr[256];
89 90
90 gftp_set_password (request, 91 gftp_set_password (request,
91 gftp_text_ask_question (_("Password:"), 0, 92 gftp_text_ask_question (request, _("Password:"), 0,
92 tempstr, sizeof (tempstr))); 93 tempstr, sizeof (tempstr)));
93 } 94 }
94 95
95 96
96 void 97 void
145 break; 146 break;
146 } 147 }
147 148
148 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); 149 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);
149 150
150 gftp_text_ask_question (question, 1, &buf, 1); 151 gftp_text_ask_question (tdata->fromreq, question, 1, &buf, 1);
151 152
152 switch (buf) 153 switch (buf)
153 { 154 {
154 case 'o': 155 case 'o':
155 action = GFTP_TRANS_ACTION_OVERWRITE; 156 action = GFTP_TRANS_ACTION_OVERWRITE;
259 char buf[10]; 260 char buf[10];
260 int ret; 261 int ret;
261 262
262 do 263 do
263 { 264 {
264 gftp_text_ask_question (question, 1, buf, sizeof (buf)); 265 gftp_text_ask_question (request, question, 1, buf, sizeof (buf));
265 if (strcasecmp (buf, "yes") == 0) 266 if (strcasecmp (buf, "yes") == 0)
266 ret = 1; 267 ret = 1;
267 else if (strcasecmp (buf, "no") == 0) 268 else if (strcasecmp (buf, "no") == 0)
268 ret = 0; 269 ret = 0;
269 else 270 else
281 { 282 {
282 char buf[255]; 283 char buf[255];
283 284
284 do 285 do
285 { 286 {
286 gftp_text_ask_question (question, shown, buf, sizeof (buf)); 287 gftp_text_ask_question (request, question, shown, buf, sizeof (buf));
287 } 288 }
288 while (*buf == '\0'); 289 while (*buf == '\0');
289 290
290 return (g_strdup (buf)); 291 return (g_strdup (buf));
291 } 292 }