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 CLEARLINE (option (OPTSTATUSONTOP) ? 0 : LINES-2);
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 + ** a leading bang disables locales
33 ** .dt %>X .dd right justify the rest of the string and pad with ``X''
34 ** .dt %|X .dd pad to the end of the line with ``X''
35 ** .dt %*X .dd soft-fill with character ``X'' as pad
36 @@ -2671,6 +2674,16 @@
37 ** Setting this variable causes the ``status bar'' to be displayed on
38 ** the first line of the screen rather than near the bottom.
40 + { "status_update", DT_NUM, R_NONE, UL &StatusUpdate, -1 },
43 + ** This variable controls, if positive, the maximum interval in seconds
44 + ** before the time in the status line is updated. It is checked at
45 + ** every key press and after a keyboard $$timeout.
46 + ** If the value is zero, the status line will be updated at every check.
47 + ** If it is negative, the status time will only be updated
48 + ** if it necessary to update to the status line for some other reason.
50 { "strict_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPTSTRICTTHREADS, 0 },
53 diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/menu.c mutt-1.5.10/menu.c
54 --- mutt-1.5.10.orig/menu.c 2005-06-12 20:32:46.000000000 +0200
55 +++ mutt-1.5.10/menu.c 2005-10-07 09:28:24.000000000 +0200
56 @@ -1087,3 +1087,23 @@
61 +int update_status_time ()
66 + if (StatusUpdate < 0)
68 + else if (StatusUpdate == 0)
72 + if (now - Last >= StatusUpdate)
80 diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/mutt_menu.h mutt-1.5.10/mutt_menu.h
81 --- mutt-1.5.10.orig/mutt_menu.h 2005-08-11 21:37:02.000000000 +0200
82 +++ mutt-1.5.10/mutt_menu.h 2005-10-07 09:28:59.000000000 +0200
84 void index_make_entry (char *, size_t, struct menu_t *, int);
85 int index_color (int);
87 +int update_status_time (void);
88 #endif /* _MUTT_MENU_H_ */
89 diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/pager.c mutt-1.5.10/pager.c
90 --- mutt-1.5.10.orig/pager.c 2005-08-11 21:37:02.000000000 +0200
91 +++ mutt-1.5.10/pager.c 2005-10-07 09:28:24.000000000 +0200
93 SETCOLOR (MT_COLOR_NORMAL);
96 - if ((redraw & REDRAW_INDEX) && index)
97 + if (index && ((redraw & REDRAW_INDEX) || update_status_time ()))
99 /* redraw the pager_index indicator, because the
100 * flags for this message might have changed. */
101 diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/status.c mutt-1.5.10/status.c
102 --- mutt-1.5.10.orig/status.c 2005-10-07 09:28:10.000000000 +0200
103 +++ mutt-1.5.10/status.c 2005-10-07 09:28:24.000000000 +0200
110 static char *get_sort_str (char *buf, size_t buflen, int method)
119 + int len = sizeof (fmt) - 1;
130 + while (len > 0 && *src != ']')
142 + break; /* not enough space */
154 + if (do_locales && Locale)
155 + setlocale (LC_TIME, Locale);
158 + time_t now = time (NULL);
160 + strftime (tmp, sizeof (tmp), fmt, localtime (&now));
163 + if (do_locales && Locale)
164 + setlocale (LC_TIME, "C");
166 + snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
167 + snprintf (buf, buflen, fmt, tmp);
172 snprintf (buf, buflen, "%%%s%c", prefix, op);