Commit 3944205b authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Merge branch 'ddfl_issue_352' into 'master'

DD file lister: For terminals over 25 rows tall, the file info window will now be up to 45 rows tall.

See merge request !151
parents 5af9aeeb c75bee54
...@@ -22,6 +22,11 @@ ...@@ -22,6 +22,11 @@
* Things overall look good. Releasing this version. Added * Things overall look good. Releasing this version. Added
* the ability to do searching via filespec, description, and * the ability to do searching via filespec, description, and
* new file search (started working on this 2022-02-08). * new file search (started working on this 2022-02-08).
* 2022-02027 Eric Oulashin Version 2.03
* For terminals over 25 rows tall, the file info window will
* now be up to 45 rows tall. Also, fixed the display of the
* trailing blocks for the list header for wide terminals (over
* 80 columns).
*/ */
if (typeof(require) === "function") if (typeof(require) === "function")
...@@ -75,8 +80,8 @@ if (system.version_num < 31900) ...@@ -75,8 +80,8 @@ if (system.version_num < 31900)
} }
// Lister version information // Lister version information
var LISTER_VERSION = "2.02"; var LISTER_VERSION = "2.03";
var LISTER_DATE = "2022-02-13"; var LISTER_DATE = "2022-02-27";
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
...@@ -527,6 +532,15 @@ function showFileInfo(pFileList, pFileListMenu) ...@@ -527,6 +532,15 @@ function showFileInfo(pFileList, pFileListMenu)
var frameUpperLeftY = pFileListMenu.pos.y + 2; var frameUpperLeftY = pFileListMenu.pos.y + 2;
// Note: frameWidth is declared earlier // Note: frameWidth is declared earlier
var frameHeight = 10; var frameHeight = 10;
// If the user's console is more than 25 rows high, then make the info window
// taller so that its bottom row is 10 from the bottom, but only up to 45 rows tall.
if (console.screen_rows > 25)
{
var frameBottomRow = console.screen_rows - 10;
frameHeight = frameBottomRow - frameUpperLeftY + 1;
if (frameHeight > 45)
frameHeight = 45;
}
var frameTitle = "File Info"; var frameTitle = "File Info";
displayBorderedFrameAndDoInputLoop(frameUpperLeftX, frameUpperLeftY, frameWidth, frameHeight, displayBorderedFrameAndDoInputLoop(frameUpperLeftX, frameUpperLeftY, frameWidth, frameHeight,
gColors.fileInfoWindowBorder, frameTitle, gColors.fileInfoWindowBorder, frameTitle,
...@@ -1952,6 +1966,8 @@ function displayListHdrLine(pMoveToLocationFirst) ...@@ -1952,6 +1966,8 @@ function displayListHdrLine(pMoveToLocationFirst)
// shortDescLen here should always be the same (for the last blocks to always be in the same // shortDescLen here should always be the same (for the last blocks to always be in the same
// position), whereas descriptionEnd might change based on whether the menu is using its scrollbar // position), whereas descriptionEnd might change based on whether the menu is using its scrollbar
var shortDescLen = 60; var shortDescLen = 60;
if (console.screen_columns > 80)
shortDescLen = console.screen_columns - 30;
var formatStr = "\1n\1w\1h%-" + filenameLen + "s %" + fileSizeLen + "s %-" var formatStr = "\1n\1w\1h%-" + filenameLen + "s %" + fileSizeLen + "s %-"
+ +(shortDescLen-7) + "s\1n\1w%5s\1n"; + +(shortDescLen-7) + "s\1n\1w%5s\1n";
var listHdrEndText = THIN_RECTANGLE_RIGHT + BLOCK4 + BLOCK3 + BLOCK2 + BLOCK1; var listHdrEndText = THIN_RECTANGLE_RIGHT + BLOCK4 + BLOCK3 + BLOCK2 + BLOCK1;
......
Digital Distortion File Lister Digital Distortion File Lister
Version 2.02 Version 2.03
Release date: 2022-02-13 Release date: 2022-02-27
by by
......
...@@ -5,6 +5,10 @@ Revision History (change log) ...@@ -5,6 +5,10 @@ Revision History (change log)
============================= =============================
Version Date Description Version Date Description
------- ---- ----------- ------- ---- -----------
2.03 2022-02-27 For terminals over 80 rows tall, the file info window will
now be up to 45 rows tall. Also, fixed the display of the
trailing blocks for the list header for wide terminals
(over 80 columns).
2.02 2022-02-13 Added the ability to do a file search (via filespec, 2.02 2022-02-13 Added the ability to do a file search (via filespec,
description, or new files since last scan). A command- description, or new files since last scan). A command-
line parameter, -MODE, specifies which search to perform line parameter, -MODE, specifies which search to perform
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment