aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/GtkNSSClientAuthDialogs.cpp
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@src.gnome.org>2004-06-04 02:51:32 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2004-06-04 02:51:32 +0800
commitb774b547788b74884b9eb690c548a6016e714023 (patch)
tree72b9df09c0fc257169b3e9b9cbdc349e56a63101 /embed/mozilla/GtkNSSClientAuthDialogs.cpp
parentb699b40d663955560655271f7645ae277e6076c8 (diff)
downloadgsoc2013-epiphany-b774b547788b74884b9eb690c548a6016e714023.tar
gsoc2013-epiphany-b774b547788b74884b9eb690c548a6016e714023.tar.gz
gsoc2013-epiphany-b774b547788b74884b9eb690c548a6016e714023.tar.bz2
gsoc2013-epiphany-b774b547788b74884b9eb690c548a6016e714023.tar.lz
gsoc2013-epiphany-b774b547788b74884b9eb690c548a6016e714023.tar.xz
gsoc2013-epiphany-b774b547788b74884b9eb690c548a6016e714023.tar.zst
gsoc2013-epiphany-b774b547788b74884b9eb690c548a6016e714023.zip
merge mozilla-embed-strings branch
Diffstat (limited to 'embed/mozilla/GtkNSSClientAuthDialogs.cpp')
-rw-r--r--embed/mozilla/GtkNSSClientAuthDialogs.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/embed/mozilla/GtkNSSClientAuthDialogs.cpp b/embed/mozilla/GtkNSSClientAuthDialogs.cpp
index ca258edaf..1ff07e953 100644
--- a/embed/mozilla/GtkNSSClientAuthDialogs.cpp
+++ b/embed/mozilla/GtkNSSClientAuthDialogs.cpp
@@ -31,9 +31,7 @@
#include <nsIServiceManager.h>
#include <nsIInterfaceRequestor.h>
#include <nsIInterfaceRequestorUtils.h>
-#ifdef ALLOW_PRIVATE_STRINGS
-#include <nsString.h>
-#endif
+#include <nsEmbedString.h>
#include <gtk/gtkdialog.h>
#include <gtk/gtkimage.h>
@@ -188,9 +186,10 @@ GtkNSSClientAuthDialogs::ChooseCertificate (nsIInterfaceRequestor *ctx,
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
- const nsACString &utf8_cn = NS_ConvertUTF16toUTF8(cn);
- tt_cn = g_strdup_printf ("\"<tt>%s</tt>\"",
- PromiseFlatCString(utf8_cn).get());
+ nsEmbedCString utf8_cn;
+ NS_UTF16ToCString (nsEmbedString (cn),
+ NS_CSTRING_ENCODING_UTF8, utf8_cn);
+ tt_cn = g_strdup_printf ("\"<tt>%s</tt>\"", utf8_cn.get());
msg = g_strdup_printf (_("Choose a certificate to present as identification to %s."),
tt_cn);
@@ -206,13 +205,18 @@ GtkNSSClientAuthDialogs::ChooseCertificate (nsIInterfaceRequestor *ctx,
store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
for (i = 0; i < count; i++)
{
- const nsACString &certnick = NS_ConvertUTF16toUTF8(certNickList[i]);
- const nsACString &certdetail = NS_ConvertUTF16toUTF8(certDetailsList[i]);
+ nsEmbedCString certnick;
+ nsEmbedCString certdetail;
+
+ NS_UTF16ToCString (nsEmbedString (certNickList[i]),
+ NS_CSTRING_ENCODING_UTF8, certnick);
+ NS_UTF16ToCString (nsEmbedString (certDetailsList[i]),
+ NS_CSTRING_ENCODING_UTF8, certdetail);
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
- 0, PromiseFlatCString(certnick).get(),
- 1, PromiseFlatCString(certdetail).get(),
+ 0, certnick.get(),
+ 1, certdetail.get(),
-1);
}