Changeset 96c3265


Ignore:
Timestamp:
Oct 30, 2009, 12:06:34 PM (15 years ago)
Author:
Karl Ramm <kcr@1ts.org>
Branches:
master, release-1.10, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
6c81223
Parents:
e3068de
git-author:
Karl Ramm <kcr@1ts.org> (09/25/09 13:51:34)
git-committer:
Karl Ramm <kcr@1ts.org> (10/30/09 12:06:34)
Message:
Tighten up sepbar()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • util.c

    r1b9d3cc r96c3265  
    1010void sepbar(const char *in)
    1111{
    12   char buff[1024];
    1312  WINDOW *sepwin;
    1413  const owl_messagelist *ml;
     
    3534  }
    3635
    37   wmove(sepwin, 0, 2); 
    38 
    39   if (owl_messagelist_get_size(ml)==0) {
    40     strcpy(buff, " (-/-) ");
    41   } else {
    42     snprintf(buff, 1024, " (%i/%i/%i) ", owl_global_get_curmsg(&g)+1,
    43             owl_view_get_size(v),
    44             owl_messagelist_get_size(ml));
    45   }
    46   waddstr(sepwin, buff);
     36  wmove(sepwin, 0, 2);
     37
     38  if (owl_messagelist_get_size(ml) == 0)
     39    waddstr(sepwin, " (-/-) ");
     40  else
     41    wprintw(sepwin, " (%i/%i/%i) ", owl_global_get_curmsg(&g) + 1,
     42            owl_view_get_size(v),
     43            owl_messagelist_get_size(ml));
    4744
    4845  foo=owl_view_get_filtname(v);
    49   if (strcmp(foo, owl_global_get_view_home(&g))) wattroff(sepwin, A_REVERSE);
    50   waddstr(sepwin, " ");
    51   waddstr(sepwin, owl_view_get_filtname(v));
    52   waddstr(sepwin, " ");
    53   if (strcmp(foo, owl_global_get_view_home(&g))) wattron(sepwin, A_REVERSE);
     46  if (strcmp(foo, owl_global_get_view_home(&g)))
     47      wattroff(sepwin, A_REVERSE);
     48  wprintw(sepwin, " %s ", owl_view_get_filtname(v));
     49  if (strcmp(foo, owl_global_get_view_home(&g)))
     50      wattron(sepwin, A_REVERSE);
    5451
    5552  if (owl_mainwin_is_curmsg_truncated(owl_global_get_mainwin(&g))) {
     
    7471    getyx(sepwin, y, x);
    7572    wmove(sepwin, y, x+2);
    76     snprintf(buff, 1024, " right: %i ", owl_global_get_rightshift(&g));
    77     waddstr(sepwin, buff);
     73    wprintw(sepwin, " right: %i ", owl_global_get_rightshift(&g));
    7874  }
    7975
Note: See TracChangeset for help on using the changeset viewer.