1
1

Ticket #2817: add mouse handler to the dialog.

Currently, dialog itself doesn't handle mouse events. It just
resends mouse event to each its widget. If we can several overlapped
widgets (especially, menu bar), there is some problem to decide which
widget must get event at first.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Этот коммит содержится в:
Andrew Borodin 2012-05-28 16:59:20 +04:00
родитель a56e983ece
Коммит 83e3945c24
33 изменённых файлов: 80 добавлений и 62 удалений

Просмотреть файл

@ -40,7 +40,6 @@
#include "lib/tty/tty.h"
#include "lib/skin.h"
#include "lib/tty/mouse.h"
#include "lib/tty/key.h"
#include "lib/strutil.h"
#include "lib/widget.h"
@ -375,6 +374,15 @@ dlg_mouse_event (Dlg_head * h, Gpm_Event * event)
return MOU_NORMAL;
}
if (h->mouse != NULL)
{
int mou;
mou = h->mouse (event, h);
if (mou != MOU_UNHANDLED)
return mou;
}
item = starting_widget;
do
{
@ -758,8 +766,8 @@ default_dlg_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, vo
Dlg_head *
create_dlg (gboolean modal, int y1, int x1, int lines, int cols,
const int *colors, dlg_cb_fn callback, const char *help_ctx,
const char *title, dlg_flags_t flags)
const int *colors, dlg_cb_fn callback, mouse_h mouse_handler,
const char *help_ctx, const char *title, dlg_flags_t flags)
{
Dlg_head *new_d;
@ -770,6 +778,7 @@ create_dlg (gboolean modal, int y1, int x1, int lines, int cols,
memmove (new_d->color, colors, sizeof (dlg_colors_t));
new_d->help_ctx = help_ctx;
new_d->callback = (callback != NULL) ? callback : default_dlg_callback;
new_d->mouse = mouse_handler;
new_d->x = x1;
new_d->y = y1;
new_d->flags = flags;

Просмотреть файл

@ -14,6 +14,7 @@
#include "lib/global.h"
#include "lib/hook.h" /* hook_t */
#include "lib/keybind.h" /* global_keymap_t */
#include "lib/tty/mouse.h" /* mouse_h */
/*** defined constants ***************************************************************************/
@ -128,6 +129,7 @@ struct Dlg_head
char *event_group; /* Name of event group for this dialog */
dlg_cb_fn callback;
mouse_h mouse;
dlg_shortcut_str get_shortcut; /* Shortcut string */
dlg_title_str get_title; /* useless for modal dialogs */
};
@ -155,7 +157,7 @@ void draw_box (Dlg_head * h, int y, int x, int ys, int xs, gboolean single);
/* Creates a dialog head */
Dlg_head *create_dlg (gboolean modal, int y1, int x1, int lines, int cols,
const int *colors, dlg_cb_fn callback,
const int *colors, dlg_cb_fn callback, mouse_h mouse_handler,
const char *help_ctx, const char *title, dlg_flags_t flags);
void dlg_set_default_colors (void);

Просмотреть файл

@ -320,7 +320,7 @@ history_show (GList ** history, Widget * widget)
hist_data.maxlen = maxlen;
query_dlg =
create_dlg (TRUE, 0, 0, 4, 4, dialog_colors, history_dlg_callback,
create_dlg (TRUE, 0, 0, 4, 4, dialog_colors, history_dlg_callback, NULL,
"[History-query]", _("History"), DLG_COMPACT);
query_dlg->data = &hist_data;

Просмотреть файл

@ -1323,7 +1323,7 @@ complete_engine (WInput * in, int what_to_do)
query_height = h;
query_width = w;
query_dlg = create_dlg (TRUE, y, x, query_height, query_width,
dialog_colors, query_callback,
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);

Просмотреть файл

@ -113,7 +113,7 @@ create_listbox_window_centered (int center_y, int center_x, int lines, int cols,
listbox->dlg =
create_dlg (TRUE, ypos, xpos, lines + space, cols + space,
listbox_colors, NULL, help, title, DLG_REVERSE | DLG_TRYUP);
listbox_colors, NULL, NULL, help, title, DLG_REVERSE | DLG_TRYUP);
listbox->list = listbox_new (2, 2, lines, cols, FALSE, NULL);
add_widget (listbox->dlg, listbox->list);

Просмотреть файл

@ -73,11 +73,12 @@ quick_dialog_skip (QuickDialog * qd, int nskip)
if ((qd->xpos == -1) || (qd->ypos == -1))
dd = create_dlg (TRUE, 0, 0, qd->ylen, qd->xlen,
dialog_colors, qd->callback, qd->help, qd->title,
dialog_colors, qd->callback, qd->mouse, qd->help, qd->title,
DLG_CENTER | DLG_TRYUP | DLG_REVERSE);
else
dd = create_dlg (TRUE, qd->ypos, qd->xpos, qd->ylen, qd->xlen,
dialog_colors, qd->callback, qd->help, qd->title, DLG_REVERSE);
dialog_colors, qd->callback, qd->mouse, qd->help, qd->title,
DLG_REVERSE);
for (qw = qd->widgets; qw->widget_type != quick_end; qw++)
{

Просмотреть файл

@ -5,6 +5,8 @@
#ifndef MC__QUICK_H
#define MC__QUICK_H
#include "lib/tty/mouse.h"
/*** typedefs(not structures) and defined constants **********************************************/
#define QUICK_CHECKBOX(x, xdiv, y, ydiv, txt, st) \
@ -218,6 +220,7 @@ typedef struct
const char *help;
QuickWidget *widgets;
dlg_cb_fn callback;
mouse_h mouse;
gboolean i18n; /* If true, internationalization has happened */
} QuickDialog;

Просмотреть файл

@ -244,7 +244,7 @@ fg_input_dialog_help (const char *header, const char *text, const char *help,
{
QuickDialog Quick_input = {
len, lines + 6, -1, -1, header,
help, quick_widgets, NULL, TRUE
help, quick_widgets, NULL, NULL, TRUE
};
for (i = 0; i < 4; i++)
@ -343,7 +343,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, default_query_callback,
create_dlg (TRUE, 0, 0, lines, cols, query_colors, default_query_callback, NULL,
"[QueryBox]", header, dlg_flags);
if (count > 0)

Просмотреть файл

@ -135,7 +135,7 @@ mcdiffview_dialog_search (WDiff * dview)
QuickDialog search_input = {
SEARCH_DLG_WIDTH, SEARCH_DLG_HEIGHT, -1, -1,
N_("Search"), "[Input Line Keys]",
search_widgets, NULL, FALSE
search_widgets, NULL, NULL, FALSE
};
mcdiffview_dialog_fix_buttons_positions (&search_input);

Просмотреть файл

@ -2432,7 +2432,7 @@ dview_diff_options (WDiff * dview)
QuickDialog diffopt = {
OPTX, OPTY, -1, -1,
N_("Diff Options"), "[Diff Options]",
diffopt_widgets, NULL, FALSE
diffopt_widgets, NULL, NULL, FALSE
};
if (quick_dialog (&diffopt) != B_CANCEL)
@ -3308,7 +3308,7 @@ 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,
create_dlg (FALSE, 0, 0, LINES, COLS, NULL, dview_dialog_callback, NULL,
"[Diff Viewer]", NULL, DLG_WANT_TAB);
dview = g_new0 (WDiff, 1);

Просмотреть файл

@ -208,7 +208,7 @@ edit_about (void)
cols = max (win_len, cols) + 6;
/* dialog */
about_dlg = create_dlg (TRUE, 0, 0, lines, cols, dialog_colors, NULL,
about_dlg = create_dlg (TRUE, 0, 0, lines, cols, dialog_colors, NULL, NULL,
"[Internal File Editor]", header, DLG_CENTER | DLG_TRYUP);
add_widget (about_dlg, label_new (3, (cols - version_len) / 2, version));

Просмотреть файл

@ -431,7 +431,7 @@ edit_get_save_file_as (WEdit * edit)
QuickDialog Quick_options = {
DLG_WIDTH, DLG_HEIGHT, -1, -1,
N_("Save As"), "[Save File As]",
quick_widgets, NULL, FALSE
quick_widgets, NULL, NULL, FALSE
};
if (quick_dialog (&Quick_options) != B_CANCEL)
@ -1596,7 +1596,7 @@ menu_save_mode_cmd (void)
QuickDialog dialog = {
DLG_X, DLG_Y, -1, -1, N_("Edit Save Mode"),
"[Edit Save Mode]", widgets, NULL, FALSE
"[Edit Save Mode]", widgets, NULL, NULL, FALSE
};
size_t i;
@ -3214,7 +3214,7 @@ edit_mail_dialog (WEdit * edit)
QuickDialog Quick_input = {
50, MAIL_DLG_HEIGHT, -1, -1, N_("Mail"),
"[Input Line Keys]", quick_widgets, NULL, FALSE
"[Input Line Keys]", quick_widgets, NULL, NULL, FALSE
};
quick_widgets[2].u.input.text = mail_cc_last ? mail_cc_last : "";

Просмотреть файл

@ -137,7 +137,7 @@ editcmd_dialog_replace_show (WEdit * edit, const char *search_default, const cha
QuickDialog Quick_input = {
REPLACE_DLG_WIDTH, REPLACE_DLG_HEIGHT, -1, -1, N_("Replace"),
"[Input Line Keys]", quick_widgets, NULL, FALSE
"[Input Line Keys]", quick_widgets, NULL, NULL, FALSE
};
if (quick_dialog (&Quick_input) != B_CANCEL)
@ -213,7 +213,7 @@ editcmd_dialog_search_show (WEdit * edit)
QuickDialog Quick_input = {
SEARCH_DLG_WIDTH, SEARCH_DLG_HEIGHT, -1, -1, N_("Search"),
"[Input Line Keys]", quick_widgets, NULL, TRUE
"[Input Line Keys]", quick_widgets, NULL, NULL, TRUE
};
#ifdef ENABLE_NLS
@ -340,7 +340,7 @@ editcmd_dialog_raw_key_query (const char *heading, const char *query, int cancel
int w = str_term_width1 (query) + 7;
struct Dlg_head *raw_dlg =
create_dlg (TRUE, 0, 0, 7, w, dialog_colors, editcmd_dialog_raw_key_query_cb,
create_dlg (TRUE, 0, 0, 7, w, dialog_colors, editcmd_dialog_raw_key_query_cb, NULL,
NULL, heading, DLG_CENTER | DLG_TRYUP | DLG_WANT_TAB);
add_widget (raw_dlg, input_new (3 - cancel, w - 5, input_get_default_colors (),
2, "", 0, INPUT_COMPLETE_DEFAULT));
@ -392,7 +392,7 @@ editcmd_dialog_completion_show (WEdit * edit, int max_len, int word_len,
/* create the dialog */
compl_dlg =
create_dlg (TRUE, start_y, start_x, compl_dlg_h, compl_dlg_w,
dialog_colors, NULL, "[Completion]", NULL, DLG_COMPACT);
dialog_colors, NULL, NULL, "[Completion]", NULL, DLG_COMPACT);
/* create the listbox */
compl_list = listbox_new (1, 1, compl_dlg_h - 2, compl_dlg_w - 2, FALSE, NULL);
@ -480,7 +480,7 @@ editcmd_dialog_select_definition_show (WEdit * edit, char *match_expr, int max_l
/* create the dialog */
def_dlg = create_dlg (TRUE, start_y, start_x, def_dlg_h, def_dlg_w,
dialog_colors, NULL, "[Definitions]", match_expr, DLG_COMPACT);
dialog_colors, NULL, NULL, "[Definitions]", match_expr, DLG_COMPACT);
/* create the listbox */
def_list = listbox_new (1, 1, def_dlg_h - 2, def_dlg_w - 2, FALSE, NULL);
@ -628,7 +628,7 @@ editcmd_dialog_replace_prompt_show (WEdit * edit, char *from_text, char *to_text
{
QuickDialog Quick_input = {
dlg_width, dlg_height, 0, 0, N_("Confirm replace"),
"[Input Line Keys]", quick_widgets, NULL, FALSE
"[Input Line Keys]", quick_widgets, NULL, NULL, FALSE
};
/* Sometimes menu can hide replaced text. I don't like it */

Просмотреть файл

@ -125,7 +125,7 @@ edit_options_dialog (WEdit * edit)
QuickDialog Quick_options = {
OPT_DLG_W, OPT_DLG_H, -1, -1, N_("Editor options"),
"[Editor options]", quick_widgets, NULL, FALSE
"[Editor options]", quick_widgets, NULL, NULL, FALSE
};
#ifdef ENABLE_NLS

Просмотреть файл

@ -393,7 +393,7 @@ edit_file (const vfs_path_t * _file_vpath, int line)
/* Create a new dialog and add it widgets to it */
edit_dlg =
create_dlg (FALSE, 0, 0, LINES, COLS, NULL, edit_dialog_callback,
create_dlg (FALSE, 0, 0, LINES, COLS, NULL, edit_dialog_callback, NULL,
"[Internal File Editor]", NULL, DLG_WANT_TAB);
edit_dlg->get_shortcut = edit_get_shortcut;

Просмотреть файл

@ -317,7 +317,7 @@ do_enter_key (Dlg_head * h, int f_pos)
chl_end = 0;
chl_dlg =
create_dlg (TRUE, lyy, lxx, 13, 17, dialog_colors, chl_callback,
create_dlg (TRUE, lyy, lxx, 13, 17, dialog_colors, chl_callback, NULL,
"[Advanced Chown]", title, DLG_COMPACT | DLG_REVERSE);
/* get new listboxes */
@ -663,7 +663,7 @@ init_chown_advanced (void)
x_toggle = 070;
ch_dlg =
create_dlg (TRUE, 0, 0, dlg_h, dlg_w, dialog_colors, advanced_chown_callback,
create_dlg (TRUE, 0, 0, dlg_h, dlg_w, dialog_colors, advanced_chown_callback, NULL,
"[Advanced Chown]", _("Chown advanced command"), DLG_CENTER | DLG_REVERSE);
#define XTRACT(i) BY+chown_advanced_but[i].y, BX+chown_advanced_but[i].x, \

Просмотреть файл

@ -296,7 +296,7 @@ display_init (int radio_sel, char *init_text, int _check_status, char **_status)
displays_status = _status;
dd = create_dlg (TRUE, 0, 0, dlg_height, dlg_width, dialog_colors,
display_callback, "[Listing Mode...]", display_title,
display_callback, NULL, "[Listing Mode...]", display_title,
DLG_CENTER | DLG_REVERSE);
add_widget (dd, cancel_button);
@ -368,7 +368,7 @@ init_disp_bits_box (void)
do_refresh ();
dbits_dlg =
create_dlg (TRUE, 0, 0, DISPY, DISPX, dialog_colors, NULL,
create_dlg (TRUE, 0, 0, DISPY, DISPX, dialog_colors, NULL, NULL,
"[Display bits]", _("Display bits"), DLG_CENTER | DLG_REVERSE);
add_widget (dbits_dlg, label_new (3, 4, _("Input / display codepage:")));
@ -622,7 +622,7 @@ sort_box (panel_sort_info_t * info)
QuickDialog quick_dlg = {
dlg_width, dlg_height, -1, -1,
N_("Sort order"), "[Sort Order...]",
quick_widgets, NULL, TRUE
quick_widgets, NULL, NULL, TRUE
};
quick_widgets[5].u.radio.items = sort_orders_names;
@ -751,7 +751,7 @@ confirm_box (void)
{
QuickDialog confirmation = {
dlg_width, dlg_height, -1, -1, title,
"[Confirmation]", conf_widgets, NULL, TRUE
"[Confirmation]", conf_widgets, NULL, NULL, TRUE
};
(void) quick_dialog (&confirmation);
@ -788,7 +788,7 @@ display_bits_box (void) /* AB:FIXME: test dialog */
QuickDialog display_bits = {
DISPX, DISPY, -1, -1, _("Display bits"),
"[Display bits]", display_widgets, NULL, TRUE
"[Display bits]", display_widgets, NULL, NULL, TRUE
};
int i;
@ -905,7 +905,7 @@ tree_box (const char *current_dir)
/* Create the components */
dlg = create_dlg (TRUE, 0, 0, LINES - 9, COLS - 20, dialog_colors,
tree_callback, "[Directory Tree]",
tree_callback, NULL, "[Directory Tree]",
_("Directory tree"), DLG_CENTER | DLG_REVERSE);
mytree = tree_new (2, 2, dlg->lines - 6, dlg->cols - 5, FALSE);
@ -970,6 +970,7 @@ configure_vfs (void)
#else
NULL,
#endif
NULL,
FALSE
};
@ -1033,7 +1034,7 @@ cd_dialog (void)
QuickDialog Quick_input = {
xlen, ylen, 2, LINES - 2 - ylen, _("Quick cd"),
"[Quick cd]", quick_widgets, NULL, TRUE
"[Quick cd]", quick_widgets, NULL, NULL, TRUE
};
return (quick_dialog (&Quick_input) != B_CANCEL) ? my_str : NULL;
@ -1062,7 +1063,7 @@ symlink_dialog (const vfs_path_t * existing_vpath, const vfs_path_t * new_vpath,
QuickDialog Quick_input = {
64, 12, -1, -1, N_("Symbolic link"),
"[File Menu]", quick_widgets, NULL, FALSE
"[File Menu]", quick_widgets, NULL, NULL, FALSE
};
if (quick_dialog (&Quick_input) == B_CANCEL)
@ -1109,7 +1110,7 @@ jobs_cmd (void)
}
#endif /* ENABLE_NLS */
jobs_dlg = create_dlg (TRUE, 0, 0, JOBS_Y, JOBS_X, dialog_colors, NULL,
jobs_dlg = create_dlg (TRUE, 0, 0, JOBS_Y, JOBS_X, dialog_colors, NULL, NULL,
"[Background jobs]", _("Background Jobs"), DLG_CENTER | DLG_REVERSE);
bg_list = listbox_new (2, 3, JOBS_Y - 9, JOBS_X - 7, FALSE, NULL);
@ -1194,7 +1195,7 @@ vfs_smb_get_authinfo (const char *host, const char *share, const char *domain, c
title = g_strdup_printf (_("Password for \\\\%s\\%s"), host, share);
auth_dlg = create_dlg (TRUE, 0, 0, dialog_y, dialog_x, dialog_colors, NULL,
auth_dlg = create_dlg (TRUE, 0, 0, dialog_y, dialog_x, dialog_colors, NULL, NULL,
"[Smb Authinfo]", title, DLG_CENTER | DLG_REVERSE);
g_free (title);

Просмотреть файл

@ -306,7 +306,7 @@ init_chmod (const char *fname, const struct stat *sf_stat)
ch_dlg =
create_dlg (TRUE, 0, 0, lines, cols, dialog_colors,
chmod_callback, "[Chmod]", _("Chmod command"), DLG_CENTER | DLG_REVERSE);
chmod_callback, NULL, "[Chmod]", _("Chmod command"), DLG_CENTER | DLG_REVERSE);
for (i = 0; i < chmod_but_num; i++)
{

Просмотреть файл

@ -177,7 +177,7 @@ init_chown (void)
single_set = (current_panel->marked < 2) ? 3 : 0;
ch_dlg =
create_dlg (TRUE, 0, 0, 18, 74, dialog_colors, chown_callback, "[Chown]",
create_dlg (TRUE, 0, 0, 18, 74, dialog_colors, chown_callback, NULL, "[Chown]",
_("Chown command"), DLG_CENTER | DLG_REVERSE);
for (i = 0; i < BUTTONS - single_set; i++)

Просмотреть файл

@ -267,7 +267,7 @@ select_unselect_cmd (const char *title, const char *history_name, gboolean do_se
QuickDialog quick_dlg = {
DX, DY, -1, -1, title,
"[Select/Unselect Files]", quick_widgets, NULL, FALSE
"[Select/Unselect Files]", quick_widgets, NULL, NULL, FALSE
};
if (quick_dialog (&quick_dlg) == B_CANCEL)

Просмотреть файл

@ -2390,7 +2390,7 @@ compute_dir_size_create_ui (void)
ui = g_new (ComputeDirSizeUI, 1);
ui->dlg = create_dlg (TRUE, 0, 0, 8, COLS / 2, dialog_colors, NULL,
ui->dlg = create_dlg (TRUE, 0, 0, 8, COLS / 2, dialog_colors, NULL, NULL,
NULL, _("Directory scanning"), DLG_CENTER);
ui->dirname = label_new (3, 3, "");
add_widget (ui->dlg, ui->dirname);

Просмотреть файл

@ -418,7 +418,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, "[Replace]",
create_dlg (TRUE, 0, 0, rd_ylen, rd_xlen, alarm_colors, NULL, NULL, "[Replace]",
title, DLG_CENTER | DLG_REVERSE);
/* prompt -- centered */
@ -573,7 +573,8 @@ file_op_context_create_ui_without_init (FileOpContext * ctx, gboolean with_eta,
ui->op_dlg =
create_dlg (TRUE, 0, 0, dlg_height, dlg_width,
dialog_colors, NULL, NULL, op_names[ctx->operation], DLG_CENTER | DLG_REVERSE);
dialog_colors, NULL, NULL, NULL, op_names[ctx->operation],
DLG_CENTER | DLG_REVERSE);
add_widget (ui->op_dlg,
button_new (dlg_height - 3, dlg_width / 2 + 1, FILE_ABORT,
@ -1086,7 +1087,7 @@ file_mask_dialog (FileOpContext * ctx, FileOperation operation,
QuickDialog Quick_input = {
fmd_xlen, FMDY, -1, -1, op_names[operation],
"[Mask Copy/Rename]", fmd_widgets, NULL, TRUE
"[Mask Copy/Rename]", fmd_widgets, NULL, NULL, TRUE
};
ask_file_mask:

Просмотреть файл

@ -550,7 +550,8 @@ find_parameters (char **start_dir, ssize_t * start_dir_len,
find_dlg =
create_dlg (TRUE, 0, 0, FIND_Y, FIND_X, dialog_colors,
find_parm_callback, "[Find File]", _("Find File"), DLG_CENTER | DLG_REVERSE);
find_parm_callback, NULL, "[Find File]", _("Find File"),
DLG_CENTER | DLG_REVERSE);
add_widget (find_dlg,
button_new (FIND_Y - 3, FIND_X * 3 / 4 - b1 / 2, B_CANCEL, NORMAL_BUTTON, buts[1],
@ -1499,7 +1500,7 @@ setup_gui (void)
}
find_dlg =
create_dlg (TRUE, 0, 0, FIND2_Y, FIND2_X, dialog_colors, find_callback,
create_dlg (TRUE, 0, 0, FIND2_Y, FIND2_X, dialog_colors, find_callback, NULL,
"[Find File]", _("Find File"), DLG_CENTER | DLG_REVERSE);
add_widget (find_dlg,

Просмотреть файл

@ -777,7 +777,7 @@ init_hotlist (int list_type)
hotlist_dlg =
create_dlg (TRUE, 0, 0, LINES - 2, hotlist_cols, dialog_colors,
hotlist_callback, help_node, title, DLG_CENTER | DLG_REVERSE);
hotlist_callback, NULL, help_node, title, DLG_CENTER | DLG_REVERSE);
for (i = 0; i < BUTTONS; i++)
{
@ -842,7 +842,7 @@ init_movelist (int list_type, struct hotlist *item)
movelist_dlg =
create_dlg (TRUE, 0, 0, LINES - 6, movelist_cols, dialog_colors,
hotlist_callback, "[Hotlist]", hdr, DLG_CENTER | DLG_REVERSE);
hotlist_callback, NULL, "[Hotlist]", hdr, DLG_CENTER | DLG_REVERSE);
g_free (hdr);
for (i = 0; i < BUTTONS; i++)
@ -1062,7 +1062,7 @@ add_new_entry_input (const char *header, const char *text1, const char *text2,
{
QuickDialog Quick_input = {
len, lines1 + lines2 + 7, -1, -1, header,
help, quick_widgets, NULL, FALSE
help, quick_widgets, NULL, NULL, FALSE
};
for (i = 0; i < 7; i++)
@ -1154,7 +1154,7 @@ add_new_group_input (const char *header, const char *label, char **result)
{
QuickDialog Quick_input = {
len, lines + 6, -1, -1, header,
"[Hotlist]", quick_widgets, NULL, FALSE
"[Hotlist]", quick_widgets, NULL, NULL, FALSE
};
int relative_y[] = { 1, 1, 1, 0, 2 }; /* the relative_x component from the

Просмотреть файл

@ -515,7 +515,7 @@ init_layout (void)
layout_dlg =
create_dlg (TRUE, 0, 0, 14, width,
dialog_colors, layout_callback, "[Layout]",
dialog_colors, layout_callback, NULL, "[Layout]",
_("Layout"), DLG_CENTER | DLG_REVERSE);
/* buttons */

Просмотреть файл

@ -198,7 +198,7 @@ init_listmode (char *oldlistformat)
do_refresh ();
listmode_dlg =
create_dlg (TRUE, 0, 0, 22, 74, dialog_colors, NULL, listmode_section,
create_dlg (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"));

Просмотреть файл

@ -1706,7 +1706,7 @@ do_nc (void)
edit_stack_init ();
#endif
midnight_dlg = create_dlg (FALSE, 0, 0, LINES, COLS, midnight_colors, midnight_callback,
midnight_dlg = create_dlg (FALSE, 0, 0, LINES, COLS, midnight_colors, midnight_callback, NULL,
"[main]", NULL, DLG_WANT_IDLE);
if (mc_global.mc_run_mode == MC_RUN_FULL)

Просмотреть файл

@ -177,7 +177,7 @@ configure_box (void)
QuickDialog Quick_input = {
dlg_width, dlg_height, -1, -1,
N_("Configure options"), "[Configuration]",
quick_widgets, configure_callback, TRUE
quick_widgets, configure_callback, NULL, TRUE
};
int b0_len, b1_len;
@ -367,7 +367,7 @@ panel_options_box (void)
QuickDialog Quick_input = {
dlg_width, dlg_height, -1, -1,
N_("Panel options"), "[Panel options]",
quick_widgets, NULL, TRUE
quick_widgets, NULL, NULL, TRUE
};
int b0_len, b1_len;

Просмотреть файл

@ -191,7 +191,7 @@ init_panelize (void)
panelize_dlg =
create_dlg (TRUE, 0, 0, 22, panelize_cols, dialog_colors,
panelize_callback, "[External panelize]",
panelize_callback, NULL, "[External panelize]",
_("External panelize"), DLG_CENTER | DLG_REVERSE);
for (i = 0; i < BUTTONS; i++)

Просмотреть файл

@ -1116,7 +1116,7 @@ help_interactive_display (const gchar * event_group_name, const gchar * event_na
whelp =
create_dlg (TRUE, 0, 0, help_lines + 4, HELP_WINDOW_WIDTH + 4,
help_colors, help_callback, "[Help]", _("Help"),
help_colors, help_callback, NULL, "[Help]", _("Help"),
DLG_TRYUP | DLG_CENTER | DLG_WANT_TAB);
selected_item = search_string_node (main_node, STRING_LINK_START) - 1;

Просмотреть файл

@ -300,7 +300,7 @@ init_learn (void)
do_refresh ();
learn_dlg =
create_dlg (TRUE, 0, 0, 23, 78, dialog_colors, learn_callback,
create_dlg (TRUE, 0, 0, 23, 78, dialog_colors, learn_callback, NULL,
"[Learn keys]", learn_title, DLG_CENTER | DLG_REVERSE);
for (i = 0; i < BUTTONS; i++)

Просмотреть файл

@ -112,7 +112,7 @@ mcview_dialog_search (mcview_t * view)
QuickDialog Quick_input = {
SEARCH_DLG_WIDTH, SEARCH_DLG_HEIGHT, -1, -1,
N_("Search"), "[Input Line Keys]",
quick_widgets, NULL, FALSE
quick_widgets, NULL, NULL, FALSE
};
qd_result = quick_dialog (&Quick_input);
@ -201,7 +201,7 @@ mcview_dialog_goto (mcview_t * view, off_t * offset)
QuickDialog Quick_input = {
goto_dlg_width, goto_dlg_height, -1, -1,
N_("Goto"), "[Input Line Keys]",
quick_widgets, NULL, FALSE
quick_widgets, NULL, NULL, FALSE
};
#ifdef ENABLE_NLS

Просмотреть файл

@ -240,7 +240,7 @@ mcview_viewer (const char *command, const vfs_path_t * file_vpath, int start_lin
mcview_ret_t ret;
/* Create dialog and widgets, put them on the dialog */
view_dlg = create_dlg (FALSE, 0, 0, LINES, COLS, NULL, mcview_dialog_callback,
view_dlg = create_dlg (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);