1 diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/curs_main.c mutt-1.5.10/curs_main.c
2 --- mutt-1.5.20.b/curs_main.c 2009-07-14 12:34:25.000000000 +0200
3 +++ mutt-1.5.20/curs_main.c 2009-07-14 12:42:41.000000000 +0200
5 menu_redraw_current (menu);
8 - if (menu->redraw & REDRAW_STATUS)
9 + if (menu->redraw & REDRAW_STATUS || update_status_time ())
11 menu_status_line (buf, sizeof (buf), menu, NONULL (Status));
12 mutt_window_move (MuttStatusWindow, 0, 0);
13 --- mutt-1.5.18/globals.h.orig 2008-01-30 05:26:50.000000000 +0100
14 +++ mutt-1.5.18/globals.h 2008-07-25 17:41:02.532746787 +0200
17 WHERE short SendmailWait;
18 WHERE short SleepTime INITVAL (1);
19 +WHERE short StatusUpdate;
23 diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/init.h mutt-1.5.10/init.h
24 --- mutt-1.5.10.orig/init.h 2005-10-07 09:28:10.000000000 +0200
25 +++ mutt-1.5.10/init.h 2005-10-07 09:28:24.000000000 +0200
27 ** .dt %u .dd number of unread messages *
28 ** .dt %v .dd Mutt version string
29 ** .dt %V .dd currently active limit pattern, if any *
30 + ** .dt %[fmt] .dd the current date and time. ``fmt'' is
31 + ** expanded by the system call ``strftime'';
32 ** .dt %>X .dd right justify the rest of the string and pad with ``X''
33 ** .dt %|X .dd pad to the end of the line with ``X''
34 ** .dt %*X .dd soft-fill with character ``X'' as pad
35 @@ -2671,6 +2674,16 @@
36 ** Setting this variable causes the ``status bar'' to be displayed on
37 ** the first line of the screen rather than near the bottom.
39 + { "status_update", DT_NUM, R_NONE, UL &StatusUpdate, -1 },
42 + ** This variable controls, if positive, the maximum interval in seconds
43 + ** before the time in the status line is updated. It is checked at
44 + ** every key press and after a keyboard $$timeout.
45 + ** If the value is zero, the status line will be updated at every check.
46 + ** If it is negative, the status time will only be updated
47 + ** if it necessary to update to the status line for some other reason.
49 { "strict_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPTSTRICTTHREADS, 0 },
52 diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/menu.c mutt-1.5.10/menu.c
53 --- mutt-1.5.10.orig/menu.c 2005-06-12 20:32:46.000000000 +0200
54 +++ mutt-1.5.10/menu.c 2005-10-07 09:28:24.000000000 +0200
55 @@ -1087,3 +1087,23 @@
60 +int update_status_time ()
65 + if (StatusUpdate < 0)
67 + else if (StatusUpdate == 0)
71 + if (now - Last >= StatusUpdate)
79 diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/mutt_menu.h mutt-1.5.10/mutt_menu.h
80 --- mutt-1.5.10.orig/mutt_menu.h 2005-08-11 21:37:02.000000000 +0200
81 +++ mutt-1.5.10/mutt_menu.h 2005-10-07 09:28:59.000000000 +0200
83 void index_make_entry (char *, size_t, struct menu_t *, int);
84 int index_color (int);
86 +int update_status_time (void);
87 #endif /* _MUTT_MENU_H_ */
88 diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/pager.c mutt-1.5.10/pager.c
89 --- mutt-1.5.10.orig/pager.c 2005-08-11 21:37:02.000000000 +0200
90 +++ mutt-1.5.10/pager.c 2005-10-07 09:28:24.000000000 +0200
95 - if ((pager_menu->redraw & REDRAW_INDEX) && rd->index)
96 + if (( (pager_menu->redraw & REDRAW_INDEX) || update_status_time()) && rd->index)
98 /* redraw the pager_index indicator, because the
99 * flags for this message might have changed. */
100 diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/status.c mutt-1.5.10/status.c
101 --- mutt-1.5.10.orig/status.c 2005-10-07 09:28:10.000000000 +0200
102 +++ mutt-1.5.10/status.c 2005-10-07 09:28:24.000000000 +0200
109 + int len = sizeof (fmt) - 1;
117 + while (len > 0 && *src != ']')
129 + break; /* not enough space */
140 + time_t now = time (NULL);
141 + strftime (tmp, sizeof (tmp), fmt, localtime (&now));
143 + snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
144 + snprintf (buf, buflen, fmt, tmp);
149 snprintf (buf, buflen, "%%%s%c", prefix, op);