Changeset d296c9a for functions.c


Ignore:
Timestamp:
Jul 18, 2010, 4:48:15 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:
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.
Message:
Merge branch 'owl_window'

Conflicts:
	global.c
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r7bfc613 rd296c9a  
    216216  /* redisplay etc. */
    217217  owl_mainwin_redisplay(owl_global_get_mainwin(&g));
    218   owl_global_set_needrefresh(&g);
    219218}
    220219
     
    287286  owl_editwin_set_cbdata(e, data, cleanup);
    288287  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));
    290289}
    291290
     
    786785{
    787786  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);
    790787}
    791788
     
    797794  if (shift > 0) {
    798795    owl_global_set_rightshift(&g, MAX(shift - 10, 0));
    799     owl_mainwin_redisplay(owl_global_get_mainwin(&g));
    800     owl_global_set_needrefresh(&g);
    801796  } else {
    802797    owl_function_beep();
     
    12011196  if (owl_global_is_bell(&g)) {
    12021197    beep();
    1203     owl_global_set_needrefresh(&g); /* do we really need this? */
    12041198  }
    12051199}
     
    12301224}
    12311225
    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);
     1226static 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);
    12401231}
    12411232
    12421233void owl_function_full_redisplay(void)
    12431234{
    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());
    12531236}
    12541237
     
    12621245
    12631246  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);
    12701249}
    12711250
     
    12791258
    12801259  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);
    12871262}
    12881263
     
    15441519  /* redisplay */
    15451520  owl_mainwin_redisplay(owl_global_get_mainwin(&g));
    1546   owl_global_set_needrefresh(&g);
    15471521}
    15481522
     
    15501524{
    15511525  owl_global_set_typwin_lines(&g, newsize);
    1552   owl_global_set_relayout_pending(&g);
     1526  owl_mainpanel_layout_contents(&g.mainpanel);
    15531527}
    15541528
     
    16641638    }
    16651639    owl_mainwin_redisplay(owl_global_get_mainwin(&g));
    1666     owl_global_set_needrefresh(&g);
    16671640  } else {
    16681641    owl_function_error("No message with id %d: unable to mark for (un)delete",id);
     
    17001673  owl_mainwin_redisplay(owl_global_get_mainwin(&g));
    17011674  owl_function_makemsg("%i messages marked for deletion", count);
    1702   owl_global_set_needrefresh(&g);
    17031675}
    17041676
     
    19051877
    19061878  owl_editwin_set_locktext(tw, "command: ");
    1907   owl_global_set_needrefresh(&g);
    19081879
    19091880  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));
    19131883  owl_editwin_set_callback(tw, owl_callback_command);
    19141884}
     
    19211891
    19221892  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));
    19281895  return tw;
    19291896}
     
    19381905
    19391906  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));
    19451909  return tw;
    19461910}
     
    21052069    }
    21062070    owl_filter_set_fgcolor(f, owl_util_string_to_color(argv[3]));
    2107     owl_global_set_needrefresh(&g);
    21082071    owl_mainwin_redisplay(owl_global_get_mainwin(&g));
    21092072    return;
     
    21202083    }
    21212084    owl_filter_set_bgcolor(f, owl_util_string_to_color(argv[3]));
    2122     owl_global_set_needrefresh(&g);
    21232085    owl_mainwin_redisplay(owl_global_get_mainwin(&g));
    21242086    return;
     
    21492111    owl_function_change_currentview_filter(argv[1]);
    21502112  }
    2151   owl_global_set_needrefresh(&g);
    21522113  owl_mainwin_redisplay(owl_global_get_mainwin(&g));
    21532114}
     
    26932654  owl_filter_set_fgcolor(f, owl_util_string_to_color(fgcolor));
    26942655 
    2695   owl_global_set_needrefresh(&g);
    26962656  owl_mainwin_redisplay(owl_global_get_mainwin(&g));
    26972657  return(0);
     
    34073367{
    34083368  va_list ap;
    3409   char buff[2048];
    3410 
    3411   if (!owl_global_get_curs_msgwin(&g)) return;
     3369  char *str;
    34123370
    34133371  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);
    34203373  va_end(ap);
     3374
     3375  owl_function_debugmsg("makemsg: %s", str);
     3376  owl_msgwin_set_text(&g.msgwin, str);
    34213377}
    34223378
Note: See TracChangeset for help on using the changeset viewer.