Changeset 08263a8 for global.c


Ignore:
Timestamp:
Sep 18, 2010, 5:07:39 PM (11 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
9190285
Parents:
cb81570
git-author:
David Benjamin <davidben@mit.edu> (08/07/10 16:31:45)
git-committer:
David Benjamin <davidben@mit.edu> (09/18/10 17:07:39)
Message:
Add owl_editwin_get_window

This removes the need for owl_global_get_typwin_window. The remaining
references within global.c may be accessed directly as its an internal
field anyway.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    rcb81570 r08263a8  
    282282}
    283283
    284 /* underlying owl_windows */
    285 
    286 owl_window *owl_global_get_typwin_window(const owl_global *g) {
    287   return g->mainpanel.typwin;
    288 }
    289 
    290 /* typwin */
    291 
    292284/* Gets the currently active typwin out of the current context. */
    293285owl_editwin *owl_global_current_typwin(const owl_global *g) {
     
    332324
    333325  if (g->typwin_erase_id) {
    334     g_signal_handler_disconnect(owl_global_get_typwin_window(g), g->typwin_erase_id);
     326    g_signal_handler_disconnect(g->mainpanel.typwin, g->typwin_erase_id);
    335327    g->typwin_erase_id = 0;
    336328  }
    337329
    338   g->tw = owl_editwin_new(owl_global_get_typwin_window(g),
     330  g->tw = owl_editwin_new(g->mainpanel.typwin,
    339331                          owl_global_get_typwin_lines(g),
    340332                          g->cols,
     
    351343  if (!g->typwin_erase_id) {
    352344    g->typwin_erase_id =
    353       g_signal_connect(owl_global_get_typwin_window(g), "redraw", G_CALLBACK(owl_window_erase_cb), NULL);
    354   }
    355   owl_window_dirty(owl_global_get_typwin_window(g));
     345      g_signal_connect(g->mainpanel.typwin, "redraw", G_CALLBACK(owl_window_erase_cb), NULL);
     346  }
     347  owl_window_dirty(g->mainpanel.typwin);
    356348
    357349  g->tw = NULL;
Note: See TracChangeset for help on using the changeset viewer.