summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-07-18 17:03:41 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-07-18 17:03:41 (GMT)
commitde209a01e646d6d240d3d98ac1f1b0e100939a12 (patch)
tree90f242fe52cc798a65dca667a7d1125cad3cdbbb /src/gui
parentcc79dc6e2bbf78acd146b618df246a7936a0e4ae (diff)
Provided a way to skip the exit message box.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/editor.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/editor.c b/src/gui/editor.c
index 6934869..5034104 100644
--- a/src/gui/editor.c
+++ b/src/gui/editor.c
@@ -421,11 +421,17 @@ GtkWidget *create_editor(void)
static gboolean on_delete_editor(GtkWidget *widget, GdkEvent *event, gpointer data)
{
gboolean result; /* Continuation à retourner */
+ bool skip; /* Saut de la vérification ? */
GStudyProject *project; /* Projet courant */
GtkWidget *dialog; /* Boîte à afficher */
result = FALSE;
+ g_generic_config_get_value(get_main_configuration(), MPK_SKIP_EXIT_MSG, &skip);
+
+ if (skip)
+ goto skip_warning;
+
project = get_current_project();
if (g_study_project_get_filename(project) == NULL)
@@ -461,6 +467,8 @@ static gboolean on_delete_editor(GtkWidget *widget, GdkEvent *event, gpointer da
g_object_unref(G_OBJECT(project));
+ skip_warning:
+
return result;
}