Changeset d2a4534


Ignore:
Timestamp:
Jun 1, 2010, 3:31:48 AM (15 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.
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • Makefile.am

    re96b4ce rd2a4534  
    5050     aim.c buddy.c buddylist.c style.c errqueue.c \
    5151     zbuddylist.c popexec.c select.c wcwidth.c \
    52      glib_compat.c
     52     glib_compat.c mainpanel.c
    5353
    5454NORMAL_SRCS = filterproc.c window.c
  • 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
  • owl.h

    r05ca0d8 rd2a4534  
    463463typedef struct _owl_editwin_excursion owl_editwin_excursion;
    464464
     465typedef struct _owl_mainpanel {
     466  owl_window *panel;
     467  owl_window *typwin;
     468  owl_window *sepwin;
     469  owl_window *msgwin;
     470  owl_window *recwin;
     471  int recwinlines;
     472} owl_mainpanel;
     473
    465474typedef struct _owl_keybinding {
    466475  int  *keys;                   /* keypress stack */
     
    566575  owl_messagelist msglist;
    567576  WINDOW *input_pad;
     577  owl_mainpanel mainpanel;
    568578  PANEL *recpan, *seppan, *msgpan, *typpan;
    569579  int needrefresh;
     
    571581  volatile sig_atomic_t resizepending;
    572582  int relayoutpending;
    573   int recwinlines;
    574583  char *thishost;
    575584  char *homedir;
Note: See TracChangeset for help on using the changeset viewer.