Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/screen.c @ 1284:2c96720c4f5b
Add comments (vorner)
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 25 Aug 2007 22:55:26 +0200 |
parents | 8b621f980321 |
children | 02ad6200df26 |
comparison
equal
deleted
inserted
replaced
1283:2faf179166f3 | 1284:2c96720c4f5b |
---|---|
235 g_free(col->wildcard); | 235 g_free(col->wildcard); |
236 g_pattern_spec_free(col->compiled); | 236 g_pattern_spec_free(col->compiled); |
237 g_free(col); | 237 g_free(col); |
238 } | 238 } |
239 | 239 |
240 // Removes all roster coloring rules | |
240 void scr_RosterClearColor(void) | 241 void scr_RosterClearColor(void) |
241 { | 242 { |
242 GSList *head; | 243 GSList *head; |
243 for (head = rostercolrules; head; head = g_slist_next(head)) { | 244 for (head = rostercolrules; head; head = g_slist_next(head)) { |
244 free_rostercolrule(head->data); | 245 free_rostercolrule(head->data); |
245 } | 246 } |
246 g_slist_free(rostercolrules); | 247 g_slist_free(rostercolrules); |
247 rostercolrules = NULL; | 248 rostercolrules = NULL; |
248 } | 249 } |
249 | 250 |
251 // Adds, modifies or removes roster coloring rule | |
252 // color set to "-" removes the rule, | |
253 // otherwise it is modified (if exists) or added | |
254 // | |
255 // Returns weather it was successfull (therefore the roster should be | |
256 // redrawed) or not. If it failed, for example because of invalid color | |
257 // name, it also prints the error. | |
250 bool scr_RosterColor(const char *status, const char *wildcard, | 258 bool scr_RosterColor(const char *status, const char *wildcard, |
251 const char *color) | 259 const char *color) |
252 { | 260 { |
253 GSList *head; | 261 GSList *head; |
254 GSList *found = NULL; | 262 GSList *found = NULL; |