Article View: news.software.readers
Article #49093Re: [slrn] upper status line
From: Byrial Jensen
Date: Sun, 06 Jun 1999 00:00
Date: Sun, 06 Jun 1999 00:00
50 lines
2014 bytes
2014 bytes
Tomasz Sienicki | tsca <tsca@cryogen.com> wrote:
> I miss a similar feature in slrn. Instead of wasting space for
> " ** Press '?' for help, 'q' to quit. ** " I'd like to see a
> clock there -- a useful thing when reading news.
Maybe you would like this patch. I wrote it once for slrn 0.9.4.3
to make a primitive clock in the upper right corner of the slrn
window/screen. The clock is only updated when the top status line
is updated (most keys will cause that to happen). Users of mouse
menus in the top line will not see the clock.
I have just verified that the patch still works with 0.9.5.6.
--- misc.c.orig Tue Jul 15 00:33:27 1997
+++ misc.c Tue Jul 15 01:23:36 1997
@@ -178,6 +178,19 @@
/*}}}*/
+void show_clock ()
+{
+ time_t secs;
+ struct tm *now;
+
+ secs = time (NULL);
+ now = localtime (&secs);
+ SLsmg_gotorc (0, SLtt_Screen_Cols - 6);
+ slrn_set_color (MENU_COLOR);
+ SLsmg_printf (" %2d:%02d", now->tm_hour, now->tm_min);
+ slrn_set_color (0);
+}
+
void slrn_update_top_status_line (void) /*{{{*/
{
if (Slrn_Full_Screen_Update == 0) return;
@@ -189,6 +202,7 @@
Slrn_Server_Obj->sv_name);
SLsmg_erase_eol ();
slrn_set_color (0);
+ show_clock ();
}
/*}}}*/
--
Byrial
Technical Details
Message-ID:
<slrn7ll5a2.1po.bjensen@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:
<slrn7l7h2b.c4d.tsca@kmodem315.has.dk>Show Full Headers
Complete Article Headers
Message-ID: <slrn7ll5a2.1po.bjensen@ask.ask> Subject: Re: [slrn] upper status line Date: Sun, 06 Jun 1999 00:00:00 +0000 From: bjensen@nospam.dk (Byrial Jensen) References: <slrn7l7h2b.c4d.tsca@kmodem315.has.dk> 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: 486340151 X-Complaints-To: news-abuse@image.dk X-Trace: news020.image.dk 928684061 212.54.73.5 (Sun, 06 Jun 1999 17:47:41 MET DST) User-Agent: slrn/0.9.5.6 (UNIX) NNTP-Posting-Date: Sun, 06 Jun 1999 17:47:41 MET DST Newsgroups: news.software.readers