Changeset fc5eef4


Ignore:
Timestamp:
Sep 18, 2010, 5:07:40 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:
6a35938
Parents:
c394de8
git-author:
David Benjamin <davidben@mit.edu> (08/14/10 01:47:04)
git-committer:
David Benjamin <davidben@mit.edu> (09/18/10 17:07:40)
Message:
Configure owl_global_set_typwin_inactive to be called on context deactivate

This removes the explicit calls to the deactivate function. In
particular, it means that we can set up an alternate deactivate function
and edit:done needn't know about it.
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • commands.c

    rc394de8 rfc5eef4  
    26912691
    26922692  owl_global_pop_context(&g);
    2693 
    2694   owl_global_set_typwin_inactive(&g);
    26952693}
    26962694
     
    27502748   * context itself will last until the command returns. */
    27512749  owl_editwin_ref(e);
    2752   owl_global_set_typwin_inactive(&g);
    27532750  owl_global_pop_context(&g);
    27542751
  • functions.c

    rc394de8 rfc5eef4  
    288288  owl_editwin_set_callback(e, callback);
    289289  ctx = owl_editcontext_new(OWL_CTX_EDITMULTI, e, "editmulti");
     290  ctx->deactivate_cb = owl_global_deactivate_editcontext;
     291  ctx->cbdata = &g;
    290292  owl_global_push_context_obj(&g, ctx);
    291293
     
    18931895
    18941896  ctx = owl_editcontext_new(OWL_CTX_EDITLINE, tw, "editline");
     1897  ctx->deactivate_cb = owl_global_deactivate_editcontext;
     1898  ctx->cbdata = &g;
    18951899  owl_global_push_context_obj(&g, ctx);
    18961900  owl_editwin_set_callback(tw, owl_callback_command);
     
    19071911
    19081912  ctx = owl_editcontext_new(OWL_CTX_EDITRESPONSE, tw, "editresponse");
     1913  ctx->deactivate_cb = owl_global_deactivate_editcontext;
     1914  ctx->cbdata = &g;
    19091915  owl_global_push_context_obj(&g, ctx);
    19101916  return tw;
     
    19231929
    19241930  ctx = owl_editcontext_new(OWL_CTX_EDITRESPONSE, tw, "editresponse");
     1931  ctx->deactivate_cb = owl_global_deactivate_editcontext;
     1932  ctx->cbdata = &g;
    19251933  owl_global_push_context_obj(&g, ctx);
    19261934  return tw;
  • global.c

    rc394de8 rfc5eef4  
    330330                          hist);
    331331  return g->tw;
     332}
     333
     334void owl_global_deactivate_editcontext(owl_context *ctx) {
     335  owl_global *g = ctx->cbdata;
     336  owl_global_set_typwin_inactive(g);
    332337}
    333338
  • owl.h

    r1d74663 rfc5eef4  
    306306  void (*deactivate_cb)(struct _owl_context*);
    307307  void (*delete_cb)(struct _owl_context*);
     308  void *cbdata;
    308309} owl_context;
    309310
Note: See TracChangeset for help on using the changeset viewer.