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
376ea27a
Commit
376ea27a
authored
23 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Revamped pop-up menu: added refresh menu item and keyboard short-cuts for all.
parent
a10fe85b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/sbbs3/ctrl/NodeFormUnit.cpp
+20
-7
20 additions, 7 deletions
src/sbbs3/ctrl/NodeFormUnit.cpp
src/sbbs3/ctrl/NodeFormUnit.dfm
+22
-8
22 additions, 8 deletions
src/sbbs3/ctrl/NodeFormUnit.dfm
src/sbbs3/ctrl/NodeFormUnit.h
+2
-1
2 additions, 1 deletion
src/sbbs3/ctrl/NodeFormUnit.h
with
44 additions
and
16 deletions
src/sbbs3/ctrl/NodeFormUnit.cpp
+
20
−
7
View file @
376ea27a
...
...
@@ -355,8 +355,11 @@ void __fastcall TNodeForm::TimerTick(TObject *Sender)
AnsiString
Str
=
AnsiString
(
str
);
if
(
ListBox
->
Items
->
Count
<
n
+
1
)
ListBox
->
Items
->
Add
(
Str
);
else
if
(
ListBox
->
Items
->
Strings
[
n
]
!=
Str
)
else
if
(
ListBox
->
Items
->
Strings
[
n
]
!=
Str
)
{
bool
selected
=
ListBox
->
Selected
[
n
];
// save selected state
ListBox
->
Items
->
Strings
[
n
]
=
str
;
ListBox
->
Selected
[
n
]
=
selected
;
// restore
}
}
Timer
->
Enabled
=
true
;
}
...
...
@@ -375,6 +378,7 @@ void __fastcall TNodeForm::InterruptNodeButtonClick(TObject *Sender)
node
.
misc
^=
NODE_INTR
;
putnodedat
(
&
MainForm
->
cfg
,
i
+
1
,
&
node
);
}
TimerTick
(
Sender
);
}
//---------------------------------------------------------------------------
...
...
@@ -389,6 +393,7 @@ void __fastcall TNodeForm::LockNodeButtonClick(TObject *Sender)
node
.
misc
^=
NODE_LOCK
;
putnodedat
(
&
MainForm
->
cfg
,
i
+
1
,
&
node
);
}
TimerTick
(
Sender
);
}
//---------------------------------------------------------------------------
...
...
@@ -403,16 +408,11 @@ void __fastcall TNodeForm::RerunNodeButtonClick(TObject *Sender)
node
.
misc
^=
NODE_RRUN
;
putnodedat
(
&
MainForm
->
cfg
,
i
+
1
,
&
node
);
}
TimerTick
(
Sender
);
}
//---------------------------------------------------------------------------
void
__fastcall
TNodeForm
::
ListBoxKeyPress
(
TObject
*
Sender
,
char
&
Key
)
{
if
(
Key
==
1
)
// ctrl-a
SelectAllMenuItemClick
(
Sender
);
}
//---------------------------------------------------------------------------
void
__fastcall
TNodeForm
::
SelectAllMenuItemClick
(
TObject
*
Sender
)
{
...
...
@@ -440,6 +440,7 @@ void __fastcall TNodeForm::DownButtonClick(TObject *Sender)
node
.
misc
^=
NODE_DOWN
;
putnodedat
(
&
MainForm
->
cfg
,
i
+
1
,
&
node
);
}
TimerTick
(
Sender
);
}
//---------------------------------------------------------------------------
...
...
@@ -454,6 +455,7 @@ void __fastcall TNodeForm::ClearErrorButtonClick(TObject *Sender)
node
.
errors
=
0
;
putnodedat
(
&
MainForm
->
cfg
,
i
+
1
,
&
node
);
}
TimerTick
(
Sender
);
}
//---------------------------------------------------------------------------
...
...
@@ -478,6 +480,7 @@ void __fastcall TNodeForm::ChatButtonClick(TObject *Sender)
);
WinExec
(
str
,
SW_SHOWNORMAL
);
}
TimerTick
(
Sender
);
}
//---------------------------------------------------------------------------
...
...
@@ -495,6 +498,7 @@ void __fastcall TNodeForm::SpyButtonClick(TObject *Sender)
}
SpyForms
[
i
]
->
Show
();
}
TimerTick
(
Sender
);
}
//---------------------------------------------------------------------------
...
...
@@ -515,6 +519,7 @@ void __fastcall TNodeForm::UserEditButtonClick(TObject *Sender)
,
node
.
useron
);
WinExec
(
str
,
SW_SHOWNORMAL
);
}
TimerTick
(
Sender
);
}
//---------------------------------------------------------------------------
...
...
@@ -538,6 +543,14 @@ void __fastcall TNodeForm::UserMsgButtonClick(TObject *Sender)
}
}
delete
UserMsgForm
;
TimerTick
(
Sender
);
}
//---------------------------------------------------------------------------
void
__fastcall
TNodeForm
::
RefreshMenuItemClick
(
TObject
*
Sender
)
{
ListBox
->
Clear
();
TimerTick
(
Sender
);
}
//---------------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
src/sbbs3/ctrl/NodeFormUnit.dfm
+
22
−
8
View file @
376ea27a
object NodeForm: TNodeForm
Left =
579
Top =
396
Left =
340
Top =
159
Width = 277
Height = 214
Caption = 'Nodes'
...
...
@@ -10,15 +10,15 @@ object NodeForm: TNodeForm
DragMode = dmAutomatic
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -1
1
Font.Height = -1
4
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poDefault
OnHide = FormHide
OnShow = FormShow
PixelsPerInch =
96
TextHeight = 1
3
PixelsPerInch =
120
TextHeight = 1
6
object Toolbar: TToolBar
Left = 0
Top = 0
...
...
@@ -118,13 +118,12 @@ object NodeForm: TNodeForm
Left = 0
Top = 25
Width = 269
Height = 1
62
Height = 1
57
Align = alClient
ItemHeight = 1
3
ItemHeight = 1
6
MultiSelect = True
PopupMenu = PopupMenu
TabOrder = 1
OnKeyPress = ListBoxKeyPress
end
object Timer: TTimer
OnTimer = TimerTick
...
...
@@ -137,53 +136,68 @@ object NodeForm: TNodeForm
object LockMenuItem: TMenuItem
Caption = 'Lock Node'
ImageIndex = 19
ShortCut = 16460
OnClick = LockNodeButtonClick
end
object DownMenuItem: TMenuItem
Caption = 'Down Node'
ImageIndex = 21
ShortCut = 16452
OnClick = DownButtonClick
end
object RerunMenuItem: TMenuItem
Caption = 'Rerun Node'
ImageIndex = 55
ShortCut = 16466
OnClick = RerunNodeButtonClick
end
object InterruptMenuItem: TMenuItem
Caption = 'Interrupt Node'
ImageIndex = 17
ShortCut = 16457
OnClick = InterruptNodeButtonClick
end
object ClearErrorsMenuItem: TMenuItem
Caption = 'Clear Errors'
ImageIndex = 33
ShortCut = 46
OnClick = ClearErrorButtonClick
end
object ChatMenuItem: TMenuItem
Caption = 'Chat w/User'
ImageIndex = 39
ShortCut = 121
OnClick = ChatButtonClick
end
object SendMsgMenuItem: TMenuItem
Caption = 'Send User Msg'
ShortCut = 122
OnClick = UserMsgButtonClick
end
object SpyMenuItem: TMenuItem
Caption = 'Spy on Node'
ImageIndex = 41
ShortCut = 123
OnClick = SpyButtonClick
end
object EditUser1: TMenuItem
Caption = 'Edit User'
Hint = 'EditUserMenuItem'
ImageIndex = 27
ShortCut = 113
OnClick = UserEditButtonClick
end
object N1: TMenuItem
Caption = '-'
end
object RefreshMenuItem: TMenuItem
Caption = 'Refresh'
ShortCut = 116
OnClick = RefreshMenuItemClick
end
object SelectAllMenuItem: TMenuItem
Caption = 'Select &All'
ShortCut = 16449
OnClick = SelectAllMenuItemClick
end
end
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/ctrl/NodeFormUnit.h
+
2
−
1
View file @
376ea27a
...
...
@@ -78,12 +78,12 @@ __published: // IDE-managed Components
TMenuItem
*
EditUser1
;
TToolButton
*
UserMsgButton
;
TMenuItem
*
SendMsgMenuItem
;
TMenuItem
*
RefreshMenuItem
;
void
__fastcall
FormShow
(
TObject
*
Sender
);
void
__fastcall
TimerTick
(
TObject
*
Sender
);
void
__fastcall
FormHide
(
TObject
*
Sender
);
void
__fastcall
InterruptNodeButtonClick
(
TObject
*
Sender
);
void
__fastcall
LockNodeButtonClick
(
TObject
*
Sender
);
void
__fastcall
ListBoxKeyPress
(
TObject
*
Sender
,
char
&
Key
);
void
__fastcall
SelectAllMenuItemClick
(
TObject
*
Sender
);
void
__fastcall
DownButtonClick
(
TObject
*
Sender
);
void
__fastcall
ClearErrorButtonClick
(
TObject
*
Sender
);
...
...
@@ -92,6 +92,7 @@ __published: // IDE-managed Components
void
__fastcall
RerunNodeButtonClick
(
TObject
*
Sender
);
void
__fastcall
UserEditButtonClick
(
TObject
*
Sender
);
void
__fastcall
UserMsgButtonClick
(
TObject
*
Sender
);
void
__fastcall
RefreshMenuItemClick
(
TObject
*
Sender
);
private:
// User declarations
public:
// User declarations
__fastcall
TNodeForm
(
TComponent
*
Owner
);
...
...
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