diff --git a/xtrn/ddfilelister/ddfilelister.cfg b/xtrn/ddfilelister/ddfilelister.cfg index ebf0f7a51b90e40c780f3adaa93c2e0e5c475f4b..0afe62224ca2b54489dc175f4b04247b74584f0f 100644 --- a/xtrn/ddfilelister/ddfilelister.cfg +++ b/xtrn/ddfilelister/ddfilelister.cfg @@ -20,5 +20,10 @@ sortOrder=NATURAL ; Whether or not to pause after viewing a file pauseAfterViewingFile=true +; When used as a loadable module, whether or not to blank out +; the "# Files Listed" string (from text.dat) so that Synchronet +; won't display it after the lister exits +blankNFilesListedStrIfLoadableModule=true + ; The name of the color theme configuration file themeFilename=defaultTheme.cfg diff --git a/xtrn/ddfilelister/ddfilelister.js b/xtrn/ddfilelister/ddfilelister.js index 55376359a4eb600d8671e3aced64f3cf20e35fbd..5c0b614724c18b77525f79cb1aee75744b6d4203 100644 --- a/xtrn/ddfilelister/ddfilelister.js +++ b/xtrn/ddfilelister/ddfilelister.js @@ -89,6 +89,10 @@ * Fix for "Empty directory" message after quitting (the lister must * exit with the number of files listed). Also, updates for filename * searching, and help screen now should always pause. + * 2023-09-17 Eric Oulashin New configuration option: blankNFilesListedStrIfLoadableModule, + * If true (default), then when started as a loadable module, replace the + * "# Files Listed" text with an empty string so that it won't be displayed + * after exit */ "use strict"; @@ -108,7 +112,7 @@ if (system.version_num < 31900) console.crlf(); console.pause(); } - exit(); + exit(0); } @@ -123,7 +127,7 @@ require("attr_conv.js", "convertAttrsToSyncPerSysCfg"); // Lister version information var LISTER_VERSION = "2.15"; -var LISTER_DATE = "2023-09-16"; +var LISTER_DATE = "2023-09-17"; /////////////////////////////////////////////////////////////////////////////// @@ -271,6 +275,11 @@ var gSearchVerbose = false; // When called as a lodable module, one of the options is to scan all dirs var gScanAllDirs = false; +// Setting from the configuration file: When used as a loadable module, whether +// or not to blank out the "# Files Listed" string (from text.dat) so that +// Synchronet won't display it after the lister exits +var gBlankNFilesListedStrIfLoadableModule = true; + // Read the configuration file and set the settings readConfigFile(); @@ -3795,6 +3804,11 @@ function readConfigFile() if (typeof(settingsObj[prop]) === "boolean") gPauseAfterViewingFile = settingsObj[prop]; } + else if (propUpper == "BLANKNFILESLISTEDSTRIFLOADABLEMODULE") + { + if (typeof(settingsObj[prop]) === "boolean") + gBlankNFilesListedStrIfLoadableModule = settingsObj[prop]; + } else if (propUpper == "THEMEFILENAME") { if (typeof(settingsObj[prop]) === "string") @@ -4032,6 +4046,10 @@ function parseArgs(argv) // There must be either 2 or 3 arguments if (argv.length < 2) return false; + // If gBlankNFilesListedStrIfLoadableModule is true, replace the "# Files Listed" text with an + // empty string so that it won't be displayed after exit + if (gBlankNFilesListedStrIfLoadableModule) + bbs.replace_text(NFilesListed, ""); // The 2nd argument is the mode/behavior bits in either case var FLBehavior = parseInt(argv[1]); if (isNaN(FLBehavior)) diff --git a/xtrn/ddfilelister/readme.txt b/xtrn/ddfilelister/readme.txt index 24a354520649a4d6ff14ba3bb289c0f41c6398d8..08ec719641e2d1ed5c31d0fc86b1fa9bd7a7ef13 100644 --- a/xtrn/ddfilelister/readme.txt +++ b/xtrn/ddfilelister/readme.txt @@ -1,6 +1,6 @@ Digital Distortion File Lister Version 2.15 - Release date: 2023-09-16 + Release date: 2023-09-17 by @@ -238,6 +238,11 @@ sortOrder String: The file sort order to use. pauseAfterViewingFile Whether or not to pause after viewing a file + +blankNFilesListedStrIfLoadableModule When used as a loadable module, whether or + not to blank out the "# Files Listed" + string (from text.dat) so that Synchronet + won't display it after the lister exits themeFilename The name of the configuration file to use for colors & string settings @@ -346,3 +351,6 @@ Synchronet's ctrl directory): - DirLibOrAll (622) - FileSpecStarDotStar (199) - SearchStringPrompt (76) +- NFilesListed (168): This string will be blanked if the file lister is used as + a loadable module and the blankNFilesListedStrIfLoadableModule configuration + setting is true \ No newline at end of file diff --git a/xtrn/ddfilelister/revision_history.txt b/xtrn/ddfilelister/revision_history.txt index 0083271eaeb5beaccb1d2cfe7b392c431f5d484b..075c312742fd1c54fba31ea80893f882cd7d4ff7 100644 --- a/xtrn/ddfilelister/revision_history.txt +++ b/xtrn/ddfilelister/revision_history.txt @@ -5,12 +5,16 @@ Revision History (change log) ============================= Version Date Description ------- ---- ----------- -2.15 2023-09-16 Fix for "Empty directory" message after quitting (the +2.15 2023-09-17 Fix for "Empty directory" message after quitting (the lister must exit with the number of files listed). Also, updates for filename searching. Also, note ddfilelister is best NOT to be used for the Scan Dirs loadable module option (only for List Files), and the help screen should - now always pause at the end. + now always pause at the end. Also, New configuration + option: blankNFilesListedStrIfLoadableModule, If true + (default), then when started as a loadable module, replace + the "# Files Listed" text with an empty string so that it + won't be displayed after exit. 2.14 2023-09-02 Fix for the lightbar interface: When erasing the file info window, the file date is not shown on a duplicate line if the file date is already showing in the description area