Package: apt-listchanges Version: 2.74 Severity: wishlist Tags: patch
When using the browser frontend, the title is set to something as uninformative as "apt-listchanges output". The attached patch displays "apt-listchanges: News" or "apt-listchanges: Changelogs" instead. -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.21-felipe (PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages apt-listchanges depends on: ii apt 0.7.3 Advanced front-end for dpkg ii debconf [debconf-2.0] 1.5.13 Debian configuration management sy ii debianutils 2.22.1 Miscellaneous utilities specific t ii python 2.4.4-6 An interactive high-level object-o ii python-apt 0.7.2 Python interface to libapt-pkg ii python-support 0.6.4 automated rebuilding support for p ii ucf 3.001 Update Configuration File: preserv Versions of packages apt-listchanges recommends: ii postfix [mail-transport-agent 2.4.3-1 High-performance mail transport ag -- debconf information excluded
diff -x '*.pot' -ru apt-listchanges-2.74.old/apt-listchanges/apt_listchanges.py apt-listchanges-2.74/apt-listchanges/apt_listchanges.py --- apt-listchanges-2.74.old/apt-listchanges/apt_listchanges.py 2007-05-11 17:09:56.000000000 -0400 +++ apt-listchanges-2.74/apt-listchanges/apt_listchanges.py 2007-07-03 01:04:16.000000000 -0400 @@ -149,6 +149,9 @@ def confirm(self): return 1 + def set_title(self, text): + pass + class ttyconfirm: def confirm(self): try: @@ -252,11 +255,15 @@ # regxlib.com email_re = re.compile(r'([a-zA-Z0-9_\-\.]+)@(([[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)') + title = '''apt-listchanges output''' + def _render(self, text): htmltext = cStringIO.StringIO() htmltext.write('''<html> <head> - <title>apt-listchanges output</title> + <title>''') + htmltext.write(self.title) + htmltext.write('''</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head> @@ -286,6 +293,8 @@ def __init__(self, *args): apply(pager.__init__, [self] + list(args)) self.command = self.config.get('browser', 'sensible-browser') + def set_title(self, text): + self.title = text class xterm_browser(html, xterm): def __init__(self, *args): diff -x '*.pot' -ru apt-listchanges-2.74.old/apt-listchanges.py apt-listchanges-2.74/apt-listchanges.py --- apt-listchanges-2.74.old/apt-listchanges.py 2007-05-11 17:45:42.000000000 -0400 +++ apt-listchanges-2.74/apt-listchanges.py 2007-07-03 01:10:46.000000000 -0400 @@ -186,9 +186,11 @@ changes += _("Informational notes") + ":\n\n" + '\n'.join(notes) if news: + frontend.set_title( _('apt-listchanges: News') ) frontend.display_output(news) if changes: + frontend.set_title( _('apt-listchanges: Changelogs') ) frontend.display_output(changes) if news or changes: