aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2008-02-15 04:14:02 +0800
committerXan Lopez <xan@src.gnome.org>2008-02-15 04:14:02 +0800
commit3bb5f859cf406cec4e562c17afe276db2ef92b4b (patch)
treefaabf573946b7e7c549721834085afb50477ba32
parentfb54867e1f8fc420905e0bbd58e8626c7bf7ce5d (diff)
downloadgsoc2013-epiphany-3bb5f859cf406cec4e562c17afe276db2ef92b4b.tar
gsoc2013-epiphany-3bb5f859cf406cec4e562c17afe276db2ef92b4b.tar.gz
gsoc2013-epiphany-3bb5f859cf406cec4e562c17afe276db2ef92b4b.tar.bz2
gsoc2013-epiphany-3bb5f859cf406cec4e562c17afe276db2ef92b4b.tar.lz
gsoc2013-epiphany-3bb5f859cf406cec4e562c17afe276db2ef92b4b.tar.xz
gsoc2013-epiphany-3bb5f859cf406cec4e562c17afe276db2ef92b4b.tar.zst
gsoc2013-epiphany-3bb5f859cf406cec4e562c17afe276db2ef92b4b.zip
GConf option to disable messagebox about unsubmitted form data. (#516170)
Left undocumented on schema because we are in string freeze, will document for 2.24. Patch by Jake Nelson svn path=/trunk/; revision=7944
-rw-r--r--data/epiphany.schemas.in11
-rw-r--r--lib/ephy-prefs.h1
-rw-r--r--src/ephy-window.c17
3 files changed, 23 insertions, 6 deletions
diff --git a/data/epiphany.schemas.in b/data/epiphany.schemas.in
index 9f2211b52..4d3331e8d 100644
--- a/data/epiphany.schemas.in
+++ b/data/epiphany.schemas.in
@@ -508,6 +508,17 @@
<long>Hide or show the downloads window. When hidden, a notification will be shown when new downloads are started.</long>
</locale>
</schema>
+ <schema>
+ <key>/schemas/apps/epiphany/dialogs/warn_on_close_unsubmitted_data</key>
+ <applyto>/apps/epiphany/dialogs/warn_on_close_unsubmitted_data</applyto>
+ <owner>epiphany</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short></short>
+ <long></long>
+ </locale>
+ </schema>
</schemalist>
</gconfschemafile>
diff --git a/lib/ephy-prefs.h b/lib/ephy-prefs.h
index 6331757dd..f75336d9f 100644
--- a/lib/ephy-prefs.h
+++ b/lib/ephy-prefs.h
@@ -38,6 +38,7 @@ G_BEGIN_DECLS
#define CONF_DESKTOP_IS_HOME_DIR "/apps/nautilus/preferences/desktop_is_home_dir"
#define CONF_NETWORK_MANAGED "/apps/epiphany/general/managed_network"
#define CONF_DOWNLOADS_HIDDEN "/apps/epiphany/dialogs/downloads_hidden"
+#define CONF_WARN_ON_CLOSE_UNSUBMITTED_DATA "/apps/epiphany/dialogs/warn_on_close_unsubmitted_data"
/* i18n pref */
#define CONF_GECKO_ENABLE_PANGO "/apps/epiphany/web/enable_pango"
diff --git a/src/ephy-window.c b/src/ephy-window.c
index a8c696dd9..93f9f16f7 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -547,15 +547,20 @@ construct_confirm_close_dialog (EphyWindow *window)
static gboolean
confirm_close_with_modified_forms (EphyWindow *window)
{
- GtkWidget *dialog;
- int response;
+ if (eel_gconf_get_boolean (CONF_WARN_ON_CLOSE_UNSUBMITTED_DATA))
+ {
+ GtkWidget *dialog;
+ int response;
- dialog = construct_confirm_close_dialog (window);
- response = gtk_dialog_run (GTK_DIALOG (dialog));
+ dialog = construct_confirm_close_dialog (window);
+ response = gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_widget_destroy (dialog);
- return response == GTK_RESPONSE_ACCEPT;
+ return response == GTK_RESPONSE_ACCEPT;
+ }
+
+ return TRUE;
}
static void