From mboxrd@z Thu Jan 1 00:00:00 1970 From: col@baibell.org (Colin Bell) Date: Wed, 07 Nov 2007 21:29:03 +1100 Subject: [sup-talk] [PATCH] Show unread message count in thread index In-Reply-To: <1194400626-sup-6556@south> References: <1194256715-sup-4315@lankhmar> <1194400626-sup-6556@south> Message-ID: <1194430991-sup-3015@lankhmar> Excerpts from William Morgan's message of Wed Nov 07 13:09:46 +1100 2007: > How about an "index-mode-widget" hook instead, that lets you replace the > "(###)" with any string you want, based on the thread? (And if the > return value is nil, use the current thread.size string.) > > You'll have to scan over them twice to get the sizing right, but it > shouldn't be too bad of a patch... > Attempt 2 :-) I've attached an example hook as well as the diff. If you accept the patch something like the example should go up on the wiki. Please take a careful look at this patch as I am just learning Ruby so I've probably done a few silly things. index-mode-widget ----------------- File: ~/.sup/hooks/index-mode-widget.rb Executes when formatting the output of the number of messages for each thread in the thread index. Variables: thread: The message thread to be formatted. -------------- next part -------------- A non-text attachment was scrubbed... Name: widget.diff Type: application/octet-stream Size: 2708 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20071107/dd62a04e/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: index-mode-widget.rb Type: application/octet-stream Size: 203 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20071107/dd62a04e/attachment-0001.obj