Skip to content
Snippets Groups Projects
Commit 5485cb2d authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Merge branch 'dd_file_lister_blank_NFilesListed_as_loadable_module' into 'master'

DD File Lister: Blank out the "# Files Listed" string if used as a loadable module (optional, defaults to true)

See merge request !334
parents 46f8360a 8dc86ed4
Branches
Tags
No related merge requests found
...@@ -20,5 +20,10 @@ sortOrder=NATURAL ...@@ -20,5 +20,10 @@ sortOrder=NATURAL
; Whether or not to pause after viewing a file ; Whether or not to pause after viewing a file
pauseAfterViewingFile=true 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 ; The name of the color theme configuration file
themeFilename=defaultTheme.cfg themeFilename=defaultTheme.cfg
...@@ -89,6 +89,10 @@ ...@@ -89,6 +89,10 @@
* Fix for "Empty directory" message after quitting (the lister must * Fix for "Empty directory" message after quitting (the lister must
* exit with the number of files listed). Also, updates for filename * exit with the number of files listed). Also, updates for filename
* searching, and help screen now should always pause. * 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"; "use strict";
...@@ -108,7 +112,7 @@ if (system.version_num < 31900) ...@@ -108,7 +112,7 @@ if (system.version_num < 31900)
console.crlf(); console.crlf();
console.pause(); console.pause();
} }
exit(); exit(0);
} }
...@@ -123,7 +127,7 @@ require("attr_conv.js", "convertAttrsToSyncPerSysCfg"); ...@@ -123,7 +127,7 @@ require("attr_conv.js", "convertAttrsToSyncPerSysCfg");
// Lister version information // Lister version information
var LISTER_VERSION = "2.15"; var LISTER_VERSION = "2.15";
var LISTER_DATE = "2023-09-16"; var LISTER_DATE = "2023-09-17";
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
...@@ -271,6 +275,11 @@ var gSearchVerbose = false; ...@@ -271,6 +275,11 @@ var gSearchVerbose = false;
// When called as a lodable module, one of the options is to scan all dirs // When called as a lodable module, one of the options is to scan all dirs
var gScanAllDirs = false; 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 // Read the configuration file and set the settings
readConfigFile(); readConfigFile();
...@@ -3795,6 +3804,11 @@ function readConfigFile() ...@@ -3795,6 +3804,11 @@ function readConfigFile()
if (typeof(settingsObj[prop]) === "boolean") if (typeof(settingsObj[prop]) === "boolean")
gPauseAfterViewingFile = settingsObj[prop]; gPauseAfterViewingFile = settingsObj[prop];
} }
else if (propUpper == "BLANKNFILESLISTEDSTRIFLOADABLEMODULE")
{
if (typeof(settingsObj[prop]) === "boolean")
gBlankNFilesListedStrIfLoadableModule = settingsObj[prop];
}
else if (propUpper == "THEMEFILENAME") else if (propUpper == "THEMEFILENAME")
{ {
if (typeof(settingsObj[prop]) === "string") if (typeof(settingsObj[prop]) === "string")
...@@ -4032,6 +4046,10 @@ function parseArgs(argv) ...@@ -4032,6 +4046,10 @@ function parseArgs(argv)
// There must be either 2 or 3 arguments // There must be either 2 or 3 arguments
if (argv.length < 2) if (argv.length < 2)
return false; 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 // The 2nd argument is the mode/behavior bits in either case
var FLBehavior = parseInt(argv[1]); var FLBehavior = parseInt(argv[1]);
if (isNaN(FLBehavior)) if (isNaN(FLBehavior))
......
Digital Distortion File Lister Digital Distortion File Lister
Version 2.15 Version 2.15
Release date: 2023-09-16 Release date: 2023-09-17
by by
...@@ -239,6 +239,11 @@ sortOrder String: The file sort order to use. ...@@ -239,6 +239,11 @@ sortOrder String: The file sort order to use.
pauseAfterViewingFile Whether or not to pause after viewing a pauseAfterViewingFile Whether or not to pause after viewing a
file 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 themeFilename The name of the configuration file to
use for colors & string settings use for colors & string settings
...@@ -346,3 +351,6 @@ Synchronet's ctrl directory): ...@@ -346,3 +351,6 @@ Synchronet's ctrl directory):
- DirLibOrAll (622) - DirLibOrAll (622)
- FileSpecStarDotStar (199) - FileSpecStarDotStar (199)
- SearchStringPrompt (76) - 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
...@@ -5,12 +5,16 @@ Revision History (change log) ...@@ -5,12 +5,16 @@ Revision History (change log)
============================= =============================
Version Date Description 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, lister must exit with the number of files listed). Also,
updates for filename searching. Also, note ddfilelister is updates for filename searching. Also, note ddfilelister is
best NOT to be used for the Scan Dirs loadable module best NOT to be used for the Scan Dirs loadable module
option (only for List Files), and the help screen should 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 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 window, the file date is not shown on a duplicate line if
the file date is already showing in the description area the file date is already showing in the description area
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment