Changeset bd3f232 for global.c


Ignore:
Timestamp:
Jun 10, 2003, 3:14:59 PM (18 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
f14a7ee
Parents:
6e05655
Message:
Styles implemented
It's still a little buggy ... if a format_msg(); is used in perl admin
  messages (or maybe just the first admin message) are not formatted.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r6a415e9 rbd3f232  
    5252  owl_list_create(&(g->puntlist));
    5353  owl_list_create(&(g->messagequeue));
     54  owl_list_create(&(g->stylelist));
    5455  g->curmsg_vert_offset=0;
    5556  g->resizepending=0;
     
    728729}
    729730 
     731/* style */
     732
     733/* Return the style with name 'name'.  If it does not exist return
     734 * NULL */
     735owl_style *owl_global_get_style_by_name(owl_global *g, char *name)
     736{
     737  int i, j;
     738  owl_style *s;
     739 
     740  j=owl_list_get_size(&(g->stylelist));
     741  for (i=0; i<j; i++) {
     742    s=owl_list_get_element(&(g->stylelist), i);
     743    if (owl_style_matches_name(s, name)) {
     744      return(s);
     745    }
     746  }
     747  return(NULL);
     748}
     749
     750owl_style *owl_global_get_current_style(owl_global *g) {
     751  return(owl_global_get_style_by_name(g, owl_global_get_style(g)));
     752}
     753
     754void owl_global_add_style(owl_global *g, owl_style *s) {
     755  owl_list_append_element(&(g->stylelist), s);
     756}
Note: See TracChangeset for help on using the changeset viewer.