Changeset d70f45f


Ignore:
Timestamp:
Jun 1, 2010, 3:19:58 PM (14 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.7, release-1.8, release-1.9
Children:
69873f7
Parents:
e294783
Message:
Port the msgwin to owl_window

I feel kind of silly making a new file for this, but meh.
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • Makefile.am

    rd2a4534 rd70f45f  
    5050     aim.c buddy.c buddylist.c style.c errqueue.c \
    5151     zbuddylist.c popexec.c select.c wcwidth.c \
    52      glib_compat.c mainpanel.c
     52     glib_compat.c mainpanel.c msgwin.c
    5353
    5454NORMAL_SRCS = filterproc.c window.c
  • functions.c

    rf6fae8d rd70f45f  
    12621262  touchwin(owl_global_get_curs_recwin(&g));
    12631263  touchwin(owl_global_get_curs_sepwin(&g));
    1264   touchwin(owl_global_get_curs_msgwin(&g));
    12651264
    12661265  sepbar("");
    1267   owl_function_makemsg("");
    12681266
    12691267  owl_global_set_needrefresh(&g);
     
    34013399{
    34023400  va_list ap;
    3403   char buff[2048];
     3401  char *str;
    34043402
    34053403  if (!owl_global_get_curs_msgwin(&g)) return;
    34063404
    34073405  va_start(ap, fmt);
    3408   werase(owl_global_get_curs_msgwin(&g));
    3409  
    3410   vsnprintf(buff, 2048, fmt, ap);
    3411   owl_function_debugmsg("makemsg: %s", buff);
    3412   waddstr(owl_global_get_curs_msgwin(&g), buff); 
    3413   owl_global_set_needrefresh(&g);
     3406  str = g_strdup_vprintf(fmt, ap);
    34143407  va_end(ap);
     3408
     3409  owl_function_debugmsg("makemsg: %s", str);
     3410  owl_msgwin_set_text(&g.msgwin, str);
    34153411}
    34163412
  • global.c

    rf6fae8d rd70f45f  
    9595  owl_mainwin_init(&(g->mw));
    9696  owl_popwin_init(&(g->pw));
     97  owl_msgwin_init(&(g->msgwin), g->mainpanel.msgwin);
    9798
    9899  g->aim_screenname=NULL;
     
    167168  _owl_panel_set_window(&g->recpan, newwin(recwinlines, cols, 0, 0));
    168169  _owl_panel_set_window(&g->seppan, newwin(1, cols, recwinlines, 0));
    169   _owl_panel_set_window(&g->msgpan, newwin(1, cols, recwinlines+1, 0));
    170170}
    171171
     
    295295}
    296296
    297 WINDOW *owl_global_get_curs_msgwin(const owl_global *g) {
    298   return panel_window(g->msgpan);
     297owl_window *owl_global_get_curs_msgwin(const owl_global *g) {
     298  return g->msgwin.window;
    299299}
    300300
     
    517517
    518518  /* refresh stuff */
    519   g->needrefresh=1;
    520519  owl_mainwin_redisplay(&(g->mw));
    521520  sepbar(NULL);
    522521
    523522  owl_function_full_redisplay();
    524 
    525   owl_function_makemsg("");
    526523}
    527524
  • owl.h

    rf6fae8d rd70f45f  
    414414  int active;
    415415} owl_popwin;
     416 
     417typedef struct _owl_msgwin {
     418  char *msg;
     419  owl_window *window;
     420  gulong redraw_id;
     421} owl_msgwin;
    416422
    417423typedef struct _owl_messagelist {
     
    558564  owl_mainwin mw;
    559565  owl_popwin pw;
     566  owl_msgwin msgwin;
    560567  owl_history cmdhist;          /* command history */
    561568  owl_history msghist;          /* outgoing message history */
     
    577584  owl_mainpanel mainpanel;
    578585  gulong typwin_erase_id;
    579   PANEL *recpan, *seppan, *msgpan;
     586  PANEL *recpan, *seppan;
    580587  int needrefresh;
    581588  int rightshift;
Note: See TracChangeset for help on using the changeset viewer.