[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.107 and 1.108

version 1.107, 2013/07/05 14:44:06 version 1.108, 2014/01/28 23:07:09
Line 80 
Line 80 
 {  {
         struct session  *s = c->session;          struct session  *s = c->session;
         char            *left;          char            *left;
         int              fg, bg, attr;  
         size_t           leftlen;          size_t           leftlen;
   
         fg = options_get_number(&s->options, "status-left-fg");          style_apply_update(gc, &s->options, "status-left-style");
         if (fg != 8)  
                 colour_set_fg(gc, fg);  
         bg = options_get_number(&s->options, "status-left-bg");  
         if (bg != 8)  
                 colour_set_bg(gc, bg);  
         attr = options_get_number(&s->options, "status-left-attr");  
         if (attr != 0)  
                 gc->attr = attr;  
   
         left = status_replace(c, NULL,          left = status_replace(c, NULL,
             NULL, NULL, options_get_string(&s->options, "status-left"), t, 1);              NULL, NULL, options_get_string(&s->options, "status-left"), t, 1);
Line 110 
Line 101 
 {  {
         struct session  *s = c->session;          struct session  *s = c->session;
         char            *right;          char            *right;
         int              fg, bg, attr;  
         size_t           rightlen;          size_t           rightlen;
   
         fg = options_get_number(&s->options, "status-right-fg");          style_apply_update(gc, &s->options, "status-right-style");
         if (fg != 8)  
                 colour_set_fg(gc, fg);  
         bg = options_get_number(&s->options, "status-right-bg");  
         if (bg != 8)  
                 colour_set_bg(gc, bg);  
         attr = options_get_number(&s->options, "status-right-attr");  
         if (attr != 0)  
                 gc->attr = attr;  
   
         right = status_replace(c, NULL,          right = status_replace(c, NULL,
             NULL, NULL, options_get_string(&s->options, "status-right"), t, 1);              NULL, NULL, options_get_string(&s->options, "status-right"), t, 1);
Line 177 
Line 159 
         t = c->status_timer.tv_sec;          t = c->status_timer.tv_sec;
   
         /* Set up default colour. */          /* Set up default colour. */
         memcpy(&stdgc, &grid_default_cell, sizeof gc);          style_apply(&stdgc, &s->options, "status-style");
         colour_set_fg(&stdgc, options_get_number(&s->options, "status-fg"));  
         colour_set_bg(&stdgc, options_get_number(&s->options, "status-bg"));  
         stdgc.attr |= options_get_number(&s->options, "status-attr");  
   
         /* Create the target screen. */          /* Create the target screen. */
         memcpy(&old_status, &c->status, sizeof old_status);          memcpy(&old_status, &c->status, sizeof old_status);
Line 646 
Line 625 
         struct session  *s = c->session;          struct session  *s = c->session;
         const char      *fmt;          const char      *fmt;
         char            *text;          char            *text;
         int              fg, bg, attr;  
   
         fg = options_get_number(oo, "window-status-fg");          style_apply_update(gc, oo, "window-status-style");
         if (fg != 8)  
                 colour_set_fg(gc, fg);  
         bg = options_get_number(oo, "window-status-bg");  
         if (bg != 8)  
                 colour_set_bg(gc, bg);  
         attr = options_get_number(oo, "window-status-attr");  
         if (attr != 0)  
                 gc->attr = attr;  
         fmt = options_get_string(oo, "window-status-format");          fmt = options_get_string(oo, "window-status-format");
         if (wl == s->curw) {          if (wl == s->curw) {
                 fg = options_get_number(oo, "window-status-current-fg");                  style_apply_update(gc, oo, "window-status-current-style");
                 if (fg != 8)  
                         colour_set_fg(gc, fg);  
                 bg = options_get_number(oo, "window-status-current-bg");  
                 if (bg != 8)  
                         colour_set_bg(gc, bg);  
                 attr = options_get_number(oo, "window-status-current-attr");  
                 if (attr != 0)  
                         gc->attr = attr;  
                 fmt = options_get_string(oo, "window-status-current-format");                  fmt = options_get_string(oo, "window-status-current-format");
         }          }
         if (wl == TAILQ_FIRST(&s->lastw)) {          if (wl == TAILQ_FIRST(&s->lastw))
                 fg = options_get_number(oo, "window-status-last-fg");                  style_apply_update(gc, oo, "window-status-last-style");
                 if (fg != 8)  
                         colour_set_fg(gc, fg);  
                 bg = options_get_number(oo, "window-status-last-bg");  
                 if (bg != 8)  
                         colour_set_bg(gc, bg);  
                 attr = options_get_number(oo, "window-status-last-attr");  
                 if (attr != 0)  
                         gc->attr = attr;  
         }  
   
         if (wl->flags & WINLINK_BELL) {          if (wl->flags & WINLINK_BELL)
                 fg = options_get_number(oo, "window-status-bell-fg");                  style_apply_update(gc, oo, "window-status-bell-style");
                 if (fg != 8)          else if (wl->flags & WINLINK_CONTENT)
                         colour_set_fg(gc, fg);                  style_apply_update(gc, oo, "window-status-content-style");
                 bg = options_get_number(oo, "window-status-bell-bg");          else if (wl->flags & (WINLINK_ACTIVITY|WINLINK_SILENCE))
                 if (bg != 8)                  style_apply_update(gc, oo, "window-status-activity-style");
                         colour_set_bg(gc, bg);  
                 attr = options_get_number(oo, "window-status-bell-attr");  
                 if (attr != 0)  
                         gc->attr = attr;  
         } else if (wl->flags & WINLINK_CONTENT) {  
                 fg = options_get_number(oo, "window-status-content-fg");  
                 if (fg != 8)  
                         colour_set_fg(gc, fg);  
                 bg = options_get_number(oo, "window-status-content-bg");  
                 if (bg != 8)  
                         colour_set_bg(gc, bg);  
                 attr = options_get_number(oo, "window-status-content-attr");  
                 if (attr != 0)  
                         gc->attr = attr;  
         } else if (wl->flags & (WINLINK_ACTIVITY|WINLINK_SILENCE)) {  
                 fg = options_get_number(oo, "window-status-activity-fg");  
                 if (fg != 8)  
                         colour_set_fg(gc, fg);  
                 bg = options_get_number(oo, "window-status-activity-bg");  
                 if (bg != 8)  
                         colour_set_bg(gc, bg);  
                 attr = options_get_number(oo, "window-status-activity-attr");  
                 if (attr != 0)  
                         gc->attr = attr;  
         }  
   
         text = status_replace(c, NULL, wl, NULL, fmt, t, 1);          text = status_replace(c, NULL, wl, NULL, fmt, t, 1);
         return (text);          return (text);
Line 814 
Line 742 
         if (len > c->tty.sx)          if (len > c->tty.sx)
                 len = c->tty.sx;                  len = c->tty.sx;
   
         memcpy(&gc, &grid_default_cell, sizeof gc);          style_apply(&gc, &s->options, "message-style");
         colour_set_fg(&gc, options_get_number(&s->options, "message-fg"));  
         colour_set_bg(&gc, options_get_number(&s->options, "message-bg"));  
         gc.attr |= options_get_number(&s->options, "message-attr");  
   
         screen_write_start(&ctx, NULL, &c->status);          screen_write_start(&ctx, NULL, &c->status);
   
Line 935 
Line 860 
                 len = c->tty.sx;                  len = c->tty.sx;
         off = 0;          off = 0;
   
         memcpy(&gc, &grid_default_cell, sizeof gc);  
   
         /* Change colours for command mode. */          /* Change colours for command mode. */
         if (c->prompt_mdata.mode == 1) {          if (c->prompt_mdata.mode == 1)
                 colour_set_fg(&gc, options_get_number(&s->options, "message-command-fg"));                  style_apply(&gc, &s->options, "message-command-style");
                 colour_set_bg(&gc, options_get_number(&s->options, "message-command-bg"));          else
                 gc.attr |= options_get_number(&s->options, "message-command-attr");                  style_apply(&gc, &s->options, "message-style");
         } else {  
                 colour_set_fg(&gc, options_get_number(&s->options, "message-fg"));  
                 colour_set_bg(&gc, options_get_number(&s->options, "message-bg"));  
                 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.107  
changed lines
  Added in v.1.108