[Note: I'm not a list subscriber. Any replies should include my e-mail
address. Thanks.]

A friend pointed me up to
http://www.common-lisp.net/macho-archives/admin/2003-11/150.html and I
found the idea of using the html accesskey attribute to browse through a
mail archive with keyboard shortcuts was a good one. So I made a patch
for what I'm using (mailman 2.1.3 from debian/sid).

The attached patch adds the ability to use alt-n for the next message
and alt+p for the previous message.

Hope you like it,

-- 
                                                Jo�o Miguel Neves


--- Mailman/Archiver/HyperArch.py.orig	2003-11-14 18:29:50.000000000 +0000
+++ Mailman/Archiver/HyperArch.py	2003-11-14 18:42:58.000000000 +0000
@@ -464,8 +464,8 @@
             subject = self._get_subject_enc(self.prev)
             prev = ('<LINK REL="Previous"  HREF="%s">'
                     % (url_quote(self.prev.filename)))
-            prev_wsubj = ('<LI>' + _('Previous message:') +
-                          ' <A HREF="%s">%s\n</A></li>'
+            prev_wsubj = ('<LI>' + _('Previous message (alt+p):') +
+                          ' <A HREF="%s" ACCESSKEY="p">%s\n</A></li>'
                           % (url_quote(self.prev.filename),
                              self.quote(subject)))
         else:
@@ -481,13 +481,13 @@
         return art.decoded.get('subject', art.subject)
 
     def _get_next(self):
-        """Return the href and subject for the previous message"""
+        """Return the href and subject for the next message"""
         if self.next:
             subject = self._get_subject_enc(self.next)
             next = ('<LINK REL="Next"  HREF="%s">'
                     % (url_quote(self.next.filename)))
-            next_wsubj = ('<LI>' + _('Next message:') +
-                          ' <A HREF="%s">%s\n</A></li>'
+            next_wsubj = ('<LI>' + _('Next message (alt+n):') +
+                          ' <A HREF="%s" ACCESSKEY="n">%s\n</A></li>'
                           % (url_quote(self.next.filename),
                              self.quote(subject)))
         else:

Attachment: signature.asc
Description: Esta =?ISO-8859-1?Q?=E9?= uma parte de mensagem assinada digitalmente

_______________________________________________
Mailman-Developers mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-developers

Reply via email to