[epiphany] Do not show tab open warning during session closing
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Do not show tab open warning during session closing
- Date: Thu, 13 Feb 2020 19:50:41 +0000 (UTC)
commit 2c0125617f05411de8a487887a184ac72a716388
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Thu Feb 13 20:46:27 2020 +0100
Do not show tab open warning during session closing
Fixes: https://gitlab.gnome.org/GNOME/epiphany/issues/1093
src/ephy-session.c | 6 ++++++
src/ephy-session.h | 1 +
src/ephy-window.c | 4 ++++
3 files changed, 11 insertions(+)
---
diff --git a/src/ephy-session.c b/src/ephy-session.c
index 593cd70f1..9f1b5ac2c 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -1768,3 +1768,9 @@ ephy_session_clear (EphySession *session)
ephy_session_save (session);
}
+
+gboolean
+ephy_session_is_closing (EphySession *session)
+{
+ return session->closing;
+}
diff --git a/src/ephy-session.h b/src/ephy-session.h
index c4d82520c..c4ce61fa7 100644
--- a/src/ephy-session.h
+++ b/src/ephy-session.h
@@ -69,5 +69,6 @@ gboolean ephy_session_get_can_undo_tab_closed (EphySession *session);
void ephy_session_clear (EphySession *session);
+gboolean ephy_session_is_closing (EphySession *session);
G_END_DECLS
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 1253c3ec2..6c667f91e 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -4231,6 +4231,8 @@ ephy_window_check_modified_forms (EphyWindow *window)
gboolean
ephy_window_close (EphyWindow *window)
{
+ EphySession *session;
+
/* We ignore the delete_event if the disable_quit lockdown has been set
*/
if (g_settings_get_boolean (EPHY_SETTINGS_LOCKDOWN,
@@ -4251,8 +4253,10 @@ ephy_window_close (EphyWindow *window)
return FALSE;
}
+ session = ephy_shell_get_session (ephy_shell_get_default ());
if (ephy_shell_get_n_windows (ephy_shell_get_default ()) > 1 &&
gtk_notebook_get_n_pages (window->notebook) > 1 &&
+ !ephy_session_is_closing (session) &&
!confirm_close_with_multiple_tabs (window)) {
/* stop window close */
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]