[Reportbug-commits] [reportbug] 09/11: make the Cancel button in Urwid interface works for tags and severity lists; thanks to Ryan Kavanagh for report and patch; Closes: #702521
Sandro Tosi
morph at moszumanska.debian.org
Wed Apr 15 18:08:51 UTC 2015
This is an automated email from the git hooks/post-receive script.
morph pushed a commit to branch master
in repository reportbug.
commit 2aa131aaae82e677a533f73ebde7b8c731762ecf
Author: Sandro Tosi <morph at debian.org>
Date: Mon Apr 13 15:47:57 2015 +0100
make the Cancel button in Urwid interface works for tags and severity lists; thanks to Ryan Kavanagh for report and patch; Closes: #702521
---
bin/reportbug | 6 ++++++
debian/changelog | 5 ++++-
reportbug/ui/urwid_ui.py | 3 ++-
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/bin/reportbug b/bin/reportbug
index 0d1035f..8cae380 100755
--- a/bin/reportbug
+++ b/bin/reportbug
@@ -1935,6 +1935,9 @@ For more details, please see: http://www.debian.org/devel/wnpp/''')
"problem or report?", severities,
'Please select a severity level: ',
default=default, order=debbugs.SEVLIST)
+ # urwid has a cancel and a quit button that return < 0
+ if severity < 0:
+ sys.exit()
if rtype == 'gnats':
# Class of report
@@ -2008,6 +2011,9 @@ For more details, please see: http://www.debian.org/devel/wnpp/''')
taglist = ui.select_multiple(
'Do any of the following apply to this report?', tags,
'Please select tags: ')
+ if taglist is None:
+ # We've pressed cancel or quit in urwid
+ sys.exit()
patch = ('patch' in taglist)
diff --git a/debian/changelog b/debian/changelog
index 6820fd5..8ee1c6a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,8 +18,11 @@ reportbug (6.6.4) UNRELEASED; urgency=medium
generic packages; thanks to Tomas Pospisek for the patch; Closes: #661563
* reportbug/{debbugs.py, ui/text_ui.py}, test/test_{debbugs.py, urlutils.py}
- use HTTPS when connecting to Debian BTS
+ * bin/reportbug, reportbug/ui/urwid_ui.py
+ - make the Cancel button in Urwid interface works for tags and severity
+ lists; thanks to Ryan Kavanagh for report and patch; Closes: #702521
- -- Sandro Tosi <morph at debian.org> Mon, 13 Apr 2015 12:54:49 +0100
+ -- Sandro Tosi <morph at debian.org> Mon, 13 Apr 2015 15:46:52 +0100
reportbug (6.6.3) unstable; urgency=medium
diff --git a/reportbug/ui/urwid_ui.py b/reportbug/ui/urwid_ui.py
index 4ddb542..81bade3 100644
--- a/reportbug/ui/urwid_ui.py
+++ b/reportbug/ui/urwid_ui.py
@@ -431,7 +431,8 @@ def menu(par, options, prompt, default=None, title=None, any_ok=False,
box.add_buttons( [(oklabel, 0), (cancellabel, -1)] )
result, chosen = box.main(ui)
if result < 0:
- return []
+ # We return None to differentiate a Cancel/Quit from no selection, []
+ return None
return chosen
# Single menu option only
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reportbug/reportbug.git
More information about the Reportbug-commits
mailing list