aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-01-09 22:44:35 +0800
committerChristian Persch <chpe@src.gnome.org>2005-01-09 22:44:35 +0800
commitefd9d3522dc2ab3275e5239e07049be9ca6a0c6e (patch)
tree8d8625add0859157da613ab13fe92885f7bb7701 /embed/mozilla
parent5002e573727d32a729e44e6b9f8260ae2230883c (diff)
downloadgsoc2013-epiphany-efd9d3522dc2ab3275e5239e07049be9ca6a0c6e.tar
gsoc2013-epiphany-efd9d3522dc2ab3275e5239e07049be9ca6a0c6e.tar.gz
gsoc2013-epiphany-efd9d3522dc2ab3275e5239e07049be9ca6a0c6e.tar.bz2
gsoc2013-epiphany-efd9d3522dc2ab3275e5239e07049be9ca6a0c6e.tar.lz
gsoc2013-epiphany-efd9d3522dc2ab3275e5239e07049be9ca6a0c6e.tar.xz
gsoc2013-epiphany-efd9d3522dc2ab3275e5239e07049be9ca6a0c6e.tar.zst
gsoc2013-epiphany-efd9d3522dc2ab3275e5239e07049be9ca6a0c6e.zip
Set show-once to PR_FALSE if the GetBoolPref call fails.
2005-01-09 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/GtkNSSSecurityWarningDialogs.cpp: Set show-once to PR_FALSE if the GetBoolPref call fails.
Diffstat (limited to 'embed/mozilla')
-rw-r--r--embed/mozilla/GtkNSSSecurityWarningDialogs.cpp9
1 files changed, 3 insertions, 6 deletions
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 <glib/gi18n.h>
#include <gtk/gtkdialog.h>
-#include <gtk/gtkbutton.h>
-#include <gtk/gtktogglebutton.h>
-#include <gtk/gtkcheckbutton.h>
#include <gtk/gtkbox.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtkvbox.h>
@@ -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);
}