Rename Dlg_head to WDialog.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2012-09-28 11:18:45 +04:00
parent 0078874613
commit 843dcd104e
55 changed files with 273 additions and 271 deletions

View File

@ -9,8 +9,8 @@
/* main forward declarations */ /* main forward declarations */
struct Widget; struct Widget;
typedef struct Widget Widget; typedef struct Widget Widget;
struct Dlg_head; struct WDialog;
typedef struct Dlg_head Dlg_head; typedef struct WDialog WDialog;
/* Please note that the first element in all the widgets is a */ /* Please note that the first element in all the widgets is a */
/* widget variable of type Widget. We abuse this fact everywhere */ /* widget variable of type Widget. We abuse this fact everywhere */

View File

@ -60,7 +60,7 @@ button_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *
WButton *b = (WButton *) w; WButton *b = (WButton *) w;
int stop = 0; int stop = 0;
int off = 0; int off = 0;
Dlg_head *h = w->owner; WDialog *h = w->owner;
switch (msg) switch (msg)
{ {

View File

@ -287,7 +287,7 @@ buttonbar_set_label (WButtonBar * bb, int idx, const char *text,
/* Find ButtonBar widget in the dialog */ /* Find ButtonBar widget in the dialog */
WButtonBar * WButtonBar *
find_buttonbar (const Dlg_head * h) find_buttonbar (const WDialog * h)
{ {
return (WButtonBar *) find_widget_type (h, buttonbar_callback); return (WButtonBar *) find_widget_type (h, buttonbar_callback);
} }

View File

@ -41,7 +41,7 @@ struct global_keymap_t;
WButtonBar *buttonbar_new (gboolean visible); WButtonBar *buttonbar_new (gboolean visible);
void buttonbar_set_label (WButtonBar * bb, int idx, const char *text, void buttonbar_set_label (WButtonBar * bb, int idx, const char *text,
const struct global_keymap_t *keymap, const Widget * receiver); const struct global_keymap_t *keymap, const Widget * receiver);
WButtonBar *find_buttonbar (const Dlg_head * h); WButtonBar *find_buttonbar (const WDialog * h);
/*** inline functions ****************************************************************************/ /*** inline functions ****************************************************************************/

View File

@ -57,7 +57,7 @@ static cb_ret_t
check_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) check_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data)
{ {
WCheck *c = (WCheck *) w; WCheck *c = (WCheck *) w;
Dlg_head *h = w->owner; WDialog *h = w->owner;
switch (msg) switch (msg)
{ {

View File

@ -43,7 +43,7 @@
/*** global variables ****************************************************************************/ /*** global variables ****************************************************************************/
Dlg_head *midnight_dlg = NULL; WDialog *midnight_dlg = NULL;
/*** file scope macro definitions ****************************************************************/ /*** file scope macro definitions ****************************************************************/
@ -75,7 +75,7 @@ dialog_switch_suspend (void *data, void *user_data)
(void) user_data; (void) user_data;
if (data != mc_current->data) if (data != mc_current->data)
((Dlg_head *) data)->state = DLG_SUSPENDED; DIALOG (data)->state = DLG_SUSPENDED;
} }
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
@ -85,7 +85,7 @@ dialog_switch_goto (GList * dlg)
{ {
if (mc_current != dlg) if (mc_current != dlg)
{ {
Dlg_head *old = (Dlg_head *) mc_current->data; WDialog *old = DIALOG (mc_current->data);
mc_current = dlg; mc_current = dlg;
@ -100,7 +100,7 @@ dialog_switch_goto (GList * dlg)
/* switch from editor, viewer, etc to another dialog */ /* switch from editor, viewer, etc to another dialog */
old->state = DLG_SUSPENDED; old->state = DLG_SUSPENDED;
if ((Dlg_head *) dlg->data != midnight_dlg) if (DIALOG (dlg->data) != midnight_dlg)
/* switch to another editor, viewer, etc */ /* switch to another editor, viewer, etc */
/* return to panels before run the required dialog */ /* return to panels before run the required dialog */
dialog_switch_pending = TRUE; dialog_switch_pending = TRUE;
@ -119,7 +119,7 @@ dialog_switch_goto (GList * dlg)
static void static void
dlg_resize_cb (void *data, void *user_data) dlg_resize_cb (void *data, void *user_data)
{ {
Dlg_head *d = data; WDialog *d = data;
(void) user_data; (void) user_data;
if (d->state == DLG_ACTIVE) if (d->state == DLG_ACTIVE)
@ -133,7 +133,7 @@ dlg_resize_cb (void *data, void *user_data)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
void void
dialog_switch_add (Dlg_head * h) dialog_switch_add (WDialog * h)
{ {
GList *dlg; GList *dlg;
@ -154,11 +154,11 @@ dialog_switch_add (Dlg_head * h)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
void void
dialog_switch_remove (Dlg_head * h) dialog_switch_remove (WDialog * h)
{ {
GList *this; GList *this;
if ((Dlg_head *) mc_current->data == h) if (DIALOG (mc_current->data) == h)
this = mc_current; this = mc_current;
else else
this = g_list_find (mc_dialogs, h); this = g_list_find (mc_dialogs, h);
@ -167,13 +167,13 @@ dialog_switch_remove (Dlg_head * h)
/* adjust current dialog */ /* adjust current dialog */
if (top_dlg != NULL) if (top_dlg != NULL)
mc_current = g_list_find (mc_dialogs, (Dlg_head *) top_dlg->data); mc_current = g_list_find (mc_dialogs, DIALOG (top_dlg->data));
else else
mc_current = mc_dialogs; mc_current = mc_dialogs;
/* resume forced the current screen */ /* resume forced the current screen */
if (mc_current != NULL) if (mc_current != NULL)
((Dlg_head *) mc_current->data)->state = DLG_ACTIVE; DIALOG (mc_current->data)->state = DLG_ACTIVE;
} }
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
@ -240,10 +240,10 @@ dialog_switch_list (void)
for (h = mc_dialogs; h != NULL; h = g_list_next (h)) for (h = mc_dialogs; h != NULL; h = g_list_next (h))
{ {
Dlg_head *dlg; WDialog *dlg;
char *title; char *title;
dlg = (Dlg_head *) h->data; dlg = DIALOG (h->data);
if ((dlg != NULL) && (dlg->get_title != NULL)) if ((dlg != NULL) && (dlg->get_title != NULL))
title = dlg->get_title (dlg, WIDGET (listbox->list)->cols - 2); title = dlg->get_title (dlg, WIDGET (listbox->list)->cols - 2);
@ -274,7 +274,7 @@ dialog_switch_process_pending (void)
while (dialog_switch_pending) while (dialog_switch_pending)
{ {
Dlg_head *h = (Dlg_head *) mc_current->data; WDialog *h = DIALOG (mc_current->data);
dialog_switch_pending = FALSE; dialog_switch_pending = FALSE;
h->state = DLG_SUSPENDED; h->state = DLG_SUSPENDED;
@ -306,7 +306,7 @@ dialog_switch_got_winch (void)
for (dlg = mc_dialogs; dlg != NULL; dlg = g_list_next (dlg)) for (dlg = mc_dialogs; dlg != NULL; dlg = g_list_next (dlg))
if (dlg != mc_current) if (dlg != mc_current)
((Dlg_head *) dlg->data)->winch_pending = TRUE; DIALOG (dlg->data)->winch_pending = TRUE;
} }
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
@ -316,7 +316,7 @@ dialog_switch_shutdown (void)
{ {
while (mc_dialogs != NULL) while (mc_dialogs != NULL)
{ {
Dlg_head *dlg = (Dlg_head *) mc_dialogs->data; WDialog *dlg = DIALOG (mc_dialogs->data);
run_dlg (dlg); run_dlg (dlg);
destroy_dlg (dlg); destroy_dlg (dlg);

View File

@ -12,12 +12,12 @@
/*** global variables defined in .c file *********************************************************/ /*** global variables defined in .c file *********************************************************/
extern Dlg_head *midnight_dlg; extern WDialog *midnight_dlg;
/*** declarations of public functions ************************************************************/ /*** declarations of public functions ************************************************************/
void dialog_switch_add (struct Dlg_head *h); void dialog_switch_add (struct WDialog *h);
void dialog_switch_remove (struct Dlg_head *h); void dialog_switch_remove (struct WDialog *h);
size_t dialog_switch_num (void); size_t dialog_switch_num (void);
void dialog_switch_next (void); void dialog_switch_next (void);

View File

@ -85,7 +85,7 @@ typedef enum
/*** file scope functions ************************************************************************/ /*** file scope functions ************************************************************************/
static GList * static GList *
dlg_widget_next (Dlg_head * h, GList * l) dlg_widget_next (WDialog * h, GList * l)
{ {
GList *next; GList *next;
@ -99,7 +99,7 @@ dlg_widget_next (Dlg_head * h, GList * l)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static GList * static GList *
dlg_widget_prev (Dlg_head * h, GList * l) dlg_widget_prev (WDialog * h, GList * l)
{ {
GList *prev; GList *prev;
@ -118,7 +118,7 @@ dlg_widget_prev (Dlg_head * h, GList * l)
*/ */
static void static void
dlg_broadcast_msg_to (Dlg_head * h, widget_msg_t msg, gboolean reverse, int flags) dlg_broadcast_msg_to (WDialog * h, widget_msg_t msg, gboolean reverse, int flags)
{ {
GList *p, *first; GList *p, *first;
@ -156,7 +156,7 @@ dlg_broadcast_msg_to (Dlg_head * h, widget_msg_t msg, gboolean reverse, int flag
* Read histories from the ${XDG_CACHE_HOME}/mc/history file * Read histories from the ${XDG_CACHE_HOME}/mc/history file
*/ */
static void static void
dlg_read_history (Dlg_head * h) dlg_read_history (WDialog * h)
{ {
char *profile; char *profile;
ev_history_load_save_t event_data; ev_history_load_save_t event_data;
@ -178,7 +178,7 @@ dlg_read_history (Dlg_head * h)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static gboolean static gboolean
dlg_unfocus (Dlg_head * h) dlg_unfocus (WDialog * h)
{ {
/* we can unfocus disabled widget */ /* we can unfocus disabled widget */
if ((h->current != NULL) && (h->state == DLG_CONSTRUCT || h->state == DLG_ACTIVE)) if ((h->current != NULL) && (h->state == DLG_CONSTRUCT || h->state == DLG_ACTIVE))
@ -213,7 +213,7 @@ dlg_find_widget_callback (const void *a, const void *b)
*/ */
static void static void
do_select_widget (Dlg_head * h, GList * w, select_dir_t dir) do_select_widget (WDialog * h, GList * w, select_dir_t dir)
{ {
Widget *w0 = WIDGET (h->current->data); Widget *w0 = WIDGET (h->current->data);
@ -271,7 +271,7 @@ refresh_cmd (void)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
dlg_execute_cmd (Dlg_head * h, unsigned long command) dlg_execute_cmd (WDialog * h, unsigned long command)
{ {
cb_ret_t ret = MSG_HANDLED; cb_ret_t ret = MSG_HANDLED;
switch (command) switch (command)
@ -338,7 +338,7 @@ dlg_execute_cmd (Dlg_head * h, unsigned long command)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
dlg_handle_key (Dlg_head * h, int d_key) dlg_handle_key (WDialog * h, int d_key)
{ {
unsigned long command; unsigned long command;
@ -357,7 +357,7 @@ dlg_handle_key (Dlg_head * h, int d_key)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static int static int
dlg_mouse_event (Dlg_head * h, Gpm_Event * event) dlg_mouse_event (WDialog * h, Gpm_Event * event)
{ {
Widget *wh = WIDGET (h); Widget *wh = WIDGET (h);
@ -409,7 +409,7 @@ dlg_mouse_event (Dlg_head * h, Gpm_Event * event)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
dlg_try_hotkey (Dlg_head * h, int d_key) dlg_try_hotkey (WDialog * h, int d_key)
{ {
GList *hot_cur; GList *hot_cur;
Widget *current; Widget *current;
@ -476,7 +476,7 @@ dlg_try_hotkey (Dlg_head * h, int d_key)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
dlg_key_event (Dlg_head * h, int d_key) dlg_key_event (WDialog * h, int d_key)
{ {
cb_ret_t handled; cb_ret_t handled;
@ -527,7 +527,7 @@ dlg_key_event (Dlg_head * h, int d_key)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
frontend_run_dlg (Dlg_head * h) frontend_run_dlg (WDialog * h)
{ {
int d_key; int d_key;
Gpm_Event event; Gpm_Event event;
@ -589,7 +589,7 @@ dlg_find_widget_by_id (gconstpointer a, gconstpointer b)
/** draw box in window */ /** draw box in window */
void void
draw_box (const Dlg_head * h, int y, int x, int ys, int xs, gboolean single) draw_box (const WDialog * h, int y, int x, int ys, int xs, gboolean single)
{ {
const Widget *wh = WIDGET (h); const Widget *wh = WIDGET (h);
@ -600,7 +600,7 @@ draw_box (const Dlg_head * h, int y, int x, int ys, int xs, gboolean single)
/** Clean the dialog area, draw the frame and the title */ /** Clean the dialog area, draw the frame and the title */
void void
dlg_default_repaint (Dlg_head * h) dlg_default_repaint (WDialog * h)
{ {
Widget *wh = WIDGET (h); Widget *wh = WIDGET (h);
@ -627,7 +627,7 @@ dlg_default_repaint (Dlg_head * h)
/** this function allows to set dialog position */ /** this function allows to set dialog position */
void void
dlg_set_position (Dlg_head * h, int y1, int x1, int y2, int x2) dlg_set_position (WDialog * h, int y1, int x1, int y2, int x2)
{ {
Widget *wh = WIDGET (h); Widget *wh = WIDGET (h);
@ -713,7 +713,7 @@ dlg_set_position (Dlg_head * h, int y1, int x1, int y2, int x2)
/** this function sets only size, leaving positioning to automatic methods */ /** this function sets only size, leaving positioning to automatic methods */
void void
dlg_set_size (Dlg_head * h, int lines, int cols) dlg_set_size (WDialog * h, int lines, int cols)
{ {
int x = WIDGET (h)->x; int x = WIDGET (h)->x;
int y = WIDGET (h)->y; int y = WIDGET (h)->y;
@ -734,7 +734,7 @@ dlg_set_size (Dlg_head * h, int lines, int cols)
/** Default dialog callback */ /** Default dialog callback */
cb_ret_t cb_ret_t
dlg_default_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) dlg_default_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
(void) sender; (void) sender;
(void) parm; (void) parm;
@ -772,15 +772,15 @@ dlg_default_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, vo
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
Dlg_head * WDialog *
create_dlg (gboolean modal, int y1, int x1, int lines, int cols, create_dlg (gboolean modal, int y1, int x1, int lines, int cols,
const int *colors, dlg_cb_fn callback, mouse_h mouse_handler, const int *colors, dlg_cb_fn callback, mouse_h mouse_handler,
const char *help_ctx, const char *title, dlg_flags_t flags) const char *help_ctx, const char *title, dlg_flags_t flags)
{ {
Dlg_head *new_d; WDialog *new_d;
Widget *w; Widget *w;
new_d = g_new0 (Dlg_head, 1); new_d = g_new0 (WDialog, 1);
w = WIDGET (new_d); w = WIDGET (new_d);
init_widget (w, y1, x1, lines, cols, NULL, mouse_handler); init_widget (w, y1, x1, lines, cols, NULL, mouse_handler);
widget_want_cursor (w, FALSE); widget_want_cursor (w, FALSE);
@ -837,7 +837,7 @@ dlg_set_default_colors (void)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
void void
dlg_erase (Dlg_head * h) dlg_erase (WDialog * h)
{ {
if ((h != NULL) && (h->state == DLG_ACTIVE)) if ((h != NULL) && (h->state == DLG_ACTIVE))
{ {
@ -850,7 +850,7 @@ dlg_erase (Dlg_head * h)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
void void
set_idle_proc (Dlg_head * d, int enable) set_idle_proc (WDialog * d, int enable)
{ {
if (enable) if (enable)
d->flags |= DLG_WANT_IDLE; d->flags |= DLG_WANT_IDLE;
@ -864,7 +864,7 @@ set_idle_proc (Dlg_head * d, int enable)
*/ */
unsigned long unsigned long
add_widget_autopos (Dlg_head * h, void *w, widget_pos_flags_t pos_flags, const void *before) add_widget_autopos (WDialog * h, void *w, widget_pos_flags_t pos_flags, const void *before)
{ {
Widget *wh = WIDGET (h); Widget *wh = WIDGET (h);
Widget *widget = WIDGET (w); Widget *widget = WIDGET (w);
@ -923,7 +923,7 @@ add_widget_autopos (Dlg_head * h, void *w, widget_pos_flags_t pos_flags, const v
/** wrapper to simply add lefttop positioned controls */ /** wrapper to simply add lefttop positioned controls */
unsigned long unsigned long
add_widget (Dlg_head * h, void *w) add_widget (WDialog * h, void *w)
{ {
return add_widget_autopos (h, w, WPOS_KEEP_DEFAULT, return add_widget_autopos (h, w, WPOS_KEEP_DEFAULT,
h->current != NULL ? h->current->data : NULL); h->current != NULL ? h->current->data : NULL);
@ -932,7 +932,7 @@ add_widget (Dlg_head * h, void *w)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
unsigned long unsigned long
add_widget_before (Dlg_head * h, void *w, void *before) add_widget_before (WDialog * h, void *w, void *before)
{ {
return add_widget_autopos (h, w, WPOS_KEEP_DEFAULT, before); return add_widget_autopos (h, w, WPOS_KEEP_DEFAULT, before);
} }
@ -943,7 +943,7 @@ add_widget_before (Dlg_head * h, void *w, void *before)
void void
del_widget (void *w) del_widget (void *w)
{ {
Dlg_head *h = WIDGET (w)->owner; WDialog *h = WIDGET (w)->owner;
GList *d; GList *d;
/* Don't accept NULL widget. This shouldn't happen */ /* Don't accept NULL widget. This shouldn't happen */
@ -976,18 +976,18 @@ do_refresh (void)
if (fast_refresh) if (fast_refresh)
{ {
if ((d != NULL) && (d->data != NULL)) if ((d != NULL) && (d->data != NULL))
dlg_redraw ((Dlg_head *) d->data); dlg_redraw (DIALOG (d->data));
} }
else else
{ {
/* Search first fullscreen dialog */ /* Search first fullscreen dialog */
for (; d != NULL; d = g_list_next (d)) for (; d != NULL; d = g_list_next (d))
if ((d->data != NULL) && ((Dlg_head *) d->data)->fullscreen) if (d->data != NULL && DIALOG (d->data)->fullscreen)
break; break;
/* back to top dialog */ /* back to top dialog */
for (; d != NULL; d = g_list_previous (d)) for (; d != NULL; d = g_list_previous (d))
if (d->data != NULL) if (d->data != NULL)
dlg_redraw ((Dlg_head *) d->data); dlg_redraw (DIALOG (d->data));
} }
} }
@ -995,7 +995,7 @@ do_refresh (void)
/** broadcast a message to all the widgets in a dialog */ /** broadcast a message to all the widgets in a dialog */
void void
dlg_broadcast_msg (Dlg_head * h, widget_msg_t msg) dlg_broadcast_msg (WDialog * h, widget_msg_t msg)
{ {
dlg_broadcast_msg_to (h, msg, FALSE, 0); dlg_broadcast_msg_to (h, msg, FALSE, 0);
} }
@ -1003,7 +1003,7 @@ dlg_broadcast_msg (Dlg_head * h, widget_msg_t msg)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
gboolean gboolean
dlg_focus (Dlg_head * h) dlg_focus (WDialog * h)
{ {
/* cannot focus disabled widget */ /* cannot focus disabled widget */
if ((h->current != NULL) && (h->state == DLG_CONSTRUCT || h->state == DLG_ACTIVE)) if ((h->current != NULL) && (h->state == DLG_CONSTRUCT || h->state == DLG_ACTIVE))
@ -1036,7 +1036,7 @@ dlg_overlap (Widget * a, Widget * b)
/** Find the widget with the given callback in the dialog h */ /** Find the widget with the given callback in the dialog h */
Widget * Widget *
find_widget_type (const Dlg_head * h, widget_cb_fn callback) find_widget_type (const WDialog * h, widget_cb_fn callback)
{ {
GList *w; GList *w;
@ -1049,7 +1049,7 @@ find_widget_type (const Dlg_head * h, widget_cb_fn callback)
/** Find the widget with the given id */ /** Find the widget with the given id */
Widget * Widget *
dlg_find_by_id (const Dlg_head * h, unsigned long id) dlg_find_by_id (const WDialog * h, unsigned long id)
{ {
GList *w; GList *w;
@ -1061,7 +1061,7 @@ dlg_find_by_id (const Dlg_head * h, unsigned long id)
/** Find the widget with the given id in the dialog h and select it */ /** Find the widget with the given id in the dialog h and select it */
void void
dlg_select_by_id (const Dlg_head * h, unsigned long id) dlg_select_by_id (const WDialog * h, unsigned long id)
{ {
Widget *w; Widget *w;
@ -1079,7 +1079,7 @@ void
dlg_select_widget (void *w) dlg_select_widget (void *w)
{ {
Widget *widget = WIDGET (w); Widget *widget = WIDGET (w);
Dlg_head *h = widget->owner; WDialog *h = widget->owner;
do_select_widget (h, g_list_find (h->widgets, widget), SELECT_EXACT); do_select_widget (h, g_list_find (h->widgets, widget), SELECT_EXACT);
} }
@ -1094,7 +1094,7 @@ void
dlg_set_top_widget (void *w) dlg_set_top_widget (void *w)
{ {
Widget *widget = WIDGET (w); Widget *widget = WIDGET (w);
Dlg_head *h = widget->owner; WDialog *h = widget->owner;
GList *l; GList *l;
l = g_list_find (h->widgets, w); l = g_list_find (h->widgets, w);
@ -1115,7 +1115,7 @@ dlg_set_top_widget (void *w)
/** Try to select previous widget in the tab order */ /** Try to select previous widget in the tab order */
void void
dlg_one_up (Dlg_head * h) dlg_one_up (WDialog * h)
{ {
if (h->widgets != NULL) if (h->widgets != NULL)
do_select_widget (h, dlg_widget_prev (h, h->current), SELECT_PREV); do_select_widget (h, dlg_widget_prev (h, h->current), SELECT_PREV);
@ -1125,7 +1125,7 @@ dlg_one_up (Dlg_head * h)
/** Try to select next widget in the tab order */ /** Try to select next widget in the tab order */
void void
dlg_one_down (Dlg_head * h) dlg_one_down (WDialog * h)
{ {
if (h->widgets != NULL) if (h->widgets != NULL)
do_select_widget (h, dlg_widget_next (h, h->current), SELECT_NEXT); do_select_widget (h, dlg_widget_next (h, h->current), SELECT_NEXT);
@ -1134,7 +1134,7 @@ dlg_one_down (Dlg_head * h)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
void void
update_cursor (Dlg_head * h) update_cursor (WDialog * h)
{ {
GList *p = h->current; GList *p = h->current;
@ -1170,7 +1170,7 @@ update_cursor (Dlg_head * h)
*/ */
void void
dlg_redraw (Dlg_head * h) dlg_redraw (WDialog * h)
{ {
if (h->state != DLG_ACTIVE) if (h->state != DLG_ACTIVE)
return; return;
@ -1189,7 +1189,7 @@ dlg_redraw (Dlg_head * h)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
void void
dlg_stop (Dlg_head * h) dlg_stop (WDialog * h)
{ {
h->state = DLG_CLOSED; h->state = DLG_CLOSED;
} }
@ -1198,9 +1198,9 @@ dlg_stop (Dlg_head * h)
/** Init the process */ /** Init the process */
void void
init_dlg (Dlg_head * h) init_dlg (WDialog * h)
{ {
if ((top_dlg != NULL) && ((Dlg_head *) top_dlg->data)->modal) if (top_dlg != NULL && DIALOG (top_dlg->data)->modal)
h->modal = TRUE; h->modal = TRUE;
/* add dialog to the stack */ /* add dialog to the stack */
@ -1231,7 +1231,7 @@ init_dlg (Dlg_head * h)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
void void
dlg_process_event (Dlg_head * h, int key, Gpm_Event * event) dlg_process_event (WDialog * h, int key, Gpm_Event * event)
{ {
if (key == EV_NONE) if (key == EV_NONE)
{ {
@ -1252,7 +1252,7 @@ dlg_process_event (Dlg_head * h, int key, Gpm_Event * event)
/** Shutdown the run_dlg */ /** Shutdown the run_dlg */
void void
dlg_run_done (Dlg_head * h) dlg_run_done (WDialog * h)
{ {
top_dlg = g_list_remove (top_dlg, h); top_dlg = g_list_remove (top_dlg, h);
@ -1274,7 +1274,7 @@ dlg_run_done (Dlg_head * h)
*/ */
int int
run_dlg (Dlg_head * h) run_dlg (WDialog * h)
{ {
init_dlg (h); init_dlg (h);
frontend_run_dlg (h); frontend_run_dlg (h);
@ -1285,7 +1285,7 @@ run_dlg (Dlg_head * h)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
void void
destroy_dlg (Dlg_head * h) destroy_dlg (WDialog * h)
{ {
/* if some widgets have history, save all history at one moment here */ /* if some widgets have history, save all history at one moment here */
dlg_save_history (h); dlg_save_history (h);
@ -1306,7 +1306,7 @@ destroy_dlg (Dlg_head * h)
* Write history to the ${XDG_CACHE_HOME}/mc/history file * Write history to the ${XDG_CACHE_HOME}/mc/history file
*/ */
void void
dlg_save_history (Dlg_head * h) dlg_save_history (WDialog * h)
{ {
char *profile; char *profile;
int i; int i;
@ -1340,7 +1340,7 @@ dlg_save_history (Dlg_head * h)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
char * char *
dlg_get_title (const Dlg_head * h, size_t len) dlg_get_title (const WDialog * h, size_t len)
{ {
char *t; char *t;
@ -1361,7 +1361,7 @@ dlg_get_title (const Dlg_head * h, size_t len)
void void
dlg_replace_widget (Widget * old_w, Widget * new_w) dlg_replace_widget (Widget * old_w, Widget * new_w)
{ {
Dlg_head *h = old_w->owner; WDialog *h = old_w->owner;
gboolean should_focus = FALSE; gboolean should_focus = FALSE;
if (h->widgets == NULL) if (h->widgets == NULL)

View File

@ -16,7 +16,9 @@
#include "lib/keybind.h" /* global_keymap_t */ #include "lib/keybind.h" /* global_keymap_t */
#include "lib/tty/mouse.h" /* mouse_h */ #include "lib/tty/mouse.h" /* mouse_h */
/*** defined constants ***************************************************************************/ /*** typedefs(not structures) and defined constants **********************************************/
#define DIALOG(x) ((WDialog *)(x))
/* Common return values */ /* Common return values */
#define B_EXIT 0 #define B_EXIT 0
@ -84,19 +86,19 @@ typedef enum
typedef char *(*dlg_shortcut_str) (unsigned long command); typedef char *(*dlg_shortcut_str) (unsigned long command);
/* get dialog name to show in dialog list */ /* get dialog name to show in dialog list */
typedef char *(*dlg_title_str) (const Dlg_head * h, size_t len); typedef char *(*dlg_title_str) (const WDialog * h, size_t len);
typedef int dlg_colors_t[DLG_COLOR_COUNT]; typedef int dlg_colors_t[DLG_COLOR_COUNT];
/* Dialog callback */ /* Dialog callback */
typedef cb_ret_t (*dlg_cb_fn) (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data); typedef cb_ret_t (*dlg_cb_fn) (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data);
/* menu command execution */ /* menu command execution */
typedef cb_ret_t (*menu_exec_fn) (int command); typedef cb_ret_t (*menu_exec_fn) (int command);
/*** structures declarations (and typedefs of structures)*****************************************/ /*** structures declarations (and typedefs of structures)*****************************************/
struct Dlg_head struct WDialog
{ {
Widget widget; Widget widget;
@ -147,70 +149,70 @@ extern const global_keymap_t *dialog_map;
/*** declarations of public functions ************************************************************/ /*** declarations of public functions ************************************************************/
/* draw box in window */ /* draw box in window */
void draw_box (const Dlg_head * h, int y, int x, int ys, int xs, gboolean single); void draw_box (const WDialog * h, int y, int x, int ys, int xs, gboolean single);
/* Creates a dialog head */ /* Creates a dialog head */
Dlg_head *create_dlg (gboolean modal, int y1, int x1, int lines, int cols, WDialog *create_dlg (gboolean modal, int y1, int x1, int lines, int cols,
const int *colors, dlg_cb_fn callback, mouse_h mouse_handler, const int *colors, dlg_cb_fn callback, mouse_h mouse_handler,
const char *help_ctx, const char *title, dlg_flags_t flags); const char *help_ctx, const char *title, dlg_flags_t flags);
void dlg_set_default_colors (void); void dlg_set_default_colors (void);
unsigned long add_widget_autopos (Dlg_head * dest, void *w, widget_pos_flags_t pos_flags, unsigned long add_widget_autopos (WDialog * dest, void *w, widget_pos_flags_t pos_flags,
const void *before); const void *before);
unsigned long add_widget (Dlg_head * dest, void *w); unsigned long add_widget (WDialog * dest, void *w);
unsigned long add_widget_before (Dlg_head * h, void *w, void *before); unsigned long add_widget_before (WDialog * h, void *w, void *before);
void del_widget (void *w); void del_widget (void *w);
/* sets size of dialog, leaving positioning to automatic mehtods /* sets size of dialog, leaving positioning to automatic mehtods
according to dialog flags */ according to dialog flags */
void dlg_set_size (Dlg_head * h, int lines, int cols); void dlg_set_size (WDialog * h, int lines, int cols);
/* this function allows to set dialog position */ /* this function allows to set dialog position */
void dlg_set_position (Dlg_head * h, int y1, int x1, int y2, int x2); void dlg_set_position (WDialog * h, int y1, int x1, int y2, int x2);
void init_dlg (Dlg_head * h); void init_dlg (WDialog * h);
int run_dlg (Dlg_head * d); int run_dlg (WDialog * d);
void destroy_dlg (Dlg_head * h); void destroy_dlg (WDialog * h);
void dlg_run_done (Dlg_head * h); void dlg_run_done (WDialog * h);
void dlg_save_history (Dlg_head * h); void dlg_save_history (WDialog * h);
void dlg_process_event (Dlg_head * h, int key, Gpm_Event * event); void dlg_process_event (WDialog * h, int key, Gpm_Event * event);
char *dlg_get_title (const Dlg_head * h, size_t len); char *dlg_get_title (const WDialog * h, size_t len);
/* To activate/deactivate the idle message generation */ /* To activate/deactivate the idle message generation */
void set_idle_proc (Dlg_head * d, int enable); void set_idle_proc (WDialog * d, int enable);
void dlg_redraw (Dlg_head * h); void dlg_redraw (WDialog * h);
void dlg_broadcast_msg (Dlg_head * h, widget_msg_t message); void dlg_broadcast_msg (WDialog * h, widget_msg_t message);
/* Default callback for dialogs */ /* Default callback for dialogs */
cb_ret_t dlg_default_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data); cb_ret_t dlg_default_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data);
/* Default paint routine for dialogs */ /* Default paint routine for dialogs */
void dlg_default_repaint (Dlg_head * h); void dlg_default_repaint (WDialog * h);
void dlg_replace_widget (Widget * old, Widget * new); void dlg_replace_widget (Widget * old, Widget * new);
int dlg_overlap (Widget * a, Widget * b); int dlg_overlap (Widget * a, Widget * b);
void dlg_erase (Dlg_head * h); void dlg_erase (WDialog * h);
void dlg_stop (Dlg_head * h); void dlg_stop (WDialog * h);
/* Widget selection */ /* Widget selection */
void dlg_select_widget (void *w); void dlg_select_widget (void *w);
void dlg_set_top_widget (void *w); void dlg_set_top_widget (void *w);
void dlg_one_up (Dlg_head * h); void dlg_one_up (WDialog * h);
void dlg_one_down (Dlg_head * h); void dlg_one_down (WDialog * h);
gboolean dlg_focus (Dlg_head * h); gboolean dlg_focus (WDialog * h);
Widget *find_widget_type (const Dlg_head * h, widget_cb_fn callback); Widget *find_widget_type (const WDialog * h, widget_cb_fn callback);
Widget *dlg_find_by_id (const Dlg_head * h, unsigned long id); Widget *dlg_find_by_id (const WDialog * h, unsigned long id);
void dlg_select_by_id (const Dlg_head * h, unsigned long id); void dlg_select_by_id (const WDialog * h, unsigned long id);
/* Redraw all dialogs */ /* Redraw all dialogs */
void do_refresh (void); void do_refresh (void);
/* Used in load_prompt() */ /* Used in load_prompt() */
void update_cursor (Dlg_head * h); void update_cursor (WDialog * h);
/*** inline functions ****************************************************************************/ /*** inline functions ****************************************************************************/
@ -224,7 +226,7 @@ dlg_widget_active (void *w)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static inline unsigned long static inline unsigned long
dlg_get_current_widget_id (const struct Dlg_head *h) dlg_get_current_widget_id (const struct WDialog *h)
{ {
return WIDGET (h->current->data)->id; return WIDGET (h->current->data)->id;
} }

View File

@ -62,7 +62,7 @@ static cb_ret_t
gauge_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) gauge_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data)
{ {
WGauge *g = (WGauge *) w; WGauge *g = (WGauge *) w;
Dlg_head *h = w->owner; WDialog *h = w->owner;
if (msg == WIDGET_INIT) if (msg == WIDGET_INIT)
return MSG_HANDLED; return MSG_HANDLED;

View File

@ -73,7 +73,7 @@ typedef struct
/*** file scope functions ************************************************************************/ /*** file scope functions ************************************************************************/
static cb_ret_t static cb_ret_t
history_dlg_reposition (Dlg_head * dlg_head) history_dlg_reposition (WDialog * dlg_head)
{ {
history_dlg_data *data; history_dlg_data *data;
int x = 0, y, he, wi; int x = 0, y, he, wi;
@ -117,7 +117,7 @@ history_dlg_reposition (Dlg_head * dlg_head)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
history_dlg_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) history_dlg_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
switch (msg) switch (msg)
{ {
@ -292,7 +292,7 @@ history_show (GList ** history, Widget * widget, int current)
GList *z, *hlist = NULL, *hi; GList *z, *hlist = NULL, *hi;
size_t maxlen, i, count = 0; size_t maxlen, i, count = 0;
char *r = NULL; char *r = NULL;
Dlg_head *query_dlg; WDialog *query_dlg;
WListbox *query_list; WListbox *query_list;
history_dlg_data hist_data; history_dlg_data hist_data;

View File

@ -57,7 +57,7 @@ static cb_ret_t
hline_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) hline_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data)
{ {
WHLine *l = (WHLine *) w; WHLine *l = (WHLine *) w;
Dlg_head *h = w->owner; WDialog *h = w->owner;
switch (msg) switch (msg)
{ {

View File

@ -1048,7 +1048,7 @@ insert_text (WInput * in, char *text, ssize_t size)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
query_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) query_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
static char buff[MB_LEN_MAX] = ""; static char buff[MB_LEN_MAX] = "";
static int bl = 0; static int bl = 0;
@ -1281,7 +1281,7 @@ complete_engine (WInput * in, int what_to_do)
int x, y, w, h; int x, y, w, h;
int start_x, start_y; int start_x, start_y;
char **p, *q; char **p, *q;
Dlg_head *query_dlg; WDialog *query_dlg;
WListbox *query_list; WListbox *query_list;
for (p = in->completions + 1; *p != NULL; count++, p++) for (p = in->completions + 1; *p != NULL; count++, p++)

View File

@ -60,7 +60,7 @@ static cb_ret_t
label_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) label_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data)
{ {
WLabel *l = (WLabel *) w; WLabel *l = (WLabel *) w;
Dlg_head *h = w->owner; WDialog *h = w->owner;
switch (msg) switch (msg)
{ {

View File

@ -16,7 +16,7 @@
typedef struct typedef struct
{ {
struct Dlg_head *dlg; struct WDialog *dlg;
struct WListbox *list; struct WListbox *list;
} Listbox; } Listbox;

View File

@ -122,7 +122,7 @@ static void
listbox_draw (WListbox * l, gboolean focused) listbox_draw (WListbox * l, gboolean focused)
{ {
Widget *w = WIDGET (l); Widget *w = WIDGET (l);
const Dlg_head *h = w->owner; const WDialog *h = w->owner;
const gboolean disabled = (w->options & W_DISABLED) != 0; const gboolean disabled = (w->options & W_DISABLED) != 0;
const int normalc = disabled ? DISABLED_COLOR : h->color[DLG_COLOR_NORMAL]; const int normalc = disabled ? DISABLED_COLOR : h->color[DLG_COLOR_NORMAL];
/* *INDENT-OFF* */ /* *INDENT-OFF* */
@ -368,7 +368,7 @@ static cb_ret_t
listbox_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) listbox_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data)
{ {
WListbox *l = (WListbox *) w; WListbox *l = (WListbox *) w;
Dlg_head *h = w->owner; WDialog *h = w->owner;
cb_ret_t ret_code; cb_ret_t ret_code;
switch (msg) switch (msg)

View File

@ -235,7 +235,7 @@ menubar_draw (WMenuBar * menubar)
static void static void
menubar_remove (WMenuBar * menubar) menubar_remove (WMenuBar * menubar)
{ {
Dlg_head *h; WDialog *h;
if (!menubar->is_dropped) if (!menubar->is_dropped)
return; return;
@ -913,7 +913,7 @@ menubar_arrange (WMenuBar * menubar)
/** Find MenuBar widget in the dialog */ /** Find MenuBar widget in the dialog */
WMenuBar * WMenuBar *
find_menubar (const Dlg_head * h) find_menubar (const WDialog * h)
{ {
return (WMenuBar *) find_widget_type (h, menubar_callback); return (WMenuBar *) find_widget_type (h, menubar_callback);
} }

View File

@ -65,7 +65,7 @@ void menubar_set_menu (WMenuBar * menubar, GList * menu);
void menubar_add_menu (WMenuBar * menubar, Menu * menu); void menubar_add_menu (WMenuBar * menubar, Menu * menu);
void menubar_arrange (WMenuBar * menubar); void menubar_arrange (WMenuBar * menubar);
WMenuBar *find_menubar (const Dlg_head * h); WMenuBar *find_menubar (const WDialog * h);
/*** inline functions ****************************************************************************/ /*** inline functions ****************************************************************************/

View File

@ -183,7 +183,7 @@ quick_dialog_skip (quick_dialog_t * quick_dlg, int nskip)
size_t i; size_t i;
quick_widget_t *quick_widget; quick_widget_t *quick_widget;
WGroupbox *g = NULL; WGroupbox *g = NULL;
Dlg_head *dd; WDialog *dd;
int return_val; int return_val;
len = str_term_width1 (I18N (quick_dlg->title)) + 6; len = str_term_width1 (I18N (quick_dlg->title)) + 6;

View File

@ -58,7 +58,7 @@ radio_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
{ {
WRadio *r = (WRadio *) w; WRadio *r = (WRadio *) w;
int i; int i;
Dlg_head *h = w->owner; WDialog *h = w->owner;
switch (msg) switch (msg)
{ {

View File

@ -233,7 +233,7 @@ widget_set_size (Widget * widget, int y, int x, int lines, int cols)
void void
widget_selectcolor (Widget * w, gboolean focused, gboolean hotkey) widget_selectcolor (Widget * w, gboolean focused, gboolean hotkey)
{ {
Dlg_head *h = w->owner; WDialog *h = w->owner;
int color; int color;
if ((w->options & W_DISABLED) != 0) if ((w->options & W_DISABLED) != 0)

View File

@ -96,7 +96,7 @@ struct Widget
widget_cb_fn callback; widget_cb_fn callback;
mouse_h mouse; mouse_h mouse;
void (*set_options) (Widget *w, widget_options_t options, gboolean enable); void (*set_options) (Widget *w, widget_options_t options, gboolean enable);
struct Dlg_head *owner; struct WDialog *owner;
}; };
/* structure for label (caption) with hotkey, if original text does not contain /* structure for label (caption) with hotkey, if original text does not contain

View File

@ -53,7 +53,7 @@
/*** file scope variables ************************************************************************/ /*** file scope variables ************************************************************************/
static Dlg_head *last_query_dlg; static WDialog *last_query_dlg;
static int sel_pos = 0; static int sel_pos = 0;
@ -63,7 +63,7 @@ static int sel_pos = 0;
/** default query callback, used to reposition query */ /** default query callback, used to reposition query */
static cb_ret_t static cb_ret_t
query_default_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) query_default_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
switch (msg) switch (msg)
{ {
@ -71,14 +71,14 @@ query_default_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm,
if ((h->flags & DLG_CENTER) == 0) if ((h->flags & DLG_CENTER) == 0)
{ {
Widget *wh = WIDGET (h); Widget *wh = WIDGET (h);
Dlg_head *prev_dlg = NULL; WDialog *prev_dlg = NULL;
int ypos, xpos; int ypos, xpos;
/* get dialog under h */ /* get dialog under h */
if (top_dlg != NULL) if (top_dlg != NULL)
{ {
if (top_dlg->data != (void *) h) if (top_dlg->data != (void *) h)
prev_dlg = (Dlg_head *) top_dlg->data; prev_dlg = DIALOG (top_dlg->data);
else else
{ {
GList *p; GList *p;
@ -87,7 +87,7 @@ query_default_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm,
Get previous dialog in stack */ Get previous dialog in stack */
p = g_list_next (top_dlg); p = g_list_next (top_dlg);
if (p != NULL) if (p != NULL)
prev_dlg = (Dlg_head *) p->data; prev_dlg = DIALOG (p->data);
} }
} }
@ -114,11 +114,11 @@ query_default_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm,
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
/** Create message dialog */ /** Create message dialog */
static struct Dlg_head * static struct WDialog *
do_create_message (int flags, const char *title, const char *text) do_create_message (int flags, const char *title, const char *text)
{ {
char *p; char *p;
Dlg_head *d; WDialog *d;
/* Add empty lines before and after the message */ /* Add empty lines before and after the message */
p = g_strconcat ("\n", text, "\n", (char *) NULL); p = g_strconcat ("\n", text, "\n", (char *) NULL);
@ -143,7 +143,7 @@ do_create_message (int flags, const char *title, const char *text)
static void static void
fg_message (int flags, const char *title, const char *text) fg_message (int flags, const char *title, const char *text)
{ {
Dlg_head *d; WDialog *d;
d = do_create_message (flags, title, text); d = do_create_message (flags, title, text);
tty_getch (); tty_getch ();
@ -270,7 +270,7 @@ int
query_dialog (const char *header, const char *text, int flags, int count, ...) query_dialog (const char *header, const char *text, int flags, int count, ...)
{ {
va_list ap; va_list ap;
Dlg_head *query_dlg; WDialog *query_dlg;
WButton *button; WButton *button;
WButton *defbutton = NULL; WButton *defbutton = NULL;
int win_len = 0; int win_len = 0;
@ -376,11 +376,11 @@ query_set_sel (int new_sel)
* destroy_dlg() to dismiss it. Not safe to call from background. * destroy_dlg() to dismiss it. Not safe to call from background.
*/ */
struct Dlg_head * struct WDialog *
create_message (int flags, const char *title, const char *text, ...) create_message (int flags, const char *title, const char *text, ...)
{ {
va_list args; va_list args;
Dlg_head *d; WDialog *d;
char *p; char *p;
va_start (args, text); va_start (args, text);

View File

@ -41,8 +41,8 @@ int query_dialog (const char *header, const char *text, int flags, int count, ..
void query_set_sel (int new_sel); void query_set_sel (int new_sel);
/* Create message box but don't dismiss it yet, not background safe */ /* Create message box but don't dismiss it yet, not background safe */
struct Dlg_head *create_message (int flags, const char *title, struct WDialog *create_message (int flags, const char *title,
const char *text, ...) __attribute__ ((format (__printf__, 3, 4))); const char *text, ...) __attribute__ ((format (__printf__, 3, 4)));
/* Show message box, background safe */ /* Show message box, background safe */
void message (int flags, const char *title, const char *text, ...) void message (int flags, const char *title, const char *text, ...)

View File

@ -2860,7 +2860,7 @@ dview_update (WDiff * dview)
static void static void
dview_edit (WDiff * dview, diff_place_t ord) dview_edit (WDiff * dview, diff_place_t ord)
{ {
Dlg_head *h; WDialog *h;
gboolean h_modal; gboolean h_modal;
int linenum, lineofs; int linenum, lineofs;
@ -2937,7 +2937,7 @@ static void
dview_labels (WDiff * dview) dview_labels (WDiff * dview)
{ {
Widget *d; Widget *d;
Dlg_head *h; WDialog *h;
WButtonBar *b; WButtonBar *b;
d = WIDGET (dview); d = WIDGET (dview);
@ -3307,7 +3307,7 @@ static cb_ret_t
dview_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) dview_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data)
{ {
WDiff *dview = (WDiff *) w; WDiff *dview = (WDiff *) w;
Dlg_head *h = w->owner; WDialog *h = w->owner;
cb_ret_t i; cb_ret_t i;
switch (msg) switch (msg)
@ -3352,7 +3352,7 @@ dview_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
dview_adjust_size (Dlg_head * h) dview_adjust_size (WDialog * h)
{ {
WDiff *dview; WDiff *dview;
WButtonBar *bar; WButtonBar *bar;
@ -3369,7 +3369,7 @@ dview_adjust_size (Dlg_head * h)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
dview_dialog_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) dview_dialog_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
WDiff *dview = (WDiff *) data; WDiff *dview = (WDiff *) data;
@ -3409,7 +3409,7 @@ dview_dialog_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, v
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static char * static char *
dview_get_title (const Dlg_head * h, size_t len) dview_get_title (const WDialog * h, size_t len)
{ {
const WDiff *dview; const WDiff *dview;
const char *modified = " (*) "; const char *modified = " (*) ";
@ -3439,7 +3439,7 @@ diff_view (const char *file1, const char *file2, const char *label1, const char
int error; int error;
WDiff *dview; WDiff *dview;
Widget *w; Widget *w;
Dlg_head *dview_dlg; WDialog *dview_dlg;
/* Create dialog and widgets, put them on the dialog */ /* Create dialog and widgets, put them on the dialog */
dview_dlg = dview_dlg =

View File

@ -172,12 +172,12 @@ extern char *edit_window_close_char;
/*** declarations of public functions ************************************************************/ /*** declarations of public functions ************************************************************/
gboolean edit_add_window (Dlg_head * h, int y, int x, int lines, int cols, gboolean edit_add_window (WDialog * h, int y, int x, int lines, int cols,
const vfs_path_t * f, long fline); const vfs_path_t * f, long fline);
WEdit *find_editor (const Dlg_head * h); WEdit *find_editor (const WDialog * h);
gboolean edit_widget_is_editor (const Widget * w); gboolean edit_widget_is_editor (const Widget * w);
gboolean edit_drop_hotkey_menu (Dlg_head * h, int key); gboolean edit_drop_hotkey_menu (WDialog * h, int key);
void edit_menu_cmd (Dlg_head * h); void edit_menu_cmd (WDialog * h);
void user_menu (WEdit * edit, const char *menu_file, int selected_entry); void user_menu (WEdit * edit, const char *menu_file, int selected_entry);
void edit_init_menu (struct WMenuBar *menubar); void edit_init_menu (struct WMenuBar *menubar);
void edit_save_mode_cmd (void); void edit_save_mode_cmd (void);
@ -228,9 +228,9 @@ WEdit *edit_init (WEdit * edit, int y, int x, int lines, int cols,
const vfs_path_t * filename_vpath, long line); const vfs_path_t * filename_vpath, long line);
gboolean edit_clean (WEdit * edit); gboolean edit_clean (WEdit * edit);
gboolean edit_ok_to_exit (WEdit * edit); gboolean edit_ok_to_exit (WEdit * edit);
gboolean edit_load_cmd (Dlg_head * h); gboolean edit_load_cmd (WDialog * h);
gboolean edit_load_syntax_file (Dlg_head * h); gboolean edit_load_syntax_file (WDialog * h);
gboolean edit_load_menu_file (Dlg_head * h); gboolean edit_load_menu_file (WDialog * h);
gboolean edit_close_cmd (WEdit * edit); gboolean edit_close_cmd (WEdit * edit);
void edit_mark_cmd (WEdit * edit, gboolean unmark); void edit_mark_cmd (WEdit * edit, gboolean unmark);
void edit_mark_current_word_cmd (WEdit * edit); void edit_mark_current_word_cmd (WEdit * edit);
@ -265,10 +265,10 @@ gboolean edit_load_back_cmd (WEdit * edit);
gboolean edit_load_forward_cmd (WEdit * edit); gboolean edit_load_forward_cmd (WEdit * edit);
void edit_block_process_cmd (WEdit * edit, int macro_number); void edit_block_process_cmd (WEdit * edit, int macro_number);
void edit_refresh_cmd (void); void edit_refresh_cmd (void);
void edit_syntax_onoff_cmd (Dlg_head * h); void edit_syntax_onoff_cmd (WDialog * h);
void edit_show_tabs_tws_cmd (Dlg_head * h); void edit_show_tabs_tws_cmd (WDialog * h);
void edit_show_margin_cmd (Dlg_head * h); void edit_show_margin_cmd (WDialog * h);
void edit_show_numbers_cmd (Dlg_head * h); void edit_show_numbers_cmd (WDialog * h);
void edit_date_cmd (WEdit * edit); void edit_date_cmd (WEdit * edit);
void edit_goto_cmd (WEdit * edit); void edit_goto_cmd (WEdit * edit);
int eval_marks (WEdit * edit, off_t * start_mark, off_t * end_mark); int eval_marks (WEdit * edit, off_t * start_mark, off_t * end_mark);
@ -321,7 +321,7 @@ gboolean edit_line_is_blank (WEdit * edit, long line);
gboolean is_break_char (char c); gboolean is_break_char (char c);
long edit_indent_width (const WEdit * edit, off_t p); long edit_indent_width (const WEdit * edit, off_t p);
void edit_insert_indent (WEdit * edit, int indent); void edit_insert_indent (WEdit * edit, int indent);
void edit_options_dialog (Dlg_head * h); void edit_options_dialog (WDialog * h);
void edit_syntax_dialog (WEdit * edit); void edit_syntax_dialog (WEdit * edit);
void edit_mail_dialog (WEdit * edit); void edit_mail_dialog (WEdit * edit);
void format_paragraph (WEdit * edit, int force); void format_paragraph (WEdit * edit, int force);

View File

@ -118,7 +118,7 @@ static unsigned long edit_save_mode_radio_id, edit_save_mode_input_id;
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
edit_save_mode_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) edit_save_mode_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
switch (msg) switch (msg)
{ {
@ -535,7 +535,7 @@ edit_save_cmd (WEdit * edit)
*/ */
static inline gboolean static inline gboolean
edit_load_file_from_filename (Dlg_head * h, const vfs_path_t * vpath) edit_load_file_from_filename (WDialog * h, const vfs_path_t * vpath)
{ {
Widget *w = WIDGET (h); Widget *w = WIDGET (h);
@ -1521,7 +1521,7 @@ edit_refresh_cmd (void)
*/ */
void void
edit_syntax_onoff_cmd (Dlg_head * h) edit_syntax_onoff_cmd (WDialog * h)
{ {
option_syntax_highlighting = !option_syntax_highlighting; option_syntax_highlighting = !option_syntax_highlighting;
g_list_foreach (h->widgets, edit_syntax_onoff_cb, NULL); g_list_foreach (h->widgets, edit_syntax_onoff_cb, NULL);
@ -1536,7 +1536,7 @@ edit_syntax_onoff_cmd (Dlg_head * h)
*/ */
void void
edit_show_tabs_tws_cmd (Dlg_head * h) edit_show_tabs_tws_cmd (WDialog * h)
{ {
enable_show_tabs_tws = !enable_show_tabs_tws; enable_show_tabs_tws = !enable_show_tabs_tws;
g_list_foreach (h->widgets, edit_redraw_page_cb, NULL); g_list_foreach (h->widgets, edit_redraw_page_cb, NULL);
@ -1551,7 +1551,7 @@ edit_show_tabs_tws_cmd (Dlg_head * h)
*/ */
void void
edit_show_margin_cmd (Dlg_head * h) edit_show_margin_cmd (WDialog * h)
{ {
show_right_margin = !show_right_margin; show_right_margin = !show_right_margin;
g_list_foreach (h->widgets, edit_redraw_page_cb, NULL); g_list_foreach (h->widgets, edit_redraw_page_cb, NULL);
@ -1566,7 +1566,7 @@ edit_show_margin_cmd (Dlg_head * h)
*/ */
void void
edit_show_numbers_cmd (Dlg_head * h) edit_show_numbers_cmd (WDialog * h)
{ {
option_line_state = !option_line_state; option_line_state = !option_line_state;
option_line_state_width = option_line_state ? LINE_STATE_WIDTH : 0; option_line_state_width = option_line_state ? LINE_STATE_WIDTH : 0;
@ -2057,7 +2057,7 @@ edit_save_confirm_cmd (WEdit * edit)
*/ */
gboolean gboolean
edit_load_cmd (Dlg_head * h) edit_load_cmd (WDialog * h)
{ {
char *exp; char *exp;
gboolean ret = TRUE; /* possible cancel */ gboolean ret = TRUE; /* possible cancel */
@ -2087,7 +2087,7 @@ edit_load_cmd (Dlg_head * h)
*/ */
gboolean gboolean
edit_load_syntax_file (Dlg_head * h) edit_load_syntax_file (WDialog * h)
{ {
vfs_path_t *extdir_vpath; vfs_path_t *extdir_vpath;
int dir = 0; int dir = 0;
@ -2132,7 +2132,7 @@ edit_load_syntax_file (Dlg_head * h)
*/ */
gboolean gboolean
edit_load_menu_file (Dlg_head * h) edit_load_menu_file (WDialog * h)
{ {
vfs_path_t *buffer_vpath; vfs_path_t *buffer_vpath;
vfs_path_t *menufile_vpath; vfs_path_t *menufile_vpath;
@ -2202,7 +2202,7 @@ edit_close_cmd (WEdit * edit)
if (ret) if (ret)
{ {
Dlg_head *h = WIDGET (edit)->owner; WDialog *h = WIDGET (edit)->owner;
if (edit->locked != 0) if (edit->locked != 0)
unlock_file (edit->filename_vpath); unlock_file (edit->filename_vpath);

View File

@ -68,7 +68,7 @@ edit_search_options_t edit_search_options = {
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
editcmd_dialog_raw_key_query_cb (Dlg_head *h, Widget * sender, dlg_msg_t msg, int parm, void *data) editcmd_dialog_raw_key_query_cb (WDialog *h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
switch (msg) switch (msg)
{ {
@ -298,7 +298,7 @@ editcmd_dialog_raw_key_query (const char *heading, const char *query, gboolean c
{ {
int w, wq; int w, wq;
int y = 2; int y = 2;
Dlg_head *raw_dlg; WDialog *raw_dlg;
w = str_term_width1 (heading) + 6; w = str_term_width1 (heading) + 6;
wq = str_term_width1 (query); wq = str_term_width1 (query);
@ -335,7 +335,7 @@ editcmd_dialog_completion_show (WEdit * edit, int max_len, int word_len,
int start_x, start_y, offset, i; int start_x, start_y, offset, i;
char *curr = NULL; char *curr = NULL;
Dlg_head *compl_dlg; WDialog *compl_dlg;
WListbox *compl_list; WListbox *compl_list;
int compl_dlg_h; /* completion dialog height */ int compl_dlg_h; /* completion dialog height */
int compl_dlg_w; /* completion dialog width */ int compl_dlg_w; /* completion dialog width */
@ -422,7 +422,7 @@ editcmd_dialog_select_definition_show (WEdit * edit, char *match_expr, int max_l
int start_x, start_y, offset, i; int start_x, start_y, offset, i;
char *curr = NULL; char *curr = NULL;
etags_hash_t *curr_def = NULL; etags_hash_t *curr_def = NULL;
Dlg_head *def_dlg; WDialog *def_dlg;
WListbox *def_list; WListbox *def_list;
int def_dlg_h; /* dialog height */ int def_dlg_h; /* dialog height */
int def_dlg_w; /* dialog width */ int def_dlg_w; /* dialog width */

View File

@ -259,7 +259,7 @@ create_options_menu (void)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
edit_drop_menu_cmd (Dlg_head * h, int which) edit_drop_menu_cmd (WDialog * h, int which)
{ {
WMenuBar *menubar; WMenuBar *menubar;
@ -306,7 +306,7 @@ edit_init_menu (struct WMenuBar *menubar)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
void void
edit_menu_cmd (Dlg_head * h) edit_menu_cmd (WDialog * h)
{ {
edit_drop_menu_cmd (h, -1); edit_drop_menu_cmd (h, -1);
} }
@ -314,7 +314,7 @@ edit_menu_cmd (Dlg_head * h)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
gboolean gboolean
edit_drop_hotkey_menu (Dlg_head * h, int key) edit_drop_hotkey_menu (WDialog * h, int key)
{ {
int m = 0; int m = 0;
switch (key) switch (key)

View File

@ -115,7 +115,7 @@ edit_reload_syntax (void *data, void *user_data)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
void void
edit_options_dialog (Dlg_head * h) edit_options_dialog (WDialog * h)
{ {
char wrap_length[16], tab_spacing[16]; char wrap_length[16], tab_spacing[16];
char *p, *q; char *p, *q;

View File

@ -84,7 +84,7 @@ static unsigned int edit_dlg_init_refcounter = 0;
/*** file scope functions ************************************************************************/ /*** file scope functions ************************************************************************/
static cb_ret_t edit_dialog_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, static cb_ret_t edit_dialog_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm,
void *data); void *data);
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
@ -314,7 +314,7 @@ get_hotkey (int n)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
edit_window_list (const Dlg_head * h) edit_window_list (const WDialog * h)
{ {
const size_t offset = 2; /* skip menu and buttonbar */ const size_t offset = 2; /* skip menu and buttonbar */
const size_t dlg_num = g_list_length (h->widgets) - offset; const size_t dlg_num = g_list_length (h->widgets) - offset;
@ -385,7 +385,7 @@ edit_get_shortcut (unsigned long command)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static char * static char *
edit_get_title (const Dlg_head * h, size_t len) edit_get_title (const WDialog * h, size_t len)
{ {
const WEdit *edit = find_editor (h); const WEdit *edit = find_editor (h);
const char *modified = edit->modified ? "(*) " : " "; const char *modified = edit->modified ? "(*) " : " ";
@ -654,7 +654,7 @@ edit_event (Gpm_Event * event, void *data)
static int static int
edit_dialog_event (Gpm_Event * event, void *data) edit_dialog_event (Gpm_Event * event, void *data)
{ {
Dlg_head *h = (Dlg_head *) data; WDialog *h = DIALOG (data);
Widget *w; Widget *w;
Widget *wh = WIDGET (h); Widget *wh = WIDGET (h);
int ret = MOU_UNHANDLED; int ret = MOU_UNHANDLED;
@ -709,7 +709,7 @@ edit_dialog_event (Gpm_Event * event, void *data)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
edit_dialog_command_execute (Dlg_head * h, unsigned long command) edit_dialog_command_execute (WDialog * h, unsigned long command)
{ {
Widget *wh = WIDGET (h); Widget *wh = WIDGET (h);
gboolean ret = MSG_HANDLED; gboolean ret = MSG_HANDLED;
@ -812,7 +812,7 @@ edit_dialog_command_execute (Dlg_head * h, unsigned long command)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static inline void static inline void
edit_quit (Dlg_head * h) edit_quit (WDialog * h)
{ {
GList *l; GList *l;
WEdit *e = NULL; WEdit *e = NULL;
@ -865,7 +865,7 @@ edit_set_buttonbar (WEdit * edit, WButtonBar * bb)
/** Callback for the edit dialog */ /** Callback for the edit dialog */
static cb_ret_t static cb_ret_t
edit_dialog_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) edit_dialog_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
WMenuBar *menubar; WMenuBar *menubar;
WButtonBar *buttonbar; WButtonBar *buttonbar;
@ -1062,7 +1062,7 @@ gboolean
edit_files (const GList * files) edit_files (const GList * files)
{ {
static gboolean made_directory = FALSE; static gboolean made_directory = FALSE;
Dlg_head *edit_dlg; WDialog *edit_dlg;
WMenuBar *menubar; WMenuBar *menubar;
const GList *file; const GList *file;
gboolean ok = FALSE; gboolean ok = FALSE;
@ -1130,7 +1130,7 @@ edit_get_file_name (const WEdit * edit)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
WEdit * WEdit *
find_editor (const Dlg_head * h) find_editor (const WDialog * h)
{ {
if (edit_widget_is_editor (WIDGET (h->current->data))) if (edit_widget_is_editor (WIDGET (h->current->data)))
return (WEdit *) h->current->data; return (WEdit *) h->current->data;
@ -1156,7 +1156,7 @@ edit_widget_is_editor (const Widget * w)
void void
edit_update_screen (WEdit * e) edit_update_screen (WEdit * e)
{ {
Dlg_head *h = WIDGET (e)->owner; WDialog *h = WIDGET (e)->owner;
edit_scroll_screen_over_cursor (e); edit_scroll_screen_over_cursor (e);
edit_update_curs_col (e); edit_update_curs_col (e);
@ -1210,7 +1210,7 @@ edit_save_size (WEdit * edit)
*/ */
gboolean gboolean
edit_add_window (Dlg_head * h, int y, int x, int lines, int cols, const vfs_path_t * f, long fline) edit_add_window (WDialog * h, int y, int x, int lines, int cols, const vfs_path_t * f, long fline)
{ {
WEdit *edit; WEdit *edit;
Widget *w; Widget *w;

View File

@ -70,7 +70,7 @@ spell_dialog_spell_suggest_show (WEdit * edit, const char *word, char **new_word
unsigned int i; unsigned int i;
int res; int res;
char *curr = NULL; char *curr = NULL;
Dlg_head *sug_dlg; WDialog *sug_dlg;
WListbox *sug_list; WListbox *sug_list;
int max_btn_len = 0; int max_btn_len = 0;
int add_len; int add_len;

View File

@ -75,7 +75,7 @@
/*** file scope variables ************************************************************************/ /*** file scope variables ************************************************************************/
static struct Dlg_head *ch_dlg; static struct WDialog *ch_dlg;
static struct static struct
{ {
@ -279,7 +279,7 @@ chown_info_update (void)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
update_mode (Dlg_head * h) update_mode (WDialog * h)
{ {
print_flags (); print_flags ();
chown_info_update (); chown_info_update ();
@ -289,7 +289,7 @@ update_mode (Dlg_head * h)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
chl_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) chl_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
switch (msg) switch (msg)
{ {
@ -310,9 +310,9 @@ chl_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
do_enter_key (Dlg_head * h, int f_pos) do_enter_key (WDialog * h, int f_pos)
{ {
Dlg_head *chl_dlg; WDialog *chl_dlg;
WListbox *chl_list; WListbox *chl_list;
struct passwd *chl_pass; struct passwd *chl_pass;
struct group *chl_grp; struct group *chl_grp;
@ -458,7 +458,7 @@ b_setpos (int f_pos)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
advanced_chown_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) advanced_chown_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
int i; int i;
int f_pos; int f_pos;

View File

@ -118,7 +118,7 @@ static WListbox *bg_list = NULL;
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
panel_listing_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) panel_listing_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
switch (msg) switch (msg)
{ {
@ -262,7 +262,7 @@ sel_charset_button (WButton * button, int action)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
tree_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) tree_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
switch (msg) switch (msg)
{ {
@ -299,7 +299,7 @@ tree_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *dat
#if defined(ENABLE_VFS) && defined (ENABLE_VFS_FTP) #if defined(ENABLE_VFS) && defined (ENABLE_VFS_FTP)
static cb_ret_t static cb_ret_t
confvfs_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) confvfs_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
switch (msg) switch (msg)
{ {
@ -711,7 +711,7 @@ char *
tree_box (const char *current_dir) tree_box (const char *current_dir)
{ {
WTree *mytree; WTree *mytree;
Dlg_head *dlg; WDialog *dlg;
Widget *wd; Widget *wd;
char *val = NULL; char *val = NULL;
WButtonBar *bar; WButtonBar *bar;
@ -916,7 +916,7 @@ jobs_cmd (void)
size_t i; size_t i;
const size_t n_but = G_N_ELEMENTS (job_but); const size_t n_but = G_N_ELEMENTS (job_but);
Dlg_head *jobs_dlg; WDialog *jobs_dlg;
int cols = 60; int cols = 60;
int lines = 15; int lines = 15;
int x = 0; int x = 0;

View File

@ -181,7 +181,7 @@ chmod_i18n (void)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
chmod_toggle_select (Dlg_head * h, int Id) chmod_toggle_select (WDialog * h, int Id)
{ {
tty_setcolor (COLOR_NORMAL); tty_setcolor (COLOR_NORMAL);
check_perm[Id].selected = !check_perm[Id].selected; check_perm[Id].selected = !check_perm[Id].selected;
@ -194,7 +194,7 @@ chmod_toggle_select (Dlg_head * h, int Id)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
chmod_refresh (Dlg_head * h) chmod_refresh (WDialog * h)
{ {
int y = WIDGET (file_gb)->y + 1; int y = WIDGET (file_gb)->y + 1;
int x = WIDGET (file_gb)->x + 2; int x = WIDGET (file_gb)->x + 2;
@ -216,7 +216,7 @@ chmod_refresh (Dlg_head * h)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
chmod_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) chmod_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
switch (msg) switch (msg)
{ {
@ -281,10 +281,10 @@ chmod_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *da
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static Dlg_head * static WDialog *
init_chmod (const char *fname, const struct stat *sf_stat) init_chmod (const char *fname, const struct stat *sf_stat)
{ {
Dlg_head *ch_dlg; WDialog *ch_dlg;
int lines, cols; int lines, cols;
int y; int y;
int perm_gb_len; int perm_gb_len;
@ -456,7 +456,7 @@ chmod_cmd (void)
do do
{ /* do while any files remaining */ { /* do while any files remaining */
vfs_path_t *vpath; vfs_path_t *vpath;
Dlg_head *ch_dlg; WDialog *ch_dlg;
struct stat sf_stat; struct stat sf_stat;
char *fname; char *fname;
int result; int result;

View File

@ -143,7 +143,7 @@ chown_i18n (void)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
chown_refresh (Dlg_head * h) chown_refresh (WDialog * h)
{ {
const int y = 3; const int y = 3;
const int x = 7 + GW * 2; const int x = 7 + GW * 2;
@ -178,7 +178,7 @@ next_file (void)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
chown_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) chown_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
switch (msg) switch (msg)
{ {
@ -193,7 +193,7 @@ chown_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *da
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static Dlg_head * static WDialog *
init_chown (void) init_chown (void)
{ {
int lines, cols; int lines, cols;
@ -201,7 +201,7 @@ init_chown (void)
int y; int y;
struct passwd *l_pass; struct passwd *l_pass;
struct group *l_grp; struct group *l_grp;
Dlg_head *ch_dlg; WDialog *ch_dlg;
do_refresh (); do_refresh ();
@ -332,7 +332,7 @@ chown_cmd (void)
{ {
char *fname; char *fname;
struct stat sf_stat; struct stat sf_stat;
Dlg_head *ch_dlg; WDialog *ch_dlg;
uid_t new_user; uid_t new_user;
gid_t new_group; gid_t new_group;
char buffer[BUF_TINY]; char buffer[BUF_TINY];

View File

@ -26,7 +26,7 @@ typedef FileProgressStatus (*compute_dir_size_callback) (const void *ui,
/* status dialog of directory size computing */ /* status dialog of directory size computing */
typedef struct typedef struct
{ {
Dlg_head *dlg; WDialog *dlg;
WLabel *dirname; WLabel *dirname;
} ComputeDirSizeUI; } ComputeDirSizeUI;

View File

@ -238,7 +238,7 @@ typedef struct
gboolean showing_bps; gboolean showing_bps;
/* Dialog and widgets for the operation progress window */ /* Dialog and widgets for the operation progress window */
Dlg_head *op_dlg; WDialog *op_dlg;
WLabel *file_string[2]; WLabel *file_string[2];
WLabel *file_label[2]; WLabel *file_label[2];
WGauge *progress_file_gauge; WGauge *progress_file_gauge;
@ -251,7 +251,7 @@ typedef struct
WLabel *total_bytes_label; WLabel *total_bytes_label;
/* Query replace dialog */ /* Query replace dialog */
Dlg_head *replace_dlg; WDialog *replace_dlg;
const char *replace_filename; const char *replace_filename;
replace_action_t replace_result; replace_action_t replace_result;

View File

@ -154,7 +154,7 @@ static int last_pos;
static size_t ignore_count = 0; static size_t ignore_count = 0;
static Dlg_head *find_dlg; /* The dialog */ static WDialog *find_dlg; /* The dialog */
static WLabel *status_label; /* Finished, Searching etc. */ static WLabel *status_label; /* Finished, Searching etc. */
static WLabel *found_num_label; /* Number of found items */ static WLabel *found_num_label; /* Number of found items */
@ -407,7 +407,7 @@ find_check_regexp (const char *r)
*/ */
static cb_ret_t static cb_ret_t
find_parm_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) find_parm_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
switch (msg) switch (msg)
{ {
@ -985,7 +985,7 @@ get_line_at (int file_fd, char *buf, int buf_size, int *pos, int *n_read, gboole
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static FindProgressStatus static FindProgressStatus
check_find_events (Dlg_head * h) check_find_events (WDialog * h)
{ {
Gpm_Event event; Gpm_Event event;
int c; int c;
@ -1023,7 +1023,7 @@ check_find_events (Dlg_head * h)
*/ */
static gboolean static gboolean
search_content (Dlg_head * h, const char *directory, const char *filename) search_content (WDialog * h, const char *directory, const char *filename)
{ {
struct stat s; struct stat s;
char buffer[BUF_4K]; char buffer[BUF_4K];
@ -1183,7 +1183,7 @@ find_ignore_dir_search (const char *dir)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
find_rotate_dash (const Dlg_head * h, gboolean finish) find_rotate_dash (const WDialog * h, gboolean finish)
{ {
static const char rotating_dash[] = "|/-\\"; static const char rotating_dash[] = "|/-\\";
static unsigned int pos = 0; static unsigned int pos = 0;
@ -1203,7 +1203,7 @@ find_rotate_dash (const Dlg_head * h, gboolean finish)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static int static int
do_search (Dlg_head * h) do_search (WDialog * h)
{ {
static struct dirent *dp = NULL; static struct dirent *dp = NULL;
static DIR *dirp = NULL; static DIR *dirp = NULL;
@ -1430,7 +1430,7 @@ view_edit_currently_selected_file (int unparsed_view, int edit)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
find_calc_button_locations (const Dlg_head * h, gboolean all_buttons) find_calc_button_locations (const WDialog * h, gboolean all_buttons)
{ {
const int cols = WIDGET (h)->cols; const int cols = WIDGET (h)->cols;
@ -1456,7 +1456,7 @@ find_calc_button_locations (const Dlg_head * h, gboolean all_buttons)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
find_relocate_buttons (const Dlg_head * h, gboolean all_buttons) find_relocate_buttons (const WDialog * h, gboolean all_buttons)
{ {
size_t i; size_t i;
@ -1469,7 +1469,7 @@ find_relocate_buttons (const Dlg_head * h, gboolean all_buttons)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
find_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) find_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
switch (msg) switch (msg)
{ {

View File

@ -163,7 +163,7 @@ struct hotlist
static gboolean hotlist_has_dot_dot = TRUE; static gboolean hotlist_has_dot_dot = TRUE;
static Dlg_head *hotlist_dlg, *movelist_dlg; static WDialog *hotlist_dlg, *movelist_dlg;
static WGroupbox *hotlist_group, *movelist_group; static WGroupbox *hotlist_group, *movelist_group;
static WListbox *l_hotlist, *l_movelist; static WListbox *l_hotlist, *l_movelist;
static WLabel *pname; static WLabel *pname;
@ -489,7 +489,7 @@ hotlist_button_callback (WButton * button, int action)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static inline cb_ret_t static inline cb_ret_t
hotlist_handle_key (Dlg_head * h, int key) hotlist_handle_key (WDialog * h, int key)
{ {
switch (key) switch (key)
{ {
@ -552,7 +552,7 @@ hotlist_handle_key (Dlg_head * h, int key)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
hotlist_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) hotlist_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
switch (msg) switch (msg)
{ {
@ -583,7 +583,7 @@ hotlist_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *
static lcback_ret_t static lcback_ret_t
hotlist_listbox_callback (WListbox * list) hotlist_listbox_callback (WListbox * list)
{ {
Dlg_head *dlg = WIDGET (list)->owner; WDialog *dlg = WIDGET (list)->owner;
if (list->count != 0) if (list->count != 0)
{ {

View File

@ -222,7 +222,7 @@ check_split (panels_layout_t * layout)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
update_split (const Dlg_head * h) update_split (const WDialog * h)
{ {
/* Check split has to be done before testing if it changed, since /* Check split has to be done before testing if it changed, since
it can change due to calling check_split() as well */ it can change due to calling check_split() as well */
@ -308,7 +308,7 @@ bminus_cback (WButton * button, int action)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
layout_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) layout_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
switch (msg) switch (msg)
{ {
@ -428,10 +428,10 @@ layout_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *d
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static Dlg_head * static WDialog *
init_layout (void) init_layout (void)
{ {
Dlg_head *layout_dlg; WDialog *layout_dlg;
int l1 = 0, width; int l1 = 0, width;
int b1, b2, b; int b1, b2, b;
size_t i; size_t i;
@ -632,7 +632,7 @@ layout_change (void)
void void
layout_box (void) layout_box (void)
{ {
Dlg_head *layout_dlg; WDialog *layout_dlg;
gboolean layout_do_change = FALSE; gboolean layout_do_change = FALSE;
layout_dlg = init_layout (); layout_dlg = init_layout ();
@ -1298,7 +1298,7 @@ do_load_prompt (void)
return ret; return ret;
/* Don't actually change the prompt if it's invisible */ /* Don't actually change the prompt if it's invisible */
if (top_dlg != NULL && ((Dlg_head *) top_dlg->data == midnight_dlg) && command_prompt) if (top_dlg != NULL && DIALOG (top_dlg->data) == midnight_dlg && command_prompt)
{ {
setup_cmdline (); setup_cmdline ();

View File

@ -173,14 +173,14 @@ bremove_cback (int action)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static Dlg_head * static WDialog *
init_listmode (char *oldlistformat) init_listmode (char *oldlistformat)
{ {
int i; int i;
char *s; char *s;
int format_width = 0; int format_width = 0;
int format_columns = 0; int format_columns = 0;
Dlg_head *listmode_dlg; WDialog *listmode_dlg;
static struct listmode_label listmode_labels[] = { static struct listmode_label listmode_labels[] = {
{UY + 13, UX + 22, "Item width:"} {UY + 13, UX + 22, "Item width:"}
@ -271,7 +271,7 @@ init_listmode (char *oldlistformat)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
listmode_done (Dlg_head * h) listmode_done (WDialog * h)
{ {
destroy_dlg (h); destroy_dlg (h);
if (0) if (0)
@ -321,7 +321,7 @@ listmode_edit (char *oldlistformat)
{ {
char *newformat = NULL; char *newformat = NULL;
char *s; char *s;
Dlg_head *listmode_dlg; WDialog *listmode_dlg;
s = g_strdup (oldlistformat); s = g_strdup (oldlistformat);
listmode_dlg = init_listmode (s); listmode_dlg = init_listmode (s);

View File

@ -142,7 +142,7 @@ stop_dialogs (void)
midnight_dlg->state = DLG_CLOSED; midnight_dlg->state = DLG_CLOSED;
if ((top_dlg != NULL) && (top_dlg->data != NULL)) if ((top_dlg != NULL) && (top_dlg->data != NULL))
((Dlg_head *) top_dlg->data)->state = DLG_CLOSED; DIALOG (top_dlg->data)->state = DLG_CLOSED;
} }
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
@ -432,7 +432,7 @@ midnight_get_shortcut (unsigned long command)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static char * static char *
midnight_get_title (const Dlg_head * h, size_t len) midnight_get_title (const WDialog * h, size_t len)
{ {
char *path; char *path;
char *login; char *login;
@ -1401,7 +1401,7 @@ midnight_execute_cmd (Widget * sender, unsigned long command)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
midnight_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) midnight_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
unsigned long command; unsigned long command;

View File

@ -62,7 +62,7 @@ unsigned long configure_old_esc_mode_id, configure_time_out_id;
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
configure_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) configure_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
switch (msg) switch (msg)
{ {

View File

@ -73,7 +73,7 @@
/*** file scope variables ************************************************************************/ /*** file scope variables ************************************************************************/
static WListbox *l_panelize; static WListbox *l_panelize;
static Dlg_head *panelize_dlg; static WDialog *panelize_dlg;
static int last_listitem; static int last_listitem;
static WInput *pname; static WInput *pname;
@ -109,7 +109,7 @@ update_command (void)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
panelize_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) panelize_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
switch (msg) switch (msg)
{ {

View File

@ -250,7 +250,7 @@ tree_show_mini_info (WTree * tree, int tree_lines, int tree_cols)
else else
{ {
/* Show full name of selected directory */ /* Show full name of selected directory */
Dlg_head *h = w->owner; WDialog *h = w->owner;
char *tmp_path; char *tmp_path;
tty_setcolor (tree->is_panel ? NORMAL_COLOR : TREE_NORMALC (h)); tty_setcolor (tree->is_panel ? NORMAL_COLOR : TREE_NORMALC (h));
@ -268,7 +268,7 @@ static void
show_tree (WTree * tree) show_tree (WTree * tree)
{ {
Widget *w = WIDGET (tree); Widget *w = WIDGET (tree);
Dlg_head *h = w->owner; WDialog *h = w->owner;
tree_entry *current; tree_entry *current;
int i, j, topsublevel; int i, j, topsublevel;
int x = 0, y = 0; int x = 0, y = 0;
@ -1175,7 +1175,7 @@ tree_key (WTree * tree, int key)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
tree_frame (Dlg_head * h, WTree * tree) tree_frame (WDialog * h, WTree * tree)
{ {
Widget *w = WIDGET (tree); Widget *w = WIDGET (tree);
@ -1206,7 +1206,7 @@ static cb_ret_t
tree_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) tree_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data)
{ {
WTree *tree = (WTree *) w; WTree *tree = (WTree *) w;
Dlg_head *h = w->owner; WDialog *h = w->owner;
WButtonBar *b = find_buttonbar (h); WButtonBar *b = find_buttonbar (h);
switch (msg) switch (msg)
@ -1333,7 +1333,7 @@ sync_tree (const char *path)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
WTree * WTree *
find_tree (struct Dlg_head *h) find_tree (struct WDialog *h)
{ {
return (WTree *) find_widget_type (h, tree_callback); return (WTree *) find_widget_type (h, tree_callback);
} }

View File

@ -20,7 +20,7 @@ typedef struct WTree WTree;
extern WTree *the_tree; extern WTree *the_tree;
extern int xtree_mode; extern int xtree_mode;
struct Dlg_head; struct WDialog;
/*** declarations of public functions ************************************************************/ /*** declarations of public functions ************************************************************/
@ -31,7 +31,7 @@ vfs_path_t *tree_selected_name (const WTree * tree);
void sync_tree (const char *pathname); void sync_tree (const char *pathname);
WTree *find_tree (struct Dlg_head *h); WTree *find_tree (struct WDialog *h);
/*** inline functions ****************************************************************************/ /*** inline functions ****************************************************************************/
#endif /* MC__TREE_H */ #endif /* MC__TREE_H */

View File

@ -104,7 +104,7 @@ static const char *currentpoint;
static const char *selected_item; static const char *selected_item;
/* The widget variables */ /* The widget variables */
static Dlg_head *whelp; static WDialog *whelp;
static struct static struct
{ {
@ -115,7 +115,7 @@ static struct
static GSList *link_area = NULL; static GSList *link_area = NULL;
static gboolean inside_link_area = FALSE; static gboolean inside_link_area = FALSE;
static cb_ret_t help_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data); static cb_ret_t help_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data);
/*** file scope functions ************************************************************************/ /*** file scope functions ************************************************************************/
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
@ -403,7 +403,7 @@ clear_link_areas (void)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
help_print_word (Dlg_head * h, GString * word, int *col, int *line, gboolean add_space) help_print_word (WDialog * h, GString * word, int *col, int *line, gboolean add_space)
{ {
if (*line >= help_lines) if (*line >= help_lines)
g_string_set_size (word, 0); g_string_set_size (word, 0);
@ -447,7 +447,7 @@ help_print_word (Dlg_head * h, GString * word, int *col, int *line, gboolean add
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
help_show (Dlg_head * h, const char *paint_start) help_show (WDialog * h, const char *paint_start)
{ {
const char *p, *n; const char *p, *n;
int col, line, c; int col, line, c;
@ -684,7 +684,7 @@ help_event (Gpm_Event * event, void *vp)
/** show help */ /** show help */
static void static void
help_help (Dlg_head * h) help_help (WDialog * h)
{ {
const char *p; const char *p;
@ -704,7 +704,7 @@ help_help (Dlg_head * h)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
help_index (Dlg_head * h) help_index (WDialog * h)
{ {
const char *new_item; const char *new_item;
@ -727,7 +727,7 @@ help_index (Dlg_head * h)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
help_back (Dlg_head * h) help_back (WDialog * h)
{ {
currentpoint = history[history_ptr].page; currentpoint = history[history_ptr].page;
selected_item = history[history_ptr].link; selected_item = history[history_ptr].link;
@ -926,7 +926,7 @@ help_execute_cmd (unsigned long command)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
help_handle_key (Dlg_head * h, int c) help_handle_key (WDialog * h, int c)
{ {
unsigned long command; unsigned long command;
@ -941,7 +941,7 @@ help_handle_key (Dlg_head * h, int c)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
help_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) help_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
WButtonBar *bb; WButtonBar *bb;

View File

@ -68,7 +68,7 @@ typedef struct
/*** file scope variables ************************************************************************/ /*** file scope variables ************************************************************************/
static Dlg_head *learn_dlg; static WDialog *learn_dlg;
static const char *learn_title = N_("Learn keys"); static const char *learn_title = N_("Learn keys");
static learnkey_t *learnkeys = NULL; static learnkey_t *learnkeys = NULL;
@ -82,7 +82,7 @@ static gboolean learnchanged = FALSE;
static int static int
learn_button (WButton * button, int action) learn_button (WButton * button, int action)
{ {
Dlg_head *d; WDialog *d;
char *seq; char *seq;
(void) button; (void) button;
@ -232,7 +232,7 @@ learn_check_key (int c)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
learn_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) learn_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
switch (msg) switch (msg)
{ {

View File

@ -551,7 +551,7 @@ mcview_handle_key (mcview_t * view, int key)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static inline void static inline void
mcview_adjust_size (Dlg_head * h) mcview_adjust_size (WDialog * h)
{ {
mcview_t *view; mcview_t *view;
WButtonBar *b; WButtonBar *b;
@ -633,7 +633,7 @@ mcview_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
cb_ret_t cb_ret_t
mcview_dialog_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) mcview_dialog_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
mcview_t *view; mcview_t *view;

View File

@ -80,7 +80,7 @@ static enum ruler_type
static void static void
mcview_set_buttonbar (mcview_t * view) mcview_set_buttonbar (mcview_t * view)
{ {
Dlg_head *h = WIDGET (view)->owner; WDialog *h = WIDGET (view)->owner;
WButtonBar *b = find_buttonbar (h); WButtonBar *b = find_buttonbar (h);
const global_keymap_t *keymap = view->hex_mode ? viewer_hex_map : viewer_map; const global_keymap_t *keymap = view->hex_mode ? viewer_hex_map : viewer_map;

View File

@ -215,7 +215,7 @@ extern mcview_search_options_t mcview_search_options;
/* actions_cmd.c: */ /* actions_cmd.c: */
cb_ret_t mcview_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data); cb_ret_t mcview_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data);
cb_ret_t mcview_dialog_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data); cb_ret_t mcview_dialog_callback (WDialog * h, Widget * sender, dlg_msg_t msg, int parm, void *data);
/* coord_cache.c: */ /* coord_cache.c: */
coord_cache_t *coord_cache_new (void); coord_cache_t *coord_cache_new (void);
@ -287,7 +287,7 @@ void mcview_set_codeset (mcview_t * view);
void mcview_show_error (mcview_t * view, const char *error); void mcview_show_error (mcview_t * view, const char *error);
off_t mcview_bol (mcview_t * view, off_t current, off_t limit); off_t mcview_bol (mcview_t * view, off_t current, off_t limit);
off_t mcview_eol (mcview_t * view, off_t current, off_t limit); off_t mcview_eol (mcview_t * view, off_t current, off_t limit);
char *mcview_get_title (const Dlg_head * h, size_t len); char *mcview_get_title (const WDialog * h, size_t len);
/* move.c */ /* move.c */
void mcview_move_up (mcview_t *, off_t); void mcview_move_up (mcview_t *, off_t);

View File

@ -433,7 +433,7 @@ mcview_eol (mcview_t * view, off_t current, off_t limit)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
char * char *
mcview_get_title (const Dlg_head * h, size_t len) mcview_get_title (const WDialog * h, size_t len)
{ {
const mcview_t *view = (const mcview_t *) find_widget_type (h, mcview_callback); const mcview_t *view = (const mcview_t *) find_widget_type (h, mcview_callback);
const char *modified = view->hexedit_mode && (view->change_list != NULL) ? "(*) " : " "; const char *modified = view->hexedit_mode && (view->change_list != NULL) ? "(*) " : " ";

View File

@ -234,7 +234,7 @@ mcview_viewer (const char *command, const vfs_path_t * file_vpath, int start_lin
{ {
gboolean succeeded; gboolean succeeded;
mcview_t *lc_mcview; mcview_t *lc_mcview;
Dlg_head *view_dlg; WDialog *view_dlg;
/* Create dialog and widgets, put them on the dialog */ /* Create dialog and widgets, put them on the dialog */
view_dlg = create_dlg (FALSE, 0, 0, LINES, COLS, NULL, mcview_dialog_callback, NULL, view_dlg = create_dlg (FALSE, 0, 0, LINES, COLS, NULL, mcview_dialog_callback, NULL,

View File

@ -117,7 +117,7 @@ mcview_find (mcview_t * view, gsize search_start, gsize * len)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void static void
mcview_search_show_result (mcview_t * view, Dlg_head ** d, size_t match_len) mcview_search_show_result (mcview_t * view, WDialog ** d, size_t match_len)
{ {
int nroff_len; int nroff_len;
@ -244,7 +244,7 @@ mcview_do_search (mcview_t * view)
gboolean isFound = FALSE; gboolean isFound = FALSE;
gboolean need_search_again = TRUE; gboolean need_search_again = TRUE;
Dlg_head *d = NULL; WDialog *d = NULL;
size_t match_len; size_t match_len;