mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +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 "command.h" /* For cmdline */
|
||||||
#include "dir.h"
|
#include "dir.h"
|
||||||
#include "panel.h" /* LIST_FORMATS */
|
|
||||||
#include "tree.h"
|
#include "tree.h"
|
||||||
#include "layout.h" /* for get_nth_panel_name proto */
|
#include "layout.h" /* for get_nth_panel_name proto */
|
||||||
#include "filemanager.h" /* current_panel */
|
#include "filemanager.h"
|
||||||
|
|
||||||
#include "boxes.h"
|
#include "boxes.h"
|
||||||
|
|
||||||
@ -1196,9 +1195,9 @@ configure_vfs_box (void)
|
|||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
char *
|
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;
|
char *my_str;
|
||||||
|
|
||||||
quick_widget_t quick_widgets[] = {
|
quick_widget_t quick_widgets[] = {
|
||||||
|
@ -28,7 +28,7 @@ void confirm_box (void);
|
|||||||
void display_bits_box (void);
|
void display_bits_box (void);
|
||||||
void configure_vfs_box (void);
|
void configure_vfs_box (void);
|
||||||
void jobs_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,
|
void symlink_box (const vfs_path_t * existing_vpath, const vfs_path_t * new_vpath,
|
||||||
char **ret_existing, char **ret_new);
|
char **ret_existing, char **ret_new);
|
||||||
char *tree_box (const char *current_dir);
|
char *tree_box (const char *current_dir);
|
||||||
|
@ -1352,11 +1352,11 @@ undelete_cmd (void)
|
|||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void
|
void
|
||||||
quick_cd_cmd (void)
|
quick_cd_cmd (WPanel * panel)
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
p = cd_box ();
|
p = cd_box (panel);
|
||||||
if (p != NULL && *p != '\0')
|
if (p != NULL && *p != '\0')
|
||||||
{
|
{
|
||||||
char *q;
|
char *q;
|
||||||
|
@ -81,7 +81,7 @@ void panel_tree_cmd (void);
|
|||||||
void link_cmd (link_type_t link_type);
|
void link_cmd (link_type_t link_type);
|
||||||
void edit_symlink_cmd (void);
|
void edit_symlink_cmd (void);
|
||||||
void swap_cmd (void);
|
void swap_cmd (void);
|
||||||
void quick_cd_cmd (void);
|
void quick_cd_cmd (WPanel * panel);
|
||||||
void save_setup_cmd (void);
|
void save_setup_cmd (void);
|
||||||
void user_file_menu_cmd (void);
|
void user_file_menu_cmd (void);
|
||||||
void info_cmd (void);
|
void info_cmd (void);
|
||||||
|
@ -1328,7 +1328,7 @@ midnight_execute_cmd (Widget * sender, long command)
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case CK_CdQuick:
|
case CK_CdQuick:
|
||||||
quick_cd_cmd ();
|
quick_cd_cmd (current_panel);
|
||||||
break;
|
break;
|
||||||
case CK_HotList:
|
case CK_HotList:
|
||||||
hotlist_cmd ();
|
hotlist_cmd ();
|
||||||
|
Loading…
Reference in New Issue
Block a user