Article View: news.software.readers
Article #36006Re: Slrn wish number 2
From: Byrial Jensen
Date: Sun, 07 Sep 1997 00:00
Date: Sun, 07 Sep 1997 00:00
86 lines
3450 bytes
3450 bytes
Ian T Zimmerman <itz@rahul.net> wrote:
>
>In article mode, if Slrn_Show_Author == 1, the authors address, or
>realname if Slrn_Show_Author_Realname is set, is displayed starting at
>column 50. The 50 seems to be hardcoded into Slrn, but in the case of
>realnames, I find that most of the time space is wasted in the name
>column while useful information gets truncated from the subject
>column. Can we make this a user settable variable please?
I made the width of author field user setable in the following patch.
Put in your .slrnrc file a line like:
set author_field_width 15
The value will be used both when author_display is set 1 and 2.
The default value is 12.
Best regards
- Byrial
--- startup.c.orig Mon Jul 7 07:11:03 1997
+++ startup.c Sun Sep 7 11:07:22 1997
@@ -316,6 +316,7 @@
{"show_article", &Slrn_Startup_With_Article},
{"author_display", &Slrn_Show_Author},
{"display_author_realname", &Slrn_Show_Author_Realname},
+ {"author_field_width", &Slrn_Author_Field_Width},
{"show_descriptions", &Slrn_Group_Display_Descriptions},
{"no_backups", &Slrn_No_Backups},
{"beep", &SLtt_Ignore_Beep},
--- art.h.orig Mon Jul 7 07:11:03 1997
+++ art.h Sun Sep 7 11:07:22 1997
@@ -13,6 +13,7 @@
extern char *Slrn_Followup_Custom_Headers;
extern char *Slrn_Reply_Custom_Headers;
extern int Slrn_Show_Author_Realname;
+extern int Slrn_Author_Field_Width;
extern int Slrn_Show_Author;
extern int Slrn_Startup_With_Article;
--- art.c.orig Sat Sep 6 10:13:31 1997
+++ art.c Sun Sep 7 11:38:20 1997
@@ -85,6 +85,7 @@
int Slrn_Startup_With_Article = 0;
int Slrn_Show_Author = 2; /* If non-zero, show author in header */
int Slrn_Show_Author_Realname = 1;
+int Slrn_Author_Field_Width = 12;
int Slrn_Query_Next_Article = 1;
int Slrn_Query_Next_Group = 1;
@@ -7335,14 +7336,16 @@
write_header_flags (h, row);
SLsmg_erase_eol ();
+ if (Slrn_Author_Field_Width < 1)
+ Slrn_Author_Field_Width = 1;
+
if (Slrn_Show_Author > 1)
{
smg_write_char ('[');
- write_header_author (h, row, 12);
+ write_header_author (h, row, Slrn_Author_Field_Width);
SLsmg_set_color (0);
smg_write_char (']');
- /* SLsmg_gotorc (row, 24 + UPDATE_COLUMN_OFFSET); */
write_header_subject (h, row, 0);
}
else
@@ -7350,9 +7353,10 @@
write_header_subject (h, row, 0);
if (Slrn_Show_Author)
{
- SLsmg_gotorc (row, 50 + UPDATE_COLUMN_OFFSET);
+ int pos = SLtt_Screen_Cols - Slrn_Author_Field_Width - 1;
+ SLsmg_gotorc (row, pos < 20 ? 20 : pos);
smg_write_char (' ');
- write_header_author (h, row, SLtt_Screen_Cols);
+ write_header_author (h, row, Slrn_Author_Field_Width);
}
}
SLsmg_erase_eol ();
Technical Details
Message-ID:
<slrn614u7n.et.byrial@ask.ask>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-mailReferences:
<slrn60u6ag.n1f.itz@kronstadt.rahul.net>Show Full Headers
Complete Article Headers
Message-ID: <slrn614u7n.et.byrial@ask.ask> Subject: Re: Slrn wish number 2 Date: Sun, 07 Sep 1997 00:00:00 +0000 From: byrial@post3.tele.dk (Byrial Jensen) References: <slrn60u6ag.n1f.itz@kronstadt.rahul.net> 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: 270442093 X-Complaints-To: abuse@news.inet.tele.dk X-Trace: news.inet.tele.dk 873625904 497760 (None) 194.239.129.90 Newsgroups: news.software.readers