From 93fd45a4e1a5fb16fa1dfb6c675ec7df6704d43c Mon Sep 17 00:00:00 2001 From: croneter Date: Sat, 15 Sep 2018 16:30:17 +0200 Subject: [PATCH] Add new Plex yes-no dialog --- resources/lib/utils.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/resources/lib/utils.py b/resources/lib/utils.py index 220198e5..c580a2a4 100644 --- a/resources/lib/utils.py +++ b/resources/lib/utils.py @@ -139,6 +139,15 @@ def messageDialog(heading, msg): optionsdialog.show(heading, msg, lang(186)) +def yesno_dialog(heading, msg): + """ + Shows a dialog with a yes and a no button using the Plex layout. + Returns True if the user selected yes, False otherwise + """ + from .windows import optionsdialog + return optionsdialog.show(heading, msg, lang(107), lang(106)) == 0 + + def dialog(typus, *args, **kwargs): """ Displays xbmcgui Dialog. Pass a string as typus: