mirror of
https://github.com/MidnightCommander/mc
synced 2025-04-01 12:42:57 +03:00
Fix segfault on adding current path to hotlist.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
485ea75cbe
commit
5a45ed1583
@ -1081,11 +1081,11 @@ edit_fhl_cmd (void)
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
hotlist_cmd (void)
|
||||
hotlist_cmd (WPanel * panel)
|
||||
{
|
||||
char *target;
|
||||
|
||||
target = hotlist_show (LIST_HOTLIST);
|
||||
target = hotlist_show (LIST_HOTLIST, panel);
|
||||
if (target == NULL)
|
||||
return;
|
||||
|
||||
@ -1115,12 +1115,12 @@ hotlist_cmd (void)
|
||||
|
||||
#ifdef ENABLE_VFS
|
||||
void
|
||||
vfs_list (void)
|
||||
vfs_list (WPanel * panel)
|
||||
{
|
||||
char *target;
|
||||
vfs_path_t *target_vpath;
|
||||
|
||||
target = hotlist_show (LIST_VFSLIST);
|
||||
target = hotlist_show (LIST_VFSLIST, panel);
|
||||
if (target == NULL)
|
||||
return;
|
||||
|
||||
|
@ -68,11 +68,11 @@ void delete_cmd (WPanel * panel);
|
||||
void delete_cmd_local (WPanel * panel);
|
||||
void filter_cmd (void);
|
||||
void reread_cmd (void);
|
||||
void vfs_list (void);
|
||||
void vfs_list (WPanel * panel);
|
||||
void ext_cmd (void);
|
||||
void edit_mc_menu_cmd (void);
|
||||
void edit_fhl_cmd (void);
|
||||
void hotlist_cmd (void);
|
||||
void hotlist_cmd (WPanel * panel);
|
||||
void compare_dirs_cmd (void);
|
||||
#ifdef USE_DIFF_VIEW
|
||||
void diff_view_cmd (void);
|
||||
|
@ -1331,7 +1331,7 @@ midnight_execute_cmd (Widget * sender, long command)
|
||||
quick_cd_cmd (current_panel);
|
||||
break;
|
||||
case CK_HotList:
|
||||
hotlist_cmd ();
|
||||
hotlist_cmd (current_panel);
|
||||
break;
|
||||
case CK_PanelQuickView:
|
||||
if (sender == WIDGET (the_menubar))
|
||||
@ -1356,7 +1356,7 @@ midnight_execute_cmd (Widget * sender, long command)
|
||||
break;
|
||||
#ifdef ENABLE_VFS
|
||||
case CK_VfsList:
|
||||
vfs_list ();
|
||||
vfs_list (current_panel);
|
||||
break;
|
||||
#endif
|
||||
case CK_SaveSetup:
|
||||
|
@ -1632,11 +1632,14 @@ add2hotlist_cmd (WPanel * panel)
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
char *
|
||||
hotlist_show (hotlist_t list_type)
|
||||
hotlist_show (hotlist_t list_type, WPanel * panel)
|
||||
{
|
||||
char *target = NULL;
|
||||
int res;
|
||||
|
||||
/* extra variable to use it in the button callback */
|
||||
our_panel = panel;
|
||||
|
||||
hotlist_state.type = list_type;
|
||||
load_hotlist ();
|
||||
|
||||
|
@ -25,7 +25,7 @@ typedef enum
|
||||
/*** declarations of public functions ************************************************************/
|
||||
|
||||
void add2hotlist_cmd (WPanel * panel);
|
||||
char *hotlist_show (hotlist_t list_type);
|
||||
char *hotlist_show (hotlist_t list_type, WPanel * panel);
|
||||
gboolean save_hotlist (void);
|
||||
void done_hotlist (void);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user