From f3147ea2d1598914c2db53e8cfb34c8ff81e2ff4 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Thu, 27 Aug 2020 07:48:10 +0200 Subject: New upstream version 3.0.0 --- InfoScreen.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'InfoScreen.c') diff --git a/InfoScreen.c b/InfoScreen.c index fab8dae..9312000 100644 --- a/InfoScreen.c +++ b/InfoScreen.c @@ -56,7 +56,7 @@ static const char* const InfoScreenKeys[] = {"F3", "F4", "F5", "Esc"}; static int InfoScreenEvents[] = {KEY_F(3), KEY_F(4), KEY_F(5), 27}; -InfoScreen* InfoScreen_init(InfoScreen* this, Process* process, FunctionBar* bar, int height, char* panelHeader) { +InfoScreen* InfoScreen_init(InfoScreen* this, Process* process, FunctionBar* bar, int height, const char* panelHeader) { this->process = process; if (!bar) { bar = FunctionBar_new(InfoScreenFunctions, InfoScreenKeys, InfoScreenEvents); @@ -75,7 +75,7 @@ InfoScreen* InfoScreen_done(InfoScreen* this) { return this; } -void InfoScreen_drawTitled(InfoScreen* this, char* fmt, ...) { +void InfoScreen_drawTitled(InfoScreen* this, const char* fmt, ...) { va_list ap; va_start(ap, fmt); attrset(CRT_colors[METER_TEXT]); @@ -120,7 +120,7 @@ void InfoScreen_run(InfoScreen* this) { } set_escdelay(25); int ch = getch(); - + if (ch == ERR) { if (As_InfoScreen(this)->onErr) { InfoScreen_onErr(this); @@ -131,19 +131,21 @@ void InfoScreen_run(InfoScreen* this) { if (ch == KEY_MOUSE) { MEVENT mevent; int ok = getmouse(&mevent); - if (ok == OK) + if (ok == OK) { if (mevent.y >= panel->y && mevent.y < LINES - 1) { Panel_setSelected(panel, mevent.y - panel->y + panel->scrollV); ch = 0; - } if (mevent.y == LINES - 1) + } else if (mevent.y == LINES - 1) { ch = IncSet_synthesizeEvent(this->inc, mevent.x); + } + } } if (this->inc->active) { IncSet_handleKey(this->inc, ch, panel, IncSet_getListItemValue, this->lines); continue; } - + switch(ch) { case ERR: continue; -- cgit v1.2.3