[BACK]Return to status.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/status.c between version 1.32 and 1.33

version 1.32, 2009/09/07 18:50:45 version 1.33, 2009/09/10 17:16:24
Line 66 
Line 66 
         if (gettimeofday(&c->status_timer, NULL) != 0)          if (gettimeofday(&c->status_timer, NULL) != 0)
                 fatal("gettimeofday");                  fatal("gettimeofday");
         memcpy(&stdgc, &grid_default_cell, sizeof gc);          memcpy(&stdgc, &grid_default_cell, sizeof gc);
         stdgc.fg = options_get_number(&s->options, "status-fg");          colour_set_fg(&stdgc, options_get_number(&s->options, "status-fg"));
         stdgc.bg = options_get_number(&s->options, "status-bg");          colour_set_bg(&stdgc, options_get_number(&s->options, "status-bg"));
         stdgc.attr |= options_get_number(&s->options, "status-attr");          stdgc.attr |= options_get_number(&s->options, "status-attr");
   
         /*          /*
Line 79 
Line 79 
         memcpy(&sr_stdgc, &stdgc, sizeof sr_stdgc);          memcpy(&sr_stdgc, &stdgc, sizeof sr_stdgc);
         sl_fg = options_get_number(&s->options, "status-left-fg");          sl_fg = options_get_number(&s->options, "status-left-fg");
         if (sl_fg != 8)          if (sl_fg != 8)
                 sl_stdgc.fg = sl_fg;                  colour_set_fg(&sl_stdgc, sl_fg);
         sl_bg = options_get_number(&s->options, "status-left-bg");          sl_bg = options_get_number(&s->options, "status-left-bg");
         if (sl_bg != 8)          if (sl_bg != 8)
                 sl_stdgc.bg = sl_bg;                  colour_set_bg(&sl_stdgc, sl_bg);
         sl_attr = options_get_number(&s->options, "status-left-attr");          sl_attr = options_get_number(&s->options, "status-left-attr");
         if (sl_attr != 0)          if (sl_attr != 0)
                 sl_stdgc.attr = sl_attr;                  sl_stdgc.attr = sl_attr;
         sr_fg = options_get_number(&s->options, "status-right-fg");          sr_fg = options_get_number(&s->options, "status-right-fg");
         if (sr_fg != 8)          if (sr_fg != 8)
                 sr_stdgc.fg = sr_fg;                  colour_set_fg(&sr_stdgc, sr_fg);
         sr_bg = options_get_number(&s->options, "status-right-bg");          sr_bg = options_get_number(&s->options, "status-right-bg");
         if (sr_bg != 8)          if (sr_bg != 8)
                 sr_stdgc.bg = sr_bg;                  colour_set_bg(&sr_stdgc, sr_bg);
         sr_attr = options_get_number(&s->options, "status-right-attr");          sr_attr = options_get_number(&s->options, "status-right-attr");
         if (sr_attr != 0)          if (sr_attr != 0)
                 sr_stdgc.attr = sr_attr;                  sr_stdgc.attr = sr_attr;
Line 501 
Line 501 
 char *  char *
 status_print(struct session *s, struct winlink *wl, struct grid_cell *gc)  status_print(struct session *s, struct winlink *wl, struct grid_cell *gc)
 {  {
         char   *text, flag;          struct options  *oo = &wl->window->options;
         u_char  fg, bg, attr;          char            *text, flag;
           u_char           fg, bg, attr;
   
         fg = options_get_number(&wl->window->options, "window-status-fg");          fg = options_get_number(oo, "window-status-fg");
         if (fg != 8)          if (fg != 8)
                 gc->fg = fg;                  colour_set_fg(gc, fg);
         bg = options_get_number(&wl->window->options, "window-status-bg");          bg = options_get_number(oo, "window-status-bg");
         if (bg != 8)          if (bg != 8)
                 gc->bg = bg;                  colour_set_bg(gc, bg);
         attr = options_get_number(&wl->window->options, "window-status-attr");          attr = options_get_number(oo, "window-status-attr");
         if (attr != 0)          if (attr != 0)
                 gc->attr = attr;                  gc->attr = attr;
   
Line 518 
Line 519 
         if (wl == SLIST_FIRST(&s->lastw))          if (wl == SLIST_FIRST(&s->lastw))
                 flag = '-';                  flag = '-';
         if (wl == s->curw) {          if (wl == s->curw) {
                 fg = options_get_number(&wl->window->options, "window-status-current-fg");                  fg = options_get_number(oo, "window-status-current-fg");
                 if (fg != 8)                  if (fg != 8)
                         gc->fg = fg;                          colour_set_fg(gc, fg);
                 bg = options_get_number(&wl->window->options, "window-status-current-bg");                  bg = options_get_number(oo, "window-status-current-bg");
                 if (bg != 8)                  if (bg != 8)
                         gc->bg = bg;                          colour_set_bg(gc, bg);
                 attr = options_get_number(&wl->window->options, "window-status-current-attr");                  attr = options_get_number(oo, "window-status-current-attr");
                 if (attr != 0)                  if (attr != 0)
                         gc->attr = attr;                          gc->attr = attr;
                 flag = '*';                  flag = '*';
Line 606 
Line 607 
                 len = c->tty.sx;                  len = c->tty.sx;
   
         memcpy(&gc, &grid_default_cell, sizeof gc);          memcpy(&gc, &grid_default_cell, sizeof gc);
         gc.fg = options_get_number(&s->options, "message-fg");          colour_set_fg(&gc, options_get_number(&s->options, "message-fg"));
         gc.bg = options_get_number(&s->options, "message-bg");          colour_set_bg(&gc, options_get_number(&s->options, "message-bg"));
         gc.attr |= options_get_number(&s->options, "message-attr");          gc.attr |= options_get_number(&s->options, "message-attr");
   
         screen_write_start(&ctx, NULL, &c->status);          screen_write_start(&ctx, NULL, &c->status);
Line 719 
Line 720 
                 len = c->tty.sx;                  len = c->tty.sx;
   
         memcpy(&gc, &grid_default_cell, sizeof gc);          memcpy(&gc, &grid_default_cell, sizeof gc);
         gc.fg = options_get_number(&s->options, "message-fg");          colour_set_fg(&gc, options_get_number(&s->options, "message-fg"));
         gc.bg = options_get_number(&s->options, "message-bg");          colour_set_bg(&gc, options_get_number(&s->options, "message-bg"));
         gc.attr |= options_get_number(&s->options, "message-attr");          gc.attr |= options_get_number(&s->options, "message-attr");
   
         screen_write_start(&ctx, NULL, &c->status);          screen_write_start(&ctx, NULL, &c->status);

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33