epiphany r7944 - in trunk: data lib src



Author: xan
Date: Thu Feb 14 20:14:02 2008
New Revision: 7944
URL: http://svn.gnome.org/viewvc/epiphany?rev=7944&view=rev

Log:
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


Modified:
   trunk/data/epiphany.schemas.in
   trunk/lib/ephy-prefs.h
   trunk/src/ephy-window.c

Modified: trunk/data/epiphany.schemas.in
==============================================================================
--- trunk/data/epiphany.schemas.in	(original)
+++ trunk/data/epiphany.schemas.in	Thu Feb 14 20:14:02 2008
@@ -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>

Modified: trunk/lib/ephy-prefs.h
==============================================================================
--- trunk/lib/ephy-prefs.h	(original)
+++ trunk/lib/ephy-prefs.h	Thu Feb 14 20:14:02 2008
@@ -38,6 +38,7 @@
 #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"

Modified: trunk/src/ephy-window.c
==============================================================================
--- trunk/src/ephy-window.c	(original)
+++ trunk/src/ephy-window.c	Thu Feb 14 20:14:02 2008
@@ -547,15 +547,20 @@
 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]