mirror of https://github.com/MidnightCommander/mc
Rename functions:
init_widget -> widget_init create_dlg -> dlg_create init_dlg -> dlg_init run_dlg -> dlg_run destroy_dlg -> dlg_destroy Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
0adf569b54
commit
48abe8735f
|
@ -212,7 +212,7 @@ button_new (int y, int x, int action, button_flags_t flags, const char *text, bc
|
|||
b->action = action;
|
||||
b->flags = flags;
|
||||
b->text = parse_hotkey (text);
|
||||
init_widget (w, y, x, 1, button_get_len (b), button_callback, button_event);
|
||||
widget_init (w, y, x, 1, button_get_len (b), button_callback, button_event);
|
||||
b->selected = FALSE;
|
||||
b->callback = callback;
|
||||
widget_want_hotkey (w, TRUE);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
2004, 2005, 2006, 2007, 2009, 2010, 2011
|
||||
2004, 2005, 2006, 2007, 2009, 2010, 2011, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
@ -11,7 +11,7 @@
|
|||
Jakub Jelinek, 1995
|
||||
Andrej Borsenkow, 1996
|
||||
Norbert Warmuth, 1997
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010, 2013
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
||||
|
@ -249,7 +249,7 @@ buttonbar_new (gboolean visible)
|
|||
|
||||
bb = g_new0 (WButtonBar, 1);
|
||||
w = WIDGET (bb);
|
||||
init_widget (w, LINES - 1, 0, 1, COLS, buttonbar_callback, buttonbar_event);
|
||||
widget_init (w, LINES - 1, 0, 1, COLS, buttonbar_callback, buttonbar_event);
|
||||
|
||||
w->pos_flags = WPOS_KEEP_HORZ | WPOS_KEEP_BOTTOM;
|
||||
bb->visible = visible;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
2004, 2005, 2006, 2007, 2009, 2010, 2011
|
||||
2004, 2005, 2006, 2007, 2009, 2010, 2011, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
@ -11,7 +11,7 @@
|
|||
Jakub Jelinek, 1995
|
||||
Andrej Borsenkow, 1996
|
||||
Norbert Warmuth, 1997
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010, 2013
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
||||
|
@ -140,7 +140,7 @@ check_new (int y, int x, int state, const char *text)
|
|||
c = g_new (WCheck, 1);
|
||||
w = WIDGET (c);
|
||||
c->text = parse_hotkey (text);
|
||||
init_widget (w, y, x, 1, 4 + hotkey_width (c->text), check_callback, check_event);
|
||||
widget_init (w, y, x, 1, 4 + hotkey_width (c->text), check_callback, check_event);
|
||||
/* 4 is width of "[X] " */
|
||||
c->state = state ? C_BOOL : 0;
|
||||
widget_want_hotkey (w, TRUE);
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
|
||||
Original idea and code: Oleg "Olegarch" Konovalov <olegarch@linuxinside.com>
|
||||
|
||||
Copyright (c) 2009, 2010, 2011
|
||||
Copyright (c) 2009, 2010, 2011, 2013
|
||||
The Free Software Foundation
|
||||
|
||||
Written by:
|
||||
Daniel Borca <dborca@yahoo.com>, 2007
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2010
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2010, 2013
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
||||
|
@ -278,10 +278,10 @@ dialog_switch_process_pending (void)
|
|||
|
||||
dialog_switch_pending = FALSE;
|
||||
h->state = DLG_SUSPENDED;
|
||||
ret = run_dlg (h);
|
||||
ret = dlg_run (h);
|
||||
if (h->state == DLG_CLOSED)
|
||||
{
|
||||
destroy_dlg (h);
|
||||
dlg_destroy (h);
|
||||
|
||||
/* return to panels */
|
||||
if (mc_global.mc_run_mode == MC_RUN_FULL)
|
||||
|
@ -318,8 +318,8 @@ dialog_switch_shutdown (void)
|
|||
{
|
||||
WDialog *dlg = DIALOG (mc_dialogs->data);
|
||||
|
||||
run_dlg (dlg);
|
||||
destroy_dlg (dlg);
|
||||
dlg_run (dlg);
|
||||
dlg_destroy (dlg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -526,7 +526,7 @@ dlg_key_event (WDialog * h, int d_key)
|
|||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
static void
|
||||
frontend_run_dlg (WDialog * h)
|
||||
frontend_dlg_run (WDialog * h)
|
||||
{
|
||||
int d_key;
|
||||
Gpm_Event event;
|
||||
|
@ -763,7 +763,7 @@ dlg_default_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, v
|
|||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
WDialog *
|
||||
create_dlg (gboolean modal, int y1, int x1, int lines, int cols,
|
||||
dlg_create (gboolean modal, int y1, int x1, int lines, int cols,
|
||||
const int *colors, widget_cb_fn callback, mouse_h mouse_handler,
|
||||
const char *help_ctx, const char *title, dlg_flags_t flags)
|
||||
{
|
||||
|
@ -772,7 +772,7 @@ create_dlg (gboolean modal, int y1, int x1, int lines, int cols,
|
|||
|
||||
new_d = g_new0 (WDialog, 1);
|
||||
w = WIDGET (new_d);
|
||||
init_widget (w, y1, x1, lines, cols, (callback != NULL) ? callback : dlg_default_callback,
|
||||
widget_init (w, y1, x1, lines, cols, (callback != NULL) ? callback : dlg_default_callback,
|
||||
mouse_handler);
|
||||
widget_want_cursor (w, FALSE);
|
||||
|
||||
|
@ -1171,7 +1171,7 @@ dlg_stop (WDialog * h)
|
|||
/** Init the process */
|
||||
|
||||
void
|
||||
init_dlg (WDialog * h)
|
||||
dlg_init (WDialog * h)
|
||||
{
|
||||
if (top_dlg != NULL && DIALOG (top_dlg->data)->modal)
|
||||
h->modal = TRUE;
|
||||
|
@ -1222,7 +1222,7 @@ dlg_process_event (WDialog * h, int key, Gpm_Event * event)
|
|||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
/** Shutdown the run_dlg */
|
||||
/** Shutdown the dlg_run */
|
||||
|
||||
void
|
||||
dlg_run_done (WDialog * h)
|
||||
|
@ -1246,10 +1246,10 @@ dlg_run_done (WDialog * h)
|
|||
*/
|
||||
|
||||
int
|
||||
run_dlg (WDialog * h)
|
||||
dlg_run (WDialog * h)
|
||||
{
|
||||
init_dlg (h);
|
||||
frontend_run_dlg (h);
|
||||
dlg_init (h);
|
||||
frontend_dlg_run (h);
|
||||
dlg_run_done (h);
|
||||
return h->ret_value;
|
||||
}
|
||||
|
@ -1257,7 +1257,7 @@ run_dlg (WDialog * h)
|
|||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
destroy_dlg (WDialog * h)
|
||||
dlg_destroy (WDialog * h)
|
||||
{
|
||||
/* if some widgets have history, save all history at one moment here */
|
||||
dlg_save_history (h);
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
/*** enums ***************************************************************************************/
|
||||
|
||||
/* Flags for create_dlg */
|
||||
/* Flags for dlg_create */
|
||||
typedef enum
|
||||
{
|
||||
DLG_NONE = 0, /* No options */
|
||||
|
@ -87,7 +87,7 @@ struct WDialog
|
|||
char *title; /* Title of the dialog */
|
||||
|
||||
/* Set and received by the user */
|
||||
int ret_value; /* Result of run_dlg() */
|
||||
int ret_value; /* Result of dlg_run() */
|
||||
|
||||
/* Internal flags */
|
||||
dlg_state_t state;
|
||||
|
@ -125,7 +125,7 @@ extern const global_keymap_t *dialog_map;
|
|||
/*** declarations of public functions ************************************************************/
|
||||
|
||||
/* Creates a dialog head */
|
||||
WDialog *create_dlg (gboolean modal, int y1, int x1, int lines, int cols,
|
||||
WDialog *dlg_create (gboolean modal, int y1, int x1, int lines, int cols,
|
||||
const int *colors, widget_cb_fn callback, mouse_h mouse_handler,
|
||||
const char *help_ctx, const char *title, dlg_flags_t flags);
|
||||
|
||||
|
@ -143,9 +143,9 @@ void dlg_set_size (WDialog * h, int lines, int cols);
|
|||
/* this function allows to set dialog position */
|
||||
void dlg_set_position (WDialog * h, int y1, int x1, int y2, int x2);
|
||||
|
||||
void init_dlg (WDialog * h);
|
||||
int run_dlg (WDialog * d);
|
||||
void destroy_dlg (WDialog * h);
|
||||
void dlg_init (WDialog * h);
|
||||
int dlg_run (WDialog * d);
|
||||
void dlg_destroy (WDialog * h);
|
||||
|
||||
void dlg_run_done (WDialog * h);
|
||||
void dlg_save_history (WDialog * h);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
2004, 2005, 2006, 2007, 2009, 2010, 2011
|
||||
2004, 2005, 2006, 2007, 2009, 2010, 2011, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
@ -11,7 +11,7 @@
|
|||
Jakub Jelinek, 1995
|
||||
Andrej Borsenkow, 1996
|
||||
Norbert Warmuth, 1997
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010, 2013
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
||||
|
@ -138,7 +138,7 @@ gauge_new (int y, int x, int cols, gboolean shown, int max, int current)
|
|||
|
||||
g = g_new (WGauge, 1);
|
||||
w = WIDGET (g);
|
||||
init_widget (w, y, x, 1, cols, gauge_callback, NULL);
|
||||
widget_init (w, y, x, 1, cols, gauge_callback, NULL);
|
||||
widget_want_cursor (w, FALSE);
|
||||
widget_want_hotkey (w, FALSE);
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ groupbox_new (int y, int x, int height, int width, const char *title)
|
|||
|
||||
g = g_new (WGroupbox, 1);
|
||||
w = WIDGET (g);
|
||||
init_widget (w, y, x, height, width, groupbox_callback, NULL);
|
||||
widget_init (w, y, x, height, width, groupbox_callback, NULL);
|
||||
|
||||
widget_want_cursor (w, FALSE);
|
||||
widget_want_hotkey (w, FALSE);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012
|
||||
2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
@ -11,7 +11,7 @@
|
|||
Jakub Jelinek, 1995
|
||||
Andrej Borsenkow, 1996
|
||||
Norbert Warmuth, 1997
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010, 2011, 2012
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010, 2011, 2012, 2013
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
||||
|
@ -320,7 +320,7 @@ history_show (GList ** history, Widget * widget, int current)
|
|||
hist_data.maxlen = maxlen;
|
||||
|
||||
query_dlg =
|
||||
create_dlg (TRUE, 0, 0, 4, 4, dialog_colors, history_dlg_callback, NULL,
|
||||
dlg_create (TRUE, 0, 0, 4, 4, dialog_colors, history_dlg_callback, NULL,
|
||||
"[History-query]", _("History"), DLG_COMPACT);
|
||||
query_dlg->data = &hist_data;
|
||||
|
||||
|
@ -357,7 +357,7 @@ history_show (GList ** history, Widget * widget, int current)
|
|||
listbox_select_entry (query_list, current);
|
||||
}
|
||||
|
||||
if (run_dlg (query_dlg) != B_CANCEL)
|
||||
if (dlg_run (query_dlg) != B_CANCEL)
|
||||
{
|
||||
char *q;
|
||||
|
||||
|
@ -380,7 +380,7 @@ history_show (GList ** history, Widget * widget, int current)
|
|||
if (WIDGET (query_dlg)->y < widget->y)
|
||||
z = g_list_reverse (z);
|
||||
|
||||
destroy_dlg (query_dlg);
|
||||
dlg_destroy (query_dlg);
|
||||
|
||||
g_list_foreach (*history, (GFunc) g_free, NULL);
|
||||
g_list_free (*history);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
2004, 2005, 2006, 2007, 2009, 2010, 2011
|
||||
2004, 2005, 2006, 2007, 2009, 2010, 2011, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
@ -11,7 +11,7 @@
|
|||
Jakub Jelinek, 1995
|
||||
Andrej Borsenkow, 1996
|
||||
Norbert Warmuth, 1997
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010, 2013
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
||||
|
@ -128,7 +128,7 @@ hline_new (int y, int x, int width)
|
|||
|
||||
l = g_new (WHLine, 1);
|
||||
w = WIDGET (l);
|
||||
init_widget (w, y, x, lines, width < 0 ? 1 : width, hline_callback, NULL);
|
||||
widget_init (w, y, x, lines, width < 0 ? 1 : width, hline_callback, NULL);
|
||||
l->text = NULL;
|
||||
l->auto_adjust_cols = (width < 0);
|
||||
l->transparent = FALSE;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
2004, 2005, 2006, 2007, 2009, 2010, 2011
|
||||
2004, 2005, 2006, 2007, 2009, 2010, 2011, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
@ -11,7 +11,7 @@
|
|||
Jakub Jelinek, 1995
|
||||
Andrej Borsenkow, 1996
|
||||
Norbert Warmuth, 1997
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010, 2013
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
||||
|
@ -1014,7 +1014,7 @@ input_new (int y, int x, const int *input_colors, int width, const char *def_tex
|
|||
|
||||
in = g_new (WInput, 1);
|
||||
w = WIDGET (in);
|
||||
init_widget (w, y, x, 1, width, input_callback, input_event);
|
||||
widget_init (w, y, x, 1, width, input_callback, input_event);
|
||||
w->options |= W_IS_INPUT;
|
||||
w->set_options = input_set_options_callback;
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
Written by:
|
||||
Jakub Jelinek, 1995
|
||||
Slava Zanko <slavazanko@gmail.com>, 2013
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2013
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
||||
|
@ -1253,14 +1254,14 @@ complete_engine (WInput * in, int what_to_do)
|
|||
min_end = end;
|
||||
query_height = h;
|
||||
query_width = w;
|
||||
query_dlg = create_dlg (TRUE, y, x, query_height, query_width,
|
||||
query_dlg = dlg_create (TRUE, y, x, query_height, query_width,
|
||||
dialog_colors, query_callback, NULL,
|
||||
"[Completion]", NULL, DLG_COMPACT);
|
||||
query_list = listbox_new (1, 1, h - 2, w - 2, FALSE, NULL);
|
||||
add_widget (query_dlg, query_list);
|
||||
for (p = in->completions + 1; *p; p++)
|
||||
listbox_add_item (query_list, LISTBOX_APPEND_AT_END, 0, *p, NULL);
|
||||
run_dlg (query_dlg);
|
||||
dlg_run (query_dlg);
|
||||
q = NULL;
|
||||
if (query_dlg->ret_value == B_ENTER)
|
||||
{
|
||||
|
@ -1271,7 +1272,7 @@ complete_engine (WInput * in, int what_to_do)
|
|||
if (q || end != min_end)
|
||||
input_free_completions (in);
|
||||
i = query_dlg->ret_value; /* B_USER if user wants to start over again */
|
||||
destroy_dlg (query_dlg);
|
||||
dlg_destroy (query_dlg);
|
||||
if (i == B_USER)
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
2004, 2005, 2006, 2007, 2009, 2010, 2011
|
||||
2004, 2005, 2006, 2007, 2009, 2010, 2011, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
@ -11,7 +11,7 @@
|
|||
Jakub Jelinek, 1995
|
||||
Andrej Borsenkow, 1996
|
||||
Norbert Warmuth, 1997
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010, 2013
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
||||
|
@ -142,7 +142,7 @@ label_new (int y, int x, const char *text)
|
|||
|
||||
l = g_new (WLabel, 1);
|
||||
w = WIDGET (l);
|
||||
init_widget (w, y, x, lines, cols, label_callback, NULL);
|
||||
widget_init (w, y, x, lines, cols, label_callback, NULL);
|
||||
|
||||
l->text = g_strdup (text);
|
||||
l->auto_adjust_cols = TRUE;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Widget based utility functions.
|
||||
|
||||
Copyright (C) 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
2005, 2006, 2007, 2008, 2009, 2010, 2011
|
||||
2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
@ -10,7 +10,7 @@
|
|||
Radek Doulik, 1994, 1995
|
||||
Jakub Jelinek, 1995
|
||||
Andrej Borsenkow, 1995
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010, 2013
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
||||
|
@ -112,7 +112,7 @@ create_listbox_window_centered (int center_y, int center_x, int lines, int cols,
|
|||
listbox = g_new (Listbox, 1);
|
||||
|
||||
listbox->dlg =
|
||||
create_dlg (TRUE, ypos, xpos, lines + space, cols + space,
|
||||
dlg_create (TRUE, ypos, xpos, lines + space, cols + space,
|
||||
listbox_colors, NULL, NULL, help, title, DLG_TRYUP);
|
||||
|
||||
listbox->list = listbox_new (2, 2, lines, cols, FALSE, NULL);
|
||||
|
@ -137,9 +137,9 @@ run_listbox (Listbox * l)
|
|||
{
|
||||
int val = -1;
|
||||
|
||||
if (run_dlg (l->dlg) != B_CANCEL)
|
||||
if (dlg_run (l->dlg) != B_CANCEL)
|
||||
val = l->list->pos;
|
||||
destroy_dlg (l->dlg);
|
||||
dlg_destroy (l->dlg);
|
||||
g_free (l);
|
||||
return val;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
2004, 2005, 2006, 2007, 2009, 2010, 2011
|
||||
2004, 2005, 2006, 2007, 2009, 2010, 2011, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
@ -11,7 +11,7 @@
|
|||
Jakub Jelinek, 1995
|
||||
Andrej Borsenkow, 1996
|
||||
Norbert Warmuth, 1997
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010, 2013
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
||||
|
@ -527,7 +527,7 @@ listbox_new (int y, int x, int height, int width, gboolean deletable, lcback_fn
|
|||
|
||||
l = g_new (WListbox, 1);
|
||||
w = WIDGET (l);
|
||||
init_widget (w, y, x, height, width, listbox_callback, listbox_event);
|
||||
widget_init (w, y, x, height, width, listbox_callback, listbox_event);
|
||||
|
||||
l->list = NULL;
|
||||
l->top = l->pos = 0;
|
||||
|
|
|
@ -843,7 +843,7 @@ menubar_new (int y, int x, int cols, GList * menu)
|
|||
|
||||
menubar = g_new0 (WMenuBar, 1);
|
||||
w = WIDGET (menubar);
|
||||
init_widget (w, y, x, 1, cols, menubar_callback, menubar_event);
|
||||
widget_init (w, y, x, 1, cols, menubar_callback, menubar_event);
|
||||
|
||||
menubar->is_visible = TRUE; /* by default */
|
||||
widget_want_cursor (w, FALSE);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Widget based utility functions.
|
||||
|
||||
Copyright (C) 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
||||
2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
@ -10,7 +10,7 @@
|
|||
Radek Doulik, 1994, 1995
|
||||
Jakub Jelinek, 1995
|
||||
Andrej Borsenkow, 1995
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010, 2011, 2012
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010, 2011, 2012, 2013
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
||||
|
@ -402,11 +402,11 @@ quick_dialog_skip (quick_dialog_t * quick_dlg, int nskip)
|
|||
width2 = (quick_dlg->cols - 7) / 2;
|
||||
|
||||
if (quick_dlg->x == -1 || quick_dlg->y == -1)
|
||||
dd = create_dlg (TRUE, 0, 0, y + 3, quick_dlg->cols,
|
||||
dd = dlg_create (TRUE, 0, 0, y + 3, quick_dlg->cols,
|
||||
dialog_colors, quick_dlg->callback, quick_dlg->mouse, quick_dlg->help,
|
||||
quick_dlg->title, DLG_CENTER | DLG_TRYUP);
|
||||
else
|
||||
dd = create_dlg (TRUE, quick_dlg->y, quick_dlg->x, y + 3, quick_dlg->cols,
|
||||
dd = dlg_create (TRUE, quick_dlg->y, quick_dlg->x, y + 3, quick_dlg->cols,
|
||||
dialog_colors, quick_dlg->callback, quick_dlg->mouse, quick_dlg->help,
|
||||
quick_dlg->title, DLG_NONE);
|
||||
|
||||
|
@ -568,7 +568,7 @@ quick_dialog_skip (quick_dialog_t * quick_dlg, int nskip)
|
|||
dd->current = dd->widgets;
|
||||
}
|
||||
|
||||
return_val = run_dlg (dd);
|
||||
return_val = dlg_run (dd);
|
||||
|
||||
/* Get the data if we found something interesting */
|
||||
if (return_val != B_CANCEL)
|
||||
|
@ -601,7 +601,7 @@ quick_dialog_skip (quick_dialog_t * quick_dlg, int nskip)
|
|||
}
|
||||
}
|
||||
|
||||
destroy_dlg (dd);
|
||||
dlg_destroy (dd);
|
||||
|
||||
/* destroy input labels created before */
|
||||
for (i = 0; i < widgets->len; i++)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
2004, 2005, 2006, 2007, 2009, 2010, 2011
|
||||
2004, 2005, 2006, 2007, 2009, 2010, 2011, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
@ -11,7 +11,7 @@
|
|||
Jakub Jelinek, 1995
|
||||
Andrej Borsenkow, 1996
|
||||
Norbert Warmuth, 1997
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010, 2013
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
||||
|
@ -196,7 +196,7 @@ radio_new (int y, int x, int count, const char **texts)
|
|||
wmax = max (width, wmax);
|
||||
}
|
||||
|
||||
init_widget (w, y, x, count, 4 + wmax, radio_callback, radio_event);
|
||||
widget_init (w, y, x, count, 4 + wmax, radio_callback, radio_event);
|
||||
/* 4 is width of "(*) " */
|
||||
r->state = 1;
|
||||
r->pos = 0;
|
||||
|
|
|
@ -138,7 +138,7 @@ hotkey_draw (Widget * w, const hotkey_t hotkey, gboolean focused)
|
|||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
init_widget (Widget * w, int y, int x, int lines, int cols,
|
||||
widget_init (Widget * w, int y, int x, int lines, int cols,
|
||||
widget_cb_fn callback, mouse_h mouse_handler)
|
||||
{
|
||||
w->x = x;
|
||||
|
|
|
@ -132,7 +132,7 @@ int hotkey_width (const hotkey_t hotkey);
|
|||
void hotkey_draw (Widget * w, const hotkey_t hotkey, gboolean focused);
|
||||
|
||||
/* widget initialization */
|
||||
void init_widget (Widget * w, int y, int x, int lines, int cols,
|
||||
void widget_init (Widget * w, int y, int x, int lines, int cols,
|
||||
widget_cb_fn callback, mouse_h mouse_handler);
|
||||
/* Default callback for widgets */
|
||||
cb_ret_t widget_default_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Widget based utility functions.
|
||||
|
||||
Copyright (C) 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
||||
2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
@ -10,7 +10,7 @@
|
|||
Radek Doulik, 1994, 1995
|
||||
Jakub Jelinek, 1995
|
||||
Andrej Borsenkow, 1995
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010, 2012
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010, 2012, 2013
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
||||
|
@ -129,7 +129,7 @@ do_create_message (int flags, const char *title, const char *text)
|
|||
/* do resize before initing and running */
|
||||
send_message (d, NULL, MSG_RESIZE, 0, NULL);
|
||||
|
||||
init_dlg (d);
|
||||
dlg_init (d);
|
||||
g_free (p);
|
||||
|
||||
return d;
|
||||
|
@ -149,7 +149,7 @@ fg_message (int flags, const char *title, const char *text)
|
|||
d = do_create_message (flags, title, text);
|
||||
tty_getch ();
|
||||
dlg_run_done (d);
|
||||
destroy_dlg (d);
|
||||
dlg_destroy (d);
|
||||
}
|
||||
|
||||
|
||||
|
@ -306,7 +306,7 @@ query_dialog (const char *header, const char *text, int flags, int count, ...)
|
|||
|
||||
/* prepare dialog */
|
||||
query_dlg =
|
||||
create_dlg (TRUE, 0, 0, lines, cols, query_colors, query_default_callback, NULL,
|
||||
dlg_create (TRUE, 0, 0, lines, cols, query_colors, query_default_callback, NULL,
|
||||
"[QueryBox]", header, dlg_flags);
|
||||
|
||||
if (count > 0)
|
||||
|
@ -342,7 +342,7 @@ query_dialog (const char *header, const char *text, int flags, int count, ...)
|
|||
dlg_select_widget (defbutton);
|
||||
|
||||
/* run dialog and make result */
|
||||
switch (run_dlg (query_dlg))
|
||||
switch (dlg_run (query_dlg))
|
||||
{
|
||||
case B_CANCEL:
|
||||
break;
|
||||
|
@ -351,7 +351,7 @@ query_dialog (const char *header, const char *text, int flags, int count, ...)
|
|||
}
|
||||
|
||||
/* free used memory */
|
||||
destroy_dlg (query_dlg);
|
||||
dlg_destroy (query_dlg);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -375,7 +375,7 @@ query_set_sel (int new_sel)
|
|||
/* --------------------------------------------------------------------------------------------- */
|
||||
/**
|
||||
* Create message dialog. The caller must call dlg_run_done() and
|
||||
* destroy_dlg() to dismiss it. Not safe to call from background.
|
||||
* dlg_destroy() to dismiss it. Not safe to call from background.
|
||||
*/
|
||||
|
||||
struct WDialog *
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
Written by:
|
||||
Daniel Borca <dborca@yahoo.com>, 2007
|
||||
Slava Zanko <slavazanko@gmail.com>, 2010, 2013
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2010, 2012
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2010, 2012, 2013
|
||||
Ilia Maslakov <il.smind@gmail.com>, 2010
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
@ -3450,12 +3450,12 @@ diff_view (const char *file1, const char *file2, const char *label1, const char
|
|||
|
||||
/* Create dialog and widgets, put them on the dialog */
|
||||
dview_dlg =
|
||||
create_dlg (FALSE, 0, 0, LINES, COLS, NULL, dview_dialog_callback, NULL,
|
||||
dlg_create (FALSE, 0, 0, LINES, COLS, NULL, dview_dialog_callback, NULL,
|
||||
"[Diff Viewer]", NULL, DLG_WANT_TAB);
|
||||
|
||||
dview = g_new0 (WDiff, 1);
|
||||
w = WIDGET (dview);
|
||||
init_widget (w, 0, 0, LINES - 1, COLS, dview_callback, dview_event);
|
||||
widget_init (w, 0, 0, LINES - 1, COLS, dview_callback, dview_event);
|
||||
widget_want_cursor (w, FALSE);
|
||||
|
||||
add_widget (dview_dlg, dview);
|
||||
|
@ -3470,10 +3470,10 @@ diff_view (const char *file1, const char *file2, const char *label1, const char
|
|||
* be aware of it
|
||||
*/
|
||||
if (error == 0)
|
||||
run_dlg (dview_dlg);
|
||||
dlg_run (dview_dlg);
|
||||
|
||||
if ((error != 0) || (dview_dlg->state == DLG_CLOSED))
|
||||
destroy_dlg (dview_dlg);
|
||||
dlg_destroy (dview_dlg);
|
||||
|
||||
return error == 0 ? 1 : 0;
|
||||
}
|
||||
|
|
|
@ -2260,7 +2260,7 @@ edit_init (WEdit * edit, int y, int x, int lines, int cols, const vfs_path_t * f
|
|||
edit = g_malloc0 (sizeof (WEdit));
|
||||
to_free = TRUE;
|
||||
|
||||
init_widget (WIDGET (edit), y, x, lines, cols, NULL, NULL);
|
||||
widget_init (WIDGET (edit), y, x, lines, cols, NULL, NULL);
|
||||
edit->fullscreen = TRUE;
|
||||
edit_save_size (edit);
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/*
|
||||
Editor dialogs for high level editing commands
|
||||
|
||||
Copyright (C) 2009, 2011, 2012
|
||||
Copyright (C) 2009, 2011, 2012, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
Slava Zanko <slavazanko@gmail.com>, 2009.
|
||||
Andrew Borodin, <aborodin@vmail.ru>, 2012.
|
||||
Slava Zanko <slavazanko@gmail.com>, 2009
|
||||
Andrew Borodin, <aborodin@vmail.ru>, 2012, 2013
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
||||
|
@ -313,7 +313,7 @@ editcmd_dialog_raw_key_query (const char *heading, const char *query, gboolean c
|
|||
w = max (w, wq + 3 * 2 + 1 + 2);
|
||||
|
||||
raw_dlg =
|
||||
create_dlg (TRUE, 0, 0, cancel ? 7 : 5, w, dialog_colors, editcmd_dialog_raw_key_query_cb,
|
||||
dlg_create (TRUE, 0, 0, cancel ? 7 : 5, w, dialog_colors, editcmd_dialog_raw_key_query_cb,
|
||||
NULL, NULL, heading, DLG_CENTER | DLG_TRYUP | DLG_WANT_TAB);
|
||||
|
||||
add_widget (raw_dlg, label_new (y, 3, query));
|
||||
|
@ -327,8 +327,8 @@ editcmd_dialog_raw_key_query (const char *heading, const char *query, gboolean c
|
|||
WPOS_KEEP_TOP | WPOS_CENTER_HORZ, NULL);
|
||||
}
|
||||
|
||||
w = run_dlg (raw_dlg);
|
||||
destroy_dlg (raw_dlg);
|
||||
w = dlg_run (raw_dlg);
|
||||
dlg_destroy (raw_dlg);
|
||||
|
||||
return (cancel && (w == ESC_CHAR || w == B_CANCEL)) ? 0 : w;
|
||||
}
|
||||
|
@ -372,7 +372,7 @@ editcmd_dialog_completion_show (const WEdit * edit, int max_len, GString ** comp
|
|||
|
||||
/* create the dialog */
|
||||
compl_dlg =
|
||||
create_dlg (TRUE, start_y, start_x, compl_dlg_h, compl_dlg_w,
|
||||
dlg_create (TRUE, start_y, start_x, compl_dlg_h, compl_dlg_w,
|
||||
dialog_colors, NULL, NULL, "[Completion]", NULL, DLG_COMPACT);
|
||||
|
||||
/* create the listbox */
|
||||
|
@ -386,14 +386,14 @@ editcmd_dialog_completion_show (const WEdit * edit, int max_len, GString ** comp
|
|||
listbox_add_item (compl_list, LISTBOX_APPEND_AT_END, 0, (char *) compl[i]->str, NULL);
|
||||
|
||||
/* pop up the dialog and apply the choosen completion */
|
||||
if (run_dlg (compl_dlg) == B_ENTER)
|
||||
if (dlg_run (compl_dlg) == B_ENTER)
|
||||
{
|
||||
listbox_get_current (compl_list, &curr, NULL);
|
||||
curr = g_strdup (curr);
|
||||
}
|
||||
|
||||
/* destroy dialog before return */
|
||||
destroy_dlg (compl_dlg);
|
||||
dlg_destroy (compl_dlg);
|
||||
|
||||
return curr;
|
||||
}
|
||||
|
@ -438,7 +438,7 @@ editcmd_dialog_select_definition_show (WEdit * edit, char *match_expr, int max_l
|
|||
start_y -= (offset + 1);
|
||||
|
||||
/* create the dialog */
|
||||
def_dlg = create_dlg (TRUE, start_y, start_x, def_dlg_h, def_dlg_w,
|
||||
def_dlg = dlg_create (TRUE, start_y, start_x, def_dlg_h, def_dlg_w,
|
||||
dialog_colors, NULL, NULL, "[Definitions]", match_expr, DLG_COMPACT);
|
||||
|
||||
/* create the listbox */
|
||||
|
@ -458,7 +458,7 @@ editcmd_dialog_select_definition_show (WEdit * edit, char *match_expr, int max_l
|
|||
}
|
||||
|
||||
/* pop up the dialog and apply the choosen completion */
|
||||
if (run_dlg (def_dlg) == B_ENTER)
|
||||
if (dlg_run (def_dlg) == B_ENTER)
|
||||
{
|
||||
char *tmp_curr_def = (char *) curr_def;
|
||||
int do_moveto = 0;
|
||||
|
@ -516,7 +516,7 @@ editcmd_dialog_select_definition_show (WEdit * edit, char *match_expr, int max_l
|
|||
}
|
||||
|
||||
/* destroy dialog before return */
|
||||
destroy_dlg (def_dlg);
|
||||
dlg_destroy (def_dlg);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
|
|
@ -1209,7 +1209,7 @@ edit_files (const GList * files)
|
|||
|
||||
/* Create a new dialog and add it widgets to it */
|
||||
edit_dlg =
|
||||
create_dlg (FALSE, 0, 0, LINES, COLS, NULL, edit_dialog_callback, edit_dialog_event,
|
||||
dlg_create (FALSE, 0, 0, LINES, COLS, NULL, edit_dialog_callback, edit_dialog_event,
|
||||
"[Internal File Editor]", NULL, DLG_WANT_TAB);
|
||||
|
||||
edit_dlg->get_shortcut = edit_get_shortcut;
|
||||
|
@ -1234,10 +1234,10 @@ edit_files (const GList * files)
|
|||
}
|
||||
|
||||
if (ok)
|
||||
run_dlg (edit_dlg);
|
||||
dlg_run (edit_dlg);
|
||||
|
||||
if (!ok || edit_dlg->state == DLG_CLOSED)
|
||||
destroy_dlg (edit_dlg);
|
||||
dlg_destroy (edit_dlg);
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
/*
|
||||
Editor spell checker dialogs
|
||||
|
||||
Copyright (C) 2012
|
||||
Copyright (C) 2012, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
Ilia Maslakov <il.smind@gmail.com>, 2012
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2013
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
||||
|
@ -108,7 +109,7 @@ spell_dialog_spell_suggest_show (WEdit * edit, const char *word, char **new_word
|
|||
sug_dlg_w += max_btn_len;
|
||||
sug_dlg_w = max (sug_dlg_w, word_label_len) + 1;
|
||||
|
||||
sug_dlg = create_dlg (TRUE, ypos, xpos, sug_dlg_h, sug_dlg_w,
|
||||
sug_dlg = dlg_create (TRUE, ypos, xpos, sug_dlg_h, sug_dlg_w,
|
||||
dialog_colors, NULL, NULL, "[ASpell]", _("Check word"), DLG_COMPACT);
|
||||
|
||||
add_widget (sug_dlg, label_new (1, 2, lang_label));
|
||||
|
@ -127,7 +128,7 @@ spell_dialog_spell_suggest_show (WEdit * edit, const char *word, char **new_word
|
|||
add_widget (sug_dlg, skip_btn);
|
||||
add_widget (sug_dlg, cancel_button);
|
||||
|
||||
res = run_dlg (sug_dlg);
|
||||
res = dlg_run (sug_dlg);
|
||||
if (res == B_ENTER)
|
||||
{
|
||||
char *tmp = NULL;
|
||||
|
@ -138,7 +139,7 @@ spell_dialog_spell_suggest_show (WEdit * edit, const char *word, char **new_word
|
|||
*new_word = tmp;
|
||||
}
|
||||
|
||||
destroy_dlg (sug_dlg);
|
||||
dlg_destroy (sug_dlg);
|
||||
g_free (lang_label);
|
||||
g_free (word_label);
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Chown-advanced command -- for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
2005, 2007, 2011
|
||||
2005, 2007, 2011, 2012, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
@ -336,7 +336,7 @@ do_enter_key (WDialog * h, int f_pos)
|
|||
chl_end = FALSE;
|
||||
|
||||
chl_dlg =
|
||||
create_dlg (TRUE, lyy, lxx, 13, 17, dialog_colors, chl_callback, NULL,
|
||||
dlg_create (TRUE, lyy, lxx, 13, 17, dialog_colors, chl_callback, NULL,
|
||||
"[Advanced Chown]", title, DLG_COMPACT);
|
||||
|
||||
/* get new listboxes */
|
||||
|
@ -366,7 +366,7 @@ do_enter_key (WDialog * h, int f_pos)
|
|||
b_pos = chl_list->pos;
|
||||
add_widget (chl_dlg, chl_list);
|
||||
|
||||
result = run_dlg (chl_dlg);
|
||||
result = dlg_run (chl_dlg);
|
||||
|
||||
if (b_pos != chl_list->pos)
|
||||
{
|
||||
|
@ -416,7 +416,7 @@ do_enter_key (WDialog * h, int f_pos)
|
|||
f_pos++;
|
||||
}
|
||||
/* Here we used to redraw the window */
|
||||
destroy_dlg (chl_dlg);
|
||||
dlg_destroy (chl_dlg);
|
||||
}
|
||||
while (chl_end);
|
||||
}
|
||||
|
@ -661,7 +661,7 @@ init_chown_advanced (void)
|
|||
dlg_h += 2;
|
||||
|
||||
ch_dlg =
|
||||
create_dlg (TRUE, 0, 0, dlg_h, dlg_w, dialog_colors, advanced_chown_callback, NULL,
|
||||
dlg_create (TRUE, 0, 0, dlg_h, dlg_w, dialog_colors, advanced_chown_callback, NULL,
|
||||
"[Advanced Chown]", _("Chown advanced command"), DLG_CENTER);
|
||||
|
||||
|
||||
|
@ -842,7 +842,7 @@ chown_advanced_cmd (void)
|
|||
|
||||
if (mc_stat (vpath, sf_stat) != 0)
|
||||
{ /* get status of file */
|
||||
destroy_dlg (ch_dlg);
|
||||
dlg_destroy (ch_dlg);
|
||||
vfs_path_free (vpath);
|
||||
break;
|
||||
}
|
||||
|
@ -857,7 +857,7 @@ chown_advanced_cmd (void)
|
|||
chown_refresh ();
|
||||
update_ownership ();
|
||||
|
||||
result = run_dlg (ch_dlg);
|
||||
result = dlg_run (ch_dlg);
|
||||
|
||||
switch (result)
|
||||
{
|
||||
|
@ -891,7 +891,7 @@ chown_advanced_cmd (void)
|
|||
do_file_mark (current_panel, current_file, 0);
|
||||
need_update = TRUE;
|
||||
}
|
||||
destroy_dlg (ch_dlg);
|
||||
dlg_destroy (ch_dlg);
|
||||
vfs_path_free (vpath);
|
||||
}
|
||||
while (current_panel->marked && !end_chown);
|
||||
|
|
|
@ -920,7 +920,7 @@ tree_box (const char *current_dir)
|
|||
(void) current_dir;
|
||||
|
||||
/* Create the components */
|
||||
dlg = create_dlg (TRUE, 0, 0, LINES - 9, COLS - 20, dialog_colors, tree_callback, NULL,
|
||||
dlg = dlg_create (TRUE, 0, 0, LINES - 9, COLS - 20, dialog_colors, tree_callback, NULL,
|
||||
"[Directory Tree]", _("Directory tree"), DLG_CENTER);
|
||||
wd = WIDGET (dlg);
|
||||
|
||||
|
@ -933,14 +933,14 @@ tree_box (const char *current_dir)
|
|||
WIDGET (bar)->x = 0;
|
||||
WIDGET (bar)->y = LINES - 1;
|
||||
|
||||
if (run_dlg (dlg) == B_ENTER)
|
||||
if (dlg_run (dlg) == B_ENTER)
|
||||
{
|
||||
const vfs_path_t *selected_name;
|
||||
selected_name = tree_selected_name (mytree);
|
||||
val = g_strdup (vfs_path_as_str (selected_name));
|
||||
}
|
||||
|
||||
destroy_dlg (dlg);
|
||||
dlg_destroy (dlg);
|
||||
return val;
|
||||
}
|
||||
|
||||
|
@ -1134,7 +1134,7 @@ jobs_cmd (void)
|
|||
x += (int) n_but - 1;
|
||||
cols = max (cols, x + 6);
|
||||
|
||||
jobs_dlg = create_dlg (TRUE, 0, 0, lines, cols, dialog_colors, NULL, NULL,
|
||||
jobs_dlg = dlg_create (TRUE, 0, 0, lines, cols, dialog_colors, NULL, NULL,
|
||||
"[Background jobs]", _("Background jobs"), DLG_CENTER);
|
||||
|
||||
bg_list = listbox_new (2, 2, lines - 6, cols - 6, FALSE, NULL);
|
||||
|
@ -1152,8 +1152,8 @@ jobs_cmd (void)
|
|||
x += job_but[i].len + 1;
|
||||
}
|
||||
|
||||
(void) run_dlg (jobs_dlg);
|
||||
destroy_dlg (jobs_dlg);
|
||||
(void) dlg_run (jobs_dlg);
|
||||
dlg_destroy (jobs_dlg);
|
||||
}
|
||||
#endif /* ENABLE_BACKGROUND */
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Chmod command -- for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
|
||||
2008, 2009, 2010, 2011
|
||||
2008, 2009, 2010, 2011, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
@ -312,7 +312,7 @@ init_chmod (const char *fname, const struct stat *sf_stat)
|
|||
}
|
||||
|
||||
ch_dlg =
|
||||
create_dlg (TRUE, 0, 0, lines, cols, dialog_colors,
|
||||
dlg_create (TRUE, 0, 0, lines, cols, dialog_colors,
|
||||
chmod_callback, NULL, "[Chmod]", _("Chmod command"), DLG_CENTER);
|
||||
|
||||
add_widget (ch_dlg, groupbox_new (PY, PX, check_perm_num + 2, perm_gb_len, _("Permission")));
|
||||
|
@ -489,7 +489,7 @@ chmod_cmd (void)
|
|||
ch_dlg = init_chmod (fname, &sf_stat);
|
||||
|
||||
/* do action */
|
||||
result = run_dlg (ch_dlg);
|
||||
result = dlg_run (ch_dlg);
|
||||
|
||||
switch (result)
|
||||
{
|
||||
|
@ -552,7 +552,7 @@ chmod_cmd (void)
|
|||
|
||||
vfs_path_free (vpath);
|
||||
|
||||
destroy_dlg (ch_dlg);
|
||||
dlg_destroy (ch_dlg);
|
||||
}
|
||||
while (current_panel->marked != 0 && !end_chmod);
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Chown command -- for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||
2007, 2011, 2012
|
||||
2007, 2011, 2012, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
@ -212,7 +212,7 @@ init_chown (void)
|
|||
lines = GH + 4 + (single_set ? 2 : 4);
|
||||
|
||||
ch_dlg =
|
||||
create_dlg (TRUE, 0, 0, lines, cols, dialog_colors, chown_callback, NULL, "[Chown]",
|
||||
dlg_create (TRUE, 0, 0, lines, cols, dialog_colors, chown_callback, NULL, "[Chown]",
|
||||
_("Chown command"), DLG_CENTER);
|
||||
|
||||
add_widget (ch_dlg, groupbox_new (2, 3, GH, GW, _("User name")));
|
||||
|
@ -354,7 +354,7 @@ chown_cmd (void)
|
|||
vpath = vfs_path_from_str (fname);
|
||||
if (mc_stat (vpath, &sf_stat) != 0)
|
||||
{ /* get status of file */
|
||||
destroy_dlg (ch_dlg);
|
||||
dlg_destroy (ch_dlg);
|
||||
vfs_path_free (vpath);
|
||||
break;
|
||||
}
|
||||
|
@ -371,7 +371,7 @@ chown_cmd (void)
|
|||
chown_label (3, buffer);
|
||||
chown_label (4, string_perm (sf_stat.st_mode));
|
||||
|
||||
switch (run_dlg (ch_dlg))
|
||||
switch (dlg_run (ch_dlg))
|
||||
{
|
||||
case B_CANCEL:
|
||||
end_chown = 1;
|
||||
|
@ -445,7 +445,7 @@ chown_cmd (void)
|
|||
need_update = 1;
|
||||
}
|
||||
|
||||
destroy_dlg (ch_dlg);
|
||||
dlg_destroy (ch_dlg);
|
||||
}
|
||||
while (current_panel->marked && !end_chown);
|
||||
|
||||
|
|
|
@ -2511,7 +2511,7 @@ compute_dir_size_create_ui (gboolean allow_skip)
|
|||
ui = g_new (ComputeDirSizeUI, 1);
|
||||
|
||||
ui_width = max (COLS / 2, b_width + 6);
|
||||
ui->dlg = create_dlg (TRUE, 0, 0, 8, ui_width, dialog_colors, NULL, NULL, NULL,
|
||||
ui->dlg = dlg_create (TRUE, 0, 0, 8, ui_width, dialog_colors, NULL, NULL, NULL,
|
||||
_("Directory scanning"), DLG_CENTER);
|
||||
|
||||
ui->dirname = label_new (2, 3, "");
|
||||
|
@ -2528,8 +2528,8 @@ compute_dir_size_create_ui (gboolean allow_skip)
|
|||
}
|
||||
|
||||
/* We will manage the dialog without any help,
|
||||
that's why we have to call init_dlg */
|
||||
init_dlg (ui->dlg);
|
||||
that's why we have to call dlg_init */
|
||||
dlg_init (ui->dlg);
|
||||
|
||||
return ui;
|
||||
}
|
||||
|
@ -2546,7 +2546,7 @@ compute_dir_size_destroy_ui (ComputeDirSizeUI * ui)
|
|||
|
||||
/* close and destroy dialog */
|
||||
dlg_run_done (ui->dlg);
|
||||
destroy_dlg (ui->dlg);
|
||||
dlg_destroy (ui->dlg);
|
||||
g_free (ui);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -535,7 +535,7 @@ overwrite_query_dialog (FileOpContext * ctx, enum OperationMode mode)
|
|||
|
||||
/* FIXME - missing help node */
|
||||
ui->replace_dlg =
|
||||
create_dlg (TRUE, 0, 0, rd_ylen, rd_xlen, alarm_colors, NULL, NULL, "[Replace]", title,
|
||||
dlg_create (TRUE, 0, 0, rd_ylen, rd_xlen, alarm_colors, NULL, NULL, "[Replace]", title,
|
||||
DLG_CENTER);
|
||||
|
||||
/* prompt */
|
||||
|
@ -588,8 +588,8 @@ overwrite_query_dialog (FileOpContext * ctx, enum OperationMode mode)
|
|||
label_set_text (LABEL (label1), str_trunc (stripped_name, rd_xlen - 8));
|
||||
dlg_set_size (ui->replace_dlg, y + 3, rd_xlen);
|
||||
dlg_select_by_id (ui->replace_dlg, yes_id);
|
||||
result = run_dlg (ui->replace_dlg);
|
||||
destroy_dlg (ui->replace_dlg);
|
||||
result = dlg_run (ui->replace_dlg);
|
||||
dlg_destroy (ui->replace_dlg);
|
||||
|
||||
g_free (widgets_len);
|
||||
g_free (stripped_name_orig);
|
||||
|
@ -732,7 +732,7 @@ file_op_context_create_ui (FileOpContext * ctx, gboolean with_eta,
|
|||
ui->showing_bps = with_eta;
|
||||
|
||||
ui->op_dlg =
|
||||
create_dlg (TRUE, 0, 0, dlg_height, dlg_width, dialog_colors, NULL, NULL, NULL,
|
||||
dlg_create (TRUE, 0, 0, dlg_height, dlg_width, dialog_colors, NULL, NULL, NULL,
|
||||
op_names[ctx->operation], DLG_CENTER);
|
||||
|
||||
ui->file_label[0] = label_new (y++, x, "");
|
||||
|
@ -826,8 +826,8 @@ file_op_context_create_ui (FileOpContext * ctx, gboolean with_eta,
|
|||
dlg_select_widget (progress_buttons[0].w);
|
||||
|
||||
/* We will manage the dialog without any help, that's why
|
||||
we have to call init_dlg */
|
||||
init_dlg (ui->op_dlg);
|
||||
we have to call dlg_init */
|
||||
dlg_init (ui->op_dlg);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -840,7 +840,7 @@ file_op_context_destroy_ui (FileOpContext * ctx)
|
|||
FileOpContextUI *ui = (FileOpContextUI *) ctx->ui;
|
||||
|
||||
dlg_run_done (ui->op_dlg);
|
||||
destroy_dlg (ui->op_dlg);
|
||||
dlg_destroy (ui->op_dlg);
|
||||
g_free (ui);
|
||||
ctx->ui = NULL;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
Written by:
|
||||
Miguel de Icaza, 1995
|
||||
Slava Zanko <slavazanko@gmail.com>, 2013
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2013
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
||||
|
@ -599,7 +600,7 @@ find_parameters (char **start_dir, ssize_t * start_dir_len,
|
|||
disable = !options.content_use;
|
||||
|
||||
find_dlg =
|
||||
create_dlg (TRUE, 0, 0, lines, cols, dialog_colors, find_parm_callback, NULL, "[Find File]",
|
||||
dlg_create (TRUE, 0, 0, lines, cols, dialog_colors, find_parm_callback, NULL, "[Find File]",
|
||||
_("Find File"), DLG_CENTER);
|
||||
|
||||
x1 = 3;
|
||||
|
@ -705,7 +706,7 @@ find_parameters (char **start_dir, ssize_t * start_dir_len,
|
|||
find_par_start:
|
||||
dlg_select_widget (in_name);
|
||||
|
||||
switch (run_dlg (find_dlg))
|
||||
switch (dlg_run (find_dlg))
|
||||
{
|
||||
case B_CANCEL:
|
||||
return_value = FALSE;
|
||||
|
@ -802,7 +803,7 @@ find_parameters (char **start_dir, ssize_t * start_dir_len,
|
|||
}
|
||||
}
|
||||
|
||||
destroy_dlg (find_dlg);
|
||||
dlg_destroy (find_dlg);
|
||||
|
||||
return return_value;
|
||||
}
|
||||
|
@ -1576,7 +1577,7 @@ setup_gui (void)
|
|||
cols = COLS - 16;
|
||||
|
||||
find_dlg =
|
||||
create_dlg (TRUE, 0, 0, lines, cols, dialog_colors, find_callback, NULL, "[Find File]",
|
||||
dlg_create (TRUE, 0, 0, lines, cols, dialog_colors, find_callback, NULL, "[Find File]",
|
||||
_("Find File"), DLG_CENTER);
|
||||
|
||||
find_calc_button_locations (find_dlg, TRUE);
|
||||
|
@ -1641,7 +1642,7 @@ run_process (void)
|
|||
resuming = 0;
|
||||
|
||||
widget_want_idle (WIDGET (find_dlg), TRUE);
|
||||
ret = run_dlg (find_dlg);
|
||||
ret = dlg_run (find_dlg);
|
||||
|
||||
mc_search_free (search_file_handle);
|
||||
search_file_handle = NULL;
|
||||
|
@ -1657,7 +1658,7 @@ static void
|
|||
kill_gui (void)
|
||||
{
|
||||
widget_want_idle (WIDGET (find_dlg), FALSE);
|
||||
destroy_dlg (find_dlg);
|
||||
dlg_destroy (find_dlg);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Directory hotlist -- for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
||||
2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -10,7 +10,7 @@
|
|||
Janne Kukonlehto, 1995
|
||||
Andrej Borsenkow, 1996
|
||||
Norbert Warmuth, 1997
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2012
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2012, 2013
|
||||
|
||||
Janne did the original Hotlist code, Andrej made the groupable
|
||||
hotlist; the move hotlist and revamped the file format and made
|
||||
|
@ -356,11 +356,11 @@ hotlist_button_callback (WButton * button, int action)
|
|||
listbox_get_current (l_hotlist, NULL, (void **) &item);
|
||||
init_movelist (item);
|
||||
hotlist_state.moving = TRUE;
|
||||
ret = run_dlg (movelist_dlg);
|
||||
ret = dlg_run (movelist_dlg);
|
||||
hotlist_state.moving = FALSE;
|
||||
listbox_get_current (l_movelist, NULL, (void **) &moveto_item);
|
||||
moveto_group = current_group;
|
||||
destroy_dlg (movelist_dlg);
|
||||
dlg_destroy (movelist_dlg);
|
||||
current_group = saved;
|
||||
if (ret == B_CANCEL)
|
||||
return 0;
|
||||
|
@ -740,7 +740,7 @@ init_hotlist (hotlist_t list_type)
|
|||
}
|
||||
|
||||
hotlist_dlg =
|
||||
create_dlg (TRUE, 0, 0, lines, cols, dialog_colors, hotlist_callback, NULL, help_node,
|
||||
dlg_create (TRUE, 0, 0, lines, cols, dialog_colors, hotlist_callback, NULL, help_node,
|
||||
title, DLG_CENTER);
|
||||
|
||||
y = UY;
|
||||
|
@ -807,7 +807,7 @@ init_movelist (struct hotlist *item)
|
|||
hdr = g_strdup_printf (_("Moving %s"), item->label);
|
||||
|
||||
movelist_dlg =
|
||||
create_dlg (TRUE, 0, 0, lines, cols, dialog_colors, hotlist_callback, NULL, "[Hotlist]",
|
||||
dlg_create (TRUE, 0, 0, lines, cols, dialog_colors, hotlist_callback, NULL, "[Hotlist]",
|
||||
hdr, DLG_CENTER);
|
||||
|
||||
g_free (hdr);
|
||||
|
@ -848,7 +848,7 @@ init_movelist (struct hotlist *item)
|
|||
static void
|
||||
hotlist_done (void)
|
||||
{
|
||||
destroy_dlg (hotlist_dlg);
|
||||
dlg_destroy (hotlist_dlg);
|
||||
l_hotlist = NULL;
|
||||
if (FALSE)
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
|
||||
|
@ -1602,7 +1602,7 @@ hotlist_show (hotlist_t list_type)
|
|||
tty_setcolor (SELECTED_COLOR);
|
||||
|
||||
hotlist_state.running = TRUE;
|
||||
res = run_dlg (hotlist_dlg);
|
||||
res = dlg_run (hotlist_dlg);
|
||||
hotlist_state.running = FALSE;
|
||||
save_hotlist ();
|
||||
|
||||
|
|
|
@ -326,7 +326,7 @@ info_new (int y, int x, int lines, int cols)
|
|||
|
||||
info = g_new (struct WInfo, 1);
|
||||
w = WIDGET (info);
|
||||
init_widget (w, y, x, lines, cols, info_callback, NULL);
|
||||
widget_init (w, y, x, lines, cols, info_callback, NULL);
|
||||
/* We do not want the cursor */
|
||||
widget_want_cursor (w, FALSE);
|
||||
|
||||
|
|
|
@ -515,7 +515,7 @@ init_layout (void)
|
|||
width = max (l1 * 2 + 7, b);
|
||||
|
||||
layout_dlg =
|
||||
create_dlg (TRUE, 0, 0, 15, width, dialog_colors, layout_callback, NULL, "[Layout]",
|
||||
dlg_create (TRUE, 0, 0, 15, width, dialog_colors, layout_callback, NULL, "[Layout]",
|
||||
_("Layout"), DLG_CENTER);
|
||||
|
||||
#define XTRACT(i) *check_options[i].variable, check_options[i].text
|
||||
|
@ -646,7 +646,7 @@ layout_box (void)
|
|||
|
||||
layout_dlg = init_layout ();
|
||||
|
||||
if (run_dlg (layout_dlg) == B_ENTER)
|
||||
if (dlg_run (layout_dlg) == B_ENTER)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
|
@ -669,7 +669,7 @@ layout_box (void)
|
|||
layout_do_change = TRUE;
|
||||
}
|
||||
|
||||
destroy_dlg (layout_dlg);
|
||||
dlg_destroy (layout_dlg);
|
||||
if (layout_do_change)
|
||||
layout_change ();
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Directory panel listing format editor -- for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2005,
|
||||
2006, 2007, 2011
|
||||
2006, 2007, 2011, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -198,7 +198,7 @@ init_listmode (char *oldlistformat)
|
|||
do_refresh ();
|
||||
|
||||
listmode_dlg =
|
||||
create_dlg (TRUE, 0, 0, 22, 74, dialog_colors, NULL, NULL, listmode_section,
|
||||
dlg_create (TRUE, 0, 0, 22, 74, dialog_colors, NULL, NULL, listmode_section,
|
||||
"Listing format edit", DLG_CENTER | DLG_REVERSE);
|
||||
|
||||
add_widget (listmode_dlg, groupbox_new (UY, UX, 4, 63, "General options"));
|
||||
|
@ -273,7 +273,7 @@ init_listmode (char *oldlistformat)
|
|||
static void
|
||||
listmode_done (WDialog * h)
|
||||
{
|
||||
destroy_dlg (h);
|
||||
dlg_destroy (h);
|
||||
if (0)
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
|
||||
repaint_screen ();
|
||||
|
@ -327,7 +327,7 @@ listmode_edit (char *oldlistformat)
|
|||
listmode_dlg = init_listmode (s);
|
||||
g_free (s);
|
||||
|
||||
if (run_dlg (listmode_dlg) == B_ENTER)
|
||||
if (dlg_run (listmode_dlg) == B_ENTER)
|
||||
{
|
||||
newformat = collect_new_format ();
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
Miguel de Icaza, 1994, 1995, 1996, 1997
|
||||
Janne Kukonlehto, 1994, 1995
|
||||
Norbert Warmuth, 1997
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010, 2012, 2013
|
||||
Slava Zanko <slavazanko@gmail.com>, 2013
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
@ -922,7 +922,7 @@ create_panels_and_run_mc (void)
|
|||
midnight_set_buttonbar (the_bar);
|
||||
|
||||
/* Run the Midnight Commander if no file was specified in the command line */
|
||||
run_dlg (midnight_dlg);
|
||||
dlg_run (midnight_dlg);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -1718,7 +1718,7 @@ do_nc (void)
|
|||
edit_stack_init ();
|
||||
#endif
|
||||
|
||||
midnight_dlg = create_dlg (FALSE, 0, 0, LINES, COLS, midnight_colors, midnight_callback,
|
||||
midnight_dlg = dlg_create (FALSE, 0, 0, LINES, COLS, midnight_colors, midnight_callback,
|
||||
midnight_event, "[main]", NULL, DLG_NONE);
|
||||
|
||||
/* Check if we were invoked as an editor or file viewer */
|
||||
|
@ -1739,7 +1739,7 @@ do_nc (void)
|
|||
|
||||
ret = TRUE;
|
||||
|
||||
/* destroy_dlg destroys even current_panel->cwd_vpath, so we have to save a copy :) */
|
||||
/* dlg_destroy destroys even current_panel->cwd_vpath, so we have to save a copy :) */
|
||||
if (mc_args__last_wd_file != NULL && vfs_current_is_local ())
|
||||
last_wd_string = g_strdup (vfs_path_as_str (current_panel->cwd_vpath));
|
||||
|
||||
|
@ -1753,7 +1753,7 @@ do_nc (void)
|
|||
mc_global.midnight_shutdown = TRUE;
|
||||
dialog_switch_shutdown ();
|
||||
done_mc ();
|
||||
destroy_dlg (midnight_dlg);
|
||||
dlg_destroy (midnight_dlg);
|
||||
current_panel = NULL;
|
||||
|
||||
#ifdef USE_INTERNAL_EDIT
|
||||
|
|
|
@ -4056,7 +4056,7 @@ panel_new_with_dir (const char *panel_name, const vfs_path_t * vpath)
|
|||
panel = g_new0 (WPanel, 1);
|
||||
w = WIDGET (panel);
|
||||
/* No know sizes of the panel at startup */
|
||||
init_widget (w, 0, 0, 0, 0, panel_callback, panel_event);
|
||||
widget_init (w, 0, 0, 0, 0, panel_callback, panel_event);
|
||||
/* We do not want the cursor */
|
||||
widget_want_cursor (w, FALSE);
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ init_panelize (void)
|
|||
panelize_cols = max (panelize_cols, blen + 4);
|
||||
|
||||
panelize_dlg =
|
||||
create_dlg (TRUE, 0, 0, 20, panelize_cols, dialog_colors, panelize_callback, NULL,
|
||||
dlg_create (TRUE, 0, 0, 20, panelize_cols, dialog_colors, panelize_callback, NULL,
|
||||
"[External panelize]", _("External panelize"), DLG_CENTER);
|
||||
|
||||
/* add listbox to the dialogs */
|
||||
|
@ -216,7 +216,7 @@ init_panelize (void)
|
|||
static void
|
||||
panelize_done (void)
|
||||
{
|
||||
destroy_dlg (panelize_dlg);
|
||||
dlg_destroy (panelize_dlg);
|
||||
repaint_screen ();
|
||||
}
|
||||
|
||||
|
@ -539,7 +539,7 @@ external_panelize (void)
|
|||
/* display file info */
|
||||
tty_setcolor (SELECTED_COLOR);
|
||||
|
||||
run_dlg (panelize_dlg);
|
||||
dlg_run (panelize_dlg);
|
||||
|
||||
switch (panelize_dlg->ret_value)
|
||||
{
|
||||
|
@ -564,7 +564,8 @@ external_panelize (void)
|
|||
if (target != NULL && *target)
|
||||
{
|
||||
char *cmd = g_strdup (target);
|
||||
destroy_dlg (panelize_dlg);
|
||||
|
||||
dlg_destroy (panelize_dlg);
|
||||
do_external_panelize (cmd);
|
||||
g_free (cmd);
|
||||
repaint_screen ();
|
||||
|
|
|
@ -1260,7 +1260,7 @@ tree_new (int y, int x, int lines, int cols, gboolean is_panel)
|
|||
tree = g_new (WTree, 1);
|
||||
w = WIDGET (tree);
|
||||
|
||||
init_widget (w, y, x, lines, cols, tree_callback, tree_event);
|
||||
widget_init (w, y, x, lines, cols, tree_callback, tree_event);
|
||||
tree->is_panel = is_panel;
|
||||
tree->selected_ptr = 0;
|
||||
|
||||
|
|
10
src/help.c
10
src/help.c
|
@ -2,7 +2,7 @@
|
|||
Hypertext file browser.
|
||||
|
||||
Copyright (C) 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
2005, 2006, 2007, 2011
|
||||
2005, 2006, 2007, 2011, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
@ -1047,7 +1047,7 @@ mousedispatch_new (int y, int x, int yl, int xl)
|
|||
Widget *w;
|
||||
|
||||
w = g_new (Widget, 1);
|
||||
init_widget (w, y, x, yl, xl, md_callback, help_event);
|
||||
widget_init (w, y, x, yl, xl, md_callback, help_event);
|
||||
return w;
|
||||
}
|
||||
|
||||
|
@ -1120,7 +1120,7 @@ help_interactive_display (const gchar * event_group_name, const gchar * event_na
|
|||
help_lines = min (LINES - 4, max (2 * LINES / 3, 18));
|
||||
|
||||
whelp =
|
||||
create_dlg (TRUE, 0, 0, help_lines + 4, HELP_WINDOW_WIDTH + 4,
|
||||
dlg_create (TRUE, 0, 0, help_lines + 4, HELP_WINDOW_WIDTH + 4,
|
||||
help_colors, help_callback, NULL, "[Help]", _("Help"),
|
||||
DLG_TRYUP | DLG_CENTER | DLG_WANT_TAB);
|
||||
|
||||
|
@ -1154,9 +1154,9 @@ help_interactive_display (const gchar * event_group_name, const gchar * event_na
|
|||
buttonbar_set_label (help_bar, 9, "", help_map, NULL);
|
||||
buttonbar_set_label (help_bar, 10, Q_ ("ButtonBar|Quit"), help_map, NULL);
|
||||
|
||||
run_dlg (whelp);
|
||||
dlg_run (whelp);
|
||||
interactive_display_finish ();
|
||||
destroy_dlg (whelp);
|
||||
dlg_destroy (whelp);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
12
src/learn.c
12
src/learn.c
|
@ -2,12 +2,12 @@
|
|||
Learn keys
|
||||
|
||||
Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||
2007, 2009, 2011, 2012
|
||||
2007, 2009, 2011, 2012, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
Jakub Jelinek, 1995
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2012
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2012, 2013
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
||||
|
@ -126,7 +126,7 @@ learn_button (WButton * button, int action)
|
|||
}
|
||||
|
||||
dlg_run_done (d);
|
||||
destroy_dlg (d);
|
||||
dlg_destroy (d);
|
||||
|
||||
dlg_select_widget (learnkeys[action - B_USER].button);
|
||||
|
||||
|
@ -276,7 +276,7 @@ init_learn (void)
|
|||
do_refresh ();
|
||||
|
||||
learn_dlg =
|
||||
create_dlg (TRUE, 0, 0, dlg_height, dlg_width, dialog_colors, learn_callback, NULL,
|
||||
dlg_create (TRUE, 0, 0, dlg_height, dlg_width, dialog_colors, learn_callback, NULL,
|
||||
"[Learn keys]", learn_title, DLG_CENTER);
|
||||
|
||||
/* find first unshown button */
|
||||
|
@ -342,7 +342,7 @@ init_learn (void)
|
|||
static void
|
||||
learn_done (void)
|
||||
{
|
||||
destroy_dlg (learn_dlg);
|
||||
dlg_destroy (learn_dlg);
|
||||
repaint_screen ();
|
||||
}
|
||||
|
||||
|
@ -403,7 +403,7 @@ learn_keys (void)
|
|||
application_keypad_mode ();
|
||||
|
||||
init_learn ();
|
||||
result = run_dlg (learn_dlg);
|
||||
result = dlg_run (learn_dlg);
|
||||
|
||||
old_esc_mode = save_old_esc_mode;
|
||||
mc_global.tty.alternate_plus_minus = save_alternate_plus_minus;
|
||||
|
|
|
@ -198,7 +198,7 @@ mcview_new (int y, int x, int lines, int cols, gboolean is_panel)
|
|||
mcview_t *view;
|
||||
|
||||
view = g_new0 (mcview_t, 1);
|
||||
init_widget (WIDGET (view), y, x, lines, cols, mcview_callback, mcview_event);
|
||||
widget_init (WIDGET (view), y, x, lines, cols, mcview_callback, mcview_event);
|
||||
|
||||
view->hex_mode = FALSE;
|
||||
view->hexedit_mode = FALSE;
|
||||
|
@ -236,7 +236,7 @@ mcview_viewer (const char *command, const vfs_path_t * file_vpath, int start_lin
|
|||
WDialog *view_dlg;
|
||||
|
||||
/* 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 = dlg_create (FALSE, 0, 0, LINES, COLS, NULL, mcview_dialog_callback, NULL,
|
||||
"[Internal File Viewer]", NULL, DLG_WANT_TAB);
|
||||
|
||||
lc_mcview = mcview_new (0, 0, LINES - 1, COLS, FALSE);
|
||||
|
@ -249,12 +249,12 @@ mcview_viewer (const char *command, const vfs_path_t * file_vpath, int start_lin
|
|||
succeeded = mcview_load (lc_mcview, command, vfs_path_as_str (file_vpath), start_line);
|
||||
|
||||
if (succeeded)
|
||||
run_dlg (view_dlg);
|
||||
dlg_run (view_dlg);
|
||||
else
|
||||
view_dlg->state = DLG_CLOSED;
|
||||
|
||||
if (view_dlg->state == DLG_CLOSED)
|
||||
destroy_dlg (view_dlg);
|
||||
dlg_destroy (view_dlg);
|
||||
|
||||
return succeeded;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Function for search data
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
2004, 2005, 2006, 2007, 2009, 2011
|
||||
2004, 2005, 2006, 2007, 2009, 2011, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -15,7 +15,7 @@
|
|||
Pavel Machek, 1998
|
||||
Roland Illig <roland.illig@gmx.de>, 2004, 2005
|
||||
Slava Zanko <slavazanko@google.com>, 2009
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009
|
||||
Andrew Borodin <aborodin@vmail.ru>, 2009, 2013
|
||||
Ilia Maslakov <il.smind@gmail.com>, 2009
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
@ -146,7 +146,7 @@ mcview_search_show_result (mcview_t * view, WDialog ** d, size_t match_len)
|
|||
if (verbose)
|
||||
{
|
||||
dlg_run_done (*d);
|
||||
destroy_dlg (*d);
|
||||
dlg_destroy (*d);
|
||||
*d = create_message (D_NORMAL, _("Search"), _("Seeking to search result"));
|
||||
tty_refresh ();
|
||||
}
|
||||
|
@ -349,7 +349,7 @@ mcview_do_search (mcview_t * view)
|
|||
if (verbose)
|
||||
{
|
||||
dlg_run_done (d);
|
||||
destroy_dlg (d);
|
||||
dlg_destroy (d);
|
||||
}
|
||||
|
||||
if (!isFound && view->search->error_str != NULL)
|
||||
|
|
Loading…
Reference in New Issue