Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
22831170
Commit
22831170
authored
6 years ago
by
echicken
Browse files
Options
Downloads
Patches
Plain Diff
Ditched isSyncTerm(); cterm_lib exists now.
Reinstated root directory variable, it actually helps in some cases.
parent
7809df3d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xtrn/ansiview/ansiview.js
+6
-24
6 additions, 24 deletions
xtrn/ansiview/ansiview.js
with
6 additions
and
24 deletions
xtrn/ansiview/ansiview.js
+
6
−
24
View file @
22831170
...
...
@@ -47,6 +47,8 @@ Frame.prototype.drawBorder = function (color) {
this
.
popxy
();
}
const
root
=
js
.
startup_dir
;
// Stash this now; can be overridden by other things (custom pause prompt via text.dat, etc.)
var
settings
,
frame
,
browserFrame
,
...
...
@@ -194,26 +196,6 @@ function printFile(file) {
}
}
// Basic check for SyncTERM; we don't really care which version it is
function
isSyncTerm
()
{
console
.
clear
(
BG_BLACK
|
LIGHTGRAY
);
console
.
write
(
"
Checking for SyncTERM ...
"
);
var
ret
=
true
;
const
cTerm
=
"
\
x1B[=67;84;101;114;109;
"
.
split
(
""
);
const
ckpt
=
console
.
ctrlkey_passthru
;
console
.
ctrlkey_passthru
=
-
1
;
console
.
write
(
"
\
x1B[0c
"
);
while
(
cTerm
.
length
>
0
)
{
if
(
console
.
inkey
(
K_NONE
,
5000
)
==
cTerm
.
shift
())
continue
;
ret
=
false
;
break
;
}
console
.
clearkeybuffer
();
console
.
ctrlkey_passthru
=
ckpt
;
return
ret
;
}
function
showSpeed
()
{
speedFrame
.
clear
();
speedFrame
.
putmsg
(
state
.
speed
==
0
?
"
Full
"
:
speedMap
[
state
.
speed
]);
...
...
@@ -231,7 +213,7 @@ function GalleryChooser() {
var
scrollBar
;
function
getList
()
{
const
f
=
new
File
(
js
.
exec_dir
+
"
settings.ini
"
);
const
f
=
new
File
(
root
+
"
settings.ini
"
);
f
.
open
(
"
r
"
);
const
galleries
=
f
.
iniGetAllObjects
();
f
.
close
();
...
...
@@ -261,7 +243,7 @@ function GalleryChooser() {
e
.
colors
=
settings
;
tree
.
addItem
(
format
(
"
%-32s %s
"
,
e
.
name
,
e
.
description
),
function
()
{
state
.
browser
.
close
();
state
.
browser
=
load
(
js
.
exec_dir
+
e
.
module
,
JSON
.
stringify
(
e
));
state
.
browser
=
load
(
root
+
e
.
module
,
JSON
.
stringify
(
e
));
state
.
browser
.
open
();
areaFrame
.
clear
();
areaFrame
.
putmsg
(
e
.
name
);
...
...
@@ -324,7 +306,7 @@ function initDisplay() {
}
function
initSettings
()
{
const
f
=
new
File
(
js
.
exec_dir
+
"
settings.ini
"
);
const
f
=
new
File
(
root
+
"
settings.ini
"
);
f
.
open
(
"
r
"
);
settings
=
f
.
iniGetObject
();
f
.
close
();
...
...
@@ -349,7 +331,7 @@ function initSettings() {
function
init
()
{
bbs
.
sys_status
|=
(
SS_MOFF
|
SS_PAUSEON
);
bbs
.
sys_status
&=
(
~
SS_PAUSEOFF
);
state
.
syncTerm
=
isSyncTerm
()
;
state
.
syncTerm
=
cterm
.
query_da
()
!==
false
;
initSettings
();
initDisplay
();
state
.
browser
=
new
GalleryChooser
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment