aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-07-12 04:41:35 +0800
committerChristian Persch <chpe@src.gnome.org>2005-07-12 04:41:35 +0800
commit02a6df50c7276d0fb38e4f9f618ec12261bad415 (patch)
treed52c5a947ca1035163aa8e59320eb33ee0847557 /embed
parent8edb3efb671cef0c762dac6a67de549f88382479 (diff)
downloadgsoc2013-epiphany-02a6df50c7276d0fb38e4f9f618ec12261bad415.tar
gsoc2013-epiphany-02a6df50c7276d0fb38e4f9f618ec12261bad415.tar.gz
gsoc2013-epiphany-02a6df50c7276d0fb38e4f9f618ec12261bad415.tar.bz2
gsoc2013-epiphany-02a6df50c7276d0fb38e4f9f618ec12261bad415.tar.lz
gsoc2013-epiphany-02a6df50c7276d0fb38e4f9f618ec12261bad415.tar.xz
gsoc2013-epiphany-02a6df50c7276d0fb38e4f9f618ec12261bad415.tar.zst
gsoc2013-epiphany-02a6df50c7276d0fb38e4f9f618ec12261bad415.zip
Remove checkbox from trust-CA dialogue. Fixes bug #168295.
2005-07-11 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/GtkNSSDialogs.cpp: Remove checkbox from trust-CA dialogue. Fixes bug #168295.
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/GtkNSSDialogs.cpp38
1 files changed, 15 insertions, 23 deletions
diff --git a/embed/mozilla/GtkNSSDialogs.cpp b/embed/mozilla/GtkNSSDialogs.cpp
index 0e6580bb7..897517e1c 100644
--- a/embed/mozilla/GtkNSSDialogs.cpp
+++ b/embed/mozilla/GtkNSSDialogs.cpp
@@ -528,14 +528,13 @@ GtkNSSDialogs::ConfirmDownloadCACert(nsIInterfaceRequestor *ctx,
PRUint32 *_trust,
PRBool *_retval)
{
- GtkWidget *dialog, *label, *content_vbox, *vbox;
- GtkWidget *check_ssl;
- char *msg, *tertiary;
+ GtkWidget *dialog, *label;
+ char *msg, *primary;
nsCOMPtr<nsIDOMWindow> parent = do_GetInterface (ctx);
GtkWindow *gparent = GTK_WINDOW (EphyUtils::FindGtkParent (parent));
- dialog = gtk_dialog_new_with_buttons ("", gparent,
+ dialog = gtk_dialog_new_with_buttons (_("Trust new Certificate Authority?"), gparent,
GTK_DIALOG_DESTROY_WITH_PARENT,
_("_View Certificate"),
NSSDIALOG_RESPONSE_VIEW_CERT,
@@ -552,7 +551,7 @@ GtkNSSDialogs::ConfirmDownloadCACert(nsIInterfaceRequestor *ctx,
gtk_window_set_icon_name (GTK_WINDOW (dialog), "web-browser");
higgy_setup_dialog (GTK_DIALOG (dialog), GTK_STOCK_DIALOG_WARNING,
- &label, &content_vbox);
+ &label, NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
nsEmbedString commonName;
@@ -562,27 +561,17 @@ GtkNSSDialogs::ConfirmDownloadCACert(nsIInterfaceRequestor *ctx,
NS_UTF16ToCString (commonName,
NS_CSTRING_ENCODING_UTF8, cCommonName);
- tertiary = g_markup_printf_escaped (_("Trust \"%s\" to identify:"), cCommonName.get());
+ primary = g_markup_printf_escaped (_("Trust new Certificate Authority \"%s\" to identify web sites?"),
+ cCommonName.get());
- msg = g_strdup_printf ("<span weight=\"bold\" size=\"larger\">%s</span>\n\n%s\n\n%s",
- _("Trust new Certificate Authority?"),
+ msg = g_strdup_printf ("<span weight=\"bold\" size=\"larger\">%s</span>\n\n%s",
+ primary,
_("Before trusting a Certificate Authority (CA) you should "
- "verify the certificate is authentic."),
- tertiary);
+ "verify the certificate is authentic."));
gtk_label_set_markup (GTK_LABEL (label), msg);
- g_free (tertiary);
+ g_free (primary);
g_free (msg);
- vbox = gtk_vbox_new (FALSE, 6);
-
- check_ssl = gtk_check_button_new_with_mnemonic
- (_("_Web sites"));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_ssl), TRUE);
- gtk_box_pack_start (GTK_BOX(vbox), check_ssl, TRUE, TRUE, 0);
-
- gtk_box_pack_start (GTK_BOX (content_vbox), higgy_indent_widget (vbox),
- FALSE, FALSE, 0);
-
gtk_widget_show_all (dialog);
int ret;
@@ -604,11 +593,14 @@ GtkNSSDialogs::ConfirmDownloadCACert(nsIInterfaceRequestor *ctx,
}
else
{
- *_trust = nsIX509CertDB::UNTRUSTED;
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_ssl)))
+ if (ret == GTK_RESPONSE_ACCEPT)
{
*_trust |= nsIX509CertDB::TRUSTED_SSL;
}
+ else
+ {
+ *_trust = nsIX509CertDB::UNTRUSTED;
+ }
*_retval = PR_TRUE;
}