From 53dc6836904c100dc75c368b9e494eaebcc63416 Mon Sep 17 00:00:00 2001 From: Julian de Navascues Date: Mon, 21 Sep 2009 11:46:12 +0200 Subject: Prevents PDM from getting keyring passwords in a private session SoupSession will remember HTTP passwords during the private session but as we dont allow to delete them it doesnt make sense to show them in the dialog. Bug #591395 Signed-off-by: Xan Lopez --- src/pdm-dialog.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c index 1c1bac06c..39fa7b709 100644 --- a/src/pdm-dialog.c +++ b/src/pdm-dialog.c @@ -1,3 +1,4 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* * Copyright © 2002 Jorn Baayen * Copyright © 2003 Marco Pesenti Gritti @@ -261,7 +262,7 @@ clear_all_dialog_response_cb (GtkDialog *dialog, if (response == GTK_RESPONSE_OK) { - if (gtk_toggle_button_get_active + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbuttons->checkbutton_history))) { EphyEmbedShell *shell; @@ -1359,6 +1360,15 @@ pdm_dialog_fill_passwords_list (PdmActionInfo *info) NULL); } +static void +pdm_dialog_fill_passwords_list_from_soupsession_dummy (PdmActionInfo *info) +{ + /* Do nothing, no HTTP password will be added to PDM (in private mode) because we cant delete them. + + See https://bugzilla.gnome.org/show_bug.cgi?id=591395 + */ +} + static void pdm_dialog_passwords_destruct (PdmActionInfo *info) { @@ -1540,6 +1550,8 @@ pdm_dialog_init (PdmDialog *dialog) PdmDialogPrivate *priv; PdmActionInfo *cookies, *passwords; GtkWidget *window; + gboolean has_private_profile = ephy_has_private_profile (); + priv = dialog->priv = EPHY_PDM_DIALOG_GET_PRIVATE (dialog); @@ -1588,7 +1600,8 @@ pdm_dialog_init (PdmDialog *dialog) passwords = g_new0 (PdmActionInfo, 1); passwords->construct = pdm_dialog_passwords_construct; passwords->destruct = pdm_dialog_passwords_destruct; - passwords->fill = pdm_dialog_fill_passwords_list; + /* Bug 591395 : we dont show HTTP auth in private mode because we can delete or use it anyway. */ + passwords->fill = has_private_profile ? pdm_dialog_fill_passwords_list_from_soupsession_dummy : pdm_dialog_fill_passwords_list; passwords->add = pdm_dialog_password_add; passwords->remove = pdm_dialog_password_remove; passwords->dialog = dialog; -- cgit v1.2.3