From efd9d3522dc2ab3275e5239e07049be9ca6a0c6e Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sun, 9 Jan 2005 14:44:35 +0000 Subject: Set show-once to PR_FALSE if the GetBoolPref call fails. 2005-01-09 Christian Persch * embed/mozilla/GtkNSSSecurityWarningDialogs.cpp: Set show-once to PR_FALSE if the GetBoolPref call fails. --- embed/mozilla/GtkNSSSecurityWarningDialogs.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'embed/mozilla') diff --git a/embed/mozilla/GtkNSSSecurityWarningDialogs.cpp b/embed/mozilla/GtkNSSSecurityWarningDialogs.cpp index 5c3c30a9c..97d238314 100644 --- a/embed/mozilla/GtkNSSSecurityWarningDialogs.cpp +++ b/embed/mozilla/GtkNSSSecurityWarningDialogs.cpp @@ -58,9 +58,6 @@ #include #include -#include -#include -#include #include #include #include @@ -220,7 +217,7 @@ GtkNSSSecurityWarningDialogs::DoDialog (nsIInterfaceRequestor *aContext, { showOncePref = g_strconcat (aPrefName, ".show_once", NULL); rv = prefBranch->GetBoolPref (showOncePref, &showOnce); - if (NS_FAILED (rv)) showOnce = PR_TRUE; + if (NS_FAILED (rv)) showOnce = PR_FALSE; } if (!show && !showOnce) @@ -270,9 +267,9 @@ GtkNSSSecurityWarningDialogs::DoDialog (nsIInterfaceRequestor *aContext, int response = gtk_dialog_run (GTK_DIALOG (dialog)); - *_retval = response == GTK_RESPONSE_ACCEPT; + *_retval = (response == GTK_RESPONSE_ACCEPT || response == GTK_RESPONSE_OK); - if (prefBranch && showOncePref && showOnce) + if (prefBranch && showOncePref && showOnce && *_retval) { prefBranch->SetBoolPref (showOncePref, PR_FALSE); } -- cgit v1.2.3