Mercurial > gftp.yaz
diff src/gtk/gtkui_transfer.c @ 582:5df46f79d9c1
2004-10-4 Brian Masney <masneyb@gftp.org>
* lib/protocols.c (gftp_string_from_utf8,gftp_string_to_utf8) - added
more printf() functions whenever there is a problem converting a string
* src/gtk/gtkui_transfer.c (gftpui_ask_transfer) - make sure the
filename that is to be displayed to the user is encoded in UTF8
author | masneyb |
---|---|
date | Tue, 05 Oct 2004 00:13:09 +0000 |
parents | 39e9945288ea |
children | 056c54ac52a0 |
line wrap: on
line diff
--- a/src/gtk/gtkui_transfer.c Mon Oct 04 15:31:25 2004 +0000 +++ b/src/gtk/gtkui_transfer.c Tue Oct 05 00:13:09 2004 +0000 @@ -206,7 +206,7 @@ gftpui_ask_transfer (gftp_transfer * tdata) { char *dltitles[4], *add_data[4] = { NULL, NULL, NULL, NULL }, - tempstr[50], temp1str[50], *pos; + tempstr[50], temp1str[50], *pos, *utf8_file; GtkWidget * dialog, * tempwid, * scroll, * hbox; gftp_file * tempfle; GList * templist; @@ -290,7 +290,9 @@ len = strlen (tdata->toreq->directory); if (strncmp (pos, tdata->toreq->directory, len) == 0) pos = tempfle->destfile + len + 1; - add_data[0] = pos; + + utf8_file = gftp_string_to_utf8 (tdata->toreq, pos); + add_data[0] = utf8_file != NULL ? utf8_file : pos; gftp_get_transfer_action (tdata->fromreq, tempfle); switch (tempfle->transfer_action) @@ -315,6 +317,9 @@ i = gtk_clist_append (GTK_CLIST (tdata->clist), add_data); gtk_clist_set_row_data (GTK_CLIST (tdata->clist), i, tempfle); + + if (utf8_file != NULL) + g_free (utf8_file); } gtk_clist_select_all (GTK_CLIST (tdata->clist));