Changeset 571fab7


Ignore:
Timestamp:
Jun 3, 2010, 2:45:28 AM (11 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
4dd115f
Parents:
f70a7a3
Message:
Move all the UI setup into a separate function
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r40597e7 r571fab7  
    1313#define MAXHOSTNAMELEN 256
    1414#endif
     15
     16static void _owl_global_init_windows(owl_global *g);
    1517
    1618void owl_global_init(owl_global *g) {
     
    8082  g->nextmsgid=0;
    8183
    82   owl_mainpanel_init(&(g->mainpanel));
    83 
    8484  /* Fill in some variables which don't have constant defaults */
    8585  /* TODO: come back later and check passwd file first */
     
    9393
    9494  owl_messagelist_create(&(g->msglist));
    95   owl_mainwin_init(&(g->mw), g->mainpanel.recwin);
    96   owl_popwin_init(&(g->pw));
    97   owl_msgwin_init(&(g->msgwin), g->mainpanel.msgwin);
    98   owl_sepbar_init(g->mainpanel.sepwin);
     95
     96  _owl_global_init_windows(g);
    9997
    10098  g->aim_screenname=NULL;
     
    121119  g->timerlist = NULL;
    122120  g->interrupted = FALSE;
     121}
     122
     123static void _owl_global_init_windows(owl_global *g)
     124{
     125  /* Create the main window */
     126  owl_mainpanel_init(&(g->mainpanel));
     127
     128  /* Create the widgets */
     129  owl_mainwin_init(&(g->mw), g->mainpanel.recwin);
     130  owl_popwin_init(&(g->pw));
     131  owl_msgwin_init(&(g->msgwin), g->mainpanel.msgwin);
     132  owl_sepbar_init(g->mainpanel.sepwin);
    123133
    124134  /* set up a pad for input */
Note: See TracChangeset for help on using the changeset viewer.