Skip to content

Commit

Permalink
Added dialog boxes for config GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
fgoudreault committed Dec 3, 2017
1 parent debdc75 commit 5172524
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions auxiclean/gui/settings_gui.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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.")
Expand All @@ -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",
Expand Down

0 comments on commit 5172524

Please sign in to comment.