From 9803d2ea909572059d4bb5c7b8d42e31bbc95e54 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Thu, 22 Aug 2002 00:50:24 +0000 Subject: [PATCH] * dlg.h: Remove unused fields in struct Widget. * dlg.c: Adjust for the above. * layout.c: Likewise. --- src/ChangeLog | 4 ++++ src/dlg.c | 8 -------- src/dlg.h | 16 +--------------- src/layout.c | 8 -------- 4 files changed, 5 insertions(+), 31 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6c97da7c6..fd29ef0d7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2002-08-21 Pavel Roskin + * dlg.h: Remove unused fields in struct Widget. + * dlg.c: Adjust for the above. + * layout.c: Likewise. + * cmd.c (info_cmd_no_menu): Toggle info screen. (quick_cmd_no_menu): Toggle quick view. diff --git a/src/dlg.c b/src/dlg.c index de00fa5b2..827fc9b20 100644 --- a/src/dlg.c +++ b/src/dlg.c @@ -127,13 +127,9 @@ void init_widget (Widget *w, int y, int x, int lines, int cols, w->y = y; w->cols = cols; w->lines = lines; - w->color = -1; w->callback = callback; w->destroy = destroy; w->mouse = mouse_handler; - w->wdata = 0; - w->wcontainer = 0; - w->frame = ""; w->parent = 0; w->tkname = tkname; @@ -234,9 +230,6 @@ int add_widget (Dlg_head *where, void *what) if (!what) return 0; - /* Only used by Tk */ - widget->frame = the_frame; - widget->x += where->x; widget->y += where->y; @@ -916,7 +909,6 @@ void dlg_replace_widget (Dlg_head *h, Widget *old, Widget *new) /* We found the widget */ /* First kill the widget */ - new->focused = old->focused; new->parent = h; send_message_to (h, old, WIDGET_DESTROY, 0); (*old->destroy) (old); diff --git a/src/dlg.h b/src/dlg.h index b7696ff82..e72c4e428 100644 --- a/src/dlg.h +++ b/src/dlg.h @@ -112,26 +112,12 @@ typedef struct Dlg_head { typedef struct Widget { int x, y; int cols, lines; - int color; /* If the widget uses it, the color */ int options; - int focused; /* Tells if the widget is focused */ int (*callback)(Dlg_head *, void *, int, int); /* The callback function */ void (*destroy)(void *); mouse_h mouse; struct Dlg_head *parent; - widget_data wdata; - widget_data wcontainer; /* For children of midnight_dlg, identifies - * the frame in which they should reside - */ - char *frame; /* Tk version: frame containing it */ - char *tkname; /* Tk version: widget name */ - enum { - AREA_TOP, - AREA_LEFT, - AREA_RIGHT, - AREA_BOTTOM - } area; /* Used by X platforms, should stay here always because the size - of this structure has to be same everywhere :) */ + char *tkname; /* name used for history saving */ } Widget; /* The options for the widgets */ diff --git a/src/layout.c b/src/layout.c index 7728c5409..671b916f2 100644 --- a/src/layout.c +++ b/src/layout.c @@ -982,14 +982,6 @@ void set_display_type (int num, int type) /* We set the same size the old widget had */ widget_set_size ((Widget *) new_widget, y, x, lines, cols); - /* We wanna the new widget at the same position */ - /* XView sets wcontainer to !0 <- Not XView, but we, when we create it */ - /* Ok, the XView support code does it */ - if (old_widget && old_widget->wcontainer){ - new_widget->wcontainer = old_widget->wcontainer; - new_widget->area = old_widget->area; - } - /* We use replace to keep the circular list of the dialog in the */ /* same state. Maybe we could just kill it and then replace it */ if (midnight_dlg && old_widget){