Changeset fa65671


Ignore:
Timestamp:
Jun 2, 2010, 8:53:27 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:
3e0147f
Parents:
40d1eef
git-author:
David Benjamin <davidben@mit.edu> (06/02/10 20:50:16)
git-committer:
David Benjamin <davidben@mit.edu> (06/02/10 20:53:27)
Message:
Remove the relayout code

The signals take care of it now.
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r40d1eef rfa65671  
    5959  g->curmsg_vert_offset=0;
    6060  g->resizepending=0;
    61   g->relayoutpending = 0;
    6261  g->direction=OWL_DIRECTION_DOWNWARDS;
    6362  g->zaway=0;
     
    374373}
    375374
    376 void owl_global_set_relayout_pending(owl_global *g) {
    377   g->relayoutpending = 1;
    378 }
    379 
    380375const char *owl_global_get_homedir(const owl_global *g) {
    381376  if (g->homedir) return(g->homedir);
     
    485480}
    486481
    487 void owl_global_relayout(owl_global *g) {
    488   if (!g->relayoutpending) return;
    489   g->relayoutpending = 0;
    490 
    491   owl_function_debugmsg("Relayouting...");
    492 
    493   /* in case any styles rely on the current width */
    494   owl_messagelist_invalidate_formats(owl_global_get_msglist(g));
    495 
    496   /* recalculate the topmsg to make sure the current message is on
    497    * screen */
    498   owl_function_calculate_topmsg(OWL_DIRECTION_NONE);
    499 
    500   /* refresh stuff */
    501   owl_mainwin_redisplay(&(g->mw));
    502   sepbar_dirty();
    503 
    504   owl_function_full_redisplay();
    505 }
    506 
    507482/* debug */
    508483
  • mainpanel.c

    r135d24b rfa65671  
    5454  owl_window_set_position(mp->msgwin, 1, cols, mp->recwinlines+1, 0);
    5555  owl_window_set_position(mp->typwin, typwin_lines, cols, mp->recwinlines+2, 0);
    56 
    57   /* TEMPORARY */
    58   owl_global_set_relayout_pending(&g);
    5956}
    6057
  • mainwin.c

    r40d1eef rfa65671  
    22
    33static void owl_mainwin_redraw(owl_window *w, WINDOW *recwin, void *user_data);
     4static void owl_mainwin_resized(owl_window *w, void *user_data);
    45
    56void owl_mainwin_init(owl_mainwin *mw, owl_window *window)
     
    89  mw->lastdisplayed=-1;
    910  mw->window = g_object_ref(window);
     11  /* for now, just assume this object lasts forever */
    1012  g_signal_connect(window, "redraw", G_CALLBACK(owl_mainwin_redraw), mw);
     13  g_signal_connect(window, "resized", G_CALLBACK(owl_mainwin_resized), mw);
     14}
     15
     16static void owl_mainwin_resized(owl_window *w, void *user_data)
     17{
     18  owl_mainwin *mw = user_data;
     19
     20  /* in case any styles rely on the current width */
     21  owl_messagelist_invalidate_formats(owl_global_get_msglist(&g));
     22
     23  /* recalculate the topmsg to make sure the current message is on
     24   * screen */
     25  owl_function_calculate_topmsg(OWL_DIRECTION_NONE);
     26
     27  /* Schedule a redraw */
     28  owl_window_dirty(mw->window);
    1129}
    1230
  • owl.c

    r385fda9 rfa65671  
    458458  /* if a resize has been scheduled, deal with it */
    459459  owl_global_resize(&g, 0, 0);
    460   /* also handle relayouts */
    461   owl_global_relayout(&g);
    462460
    463461  /* update the terminal if we need to */
  • owl.h

    r40d1eef rfa65671  
    591591  int rightshift;
    592592  volatile sig_atomic_t resizepending;
    593   int relayoutpending;
    594593  char *thishost;
    595594  char *homedir;
Note: See TracChangeset for help on using the changeset viewer.