mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
* cmd.c (other_symlink_cmd): Remove, this function is
undocumented and poorly implemented. * main.c: Remove call to other_symlink_cmd() on C-x C-l.
This commit is contained in:
parent
43b82434a3
commit
c3e1e0e19d
@ -1,3 +1,9 @@
|
||||
2002-09-18 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* cmd.c (other_symlink_cmd): Remove, this function is
|
||||
undocumented and poorly implemented.
|
||||
* main.c: Remove call to other_symlink_cmd() on C-x C-l.
|
||||
|
||||
2002-09-16 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* wtools.c (real_input_dialog_help): Trim spaces from the label
|
||||
|
41
src/cmd.c
41
src/cmd.c
@ -1124,47 +1124,6 @@ void edit_symlink_cmd (void)
|
||||
selection (cpanel)->fname);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
other_symlink_cmd (void)
|
||||
{
|
||||
char *dest, *q, *p, *r, *s, *t;
|
||||
|
||||
if (get_other_type () != view_listing)
|
||||
return;
|
||||
|
||||
if (!strcmp (selection (opanel)->fname, ".."))
|
||||
return;
|
||||
p = concat_dir_and_file (cpanel->cwd, selection (cpanel)->fname);
|
||||
r = concat_dir_and_file (opanel->cwd, selection (cpanel)->fname);
|
||||
|
||||
q = g_strdup_printf (_("Link symbolically %s to:"),
|
||||
name_trunc (p, 32));
|
||||
dest = input_expand_dialog (_(" Relative symlink "), q, r);
|
||||
if (dest) {
|
||||
if (*dest) {
|
||||
t = strrchr (dest, PATH_SEP);
|
||||
if (t) {
|
||||
t[1] = 0;
|
||||
s = diff_two_paths (dest, p);
|
||||
t[1] = PATH_SEP;
|
||||
if (s) {
|
||||
save_cwds_stat ();
|
||||
if (-1 == mc_symlink (dest, s))
|
||||
message (1, MSG_ERROR, _(" relative symlink: %s "),
|
||||
unix_error_string (errno));
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
|
||||
repaint_screen ();
|
||||
g_free (s);
|
||||
}
|
||||
}
|
||||
}
|
||||
g_free (dest);
|
||||
}
|
||||
g_free (q);
|
||||
g_free (p);
|
||||
g_free (r);
|
||||
}
|
||||
#endif /* !NATIVE_WIN32 */
|
||||
|
||||
void help_cmd (void)
|
||||
|
@ -49,7 +49,6 @@ void tree_cmd (void);
|
||||
void link_cmd (void);
|
||||
void symlink_cmd (void);
|
||||
void edit_symlink_cmd (void);
|
||||
void other_symlink_cmd (void);
|
||||
void reverse_selection_cmd_panel (WPanel *);
|
||||
void unselect_cmd_panel (WPanel *);
|
||||
void select_cmd_panel (WPanel *);
|
||||
|
@ -1421,7 +1421,6 @@ static const key_map ctl_x_map [] = {
|
||||
{ 'r', copy_current_readlink },
|
||||
{ XCTRL('r'), copy_other_readlink },
|
||||
{ 'l', link_cmd },
|
||||
{ XCTRL('l'), other_symlink_cmd },
|
||||
{ 's', symlink_cmd },
|
||||
{ XCTRL('s'), edit_symlink_cmd },
|
||||
#endif /* !NATIVE_WIN32 */
|
||||
|
Loading…
Reference in New Issue
Block a user