summaryrefslogtreecommitdiffstats
path: root/Action.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2016-01-12 06:00:58 -0200
committerHisham Muhammad <hisham@gobolinux.org>2016-01-12 06:00:58 -0200
commit466d4da0c6e7255a38b8de3c3b9dc0373805cc41 (patch)
tree536ca897e2687e51961e9dffffd073f02aa07acb /Action.c
parentfaf28606696ad023c786e8b63372bfa498b0974a (diff)
refactor *Screen classes, add InfoScreen superclass
Diffstat (limited to 'Action.c')
-rw-r--r--Action.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/Action.c b/Action.c
index e60a7f23..e53f5688 100644
--- a/Action.c
+++ b/Action.c
@@ -346,9 +346,9 @@ static Htop_Reaction actionSetup(State* st) {
static Htop_Reaction actionLsof(State* st) {
Process* p = (Process*) Panel_getSelected(st->panel);
if (!p) return HTOP_OK;
- OpenFilesScreen* ts = OpenFilesScreen_new(p);
- OpenFilesScreen_run(ts);
- OpenFilesScreen_delete(ts);
+ OpenFilesScreen* ofs = OpenFilesScreen_new(p);
+ InfoScreen_run((InfoScreen*)ofs);
+ OpenFilesScreen_delete((Object*)ofs);
clear();
CRT_enableDelay();
return HTOP_REFRESH | HTOP_REDRAW_BAR;
@@ -358,8 +358,11 @@ static Htop_Reaction actionStrace(State* st) {
Process* p = (Process*) Panel_getSelected(st->panel);
if (!p) return HTOP_OK;
TraceScreen* ts = TraceScreen_new(p);
- TraceScreen_run(ts);
- TraceScreen_delete(ts);
+ bool ok = TraceScreen_forkTracer(ts);
+ if (ok) {
+ InfoScreen_run((InfoScreen*)ts);
+ }
+ TraceScreen_delete((Object*)ts);
clear();
CRT_enableDelay();
return HTOP_REFRESH | HTOP_REDRAW_BAR;
@@ -504,9 +507,9 @@ static Htop_Reaction actionTagAllChildren(State* st) {
static Htop_Reaction actionShowEnvScreen(State* st) {
Process* p = (Process*) Panel_getSelected(st->panel);
if (!p) return HTOP_OK;
- EnvScreen* ts = EnvScreen_new(p);
- EnvScreen_run(ts);
- EnvScreen_delete(ts);
+ EnvScreen* es = EnvScreen_new(p);
+ InfoScreen_run((InfoScreen*)es);
+ EnvScreen_delete((Object*)es);
clear();
CRT_enableDelay();
return HTOP_REFRESH | HTOP_REDRAW_BAR;

© 2014-2024 Faster IT GmbH | imprint | privacy policy