1
1

Merge branch '2465_dynamically_resize'

* 2465_dynamically_resize:
  modified mc.lib, added alt-shift-arrows
  Ticket #2465 (dynamically resize panels)
Этот коммит содержится в:
Ilia Maslakov 2012-02-09 22:02:58 +04:00
родитель 7c0a526916 7a4a7576b8
Коммит b1a26c7e2f
8 изменённых файлов: 83 добавлений и 7 удалений

Просмотреть файл

@ -194,6 +194,9 @@ static name_keymap_t command_names[] = {
{"HotListAdd", CK_HotListAdd},
{"ShowHidden", CK_ShowHidden},
{"SplitVertHoriz", CK_SplitVertHoriz},
{"SplitEqual", CK_SplitEqual},
{"SplitMore", CK_SplitMore},
{"SplitLess", CK_SplitLess},
{"PutCurrentPath", CK_PutCurrentPath},
{"PutOtherPath", CK_PutOtherPath},
{"PutCurrentTagged", CK_PutCurrentTagged},
@ -324,9 +327,6 @@ static name_keymap_t command_names[] = {
/* diff viewer */
{"ShowSymbols", CK_ShowSymbols},
{"SplitFull", CK_SplitFull},
{"SplitEqual", CK_SplitEqual},
{"SplitMore", CK_SplitMore},
{"SplitLess", CK_SplitLess},
{"Tab2", CK_Tab2},
{"Tab3", CK_Tab3},
{"Tab4", CK_Tab4},

Просмотреть файл

@ -164,6 +164,9 @@ enum
CK_Tree,
CK_Undelete,
CK_SplitVertHoriz,
CK_SplitEqual,
CK_SplitMore,
CK_SplitLess,
CK_CompareFiles,
CK_OptionsPanel,
CK_LinkSymbolicRelative,
@ -304,9 +307,6 @@ enum
/* diff viewer */
CK_ShowSymbols = 700,
CK_SplitFull,
CK_SplitEqual,
CK_SplitMore,
CK_SplitLess,
CK_Tab2,
CK_Tab3,
CK_Tab4,

Просмотреть файл

@ -26,6 +26,9 @@ PanelListingSwitch = alt-t
PanelListingChange =
ShowHidden = alt-dot
SplitVertHoriz = alt-comma
SplitEqual = alt-equal
SplitMore = alt-shift-right
SplitLess = alt-shift-left
Shell = ctrl-o
PutCurrentPath = alt-a
PutOtherPath = alt-shift-a

Просмотреть файл

@ -26,6 +26,9 @@ PanelListingSwitch = alt-t
PanelListingChange =
ShowHidden = alt-dot
SplitVertHoriz = alt-comma
SplitEqual = alt-equal
SplitMore = alt-shift-right
SplitLess = alt-shift-left
Shell = ctrl-o
PutCurrentPath = alt-a
PutOtherPath = alt-shift-a

Просмотреть файл

@ -99,6 +99,12 @@ right=\\eOC
left=\\e[D
left=\\eOD
# arrows with modifiers
alt-shift-right=\\e[1\;4C
alt-shift-left=\\e[1\;4D
alt-shift-up=\\e[1\;4A
alt-shift-down=\\e[1\;4B
[terminal:gnome]
copy=xterm

Просмотреть файл

@ -753,6 +753,59 @@ setup_panels (void)
/* --------------------------------------------------------------------------------------------- */
void
panels_split_equal (void)
{
if (panels_layout.horizontal_split)
panels_layout.horizontal_equal = TRUE;
else
panels_layout.vertical_equal = TRUE;
layout_change ();
do_refresh ();
}
/* --------------------------------------------------------------------------------------------- */
void
panels_split_more (void)
{
if (panels_layout.horizontal_split)
{
panels_layout.horizontal_equal = FALSE;
panels_layout.top_panel_size++;
}
else
{
panels_layout.vertical_equal = FALSE;
panels_layout.left_panel_size++;
}
layout_change ();
}
/* --------------------------------------------------------------------------------------------- */
void
panels_split_less (void)
{
if (panels_layout.horizontal_split)
{
panels_layout.horizontal_equal = FALSE;
panels_layout.top_panel_size--;
}
else
{
panels_layout.vertical_equal = FALSE;
panels_layout.left_panel_size--;
}
layout_change ();
}
/* --------------------------------------------------------------------------------------------- */
void
setup_cmdline (void)
{

Просмотреть файл

@ -51,10 +51,12 @@ extern int nice_rotating_dash;
extern panels_layout_t panels_layout;
/*** declarations of public functions ************************************************************/
void layout_change (void);
void layout_box (void);
void setup_panels (void);
void panels_split_equal (void);
void panels_split_more (void);
void panels_split_less (void);
void destroy_panels (void);
void setup_cmdline (void);
void set_display_type (int num, panel_view_mode_t type);

Просмотреть файл

@ -1294,6 +1294,15 @@ midnight_execute_cmd (Widget * sender, unsigned long command)
case CK_SplitVertHoriz:
toggle_panels_split ();
break;
case CK_SplitEqual:
panels_split_equal ();
break;
case CK_SplitMore:
panels_split_more ();
break;
case CK_SplitLess:
panels_split_less ();
break;
case CK_PanelTree:
panel_tree_cmd ();
break;