Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/screen.c @ 712:e1639629c87b
Rename color options
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 04 Mar 2006 18:52:29 +0100 |
parents | 75dde88f1884 |
children | b5aa7b7afee8 |
comparison
equal
deleted
inserted
replaced
711:75dde88f1884 | 712:e1639629c87b |
---|---|
129 { | 129 { |
130 const char *colors[8] = { | 130 const char *colors[8] = { |
131 "", "", | 131 "", "", |
132 "general", | 132 "general", |
133 "status", | 133 "status", |
134 "newmsg", | 134 "roster", |
135 "rosterselect", | 135 "rostersel", |
136 "rosternormal", | 136 "rosternewmsg", |
137 NULL | 137 NULL |
138 }; | 138 }; |
139 | 139 |
140 char *tmp = g_new(char, 512); | 140 char *tmp = g_new(char, 512); |
141 const char *color; | 141 const char *color; |
142 const char *background = settings_opt_get("color_background"); | 142 const char *background = settings_opt_get("color_background"); |
143 const char *backselected = settings_opt_get("color_backselected"); | 143 const char *backselected = settings_opt_get("color_bgrostersel"); |
144 const char *backstatus = settings_opt_get("color_backstatus"); | 144 const char *backstatus = settings_opt_get("color_bgstatus"); |
145 int i = 0; | 145 int i = 0; |
146 | 146 |
147 // Default values | 147 // Default values |
148 if (!background) background = "black"; | 148 if (!background) background = "black"; |
149 if (!backselected) backselected = "cyan"; | 149 if (!backselected) backselected = "cyan"; |
166 break; | 166 break; |
167 case COLOR_STATUS: | 167 case COLOR_STATUS: |
168 init_pair(i+1, ((color) ? FindColor(color) : COLOR_WHITE), | 168 init_pair(i+1, ((color) ? FindColor(color) : COLOR_WHITE), |
169 FindColor(backstatus)); | 169 FindColor(backstatus)); |
170 break; | 170 break; |
171 case COLOR_NMSG: | 171 case COLOR_ROSTER: |
172 init_pair(i+1, ((color) ? FindColor(color) : COLOR_RED), | 172 init_pair(i+1, ((color) ? FindColor(color) : COLOR_GREEN), |
173 FindColor(background)); | 173 FindColor(background)); |
174 break; | 174 break; |
175 case COLOR_BD_DESSEL: | 175 case COLOR_ROSTERSEL: |
176 init_pair(i+1, ((color) ? FindColor(color) : COLOR_BLUE), | 176 init_pair(i+1, ((color) ? FindColor(color) : COLOR_BLUE), |
177 FindColor(backselected)); | 177 FindColor(backselected)); |
178 break; | 178 break; |
179 case COLOR_BD_DES: | 179 case COLOR_ROSTERNMSG: |
180 init_pair(i+1, ((color) ? FindColor(color) : COLOR_GREEN), | 180 init_pair(i+1, ((color) ? FindColor(color) : COLOR_RED), |
181 FindColor(background)); | 181 FindColor(background)); |
182 break; | 182 break; |
183 } | 183 } |
184 i++; | 184 i++; |
185 } | 185 } |
787 | 787 |
788 budstate = buddy_getstatus(BUDDATA(buddy), NULL); | 788 budstate = buddy_getstatus(BUDDATA(buddy), NULL); |
789 if (budstate >= 0 && budstate < imstatus_size && currentstatus != offline) | 789 if (budstate >= 0 && budstate < imstatus_size && currentstatus != offline) |
790 status = imstatus2char[budstate]; | 790 status = imstatus2char[budstate]; |
791 if (buddy == current_buddy) { | 791 if (buddy == current_buddy) { |
792 wattrset(rosterWnd, COLOR_PAIR(COLOR_BD_DESSEL)); | 792 wattrset(rosterWnd, COLOR_PAIR(COLOR_ROSTERSEL)); |
793 // The 3 following lines aim to color the whole line | 793 // The 3 following lines aim to color the whole line |
794 wmove(rosterWnd, i, 0); | 794 wmove(rosterWnd, i, 0); |
795 for (n = 0; n < maxx; n++) | 795 for (n = 0; n < maxx; n++) |
796 waddch(rosterWnd, ' '); | 796 waddch(rosterWnd, ' '); |
797 } else { | 797 } else { |
798 if (pending == '#') | 798 if (pending == '#') |
799 wattrset(rosterWnd, COLOR_PAIR(COLOR_NMSG)); | 799 wattrset(rosterWnd, COLOR_PAIR(COLOR_ROSTERNMSG)); |
800 else | 800 else |
801 wattrset(rosterWnd, COLOR_PAIR(COLOR_BD_DES)); | 801 wattrset(rosterWnd, COLOR_PAIR(COLOR_ROSTER)); |
802 } | 802 } |
803 | 803 |
804 if (ismuc) { | 804 if (ismuc) { |
805 if (buddy_getinsideroom(BUDDATA(buddy))) | 805 if (buddy_getinsideroom(BUDDATA(buddy))) |
806 status = 'C'; | 806 status = 'C'; |