- Timestamp:
- Jun 2, 2010, 8:53:27 PM (14 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.