* dlg.h: Remove unused fields in struct Widget.
* dlg.c: Adjust for the above. * layout.c: Likewise.
Этот коммит содержится в:
родитель
83b5c737aa
Коммит
9803d2ea90
@ -1,5 +1,9 @@
|
||||
2002-08-21 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* 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.
|
||||
|
||||
|
@ -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);
|
||||
|
16
src/dlg.h
16
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 */
|
||||
|
@ -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){
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user