[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 4.9-19-gb17733a
Sandro Tosi
morph at debian.org
Sun Jan 3 15:36:28 UTC 2010
The following commit has been merged in the master branch:
commit f73bb937c41ad1eed326a9cfda25838682f1d818
Author: Sandro Tosi <morph at debian.org>
Date: Sun Jan 3 01:28:37 2010 +0100
when retrieving a string, also show a default text (if preset), useful in particular with --configure to see the current values for realname and email; thanks to Andrei Popescu for the report; Closes: #526631
diff --git a/debian/changelog b/debian/changelog
index f85371b..4762324 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -31,8 +31,12 @@ reportbug (4.10~WIP) UNRELEASED; urgency=low
* man/reportbug.conf.5
- clarified the configuration files has to be UTF-8 documents; thanks to
Anders Lageras for the report; Closes: #417054
+ * reportbug/ui/urwid_ui.py
+ - when retrieving a string, also show a default text (if preset), useful in
+ particular with --configure to see the current values for realname and
+ email; thanks to Andrei Popescu for the report; Closes: #526631
- -- Sandro Tosi <morph at debian.org> Sat, 02 Jan 2010 12:16:20 +0100
+ -- Sandro Tosi <morph at debian.org> Sun, 03 Jan 2010 01:21:27 +0100
reportbug (4.9) unstable; urgency=low
diff --git a/reportbug/ui/urwid_ui.py b/reportbug/ui/urwid_ui.py
index 22711e8..775a67e 100644
--- a/reportbug/ui/urwid_ui.py
+++ b/reportbug/ui/urwid_ui.py
@@ -216,8 +216,8 @@ class displaybox(dialog):
class textentry(dialog):
def __init__(self, text, width=None, height=None, multiline=False,
- title=''):
- self.edit = urwid.Edit(multiline=multiline)
+ title='', edit_text=''):
+ self.edit = urwid.Edit(edit_text=edit_text, multiline=multiline)
body = urwid.ListBox([self.edit])
body = urwid.AttrWrap(body, 'selectable', 'focustext')
if not multiline:
@@ -356,7 +356,7 @@ def get_string(prompt, options=None, title=None, empty_ok=False, force_prompt=Fa
else:
title = VERSION
- box = textentry(prompt, title=title)
+ box = textentry(prompt, title=title, edit_text=default)
box.add_buttons([ ("OK", 0) ])
code, text = box.main(ui)
return text or default
--
Reportbug - reports bugs in the Debian distribution
More information about the Reportbug-commits
mailing list