From 4537895941f159af3c96a71ef36ec11c1c8c5484 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 17 Apr 2016 14:27:50 -0400 Subject: [PATCH] Add default_label to other implementations of prompt() --- gramps/gen/user.py | 5 ++++- gramps/gui/user.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gramps/gen/user.py b/gramps/gen/user.py index f4160bf34..c5ce1e237 100644 --- a/gramps/gen/user.py +++ b/gramps/gen/user.py @@ -114,7 +114,8 @@ class User(): finally: self.end_progress() - def prompt(self, title, message, accept_label, reject_label, parent=None): + def prompt(self, title, message, accept_label, reject_label, parent=None, + default_label=None): """ Prompt the user with a message to select an alternative. @@ -128,6 +129,8 @@ class User(): :type accept_label: str :param reject_label: what to call the negative choice, e.g.: "Stop" :type reject_label: str + :param default_label: the label of the default + :type default_label: str or None :returns: the user's answer to the question :rtype: bool """ diff --git a/gramps/gui/user.py b/gramps/gui/user.py index 8118bb244..09772975e 100644 --- a/gramps/gui/user.py +++ b/gramps/gui/user.py @@ -91,7 +91,8 @@ class User(user.User): self._progress.close() self._progress = None - def prompt(self, title, message, accept_label, reject_label, parent=None): + def prompt(self, title, message, accept_label, reject_label, parent=None, + default_label=None): """ Prompt the user with a message to select an alternative. @@ -105,6 +106,8 @@ class User(user.User): :param accept_label: what to call the positive choice, e.g.: "Proceed" :type accept_label: str :param reject_label: what to call the negative choice, e.g.: "Stop" + :param default_label: the label of the default + :type default_label: str or None :type reject_label: str :returns: the user's answer to the question :rtype: bool