diff options
author | Christian Persch <chpe@src.gnome.org> | 2008-08-15 03:41:56 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2008-08-15 03:41:56 +0800 |
commit | 93601ab889e0284f607b532921c59ea06f2785fa (patch) | |
tree | b6b04a000a2a7bd5d1fe19100e4186ecf6f47f7c /embed | |
parent | 3be63f81456440cad187fb7250e35c7158ebb6d9 (diff) | |
download | gsoc2013-epiphany-93601ab889e0284f607b532921c59ea06f2785fa.tar gsoc2013-epiphany-93601ab889e0284f607b532921c59ea06f2785fa.tar.gz gsoc2013-epiphany-93601ab889e0284f607b532921c59ea06f2785fa.tar.bz2 gsoc2013-epiphany-93601ab889e0284f607b532921c59ea06f2785fa.tar.lz gsoc2013-epiphany-93601ab889e0284f607b532921c59ea06f2785fa.tar.xz gsoc2013-epiphany-93601ab889e0284f607b532921c59ea06f2785fa.tar.zst gsoc2013-epiphany-93601ab889e0284f607b532921c59ea06f2785fa.zip |
Allow remembering the selected user cert.
svn path=/branches/gnome-2-24/; revision=8417
Diffstat (limited to 'embed')
-rw-r--r-- | embed/mozilla/GtkNSSClientAuthDialogs.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/embed/mozilla/GtkNSSClientAuthDialogs.cpp b/embed/mozilla/GtkNSSClientAuthDialogs.cpp index ee699a23d..9c3320ec1 100644 --- a/embed/mozilla/GtkNSSClientAuthDialogs.cpp +++ b/embed/mozilla/GtkNSSClientAuthDialogs.cpp @@ -267,13 +267,36 @@ GtkNSSClientAuthDialogs::ChooseCertificate (nsIInterfaceRequestor *ctx, gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0); +#ifdef HAVE_NSICLIENTAUTHUSERDECISION + GtkWidget *rememberButton; + nsCOMPtr<nsIClientAuthUserDecision> userDecision (do_QueryInterface (ctx)); + + if (userDecision) + { + PRBool remember = PR_FALSE; + userDecision->GetRememberClientAuthCertificate (&remember); + + rememberButton = gtk_check_button_new_with_mnemonic ("_Remember this choice"); /* FIXME i18n */ + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rememberButton), remember != PR_FALSE); + gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog)->vbox), rememberButton, FALSE, FALSE, 0); + gtk_widget_show (rememberButton); + } +#endif /* HAVE_NSICLIENTAUTHUSERDECISION */ + /* run the dialog */ int res = modalDialog.Run (GTK_DIALOG (dialog)); if (res == GTK_RESPONSE_OK) { *canceled = PR_FALSE; *selectedIndex = gtk_combo_box_get_active (GTK_COMBO_BOX (combo)); - } + +#ifdef HAVE_NSICLIENTAUTHUSERDECISION + if (userDecision) + { + userDecision->SetRememberClientAuthCertificate (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rememberButton)) != FALSE); + } +#endif /* HAVE_NSICLIENTAUTHUSERDECISION */ + } else { *canceled = PR_TRUE; |