new feature: support for merging screens together

This commit is contained in:
Andrzej Rybczak
2011-11-12 19:47:47 +01:00
parent e31dec7005
commit 56467eaac6
44 changed files with 633 additions and 218 deletions

View File

@@ -40,14 +40,17 @@ void Help::Init()
void Help::Resize()
{
w->Resize(COLS, MainHeight);
w->MoveTo(0, MainStartY);
size_t x_offset, width;
GetWindowResizeParams(x_offset, width);
w->Resize(width, MainHeight);
w->MoveTo(x_offset, MainStartY);
hasToBeResized = 0;
}
void Help::SwitchTo()
{
using Global::myScreen;
using Global::myLockedScreen;
if (myScreen == this)
return;
@@ -55,7 +58,10 @@ void Help::SwitchTo()
if (!isInitialized)
Init();
if (hasToBeResized)
if (myLockedScreen)
UpdateInactiveScreen(this);
if (hasToBeResized || myLockedScreen)
Resize();
if (myScreen != this && myScreen->isTabbable())
@@ -211,6 +217,7 @@ void Help::GetKeybindings()
*w << DisplayKeys(Key.ToggleFindMode) << "Toggle find mode (normal/wrapped)\n";
*w << DisplayKeys(Key.GoToContainingDir) << "Locate song in browser\n";
*w << DisplayKeys(Key.GoToMediaLibrary) << "Locate current song in media library\n";
*w << DisplayKeys(Key.ToggleScreenLock) << "Lock/unlock current screen\n";
# ifdef HAVE_TAGLIB_H
*w << DisplayKeys(Key.GoToTagEditor) << "Locate current song in tag editor\n";
# endif // HAVE_TAGLIB_H