[gvfs] afp: use the UTF-8 server name for password dialogs when it's available
- From: Carl-Anton Ingmarsson <carlantoni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] afp: use the UTF-8 server name for password dialogs when it's available
- Date: Sun, 22 Apr 2012 14:10:59 +0000 (UTC)
commit a1f285ff0b5583b56b349303f42579f84add6c78
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date: Sat Apr 21 19:19:56 2012 +0200
afp: use the UTF-8 server name for password dialogs when it's available
https://bugzilla.gnome.org/show_bug.cgi?id=674528
daemon/gvfsafpserver.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gvfsafpserver.c b/daemon/gvfsafpserver.c
index 8dbd307..c5330ba 100644
--- a/daemon/gvfsafpserver.c
+++ b/daemon/gvfsafpserver.c
@@ -928,6 +928,7 @@ g_vfs_afp_server_login (GVfsAfpServer *server,
gboolean res;
char *user, *olduser;
char *password;
+ char *server_name;
gboolean anonymous;
GPasswordSave password_save;
char *prompt = NULL;
@@ -968,6 +969,9 @@ g_vfs_afp_server_login (GVfsAfpServer *server,
}
}
+ /* Use utf8_server_name if it exists */
+ server_name = server->utf8_server_name ? server->utf8_server_name : server->server_name;
+
while (TRUE)
{
GString *str;
@@ -987,10 +991,10 @@ g_vfs_afp_server_login (GVfsAfpServer *server,
/* create prompt */
if (initial_user)
/* Translators: the first %s is the username, the second the host name */
- g_string_append_printf (str, _("Enter password for afp as %s on %s"), initial_user, server->server_name);
+ g_string_append_printf (str, _("Enter password for afp as %s on %s"), initial_user, server_name);
else
/* translators: %s here is the hostname */
- g_string_append_printf (str, _("Enter password for afp on %s"), server->server_name);
+ g_string_append_printf (str, _("Enter password for afp on %s"), server_name);
prompt = g_string_free (str, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]