Article View: news.software.readers
Article #49882[slrn] Patch: read/unread status of threads
From: Thomas Schultz
Date: Thu, 15 Jul 1999 00:00
Date: Thu, 15 Jul 1999 00:00
57 lines
2467 bytes
2467 bytes
Hi,
At the moment, a collapsed thread in slrn may look like this:
1! D 200 10:[Joe User ] 3 slrn is cool
This line only tells you that the message by "Joe User" is marked as
read -- we know that there are two replies, but we know nothing of
their read/unread status.
This behaviour is changed by the patch below -- it will use 'D' only
if every message in a collapsed thread is marked as read and '-' only
if all messages are marked as unread. In case some are read and some
are not, it will use the new indicator 'd'.
This new feature was suggested some time ago in news.software.readers;
if others also think that it is helpful, I would be glad to see it in
the next release of slrn.
<patch starts here>
diff -ur slrn-0.9.5.6.orig/src/art.c slrn-0.9.5.6/src/art.c
--- slrn-0.9.5.6.orig/src/art.c Mon May 17 07:27:02 1999
+++ slrn-0.9.5.6/src/art.c Wed Jul 14 23:50:42 1999
@@ -7856,6 +7856,8 @@
static void disp_write_flags (Slrn_Header_Type *h, int row)
{
unsigned int flags = h->flags;
+ int read = (flags & HEADER_READ);
+ char read_char = read ? 'D' : '-';
/* Do not write header numbers if we are displaying at bottom of the
* screen in the display area. When this happens, the header window is
@@ -7898,7 +7900,17 @@
}
}
slrn_set_color (0);
- SLsmg_write_char ((flags & HEADER_READ) ? 'D': '-');
+
+ while (((h = h->next) != NULL)
+ && (h->flags & HEADER_HIDDEN))
+ {
+ if ((h->flags & HEADER_READ) != read)
+ {
+ read_char='d';
+ break;
+ }
+ }
+ SLsmg_write_char (read_char);
}
#if SLRN_HAS_GROUPLENS
<patch ends here>
--
Kind regards,
Thomas Schultz
Technical Details
Message-ID:
<slrn7oqc65.d2p.tststs@starflower.tststs.ddns.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <slrn7oqc65.d2p.tststs@starflower.tststs.ddns.org> Subject: [slrn] Patch: read/unread status of threads Date: Thu, 15 Jul 1999 00:00:00 +0000 From: tststs@gmx.de (Thomas Schultz) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 501144841 X-Server-Date: 15 Jul 1999 00:51:01 GMT X-Trace: news1.cityweb.de 932000025 62.52.148.112 (Thu, 15 Jul 1999 02:53:45 MET DST) Organization: Pinguin online User-Agent: slrn/0.9.5.6 (UNIX) NNTP-Posting-Date: Thu, 15 Jul 1999 02:53:45 MET DST Newsgroups: news.software.readers