From 680678ef7244a3a393d32ceb733231598d87dbf6 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 15 Oct 2017 19:43:31 +0300 Subject: [PATCH] Ticket #3861: fix %f macro in mcedit user menu. Initial step: move usermenu.[ch] files from src/filemanager/ directory to src/ one. Signed-off-by: Andrew Borodin --- src/Makefile.am | 1 + src/editor/edit.c | 2 +- src/filemanager/Makefile.am | 3 +-- src/filemanager/cmd.c | 5 +++-- src/filemanager/command.c | 2 +- src/filemanager/ext.c | 2 +- src/filemanager/panel.c | 3 ++- src/{filemanager => }/usermenu.c | 6 +++--- src/{filemanager => }/usermenu.h | 0 9 files changed, 13 insertions(+), 11 deletions(-) rename src/{filemanager => }/usermenu.c (99%) rename src/{filemanager => }/usermenu.h (100%) diff --git a/src/Makefile.am b/src/Makefile.am index cb2e87e23..56063be20 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -78,6 +78,7 @@ libinternal_la_SOURCES = \ learn.c learn.h \ setup.c setup.h \ textconf.c textconf.h \ + usermenu.c usermenu.h \ util.c util.h if CHARSET diff --git a/src/editor/edit.c b/src/editor/edit.c index f79f65e17..3e41381eb 100644 --- a/src/editor/edit.c +++ b/src/editor/edit.c @@ -61,7 +61,7 @@ #include "lib/charsets.h" /* get_codepage_id */ #endif -#include "src/filemanager/usermenu.h" /* user_menu_cmd() */ +#include "src/usermenu.h" /* user_menu_cmd() */ #include "src/setup.h" /* option_tab_spacing */ #include "src/learn.h" /* learn_keys */ diff --git a/src/filemanager/Makefile.am b/src/filemanager/Makefile.am index b593b7025..d0902be9d 100644 --- a/src/filemanager/Makefile.am +++ b/src/filemanager/Makefile.am @@ -24,8 +24,7 @@ libmcfilemanager_la_SOURCES = \ panelize.c panelize.h \ panel.c panel.h \ tree.c tree.h \ - treestore.c treestore.h \ - usermenu.c usermenu.h + treestore.c treestore.h # Unmaintained, unsupported, etc # listmode.c listmode.h diff --git a/src/filemanager/cmd.c b/src/filemanager/cmd.c index fbfcd5030..0507debc6 100644 --- a/src/filemanager/cmd.c +++ b/src/filemanager/cmd.c @@ -63,12 +63,14 @@ #include "lib/keybind.h" /* CK_Down, CK_History */ #include "lib/event.h" /* mc_event_raise() */ -#include "src/viewer/mcviewer.h" #include "src/setup.h" #include "src/execute.h" /* toggle_panels() */ #include "src/history.h" +#include "src/usermenu.h" /* MC_GLOBAL_MENU */ #include "src/util.h" /* check_for_default() */ +#include "src/viewer/mcviewer.h" + #ifdef USE_INTERNAL_EDIT #include "src/editor/edit.h" #endif @@ -85,7 +87,6 @@ #include "panel.h" /* WPanel */ #include "tree.h" /* tree_chdir() */ #include "midnight.h" /* change_panel() */ -#include "usermenu.h" /* MC_GLOBAL_MENU */ #include "command.h" /* cmdline */ #include "layout.h" /* get_current_type() */ #include "ext.h" /* regex_command() */ diff --git a/src/filemanager/command.c b/src/filemanager/command.c index 99fe87203..e2fba4952 100644 --- a/src/filemanager/command.c +++ b/src/filemanager/command.c @@ -49,10 +49,10 @@ #include "src/subshell/subshell.h" #endif #include "src/execute.h" /* shell_execute */ +#include "src/usermenu.h" /* expand_format */ #include "midnight.h" /* current_panel */ #include "layout.h" /* for command_prompt variable */ -#include "usermenu.h" /* expand_format */ #include "tree.h" /* sync_tree() */ #include "command.h" diff --git a/src/filemanager/ext.c b/src/filemanager/ext.c index 092a6bcee..4ca850e0e 100644 --- a/src/filemanager/ext.c +++ b/src/filemanager/ext.c @@ -53,6 +53,7 @@ #include "src/setup.h" /* use_file_to_check_type */ #include "src/execute.h" #include "src/history.h" +#include "src/usermenu.h" #include "src/consaver/cons.saver.h" #include "src/viewer/mcviewer.h" @@ -62,7 +63,6 @@ #endif #include "panel.h" /* do_cd */ -#include "usermenu.h" #include "ext.h" diff --git a/src/filemanager/panel.c b/src/filemanager/panel.c index 039ec7ccc..f4dcb42a8 100644 --- a/src/filemanager/panel.c +++ b/src/filemanager/panel.c @@ -65,6 +65,8 @@ #include "src/subshell/subshell.h" /* do_subshell_chdir() */ #endif +#include "src/usermenu.h" + #include "dir.h" #include "boxes.h" #include "tree.h" @@ -72,7 +74,6 @@ #include "layout.h" /* Most layout variables are here */ #include "cmd.h" #include "command.h" /* cmdline */ -#include "usermenu.h" #include "midnight.h" #include "mountlist.h" /* my_statfs */ diff --git a/src/filemanager/usermenu.c b/src/usermenu.c similarity index 99% rename from src/filemanager/usermenu.c rename to src/usermenu.c index e2b7c9dcd..5d1e4cf85 100644 --- a/src/filemanager/usermenu.c +++ b/src/usermenu.c @@ -53,9 +53,9 @@ #include "src/setup.h" #include "src/history.h" -#include "dir.h" -#include "midnight.h" -#include "layout.h" +#include "src/filemanager/dir.h" +#include "src/filemanager/midnight.h" +#include "src/filemanager/layout.h" #include "usermenu.h" diff --git a/src/filemanager/usermenu.h b/src/usermenu.h similarity index 100% rename from src/filemanager/usermenu.h rename to src/usermenu.h