aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2013-08-29 03:23:07 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2013-08-29 03:25:29 +0800
commit91464eef94f05c139aa60fc8bebcc3e7fad62281 (patch)
tree4a719db10630882e9a83e126133ea7dfede3dd90
parentb5754ac85db00de0183dbd13004917d5eb9c06a6 (diff)
downloadgsoc2013-epiphany-91464eef94f05c139aa60fc8bebcc3e7fad62281.tar
gsoc2013-epiphany-91464eef94f05c139aa60fc8bebcc3e7fad62281.tar.gz
gsoc2013-epiphany-91464eef94f05c139aa60fc8bebcc3e7fad62281.tar.bz2
gsoc2013-epiphany-91464eef94f05c139aa60fc8bebcc3e7fad62281.tar.lz
gsoc2013-epiphany-91464eef94f05c139aa60fc8bebcc3e7fad62281.tar.xz
gsoc2013-epiphany-91464eef94f05c139aa60fc8bebcc3e7fad62281.tar.zst
gsoc2013-epiphany-91464eef94f05c139aa60fc8bebcc3e7fad62281.zip
ephy-window: Simplify ephy_window_close()
Simply use one if block, also put the boolean variable check first. https://bugzilla.gnome.org/show_bug.cgi?id=695642
-rw-r--r--src/ephy-window.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 62a874108..6f9985f15 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -4535,16 +4535,14 @@ ephy_window_close (EphyWindow *window)
return FALSE;
}
- if (g_settings_get_boolean (EPHY_SETTINGS_MAIN,
- EPHY_PREFS_WARN_ON_CLOSE_UNSUBMITTED_DATA))
+ if (!window->priv->force_close &&
+ g_settings_get_boolean (EPHY_SETTINGS_MAIN,
+ EPHY_PREFS_WARN_ON_CLOSE_UNSUBMITTED_DATA) &&
+ gtk_notebook_get_n_pages (window->priv->notebook) > 0)
{
- if (!window->priv->force_close &&
- gtk_notebook_get_n_pages (window->priv->notebook) > 0)
- {
- ephy_window_check_modified_forms (window);
- /* stop window close */
- return FALSE;
- }
+ ephy_window_check_modified_forms (window);
+ /* stop window close */
+ return FALSE;
}
if (window_has_ongoing_downloads (window) && confirm_close_with_downloads (window) == FALSE)