Changeset d2a4534 for global.c


Ignore:
Timestamp:
Jun 1, 2010, 3:31:48 AM (14 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.7, release-1.8, release-1.9
Children:
cb5a9f3
Parents:
05ca0d8
Message:
Maintain an owl_mainpanel structure

This structure will contain all the other windows.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r7a6e6c7 rd2a4534  
    7979  g->nextmsgid=0;
    8080
     81  owl_mainpanel_init(&(g->mainpanel));
    8182  _owl_global_setup_windows(g);
    8283
     
    157158
    158159void _owl_global_setup_windows(owl_global *g) {
    159   int cols, typwin_lines;
     160  int cols, typwin_lines, recwinlines;
    160161
    161162  cols=g->cols;
    162163  typwin_lines=owl_global_get_typwin_lines(g);
    163164
    164   /* set the new window sizes */
    165   g->recwinlines=g->lines-(typwin_lines+2);
    166   if (g->recwinlines<0) {
    167     /* gotta deal with this */
    168     g->recwinlines=0;
    169   }
     165  recwinlines = owl_global_get_recwin_lines(g);
    170166
    171167  /* create the new windows */
    172   _owl_panel_set_window(&g->recpan, newwin(g->recwinlines, cols, 0, 0));
    173   _owl_panel_set_window(&g->seppan, newwin(1, cols, g->recwinlines, 0));
    174   _owl_panel_set_window(&g->msgpan, newwin(1, cols, g->recwinlines+1, 0));
    175   _owl_panel_set_window(&g->typpan, newwin(typwin_lines, cols, g->recwinlines+2, 0));
     168  _owl_panel_set_window(&g->recpan, newwin(recwinlines, cols, 0, 0));
     169  _owl_panel_set_window(&g->seppan, newwin(1, cols, recwinlines, 0));
     170  _owl_panel_set_window(&g->msgpan, newwin(1, cols, recwinlines+1, 0));
     171  _owl_panel_set_window(&g->typpan, newwin(typwin_lines, cols, recwinlines+2, 0));
    176172
    177173  if (g->tw)
     
    230226
    231227int owl_global_get_recwin_lines(const owl_global *g) {
    232   return(g->recwinlines);
     228  return g->mainpanel.recwinlines;
    233229}
    234230
Note: See TracChangeset for help on using the changeset viewer.