Changeset 40d1eef
- Timestamp:
- Jun 2, 2010, 8:53:27 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- fa65671
- Parents:
- a5a9572
- git-author:
- David Benjamin <davidben@mit.edu> (06/02/10 20:41:52)
- git-committer:
- David Benjamin <davidben@mit.edu> (06/02/10 20:53:27)
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
r385fda9 r40d1eef 1250 1250 void owl_function_full_redisplay(void) 1251 1251 { 1252 touchwin(owl_global_get_curs_recwin(&g)); 1253 1254 sepbar_dirty(); 1255 1256 owl_global_set_needrefresh(&g); 1252 /* FIXME: this maybe should do something; dirty every window? */ 1257 1253 } 1258 1254 -
global.c
r385fda9 r40d1eef 82 82 83 83 owl_mainpanel_init(&(g->mainpanel)); 84 _owl_global_setup_windows(g);85 84 86 85 /* Fill in some variables which don't have constant defaults */ … … 95 94 96 95 owl_messagelist_create(&(g->msglist)); 97 owl_mainwin_init(&(g->mw) );96 owl_mainwin_init(&(g->mw), g->mainpanel.recwin); 98 97 owl_popwin_init(&(g->pw)); 99 98 owl_msgwin_init(&(g->msgwin), g->mainpanel.msgwin); … … 159 158 *pan = new_panel(win); 160 159 } 161 }162 163 void _owl_global_setup_windows(owl_global *g) {164 int cols, recwinlines;165 166 cols=g->cols;167 168 recwinlines = owl_global_get_recwin_lines(g);169 170 /* create the new windows */171 _owl_panel_set_window(&g->recpan, newwin(recwinlines, cols, 0, 0));172 _owl_panel_set_window(&g->seppan, newwin(1, cols, recwinlines, 0));173 160 } 174 161 … … 289 276 290 277 /* curses windows */ 291 292 WINDOW *owl_global_get_curs_recwin(const owl_global *g) {293 return panel_window(g->recpan);294 }295 278 296 279 owl_window *owl_global_get_curs_sepwin(const owl_global *g) { … … 508 491 owl_function_debugmsg("Relayouting..."); 509 492 510 /* re-initialize the windows */511 _owl_global_setup_windows(g);512 513 493 /* in case any styles rely on the current width */ 514 494 owl_messagelist_invalidate_formats(owl_global_get_msglist(g)); -
mainwin.c
rf449096 r40d1eef 1 1 #include "owl.h" 2 2 3 void owl_mainwin_init(owl_mainwin *mw) 3 static void owl_mainwin_redraw(owl_window *w, WINDOW *recwin, void *user_data); 4 5 void owl_mainwin_init(owl_mainwin *mw, owl_window *window) 4 6 { 5 7 mw->curtruncated=0; 6 8 mw->lastdisplayed=-1; 9 mw->window = g_object_ref(window); 10 g_signal_connect(window, "redraw", G_CALLBACK(owl_mainwin_redraw), mw); 7 11 } 8 12 9 13 void owl_mainwin_redisplay(owl_mainwin *mw) 14 { 15 owl_window_dirty(mw->window); 16 } 17 18 static void owl_mainwin_redraw(owl_window *w, WINDOW *recwin, void *user_data) 10 19 { 11 20 owl_message *m; … … 13 22 int x, y, savey, recwinlines, start; 14 23 int topmsg, curmsg, markedmsgid, fgcolor, bgcolor; 15 WINDOW *recwin;16 24 const owl_view *v; 17 25 GList *fl; 18 26 const owl_filter *f; 27 owl_mainwin *mw = user_data; 19 28 20 recwin = owl_global_get_curs_recwin(&g);21 29 topmsg = owl_global_get_topmsg(&g); 22 30 curmsg = owl_global_get_curmsg(&g); … … 88 96 if (y+lines > recwinlines-1) { 89 97 isfull=1; 90 owl_message_curs_waddstr(m, owl_global_get_curs_recwin(&g),98 owl_message_curs_waddstr(m, recwin, 91 99 start, 92 100 start+recwinlines-y, … … 96 104 } else { 97 105 /* otherwise print the whole thing */ 98 owl_message_curs_waddstr(m, owl_global_get_curs_recwin(&g),106 owl_message_curs_waddstr(m, recwin, 99 107 start, 100 108 start+lines, … … 139 147 } 140 148 mw->lastdisplayed=i-1; 141 142 owl_global_set_needrefresh(&g);143 149 } 144 150 -
owl.h
rf3a9d4d r40d1eef 396 396 int lasttruncated; 397 397 int lastdisplayed; 398 owl_window *window; 398 399 } owl_mainwin; 399 400 … … 587 588 owl_mainpanel mainpanel; 588 589 gulong typwin_erase_id; 589 PANEL *recpan, *seppan;590 590 int needrefresh; 591 591 int rightshift;
Note: See TracChangeset
for help on using the changeset viewer.