1
1

Ticket #1378: removed duplication of command line histroy.

Modified histroy_cmd() function: now it shows history of command
line widget, not yet another dialog window.
Modified menu entry.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Этот коммит содержится в:
Andrew Borodin 2009-06-25 22:16:58 +04:00
родитель 4ff5d7c0a9
Коммит bbbb4d6daf
2 изменённых файлов: 3 добавлений и 32 удалений

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

@ -837,37 +837,8 @@ compare_dirs_cmd (void)
void
history_cmd (void)
{
Listbox *listbox;
GList *current;
if (cmdline->need_push) {
if (push_history (cmdline, cmdline->buffer) == 2)
cmdline->need_push = 0;
}
if (!cmdline->history) {
message (D_ERROR, MSG_ERROR, _(" The command history is empty "));
return;
}
current = g_list_first (cmdline->history);
listbox = create_listbox_window (60, 10, _(" Command history "),
"[Command Menu]");
while (current) {
LISTBOX_APPEND_TEXT (listbox, 0, (char *) current->data, current);
current = g_list_next(current);
}
run_dlg (listbox->dlg);
if (listbox->dlg->ret_value == B_CANCEL)
current = NULL;
else
current = listbox->list->current->data;
destroy_dlg (listbox->dlg);
g_free (listbox);
if (!current)
return;
cmdline->history = current;
assign_text (cmdline, (char *) current->data);
update_input (cmdline, 1);
/* show the history of command line widget */
send_message (&cmdline->widget, WIDGET_KEY, ALT ('h'));
}
void swap_cmd (void)

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

@ -920,7 +920,7 @@ static menu_entry CmdMenu[] = {
{' ', N_("e&Xternal panelize C-x !"), NULL_HOTKEY, external_panelize},
{' ', N_("show directory s&Izes"), NULL_HOTKEY, dirsizes_cmd},
{' ', "", NULL_HOTKEY, 0},
{' ', N_("command &History"), NULL_HOTKEY, history_cmd},
{' ', N_("Command &history M-h"), NULL_HOTKEY, history_cmd},
{' ', N_("di&Rectory hotlist C-\\"), NULL_HOTKEY, quick_chdir_cmd},
#ifdef USE_VFS
{' ', N_("&Active VFS list C-x a"), NULL_HOTKEY, reselect_vfs},