Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
b796362e
Commit
b796362e
authored
Jun 15, 2015
by
Christian Hesse
Browse files
ignore enter, delete and space on empty panel
parent
abe165fe
Changes
1
Show whitespace changes
Inline
Side-by-side
MetersPanel.c
View file @
b796362e
...
...
@@ -76,6 +76,8 @@ static HandlerResult MetersPanel_eventHandler(Panel* super, int ch) {
case
0x0d
:
case
KEY_ENTER
:
{
if
(
!
Vector_size
(
this
->
meters
))
break
;
this
->
moving
=
!
(
this
->
moving
);
((
ListItem
*
)
Panel_getSelected
(
super
))
->
moving
=
this
->
moving
;
result
=
HANDLED
;
...
...
@@ -85,6 +87,8 @@ static HandlerResult MetersPanel_eventHandler(Panel* super, int ch) {
case
KEY_F
(
4
):
case
't'
:
{
if
(
!
Vector_size
(
this
->
meters
))
break
;
Meter
*
meter
=
(
Meter
*
)
Vector_get
(
this
->
meters
,
selected
);
int
mode
=
meter
->
mode
+
1
;
if
(
mode
==
LAST_METERMODE
)
mode
=
1
;
...
...
@@ -147,6 +151,8 @@ static HandlerResult MetersPanel_eventHandler(Panel* super, int ch) {
case
KEY_F
(
9
):
case
KEY_DC
:
{
if
(
!
Vector_size
(
this
->
meters
))
break
;
if
(
selected
<
Vector_size
(
this
->
meters
))
{
Vector_remove
(
this
->
meters
,
selected
);
Panel_remove
(
super
,
selected
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment