diff --git a/src/ChangeLog b/src/ChangeLog index faca5b747..b3a4a469a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2003-09-10 Pavel Roskin + * dlg.h: Remove "last" field from Dlg_head, it's unneeded in a + circularly linked list. + * screen.c (paint_dir): Don't make panel clean here. (panel_update_contents): Do it here. (panel_callback): Repaint the panel on focus. diff --git a/src/dlg.c b/src/dlg.c index 8e0a2d256..47631cab0 100644 --- a/src/dlg.c +++ b/src/dlg.c @@ -257,8 +257,7 @@ int add_widget (Dlg_head *where, void *what) where->current->next = where->current; where->first = where->current; where->current->prev = where->first; - where->last = where->current; - where->first->next = where->last; + where->first->next = where->current; } } else { back = where->current; @@ -272,8 +271,7 @@ int add_widget (Dlg_head *where, void *what) } where->current->prev = where->first; - where->last = where->current; - where->first->next = where->last; + where->first->next = where->current; } where->current->dlg_id = where->count; diff --git a/src/dlg.h b/src/dlg.h index c185e6517..2af16b243 100644 --- a/src/dlg.h +++ b/src/dlg.h @@ -85,7 +85,7 @@ typedef struct Dlg_head { /* Internal variables */ int count; /* number of widgets */ - struct Widget_Item *current, *first, *last; + struct Widget_Item *current, *first; dlg_cb_fn callback; struct Widget_Item *initfocus; void *previous_dialog; /* Pointer to the previously running Dlg_head */