From 450993fff6032aa0c448f099c90a47a63e7df1d9 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sat, 2 Apr 2022 21:36:37 +0300 Subject: [PATCH] Add macros for select/unselect histories. Signed-off-by: Andrew Borodin --- src/filemanager/panel.c | 5 +++-- src/history.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/filemanager/panel.c b/src/filemanager/panel.c index fa54f0fbe..8df281f2b 100644 --- a/src/filemanager/panel.c +++ b/src/filemanager/panel.c @@ -61,6 +61,7 @@ #include "src/selcodepage.h" /* select_charset (), SELECT_CHARSET_NO_TRANSLATE */ #endif #include "src/keymap.h" /* global_keymap_t */ +#include "src/history.h" #ifdef ENABLE_SUBSHELL #include "src/subshell/subshell.h" /* do_subshell_chdir() */ #endif @@ -2628,7 +2629,7 @@ panel_select_unselect_files (WPanel * panel, const char *title, const char *hist static void panel_select_files (WPanel * panel) { - panel_select_unselect_files (panel, _("Select"), ":select_cmd: Select ", + panel_select_unselect_files (panel, _("Select"), MC_HISTORY_FM_PANEL_SELECT, "[Select/Unselect Files]", TRUE); } @@ -2637,7 +2638,7 @@ panel_select_files (WPanel * panel) static void panel_unselect_files (WPanel * panel) { - panel_select_unselect_files (panel, _("Unselect"), ":unselect_cmd: Unselect ", + panel_select_unselect_files (panel, _("Unselect"), MC_HISTORY_FM_PANEL_UNSELECT, "[Select/Unselect Files]", FALSE); } diff --git a/src/history.h b/src/history.h index 7a8d73fa2..52109b0c7 100644 --- a/src/history.h +++ b/src/history.h @@ -26,6 +26,8 @@ #define MC_HISTORY_FM_TREE_MOVE "mc.fm.tree-move" #define MC_HISTORY_FM_PANELIZE_ADD "mc.fm.panelize.add" #define MC_HISTORY_FM_FILTERED_VIEW "mc.fm.filtered-view" +#define MC_HISTORY_FM_PANEL_SELECT ":select_cmd: Select " +#define MC_HISTORY_FM_PANEL_UNSELECT ":select_cmd: Unselect " #define MC_HISTORY_FM_PANEL_FILTER "mc.fm.panel-filter" #define MC_HISTORY_FM_MENU_EXEC_PARAM "mc.fm.menu.exec.parameter"