mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Rename DLG_WANT_TAB to WOP_WANT_TAB and move it to widget_options_t.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
2dab74fddd
commit
163d9cd94a
@ -510,7 +510,7 @@ dlg_key_event (WDialog * h, int d_key)
|
||||
h->current = h->widgets;
|
||||
|
||||
/* TAB used to cycle */
|
||||
if ((h->flags & DLG_WANT_TAB) == 0)
|
||||
if (!widget_get_options (WIDGET (h), WOP_WANT_TAB))
|
||||
{
|
||||
if (d_key == '\t')
|
||||
{
|
||||
|
@ -35,8 +35,7 @@ typedef enum
|
||||
DLG_NONE = 0, /* No options */
|
||||
DLG_CENTER = (1 << 0), /* Center the dialog */
|
||||
DLG_TRYUP = (1 << 1), /* Try to move two lines up the dialog */
|
||||
DLG_COMPACT = (1 << 2), /* Suppress spaces around the frame */
|
||||
DLG_WANT_TAB = (1 << 3) /* Should the tab key be sent to the dialog? */
|
||||
DLG_COMPACT = (1 << 2) /* Suppress spaces around the frame */
|
||||
} dlg_flags_t;
|
||||
|
||||
/* Dialog color constants */
|
||||
|
@ -18,6 +18,7 @@
|
||||
/* Sets/clear the specified flag in the options field */
|
||||
#define widget_want_cursor(w,i) widget_set_options(w, WOP_WANT_CURSOR, i)
|
||||
#define widget_want_hotkey(w,i) widget_set_options(w, WOP_WANT_HOTKEY, i)
|
||||
#define widget_want_tab(w,i) widget_set_options(w, WOP_WANT_TAB, i)
|
||||
#define widget_idle(w,i) widget_set_state(w, WST_IDLE, i)
|
||||
#define widget_disable(w,i) widget_set_state(w, WST_DISABLED, i)
|
||||
|
||||
@ -67,8 +68,9 @@ typedef enum
|
||||
WOP_DEFAULT = (0 << 0),
|
||||
WOP_WANT_HOTKEY = (1 << 1),
|
||||
WOP_WANT_CURSOR = (1 << 2),
|
||||
WOP_IS_INPUT = (1 << 3),
|
||||
WOP_TOP_SELECT = (1 << 4)
|
||||
WOP_WANT_TAB = (1 << 3), /* Should the tab key be sent to the dialog? */
|
||||
WOP_IS_INPUT = (1 << 4),
|
||||
WOP_TOP_SELECT = (1 << 5)
|
||||
} widget_options_t;
|
||||
|
||||
/* Widget state */
|
||||
|
@ -3461,7 +3461,8 @@ diff_view (const char *file1, const char *file2, const char *label1, const char
|
||||
/* Create dialog and widgets, put them on the dialog */
|
||||
dview_dlg =
|
||||
dlg_create (FALSE, 0, 0, LINES, COLS, NULL, dview_dialog_callback, NULL,
|
||||
"[Diff Viewer]", NULL, DLG_WANT_TAB);
|
||||
"[Diff Viewer]", NULL, DLG_NONE);
|
||||
widget_want_tab (WIDGET (dview_dlg), TRUE);
|
||||
|
||||
dview = g_new0 (WDiff, 1);
|
||||
w = WIDGET (dview);
|
||||
|
@ -321,7 +321,8 @@ editcmd_dialog_raw_key_query (const char *heading, const char *query, gboolean c
|
||||
|
||||
raw_dlg =
|
||||
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);
|
||||
NULL, NULL, heading, DLG_CENTER | DLG_TRYUP);
|
||||
widget_want_tab (WIDGET (raw_dlg), TRUE);
|
||||
|
||||
add_widget (raw_dlg, label_new (y, 3, query));
|
||||
add_widget (raw_dlg, input_new (y++, 3 + wq + 1, input_colors,
|
||||
|
@ -1224,7 +1224,8 @@ edit_files (const GList * files)
|
||||
/* Create a new dialog and add it widgets to it */
|
||||
edit_dlg =
|
||||
dlg_create (FALSE, 0, 0, LINES, COLS, NULL, edit_dialog_callback,
|
||||
edit_dialog_mouse_callback, "[Internal File Editor]", NULL, DLG_WANT_TAB);
|
||||
edit_dialog_mouse_callback, "[Internal File Editor]", NULL, DLG_NONE);
|
||||
widget_want_tab (WIDGET (edit_dlg), TRUE);
|
||||
|
||||
edit_dlg->get_shortcut = edit_get_shortcut;
|
||||
edit_dlg->get_title = edit_get_title;
|
||||
|
@ -1097,9 +1097,9 @@ help_interactive_display (const gchar * event_group_name, const gchar * event_na
|
||||
help_lines = MIN (LINES - 4, MAX (2 * LINES / 3, 18));
|
||||
|
||||
whelp =
|
||||
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);
|
||||
dlg_create (TRUE, 0, 0, help_lines + 4, HELP_WINDOW_WIDTH + 4, help_colors,
|
||||
help_callback, NULL, "[Help]", _("Help"), DLG_TRYUP | DLG_CENTER);
|
||||
widget_want_tab (WIDGET (whelp), TRUE);
|
||||
|
||||
selected_item = search_string_node (main_node, STRING_LINK_START) - 1;
|
||||
currentpoint = main_node + 1; /* Skip the newline following the start of the node */
|
||||
|
@ -233,7 +233,8 @@ mcview_viewer (const char *command, const vfs_path_t * file_vpath, int start_lin
|
||||
|
||||
/* Create dialog and widgets, put them on the dialog */
|
||||
view_dlg = dlg_create (FALSE, 0, 0, LINES, COLS, NULL, mcview_dialog_callback, NULL,
|
||||
"[Internal File Viewer]", NULL, DLG_WANT_TAB);
|
||||
"[Internal File Viewer]", NULL, DLG_NONE);
|
||||
widget_want_tab (WIDGET (view_dlg), TRUE);
|
||||
|
||||
lc_mcview = mcview_new (0, 0, LINES - 1, COLS, FALSE);
|
||||
add_widget (view_dlg, lc_mcview);
|
||||
|
Loading…
Reference in New Issue
Block a user