Changeset d296c9a for functions.c
- Timestamp:
- Jul 18, 2010, 4:48:15 PM (14 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- 205e164
- Parents:
- 1cc9b615 (diff), 8bba1ae (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
r7bfc613 rd296c9a 216 216 /* redisplay etc. */ 217 217 owl_mainwin_redisplay(owl_global_get_mainwin(&g)); 218 owl_global_set_needrefresh(&g);219 218 } 220 219 … … 287 286 owl_editwin_set_cbdata(e, data, cleanup); 288 287 owl_editwin_set_callback(e, callback); 289 owl_global_push_context(&g, OWL_CTX_EDITMULTI, e, "editmulti" );288 owl_global_push_context(&g, OWL_CTX_EDITMULTI, e, "editmulti", owl_global_get_typwin_window(&g)); 290 289 } 291 290 … … 786 785 { 787 786 owl_global_set_rightshift(&g, owl_global_get_rightshift(&g)+10); 788 owl_mainwin_redisplay(owl_global_get_mainwin(&g));789 owl_global_set_needrefresh(&g);790 787 } 791 788 … … 797 794 if (shift > 0) { 798 795 owl_global_set_rightshift(&g, MAX(shift - 10, 0)); 799 owl_mainwin_redisplay(owl_global_get_mainwin(&g));800 owl_global_set_needrefresh(&g);801 796 } else { 802 797 owl_function_beep(); … … 1201 1196 if (owl_global_is_bell(&g)) { 1202 1197 beep(); 1203 owl_global_set_needrefresh(&g); /* do we really need this? */1204 1198 } 1205 1199 } … … 1230 1224 } 1231 1225 1232 void owl_function_set_cursor(WINDOW *win) 1233 { 1234 /* Be careful that this window is actually empty, otherwise panels get confused */ 1235 if (is_wintouched(win)) { 1236 owl_function_debugmsg("Warning: owl_function_set_cursor called on dirty window"); 1237 update_panels(); 1238 } 1239 wnoutrefresh(win); 1226 static void _dirty_everything(owl_window *w) { 1227 if (!owl_window_is_realized(w)) 1228 return; 1229 owl_window_dirty(w); 1230 owl_window_children_foreach(w, (GFunc)_dirty_everything, NULL); 1240 1231 } 1241 1232 1242 1233 void owl_function_full_redisplay(void) 1243 1234 { 1244 touchwin(owl_global_get_curs_recwin(&g)); 1245 touchwin(owl_global_get_curs_sepwin(&g)); 1246 touchwin(owl_global_get_curs_typwin(&g)); 1247 touchwin(owl_global_get_curs_msgwin(&g)); 1248 1249 sepbar(""); 1250 owl_function_makemsg(""); 1251 1252 owl_global_set_needrefresh(&g); 1235 _dirty_everything(owl_window_get_screen()); 1253 1236 } 1254 1237 … … 1262 1245 1263 1246 owl_popwin_up(pw); 1264 owl_global_push_context(&g, OWL_CTX_POPLESS, v, "popless"); 1265 owl_viewwin_init_text(v, owl_popwin_get_curswin(pw), 1266 owl_popwin_get_lines(pw), owl_popwin_get_cols(pw), 1267 text); 1268 owl_viewwin_redisplay(v); 1269 owl_global_set_needrefresh(&g); 1247 owl_global_push_context(&g, OWL_CTX_POPLESS, v, "popless", NULL); 1248 owl_viewwin_init_text(v, owl_popwin_get_content(pw), text); 1270 1249 } 1271 1250 … … 1279 1258 1280 1259 owl_popwin_up(pw); 1281 owl_global_push_context(&g, OWL_CTX_POPLESS, v, "popless"); 1282 owl_viewwin_init_fmtext(v, owl_popwin_get_curswin(pw), 1283 owl_popwin_get_lines(pw), owl_popwin_get_cols(pw), 1284 fm); 1285 owl_viewwin_redisplay(v); 1286 owl_global_set_needrefresh(&g); 1260 owl_global_push_context(&g, OWL_CTX_POPLESS, v, "popless", NULL); 1261 owl_viewwin_init_fmtext(v, owl_popwin_get_content(pw), fm); 1287 1262 } 1288 1263 … … 1544 1519 /* redisplay */ 1545 1520 owl_mainwin_redisplay(owl_global_get_mainwin(&g)); 1546 owl_global_set_needrefresh(&g);1547 1521 } 1548 1522 … … 1550 1524 { 1551 1525 owl_global_set_typwin_lines(&g, newsize); 1552 owl_ global_set_relayout_pending(&g);1526 owl_mainpanel_layout_contents(&g.mainpanel); 1553 1527 } 1554 1528 … … 1664 1638 } 1665 1639 owl_mainwin_redisplay(owl_global_get_mainwin(&g)); 1666 owl_global_set_needrefresh(&g);1667 1640 } else { 1668 1641 owl_function_error("No message with id %d: unable to mark for (un)delete",id); … … 1700 1673 owl_mainwin_redisplay(owl_global_get_mainwin(&g)); 1701 1674 owl_function_makemsg("%i messages marked for deletion", count); 1702 owl_global_set_needrefresh(&g);1703 1675 } 1704 1676 … … 1905 1877 1906 1878 owl_editwin_set_locktext(tw, "command: "); 1907 owl_global_set_needrefresh(&g);1908 1879 1909 1880 owl_editwin_insert_string(tw, line); 1910 owl_editwin_redisplay(tw); 1911 1912 owl_global_push_context(&g, OWL_CTX_EDITLINE, tw, "editline"); 1881 1882 owl_global_push_context(&g, OWL_CTX_EDITLINE, tw, "editline", owl_global_get_typwin_window(&g)); 1913 1883 owl_editwin_set_callback(tw, owl_callback_command); 1914 1884 } … … 1921 1891 1922 1892 owl_editwin_set_locktext(tw, line); 1923 owl_global_set_needrefresh(&g); 1924 1925 owl_editwin_redisplay(tw); 1926 1927 owl_global_push_context(&g, OWL_CTX_EDITRESPONSE, tw, "editresponse"); 1893 1894 owl_global_push_context(&g, OWL_CTX_EDITRESPONSE, tw, "editresponse", owl_global_get_typwin_window(&g)); 1928 1895 return tw; 1929 1896 } … … 1938 1905 1939 1906 owl_editwin_set_locktext(tw, line); 1940 owl_global_set_needrefresh(&g); 1941 1942 owl_editwin_redisplay(tw); 1943 1944 owl_global_push_context(&g, OWL_CTX_EDITRESPONSE, tw, "editresponse"); 1907 1908 owl_global_push_context(&g, OWL_CTX_EDITRESPONSE, tw, "editresponse", owl_global_get_typwin_window(&g)); 1945 1909 return tw; 1946 1910 } … … 2105 2069 } 2106 2070 owl_filter_set_fgcolor(f, owl_util_string_to_color(argv[3])); 2107 owl_global_set_needrefresh(&g);2108 2071 owl_mainwin_redisplay(owl_global_get_mainwin(&g)); 2109 2072 return; … … 2120 2083 } 2121 2084 owl_filter_set_bgcolor(f, owl_util_string_to_color(argv[3])); 2122 owl_global_set_needrefresh(&g);2123 2085 owl_mainwin_redisplay(owl_global_get_mainwin(&g)); 2124 2086 return; … … 2149 2111 owl_function_change_currentview_filter(argv[1]); 2150 2112 } 2151 owl_global_set_needrefresh(&g);2152 2113 owl_mainwin_redisplay(owl_global_get_mainwin(&g)); 2153 2114 } … … 2693 2654 owl_filter_set_fgcolor(f, owl_util_string_to_color(fgcolor)); 2694 2655 2695 owl_global_set_needrefresh(&g);2696 2656 owl_mainwin_redisplay(owl_global_get_mainwin(&g)); 2697 2657 return(0); … … 3407 3367 { 3408 3368 va_list ap; 3409 char buff[2048]; 3410 3411 if (!owl_global_get_curs_msgwin(&g)) return; 3369 char *str; 3412 3370 3413 3371 va_start(ap, fmt); 3414 werase(owl_global_get_curs_msgwin(&g)); 3415 3416 vsnprintf(buff, 2048, fmt, ap); 3417 owl_function_debugmsg("makemsg: %s", buff); 3418 waddstr(owl_global_get_curs_msgwin(&g), buff); 3419 owl_global_set_needrefresh(&g); 3372 str = g_strdup_vprintf(fmt, ap); 3420 3373 va_end(ap); 3374 3375 owl_function_debugmsg("makemsg: %s", str); 3376 owl_msgwin_set_text(&g.msgwin, str); 3421 3377 } 3422 3378
Note: See TracChangeset
for help on using the changeset viewer.