mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-01 00:54:24 +03:00
* key.c (ctrl_pressed): Don't limit functionality to Linux.
* screen.c (prev_page_key): Don't require console_flag to be set to use ctrl_pressed(), only require that HAVE_X is undefined. (next_page_key): Likewise. * widget.c (key_left): Don't limit functionality to Linux. (key_right): Likewise.
This commit is contained in:
parent
11715780a8
commit
c83fdc336c
@ -1,5 +1,12 @@
|
||||
2001-06-25 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* key.c (ctrl_pressed): Don't limit functionality to Linux.
|
||||
* screen.c (prev_page_key): Don't require console_flag to be set
|
||||
to use ctrl_pressed(), only require that HAVE_X is undefined.
|
||||
(next_page_key): Likewise.
|
||||
* widget.c (key_left): Don't limit functionality to Linux.
|
||||
(key_right): Likewise.
|
||||
|
||||
* main.h: Use "ifdef HAVE_GNOME", not "if HAVE_GNOME". Fix the
|
||||
order of conditionals and put comments on endifs.
|
||||
|
||||
|
@ -978,13 +978,12 @@ get_modifier (void)
|
||||
}
|
||||
|
||||
int
|
||||
ctrl_pressed ()
|
||||
ctrl_pressed (void)
|
||||
{
|
||||
#ifdef __linux__
|
||||
if (get_modifier () & CONTROL_PRESSED)
|
||||
return 1;
|
||||
#endif
|
||||
return 0;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef HAVE_MAD
|
||||
|
13
src/screen.c
13
src/screen.c
@ -36,7 +36,6 @@
|
||||
#include "main.h"
|
||||
#include "ext.h" /* regexp_command */
|
||||
#include "mouse.h" /* For Gpm_Event */
|
||||
#include "cons.saver.h" /* For console_flag */
|
||||
#include "layout.h" /* Most layout variables are here */
|
||||
#include "dialog.h" /* for message (...) */
|
||||
#include "cmd.h"
|
||||
@ -1792,15 +1791,17 @@ prev_page (WPanel *panel)
|
||||
select_item (panel);
|
||||
#ifndef HAVE_X
|
||||
paint_dir (panel);
|
||||
#endif
|
||||
#endif /* !HAVE_X */
|
||||
}
|
||||
|
||||
static void
|
||||
prev_page_key (WPanel *panel)
|
||||
{
|
||||
if (console_flag && ctrl_pressed ()){
|
||||
#ifndef HAVE_X
|
||||
if (ctrl_pressed ()){
|
||||
do_cd ("..", cd_exact);
|
||||
} else
|
||||
#endif /* !HAVE_X */
|
||||
prev_page (panel);
|
||||
}
|
||||
|
||||
@ -1832,16 +1833,18 @@ next_page (WPanel *panel)
|
||||
select_item (panel);
|
||||
#ifndef HAVE_X
|
||||
paint_dir (panel);
|
||||
#endif
|
||||
#endif /* !HAVE_X */
|
||||
}
|
||||
|
||||
static void next_page_key (WPanel *panel)
|
||||
{
|
||||
if (console_flag&&ctrl_pressed()&&
|
||||
#ifndef HAVE_X
|
||||
if (ctrl_pressed() &&
|
||||
(S_ISDIR(selection (panel)->buf.st_mode) ||
|
||||
link_isdir (selection (panel))))
|
||||
do_cd (selection (panel)->fname, cd_exact);
|
||||
else
|
||||
#endif /* !HAVE_X */
|
||||
next_page (panel);
|
||||
}
|
||||
|
||||
|
@ -1290,7 +1290,7 @@ backward_word (WInput *in)
|
||||
in->point = p - in->buffer;
|
||||
}
|
||||
|
||||
#if defined(__linux__) && !defined(HAVE_X)
|
||||
#ifndef HAVE_X
|
||||
static void
|
||||
key_left (WInput *in)
|
||||
{
|
||||
@ -1311,7 +1311,7 @@ key_right (WInput *in)
|
||||
#else
|
||||
#define key_left backward_char
|
||||
#define key_right forward_char
|
||||
#endif
|
||||
#endif /* HAVE_X */
|
||||
|
||||
static void
|
||||
backward_delete (WInput *in)
|
||||
|
Loading…
Reference in New Issue
Block a user