]> git.pld-linux.org Git - packages/mutt.git/blobdiff - mutt-bj.status-time.patch
- updated to 2.1.4
[packages/mutt.git] / mutt-bj.status-time.patch
index 8556b192e38827f1e1f0f016a8d58d5e3f24ba71..b72337ccc58b450e2d6624f3e84ec2cfe942efbc 100644 (file)
@@ -1,44 +1,41 @@
-diff -Nur mutt-1.3.25-2/curs_main.c mutt-1.3.25/curs_main.c
---- mutt-1.3.25-2/curs_main.c  Tue Jan 22 00:06:44 2002
-+++ mutt-1.3.25/curs_main.c    Tue Jan 22 00:07:02 2002
-@@ -546,7 +546,7 @@
-         menu_redraw_current (menu);
-       }
+diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/curs_main.c mutt-1.5.10/curs_main.c
+--- mutt-1.5.20.b/curs_main.c  2009-07-14 12:34:25.000000000 +0200
++++ mutt-1.5.20/curs_main.c    2009-07-14 12:42:41.000000000 +0200
+@@ -556,7 +556,7 @@
+       menu_redraw_current (menu);
+   }
  
--      if (menu->redraw & REDRAW_STATUS) 
-+      if ((menu->redraw & REDRAW_STATUS) || update_status_time ())
-       {
-       menu_status_line (buf, sizeof (buf), menu, NONULL (Status));
-       CLEARLINE (option (OPTSTATUSONTOP) ? 0 : LINES-2);
-diff -Nur mutt-1.3.25-2/globals.h mutt-1.3.25/globals.h
---- mutt-1.3.25-2/globals.h    Tue Jan 22 00:06:44 2002
-+++ mutt-1.3.25/globals.h      Tue Jan 22 00:07:02 2002
-@@ -145,6 +145,7 @@
- WHERE short ReadInc;
+-  if (menu->redraw & REDRAW_STATUS)
++  if (menu->redraw & REDRAW_STATUS || update_status_time ())
+   {
+     menu_status_line (buf, sizeof (buf), menu, NONULL (Status));
+     mutt_window_move (MuttStatusWindow, 0, 0);
+--- mutt-1.5.18/globals.h.orig 2008-01-30 05:26:50.000000000 +0100
++++ mutt-1.5.18/globals.h      2008-07-25 17:41:02.532746787 +0200
+@@ -200,6 +200,7 @@
+ WHERE short SaveHist;
  WHERE short SendmailWait;
  WHERE short SleepTime INITVAL (1);
 +WHERE short StatusUpdate;
+ WHERE short TimeInc;
  WHERE short Timeout;
- WHERE short WrapMargin;
- WHERE short WriteInc;
-diff -Nur mutt-1.3.25-2/init.h mutt-1.3.25/init.h
---- mutt-1.3.25-2/init.h       Tue Jan 22 00:06:44 2002
-+++ mutt-1.3.25/init.h Tue Jan 22 00:09:07 2002
-@@ -2119,6 +2119,9 @@
+ WHERE short Wrap;
+--- mutt-2.0.6/init.h.orig     2021-03-06 19:06:37.000000000 +0000
++++ mutt-2.0.6/init.h  2021-04-07 17:25:21.720777040 +0000
+@@ -4197,6 +4197,8 @@
    ** .dt %u  .dd number of unread messages *
    ** .dt %v  .dd Mutt version string
    ** .dt %V  .dd currently active limit pattern, if any *
 +  ** .dt %[fmt] .dd the current date and time. ``fmt'' is
 +  **                expanded by the system call ``strftime'';
-+  **                a leading bang disables locales 
-   ** .dt %>X .dd right justify the rest of the string and pad with "X"
-   ** .dt %|X .dd pad to the end of the line with "X"
-   ** .de
-@@ -2160,6 +2163,16 @@
-   ** Setting this variable causes the ``status bar'' to be displayed on
-   ** the first line of the screen rather than near the bottom.
+   ** .dt %>X .dd right justify the rest of the string and pad with ``X''
+   ** .dt %|X .dd pad to the end of the line with ``X''
+   ** .dt %*X .dd soft-fill with character ``X'' as pad
+@@ -4248,6 +4250,16 @@
+   ** the first line of the screen rather than near the bottom. If $$help
+   ** is \fIset\fP, too it'll be placed at the bottom.
    */
-+  { "status_update",  DT_NUM, R_NONE, UL &StatusUpdate, -1 },
++  { "status_update",  DT_NUM, R_NONE, {.p=&StatusUpdate}, {.l=-1} },
 +  /*
 +  ** .pp
 +  ** This variable controls, if positive, the maximum interval in seconds
@@ -48,13 +45,13 @@ diff -Nur mutt-1.3.25-2/init.h mutt-1.3.25/init.h
 +  ** If it is negative, the status time will only be updated
 +  ** if it necessary to update to the status line for some other reason.
 +  */
-   { "strict_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPTSTRICTTHREADS, 0 },
+   { "strict_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, {.l=OPTSTRICTTHREADS}, {.l=0} },
    /*
    ** .pp
-diff -Nur mutt-1.3.25-2/menu.c mutt-1.3.25/menu.c
---- mutt-1.3.25-2/menu.c       Tue Jan 22 00:06:44 2002
-+++ mutt-1.3.25/menu.c Tue Jan 22 00:07:02 2002
-@@ -1045,3 +1045,23 @@
+diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/menu.c mutt-1.5.10/menu.c
+--- mutt-1.5.10.orig/menu.c    2005-06-12 20:32:46.000000000 +0200
++++ mutt-1.5.10/menu.c 2005-10-07 09:28:24.000000000 +0200
+@@ -1087,3 +1087,23 @@
    }
    /* not reached */
  }
@@ -78,55 +75,43 @@ diff -Nur mutt-1.3.25-2/menu.c mutt-1.3.25/menu.c
 +  else
 +    return 0;
 +}
-diff -Nur mutt-1.3.25-2/mutt_menu.h mutt-1.3.25/mutt_menu.h
---- mutt-1.3.25-2/mutt_menu.h  Tue Jan 22 00:06:44 2002
-+++ mutt-1.3.25/mutt_menu.h    Tue Jan 22 00:07:02 2002
-@@ -107,3 +107,5 @@
- /* used in both the index and pager index to make an entry. */
+diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/mutt_menu.h mutt-1.5.10/mutt_menu.h
+--- mutt-1.5.10.orig/mutt_menu.h       2005-08-11 21:37:02.000000000 +0200
++++ mutt-1.5.10/mutt_menu.h    2005-10-07 09:28:59.000000000 +0200
+@@ -112,4 +112,5 @@
  void index_make_entry (char *, size_t, struct menu_t *, int);
int index_color (int);
-+
COLOR_ATTR index_color (int);
 +int update_status_time (void);
-diff -Nur mutt-1.3.25-2/pager.c mutt-1.3.25/pager.c
---- mutt-1.3.25-2/pager.c      Tue Jan 22 00:06:44 2002
-+++ mutt-1.3.25/pager.c        Tue Jan 22 00:07:02 2002
-@@ -1712,7 +1712,7 @@
-       SETCOLOR (MT_COLOR_NORMAL);
+ #endif /* _MUTT_MENU_H_ */
+diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/pager.c mutt-1.5.10/pager.c
+--- mutt-1.5.10.orig/pager.c   2005-08-11 21:37:02.000000000 +0200
++++ mutt-1.5.10/pager.c        2005-10-07 09:28:24.000000000 +0200
+@@ -1763,7 +1763,7 @@
      }
+   }
  
--    if ((redraw & REDRAW_INDEX) && index)
-+    if (index && ((redraw & REDRAW_INDEX) || update_status_time ()))
-     {
-       /* redraw the pager_index indicator, because the
-        * flags for this message might have changed. */
-diff -Nur mutt-1.3.25-2/status.c mutt-1.3.25/status.c
---- mutt-1.3.25-2/status.c     Tue Jan 22 00:06:44 2002
-+++ mutt-1.3.25/status.c       Tue Jan 22 00:07:02 2002
-@@ -26,6 +26,7 @@
- #include <string.h>
- #include <ctype.h>
- #include <unistd.h>
-+#include <locale.h>
- static char *get_sort_str (char *buf, size_t buflen, int method)
- {
-@@ -284,6 +285,61 @@
+-  if ((pager_menu->redraw & REDRAW_INDEX) && rd->index)
++  if (( (pager_menu->redraw & REDRAW_INDEX) || update_status_time()) && rd->index)
+   {
+     /* redraw the pager_index indicator, because the
+      * flags for this message might have changed. */
+diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/status.c mutt-1.5.10/status.c
+--- mutt-1.5.10.orig/status.c  2005-10-07 09:28:10.000000000 +0200
++++ mutt-1.5.10/status.c       2005-10-07 09:28:24.000000000 +0200
+@@ -303,6 +304,47 @@
        *buf = 0;
        return (src);
  
 +    case '[':
 +      {
-+      int do_locales;
 +      int len = sizeof (fmt) - 1;
 +
 +      cp = fmt;
 +      if (*src == '!')
 +      {
-+        do_locales = 0;
 +        src++;
 +      }
-+      else
-+        do_locales = 1;
 +
 +      while (len > 0 && *src != ']')
 +      {
@@ -151,18 +136,8 @@ diff -Nur mutt-1.3.25-2/status.c mutt-1.3.25/status.c
 +      }
 +      *cp = 0;
 +      src++;
-+
-+      if (do_locales && Locale)
-+        setlocale (LC_TIME, Locale);
-+
-+      {
-+        time_t now = time (NULL);
-+
-+        strftime (tmp, sizeof (tmp), fmt, localtime (&now));
-+      }
-+
-+      if (do_locales && Locale)
-+        setlocale (LC_TIME, "C");
++      time_t now = time (NULL);
++      strftime (tmp, sizeof (tmp), fmt, localtime (&now));
 +
 +      snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
 +      snprintf (buf, buflen, fmt, tmp);
@@ -172,4 +147,3 @@ diff -Nur mutt-1.3.25-2/status.c mutt-1.3.25/status.c
      default:
        snprintf (buf, buflen, "%%%s%c", prefix, op);
        break;
-
This page took 0.037168 seconds and 4 git commands to generate.