summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/actions.cpp4
-rw-r--r--src/playlist.cpp20
-rw-r--r--src/sel_items_adder.cpp6
-rw-r--r--src/server_info.cpp5
-rw-r--r--src/tag_editor.cpp10
5 files changed, 8 insertions, 37 deletions
diff --git a/src/actions.cpp b/src/actions.cpp
index 85c7d7b8..1363ce80 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -84,10 +84,10 @@ void Action::ValidateScreenSize()
{
using Global::MainHeight;
- if (COLS < 20 || MainHeight < 3)
+ if (COLS < 30 || MainHeight < 5)
{
NC::destroyScreen();
- std::cout << "Screen is too small!\n";
+ std::cout << "Screen is too small to handle ncmpcpp correctly\n";
exit(1);
}
}
diff --git a/src/playlist.cpp b/src/playlist.cpp
index fa3d088d..550237bf 100644
--- a/src/playlist.cpp
+++ b/src/playlist.cpp
@@ -137,14 +137,9 @@ void Playlist::resize()
if (w == SortDialog) // if sorting window is active, playlist needs refreshing
Items->display();
- SortDialogHeight = std::min(int(MainHeight), 17);
- if (Items->getWidth() >= SortDialogWidth && MainHeight >= 5)
- {
- SortDialog->resize(SortDialogWidth, SortDialogHeight);
- SortDialog->moveTo(x_offset+(width-SortDialogWidth)/2, (MainHeight-SortDialogHeight)/2+MainStartY);
- }
- else // if screen is too low to display sorting window, fall back to items list
- w = Items;
+ SortDialogHeight = std::min(size_t(17), MainHeight);
+ SortDialog->resize(SortDialogWidth, SortDialogHeight);
+ SortDialog->moveTo(x_offset+(width-SortDialogWidth)/2, (MainHeight-SortDialogHeight)/2+MainStartY);
hasToBeResized = 0;
}
@@ -390,13 +385,8 @@ void Playlist::Sort()
{
if (isFiltered())
return;
- if (Items->getWidth() < SortDialogWidth || MainHeight < 5)
- Statusbar::msg("Screen is too small to display dialog window");
- else
- {
- SortDialog->reset();
- w = SortDialog;
- }
+ SortDialog->reset();
+ w = SortDialog;
}
void Playlist::Reverse()
diff --git a/src/sel_items_adder.cpp b/src/sel_items_adder.cpp
index 0dcab2bc..3da39ca4 100644
--- a/src/sel_items_adder.cpp
+++ b/src/sel_items_adder.cpp
@@ -76,12 +76,6 @@ void SelectedItemsAdder::switchTo()
if (!hs || !hs->allowsSelection())
return;
- if (MainHeight < 5)
- {
- Statusbar::msg("Screen is too small to display this window");
- return;
- }
-
if (!isInitialized)
init();
diff --git a/src/server_info.cpp b/src/server_info.cpp
index f07f2f27..a7eab9fc 100644
--- a/src/server_info.cpp
+++ b/src/server_info.cpp
@@ -52,11 +52,6 @@ void ServerInfo::switchTo()
myOldScreen->switchTo();
return;
}
- if (MainHeight < 5)
- {
- Statusbar::msg("Screen is too small to display this window");
- return;
- }
if (!isInitialized)
init();
diff --git a/src/tag_editor.cpp b/src/tag_editor.cpp
index 619e033f..cf9e147c 100644
--- a/src/tag_editor.cpp
+++ b/src/tag_editor.cpp
@@ -155,7 +155,7 @@ void TagEditor::SetDimensions(size_t x_offset, size_t width)
RightColumnStartX = MiddleColumnStartX+MiddleColumnWidth+1;
FParserDialogWidth = std::min(30, COLS);
- FParserDialogHeight = std::min(size_t(6), MainHeight);
+ FParserDialogHeight = std::min(size_t(5), MainHeight);
FParserWidth = width*0.9;
FParserHeight = std::min(size_t(LINES*0.8), MainHeight);
FParserWidthOne = FParserWidth/2;
@@ -185,9 +185,6 @@ void TagEditor::resize()
FParserLegend->moveTo(x_offset+(width-FParserWidth)/2+FParserWidthOne, (MainHeight-FParserHeight)/2+MainStartY);
FParserPreview->moveTo(x_offset+(width-FParserWidth)/2+FParserWidthOne, (MainHeight-FParserHeight)/2+MainStartY);
- if (MainHeight < 5 && (w == FParserDialog || w == FParser || w == FParserHelper)) // screen too low
- w = TagTypes; // fall back to main columns
-
hasToBeResized = 0;
}
@@ -534,11 +531,6 @@ void TagEditor::enterPressed()
{
if (w == TagTypes)
{
- if (size_t(COLS) < FParserDialogWidth || MainHeight < FParserDialogHeight)
- {
- Statusbar::msg("Screen is too small to display additional windows");
- return;
- }
FParserDialog->reset();
w = FParserDialog;
}