From 5172524c2a378f4831d4514f4f3b5c4744316553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Antoine=20Goudreault?= Date: Sat, 2 Dec 2017 23:22:59 -0500 Subject: [PATCH] Added dialog boxes for config GUI --- auxiclean/gui/settings_gui.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/auxiclean/gui/settings_gui.py b/auxiclean/gui/settings_gui.py index 7b301ce..0131b16 100644 --- a/auxiclean/gui/settings_gui.py +++ b/auxiclean/gui/settings_gui.py @@ -1,6 +1,7 @@ from .auxiliary_window import AuxiliaryWindow from ..managers.config_manager import (NonUniquePriority, NonValidPriority, MissingPriority) +from tkinter import messagebox import logging import tkinter as tk @@ -105,6 +106,9 @@ def apply_new_settings(self): except MissingPriority as e: self._logger.error("There is a missing priority.") self._logger.error(str(e)) + messagebox.showerror("Erreur configuration", + "Les critères doivent" + " tous être différents.") return except NonValidPriority as e: self._logger.error("There is a non valid priority.") @@ -113,8 +117,13 @@ def apply_new_settings(self): except NonUniquePriority as e: self._logger.error("There is non unique priorities.") self._logger.error(str(e)) + messagebox.showerror("Erreur configuration", + "Les critères doivent" + " tous être différents.") return self.config_manager.write_config() + messagebox.showinfo("Configuration", + "Les paramètres ont été enregistrés.") def create_ok_button(self): self.okbutton = tk.Button(self.frame, text="Quitter",