mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
* cmd.c (do_view_cmd): When asking confirmation, correctly
interpret closing the dialog by escape.
This commit is contained in:
parent
31f1ddd081
commit
a53c486e4f
@ -1,3 +1,8 @@
|
|||||||
|
2002-10-21 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* cmd.c (do_view_cmd): When asking confirmation, correctly
|
||||||
|
interpret closing the dialog by escape.
|
||||||
|
|
||||||
2002-10-20 Pavel Roskin <proski@gnu.org>
|
2002-10-20 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
* utilunix.c (mc_tmpdir): Don't exit if the temporary directory
|
* utilunix.c (mc_tmpdir): Don't exit if the temporary directory
|
||||||
|
18
src/cmd.c
18
src/cmd.c
@ -214,22 +214,24 @@ static int scan_for_file (WPanel *panel, int idx, int direction)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* do_view: Invoked as the F3/F13 key. */
|
/* do_view: Invoked as the F3/F13 key. */
|
||||||
static void do_view_cmd (WPanel *panel, int normal)
|
static void
|
||||||
|
do_view_cmd (WPanel *panel, int normal)
|
||||||
{
|
{
|
||||||
int dir, file_idx;
|
int dir, file_idx;
|
||||||
panel = get_a_panel (panel);
|
panel = get_a_panel (panel);
|
||||||
|
|
||||||
/* Directories are viewed by changing to them */
|
/* Directories are viewed by changing to them */
|
||||||
if (S_ISDIR (selection (panel)->buf.st_mode) ||
|
if (S_ISDIR (selection (panel)->buf.st_mode)
|
||||||
link_isdir (selection (panel))) {
|
|| link_isdir (selection (panel))) {
|
||||||
if (confirm_view_dir && (panel->marked || panel->dirs_marked)){
|
if (confirm_view_dir && (panel->marked || panel->dirs_marked)) {
|
||||||
if (query_dialog (_(" CD "), _("Files tagged, want to cd?"),
|
if (query_dialog
|
||||||
0, 2, _("&Yes"), _("&No")) == 1){
|
(_(" Confirmation "), _("Files tagged, want to cd?"), 0, 2,
|
||||||
|
_("&Yes"), _("&No")) != 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!do_cd (selection (panel)->fname, cd_exact))
|
if (!do_cd (selection (panel)->fname, cd_exact))
|
||||||
message (1, MSG_ERROR, _("Could not change directory") );
|
message (1, MSG_ERROR, _("Could not change directory"));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -239,7 +241,7 @@ static void do_view_cmd (WPanel *panel, int normal)
|
|||||||
while (1) {
|
while (1) {
|
||||||
char *filename;
|
char *filename;
|
||||||
|
|
||||||
filename = panel->dir.list [file_idx].fname;
|
filename = panel->dir.list[file_idx].fname;
|
||||||
|
|
||||||
dir = view_file (filename, normal, use_internal_view);
|
dir = view_file (filename, normal, use_internal_view);
|
||||||
if (dir == 0)
|
if (dir == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user