mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
* option.c (check_options): Remove tk field.
* widget.c: Comment fix to get rid of references to Tk. * wtools.c (real_input_dialog_help): Rename tk_name to histname. Remove names from non-input widgets.
This commit is contained in:
parent
fab6e8a493
commit
c27ebffa28
@ -1,5 +1,10 @@
|
||||
2003-08-31 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* option.c (check_options): Remove tk field.
|
||||
* widget.c: Comment fix to get rid of references to Tk.
|
||||
* wtools.c (real_input_dialog_help): Rename tk_name to histname.
|
||||
Remove names from non-input widgets.
|
||||
|
||||
* widget.h: Completely get rid of tkname. Rename it to histname
|
||||
for the input widget. Adjust all dependencies.
|
||||
|
||||
|
37
src/option.c
37
src/option.c
@ -55,28 +55,27 @@ static struct {
|
||||
int *variable;
|
||||
void (*toggle_function)(void);
|
||||
WCheck *widget;
|
||||
char *tk;
|
||||
} check_options [] = {
|
||||
/* other options */
|
||||
{N_("safe de&Lete"), &safe_delete, TOGGLE_VARIABLE, 0, "safe-del" },
|
||||
{N_("cd follows lin&Ks"), &cd_symlinks, TOGGLE_VARIABLE, 0, "cd-follow" },
|
||||
{N_("L&ynx-like motion"), &navigate_with_arrows,TOGGLE_VARIABLE, 0, "lynx" },
|
||||
{N_("rotatin&G dash"), &nice_rotating_dash,TOGGLE_VARIABLE, 0, "rotating" },
|
||||
{N_("co&Mplete: show all"),&show_all_if_ambiguous,TOGGLE_VARIABLE, 0, "completion" },
|
||||
{N_("&Use internal view"), &use_internal_view, TOGGLE_VARIABLE, 0, "view-int" },
|
||||
{N_("use internal ed&It"), &use_internal_edit, TOGGLE_VARIABLE, 0, "edit-int" },
|
||||
{N_("auto m&Enus"), &auto_menu, TOGGLE_VARIABLE, 0, "auto-menus" },
|
||||
{N_("&Auto save setup"), &auto_save_setup, TOGGLE_VARIABLE, 0, "auto-save" },
|
||||
{N_("shell &Patterns"), &easy_patterns, TOGGLE_VARIABLE, 0, "shell-patt" },
|
||||
{N_("Compute &Totals"), &file_op_compute_totals, TOGGLE_VARIABLE, 0, "compute-totals" },
|
||||
{N_("&Verbose operation"), &verbose, TOGGLE_VARIABLE, 0, "verbose" },
|
||||
{N_("safe de&Lete"), &safe_delete, TOGGLE_VARIABLE, 0 },
|
||||
{N_("cd follows lin&Ks"), &cd_symlinks, TOGGLE_VARIABLE, 0 },
|
||||
{N_("L&ynx-like motion"), &navigate_with_arrows,TOGGLE_VARIABLE, 0 },
|
||||
{N_("rotatin&G dash"), &nice_rotating_dash,TOGGLE_VARIABLE, 0 },
|
||||
{N_("co&Mplete: show all"),&show_all_if_ambiguous,TOGGLE_VARIABLE, 0 },
|
||||
{N_("&Use internal view"), &use_internal_view, TOGGLE_VARIABLE, 0 },
|
||||
{N_("use internal ed&It"), &use_internal_edit, TOGGLE_VARIABLE, 0 },
|
||||
{N_("auto m&Enus"), &auto_menu, TOGGLE_VARIABLE, 0 },
|
||||
{N_("&Auto save setup"), &auto_save_setup, TOGGLE_VARIABLE, 0 },
|
||||
{N_("shell &Patterns"), &easy_patterns, TOGGLE_VARIABLE, 0 },
|
||||
{N_("Compute &Totals"), &file_op_compute_totals, TOGGLE_VARIABLE, 0 },
|
||||
{N_("&Verbose operation"), &verbose, TOGGLE_VARIABLE, 0 },
|
||||
/* panel options */
|
||||
{N_("&Fast dir reload"), &fast_reload, toggle_fast_reload, 0, "fast-reload" },
|
||||
{N_("mi&X all files"), &mix_all_files, toggle_mix_all_files, 0, "mix-files" },
|
||||
{N_("&Drop down menus"), &drop_menus, TOGGLE_VARIABLE, 0, "drop-menus" },
|
||||
{N_("ma&Rk moves down"), &mark_moves_down, TOGGLE_VARIABLE, 0, "mark-moves" },
|
||||
{N_("show &Hidden files"), &show_dot_files, toggle_show_hidden, 0, "show-hidden" },
|
||||
{N_("show &Backup files"), &show_backups, toggle_show_backup, 0, "show-backup" },
|
||||
{N_("&Fast dir reload"), &fast_reload, toggle_fast_reload, 0 },
|
||||
{N_("mi&X all files"), &mix_all_files, toggle_mix_all_files, 0 },
|
||||
{N_("&Drop down menus"), &drop_menus, TOGGLE_VARIABLE, 0 },
|
||||
{N_("ma&Rk moves down"), &mark_moves_down, TOGGLE_VARIABLE, 0 },
|
||||
{N_("show &Hidden files"), &show_dot_files, toggle_show_hidden, 0 },
|
||||
{N_("show &Backup files"), &show_backups, toggle_show_backup, 0 },
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -791,7 +791,7 @@ int num_history_items_recorded = 60;
|
||||
|
||||
/*
|
||||
This loads and saves the history of an input line to and from the
|
||||
widget. It is called with the widgets tk name on creation of the
|
||||
widget. It is called with the widgets history name on creation of the
|
||||
widget, and returns the GList list. It stores histories in the file
|
||||
~/.mc/history in using the profile code.
|
||||
|
||||
|
24
src/wtools.c
24
src/wtools.c
@ -392,11 +392,10 @@ real_input_dialog_help (char *header, char *text, char *help,
|
||||
QuickDialog Quick_input;
|
||||
QuickWidget quick_widgets[] = {
|
||||
{quick_button, 6, 10, 1, 0, N_("&Cancel"), 0, B_CANCEL, 0, 0,
|
||||
"button-cancel"},
|
||||
{quick_button, 3, 10, 1, 0, N_("&OK"), 0, B_ENTER, 0, 0,
|
||||
"button-ok"},
|
||||
{quick_input, 4, 80, 0, 0, "", 58, 0, 0, 0, 0},
|
||||
{quick_label, 4, 80, 2, 0, "", 0, 0, 0, 0, "label"},
|
||||
NULL},
|
||||
{quick_button, 3, 10, 1, 0, N_("&OK"), 0, B_ENTER, 0, 0, NULL},
|
||||
{quick_input, 4, 80, 0, 0, "", 58, 0, 0, 0, NULL},
|
||||
{quick_label, 4, 80, 2, 0, "", 0, 0, 0, 0, NULL},
|
||||
{0}
|
||||
};
|
||||
|
||||
@ -405,14 +404,13 @@ real_input_dialog_help (char *header, char *text, char *help,
|
||||
int lines;
|
||||
int ret;
|
||||
char *my_str;
|
||||
char tk_name[64] = "inp|";
|
||||
char histname[64] = "inp|";
|
||||
|
||||
/* we need a unique name for histname because widget.c:history_tool()
|
||||
needs a unique name for each dialog - using the header is ideal */
|
||||
|
||||
strncpy (tk_name + 3, header, 60);
|
||||
tk_name[63] = '\0';
|
||||
quick_widgets[2].histname = tk_name;
|
||||
/* we need a unique name for histname because widget.c:history_tool()
|
||||
needs a unique name for each dialog - using the header is ideal */
|
||||
strncpy (histname + 3, header, 60);
|
||||
histname[63] = '\0';
|
||||
quick_widgets[2].histname = histname;
|
||||
|
||||
len = max (strlen (header), msglen (text, &lines)) + 4;
|
||||
len = max (len, 64);
|
||||
@ -421,7 +419,7 @@ real_input_dialog_help (char *header, char *text, char *help,
|
||||
and hide characters with "*". Don't save passwords in history! */
|
||||
if (def_text == INPUT_PASSWORD) {
|
||||
quick_widgets[INPUT_INDEX].value = 1;
|
||||
tk_name[3] = 0;
|
||||
histname[3] = 0;
|
||||
def_text = "";
|
||||
} else {
|
||||
quick_widgets[INPUT_INDEX].value = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user