X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-ui%2Fstatus.c;h=00ccde80c1657912b852c8428b0c9beea24b0baa;hb=85707d7504ab7baf1b07e30b1bcab517ef115976;hp=9c4bdf9f882c382b142242f2ecfbe99bdeb2d5fe;hpb=b23d5033080fe9f9fba038e3cf1e3ec2b0a0d33d;p=apps%2Fmadmutt.git diff --git a/lib-ui/status.c b/lib-ui/status.c index 9c4bdf9..00ccde8 100644 --- a/lib-ui/status.c +++ b/lib-ui/status.c @@ -7,9 +7,8 @@ * please see the file GPL in the top level source directory. */ -#include +#include -#include #include #include @@ -17,8 +16,6 @@ #include "sort.h" #include "buffy.h" -#define SW (option(OPTMBOXPANE)?SidebarWidth:0) - static char *get_sort_str (char *buf, ssize_t buflen, int method) { snprintf (buf, buflen, "%s%s%s", @@ -98,7 +95,7 @@ status_format_str(char *buf, ssize_t buflen, char op, const char *src, case 'h': snprintf (fmt, sizeof (fmt), "%%%ss", prefix); - snprintf (buf, buflen, fmt, NONULL (Hostname)); + snprintf (buf, buflen, fmt, NONULL (mod_core.shorthost)); break; case 'f': @@ -256,7 +253,7 @@ status_format_str(char *buf, ssize_t buflen, char op, const char *src, break; case 'v': - m_strcpy(buf, buflen, mutt_make_version(0)); + m_strcpy(buf, buflen, madmutt_version); break; case 'V': @@ -271,7 +268,7 @@ status_format_str(char *buf, ssize_t buflen, char op, const char *src, case 0: *buf = 0; - return (src); + return src; default: *buf = 0; @@ -281,10 +278,10 @@ status_format_str(char *buf, ssize_t buflen, char op, const char *src, if (flags & M_FORMAT_OPTIONAL) menu_status_line(buf, buflen, menu, optional ? ifstr : elstr); - return (src); + return src; } void menu_status_line(char* buf, ssize_t len, MUTTMENU* menu, const char* p) { - m_strformat(buf, len, COLS - SW, p, status_format_str, menu, 0); + m_strformat(buf, len, getmaxx(main_w), p, status_format_str, menu, 0); }