Wed Mar 12 17:46:09 1998 Norbert Warmuth <k3190@fh-sw.de>

* screen.c (chdir_other_panel, chdir_to_readlink): Use passed
panel instead of cpanel (removed mixed use of panel and cpanel).

* main.c, screen.c: Deleted F13 from the default keymap, added F13
and F14 to the panel's keymap (the keymap for panels in listing
mode). These two keys are only useful for panels in listing mode.
It seems there are even more candidates for such a move. Especially
select_cmd and unselect_cmd which appeared recently for the GNOME
edition in screen.c act unexpected for panels in tree-mode.

* cmd.c (view_simple_cmd): Added WPanel* to the parameter list.

(edit_cmd_new): No need to get a panel because it is not used.

* panelize.c: Changed hotkey of the Panelize button (Alt-p is
already used by the input line history). I wonder if I should
change it in the find dialog, too (just to have a unique hotkey
for the panelize button).
This commit is contained in:
Norbert Warmuth 1998-03-12 17:21:12 +00:00
parent a65ce95420
commit 6356184c04
6 changed files with 35 additions and 15 deletions

View File

@ -1,3 +1,24 @@
Wed Mar 12 17:46:09 1998 Norbert Warmuth <k3190@fh-sw.de>
* screen.c (chdir_other_panel, chdir_to_readlink): Use passed
panel instead of cpanel (removed mixed use of panel and cpanel).
* main.c, screen.c: Deleted F13 from the default keymap, added F13
and F14 to the panel's keymap (the keymap for panels in listing
mode). These two keys are only useful for panels in listing mode.
It seems there are even more candidates for such a move. Especially
select_cmd and unselect_cmd which appeared recently for the GNOME
edition in screen.c act unexpected for panels in tree-mode.
* cmd.c (view_simple_cmd): Added WPanel* to the parameter list.
(edit_cmd_new): No need to get a panel because it is not used.
* panelize.c: Changed hotkey of the Panelize button (Alt-p is
already used by the input line history). I wonder if I should
change it in the find dialog, too (just to have a unique hotkey
for the panelize button).
Wed Mar 11 19:02:48 1998 Miguel de Icaza <miguel@nuclecu.unam.mx>
* view.c: Lots of changes: Split the X11 code from the main view

View File

@ -260,9 +260,9 @@ void view_cmd (WPanel *panel)
do_view_cmd (panel, 0);
}
void view_simple_cmd (void)
void view_simple_cmd (WPanel *panel)
{
do_view_cmd (cpanel, 1);
do_view_cmd (panel, 1);
}
void filtered_view_cmd (WPanel *panel)
@ -320,7 +320,6 @@ void edit_cmd (WPanel *panel)
void edit_cmd_new (WPanel *panel)
{
panel = get_a_panel(panel);
do_edit ("");
}

View File

@ -9,7 +9,7 @@ int view_file_at_line (char *filename, int plain_view, int internal,
int start_line);
int view_file (char *filename, int normal, int internal);
void view_cmd (WPanel *panel);
void view_simple_cmd ();
void view_simple_cmd (WPanel *panel);
void filtered_view_cmd (WPanel *panel);
void filtered_view_cmd_cpanel (void);
void do_edit (const char *what);

View File

@ -1696,8 +1696,6 @@ static void nothing ()
static key_map default_map [] = {
{ KEY_F(19), menu_last_selected_cmd },
{ KEY_F(13), (key_callback) view_simple_cmd },
{ KEY_F(20), (key_callback) quiet_quit_cmd },
/* Copy useful information to the command line */

View File

@ -92,7 +92,7 @@ struct {
{ B_CANCEL, NORMAL_BUTTON, 0, 53, "&Cancel", "c"},
{ B_ADD, NORMAL_BUTTON, 0, 28, "&Add new", "a"},
{ B_REMOVE, NORMAL_BUTTON, 0, 16, "&Remove", "r"},
{ B_ENTER, DEFPUSH_BUTTON, 0, 0, "&Panelize","p"},
{ B_ENTER, DEFPUSH_BUTTON, 0, 0, "Pane&lize","l"},
};
/* Directory panelize */

View File

@ -1959,10 +1959,10 @@ chdir_other_panel (WPanel *panel)
if (get_other_type () != view_listing)
return;
if (!S_ISDIR (cpanel->dir.list [cpanel->selected].buf.st_mode))
new_dir = concat_dir_and_file (cpanel->cwd, "..");
if (!S_ISDIR (panel->dir.list [panel->selected].buf.st_mode))
new_dir = concat_dir_and_file (panel->cwd, "..");
else
new_dir = concat_dir_and_file (cpanel->cwd, cpanel->dir.list [cpanel->selected].fname);
new_dir = concat_dir_and_file (panel->cwd, panel->dir.list [panel->selected].fname);
change_panel ();
do_cd (new_dir, cd_exact);
@ -1981,15 +1981,15 @@ chdir_to_readlink (WPanel *panel)
if (get_other_type () != view_listing)
return;
if (S_ISLNK (cpanel->dir.list [cpanel->selected].buf.st_mode)) {
if (S_ISLNK (panel->dir.list [panel->selected].buf.st_mode)) {
char buffer [MC_MAXPATHLEN], *p;
int i;
struct stat mybuf;
i = readlink (selection (cpanel)->fname, buffer, MC_MAXPATHLEN);
i = readlink (selection (panel)->fname, buffer, MC_MAXPATHLEN);
if (i < 0)
return;
if (mc_stat (selection (cpanel)->fname, &mybuf) < 0)
if (mc_stat (selection (panel)->fname, &mybuf) < 0)
return;
buffer [i] = 0;
if (!S_ISDIR (mybuf.st_mode)) {
@ -2005,7 +2005,7 @@ chdir_to_readlink (WPanel *panel)
if (*buffer == PATH_SEP)
new_dir = strdup (buffer);
else
new_dir = concat_dir_and_file (cpanel->cwd, buffer);
new_dir = concat_dir_and_file (panel->cwd, buffer);
change_panel ();
do_cd (new_dir, cd_exact);
@ -2054,7 +2054,9 @@ static key_map panel_keymap [] = {
{ XCTRL('t'), mark_file },
{ ALT('o'), chdir_other_panel },
{ ALT('l'), chdir_to_readlink },
{ KEY_F(13), view_simple_cmd },
{ KEY_F(14), edit_cmd_new },
#ifdef HAVE_GNOME
{ '+', select_cmd },
{ '\\', unselect_cmd },