From 5a50ac5c372679a0d23891f307552b356665bb31 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Mon, 1 Dec 2014 18:56:39 +0100 Subject: [PATCH] [dialog/CPS] Un pitit wrapper autour du widget yesno --- gestion/dialog/CPS.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gestion/dialog/CPS.py b/gestion/dialog/CPS.py index d90141af..ae719897 100644 --- a/gestion/dialog/CPS.py +++ b/gestion/dialog/CPS.py @@ -391,3 +391,17 @@ class Dialog(object): (hour, minute, second) = get_time(hour, minute, second, day, month, year) return (year, month, day) + (hour, minute, second) + def confirm(self, text, title, defaultno=False): + """wrapper autour du widget yesno""" + return self.dialog.yesno( + text, + no_collapse=True, + colors=True, + no_mouse=True, + timeout=self.timeout, + title=title, + defaultno=defaultno, + width=0, height=0, + backtitle="Appuyez sur MAJ pour selectionner du texte" + ) == self.dialog.DIALOG_OK +