mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
(cd_box): get rid of global variable current_panel usage.
(quick_cd_cmd): likewise. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
7fefe1874a
commit
4bae23495a
@ -73,10 +73,9 @@
|
||||
|
||||
#include "command.h" /* For cmdline */
|
||||
#include "dir.h"
|
||||
#include "panel.h" /* LIST_FORMATS */
|
||||
#include "tree.h"
|
||||
#include "layout.h" /* for get_nth_panel_name proto */
|
||||
#include "filemanager.h" /* current_panel */
|
||||
#include "filemanager.h"
|
||||
|
||||
#include "boxes.h"
|
||||
|
||||
@ -1196,9 +1195,9 @@ configure_vfs_box (void)
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
char *
|
||||
cd_box (void)
|
||||
cd_box (const WPanel * panel)
|
||||
{
|
||||
const Widget *w = CONST_WIDGET (current_panel);
|
||||
const Widget *w = CONST_WIDGET (panel);
|
||||
char *my_str;
|
||||
|
||||
quick_widget_t quick_widgets[] = {
|
||||
|
@ -28,7 +28,7 @@ void confirm_box (void);
|
||||
void display_bits_box (void);
|
||||
void configure_vfs_box (void);
|
||||
void jobs_box (void);
|
||||
char *cd_box (void);
|
||||
char *cd_box (const WPanel * panel);
|
||||
void symlink_box (const vfs_path_t * existing_vpath, const vfs_path_t * new_vpath,
|
||||
char **ret_existing, char **ret_new);
|
||||
char *tree_box (const char *current_dir);
|
||||
|
@ -1352,11 +1352,11 @@ undelete_cmd (void)
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
quick_cd_cmd (void)
|
||||
quick_cd_cmd (WPanel * panel)
|
||||
{
|
||||
char *p;
|
||||
|
||||
p = cd_box ();
|
||||
p = cd_box (panel);
|
||||
if (p != NULL && *p != '\0')
|
||||
{
|
||||
char *q;
|
||||
|
@ -81,7 +81,7 @@ void panel_tree_cmd (void);
|
||||
void link_cmd (link_type_t link_type);
|
||||
void edit_symlink_cmd (void);
|
||||
void swap_cmd (void);
|
||||
void quick_cd_cmd (void);
|
||||
void quick_cd_cmd (WPanel * panel);
|
||||
void save_setup_cmd (void);
|
||||
void user_file_menu_cmd (void);
|
||||
void info_cmd (void);
|
||||
|
@ -1328,7 +1328,7 @@ midnight_execute_cmd (Widget * sender, long command)
|
||||
break;
|
||||
#endif
|
||||
case CK_CdQuick:
|
||||
quick_cd_cmd ();
|
||||
quick_cd_cmd (current_panel);
|
||||
break;
|
||||
case CK_HotList:
|
||||
hotlist_cmd ();
|
||||
|
Loading…
Reference in New Issue
Block a user