summaryrefslogtreecommitdiffstats
path: root/MetersPanel.c
AgeCommit message (Collapse)Author
2021-01-11Mark several non-modified pointer variables constChristian Göttsche
2020-12-20MetersPanel: drop color interruption in FunctionBarChristian Göttsche
2020-12-20Rework drawing of FunctionBarChristian Göttsche
Draw the FunctionBar within Panel_draw instead of manually throughout the code. Add an optional PanelClass function drawFunctionBar, to allow specific panels to override the default FunctionBar_draw call. Rework the code on color change, to really change all colors (selection markers and panel headers). Closes: #402
2020-12-20Mark event arrays constChristian Göttsche
2020-10-18Make all required includes explicitBenny Baumann
Information as seen by IWYU 0.12 + clang 9 on Linux
2020-10-12Add key to pause process list updatesChristian Göttsche
2020-10-07Mark Object instances constChristian Göttsche
2020-10-05Update License consistently to GPLv2 as per COPYING fileDaniel Lange
2020-09-24Do not drop qualifier in castChristian Göttsche
ListItem.c:73:33: warning: cast from 'const void *' to 'struct ListItem_ *' drops const qualifier [-Wcast-qual] ListItem* obj1 = (ListItem*) cast1; ^ ListItem.c:74:33: warning: cast from 'const void *' to 'struct ListItem_ *' drops const qualifier [-Wcast-qual] ListItem* obj2 = (ListItem*) cast2; ^ Process.c:434:28: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] Process* p1 = (Process*)v1; ^ Process.c:435:28: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] Process* p2 = (Process*)v2; ^ Process.c:441:36: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] Settings *settings = ((Process*)v1)->settings; ^ Process.c:443:22: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] p1 = (Process*)v1; ^ Process.c:444:22: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] p2 = (Process*)v2; ^ Process.c:446:22: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] p2 = (Process*)v1; ^ Process.c:447:22: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] p1 = (Process*)v2; ^ AffinityPanel.c:37:16: warning: cast from 'const char *' to 'void *' drops const qualifier [-Wcast-qual] free((void*)this->text); ^ AffinityPanel.c:39:19: warning: cast from 'const char *' to 'void *' drops const qualifier [-Wcast-qual] free((void*)this->indent); ^ linux/LinuxProcess.c:294:36: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] Settings *settings = ((Process*)v1)->settings; ^ linux/LinuxProcess.c:296:27: warning: cast from 'const void *' to 'struct LinuxProcess_ *' drops const qualifier [-Wcast-qual] p1 = (LinuxProcess*)v1; ^ linux/LinuxProcess.c:297:27: warning: cast from 'const void *' to 'struct LinuxProcess_ *' drops const qualifier [-Wcast-qual] p2 = (LinuxProcess*)v2; ^ linux/LinuxProcess.c:299:27: warning: cast from 'const void *' to 'struct LinuxProcess_ *' drops const qualifier [-Wcast-qual] p2 = (LinuxProcess*)v1; ^ linux/LinuxProcess.c:300:27: warning: cast from 'const void *' to 'struct LinuxProcess_ *' drops const qualifier [-Wcast-qual] p1 = (LinuxProcess*)v2; ^ linux/LinuxProcessList.c:62:32: warning: cast from 'const void *' to 'struct TtyDriver_ *' drops const qualifier [-Wcast-qual] TtyDriver* a = (TtyDriver*) va; ^ linux/LinuxProcessList.c:63:32: warning: cast from 'const void *' to 'struct TtyDriver_ *' drops const qualifier [-Wcast-qual] TtyDriver* b = (TtyDriver*) vb; ^ linux/Battery.c:130:21: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual] free((char *) isOnline); ^ linux/Battery.c:197:26: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual] xSnprintf((char *) filePath, sizeof filePath, SYS_POWERSUPPLY_DIR "/%s/type", entryName); ^ linux/Battery.c:209:29: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual] xSnprintf((char *) filePath, sizeof filePath, SYS_POWERSUPPLY_DIR "/%s/uevent", entryName); ^ linux/Battery.c:262:29: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual] xSnprintf((char *) filePath, sizeof filePath, SYS_POWERSUPPLY_DIR "/%s/online", entryName); ^
2020-09-17Free movingBar memory on exitChristian Göttsche
2020-09-03Axe automated header generation.Zev Weiss
Reasoning: - implementation was unsound -- broke down when I added a fairly basic macro definition expanding to a struct initializer in a *.c file. - made it way too easy (e.g. via otherwise totally innocuous git commands) to end up with timestamps such that it always ran MakeHeader.py but never used its output, leading to overbuild noise when running what should be a null 'make'. - but mostly: it's just an awkward way of dealing with C code.
2019-10-31Clean up existing whitespaceDaniel Flanagan
2017-10-23fix fallthough comments for GCC 7.xChristian Hesse
GCC 7.x does some extended checks on fallthough for switch/case statement. The warning looks like this: warning: this statement may fall through [-Wimplicit-fallthrough=] It can be told about implicit fallthough, however it does not recognize comments within blocks, so move the comments outside.
2017-07-22Mark some things as constRichard
Several string pointer arrays pointed to const strings but were not const themselves. A few various structures and arrays were also marked const.
2016-07-16Mouse-friendly functions bar for meters panelExplorer09
Before: SpaceStyle EnterMove DelDeleteEscDone | ~~~~~ ~~~~~ ~~~ ~~~ | UpUp DnDown LtLeft RtRight EnterConfirmDelDeleteEscDone | ~~ ~~ ~~ ~~ ~~~~~ ~~~ ~~~ | After: SpaceStyle EnterMove DelDeleteF10Done ~~~~~ ~~~~~ ~~ ~~~ ~~~ SpaceStyle EnterLock UpUp DnDown <-Left ->Right DelDeleteF10Done ~~~~~ ~~~~~ ~~ ~~ ~~ ~~ ~~ ~~~ ~~~ * Align 'Delete' and 'Done' to the right to match functions on other screens. (Accidental clicking is avoided as a side benefit.) * You could change meter type while in moving mode. New bar now hints this. * Two Enter key functions are put in the same place and so mouse clicks there act like functions toggle. (The wording change to 'Lock' is also to reflect this.) * '<-' and '->' instead of 'Lt' and 'Rt' abbreviation as the latter is not widely seen and arrows shapes are obvious. :) * 'Esc' key for 'Done' in this context may not be intuitive, comparing to 'F10'. While I wish there be a Cancel/Undo function for 'Esc', it wouldn't hurt if we write 'F10' for 'Done' on functions bar for now.
2016-07-16Reword 'Type' to 'Style' for meters.Explorer09
Per @hishamhm's suggestion. This is UI change only. In code the class names and symbols still refer them as "modes".
2016-05-25Fixes #498.Hisham
2016-02-12Fix crash when emptying column. Closes #381.Hisham
2015-12-22Fix function bar when moving meters.Explorer09
Before: [Up]Up [Dn]Down [Lt]Left [Rt]Right [Arrow]Confirm [Enter]Delete [Del]Done After: [Up]Up [Dn]Down [Lt]Left [Rt]Right [Enter]Confirm [Del]Delete [Esc]Done
2015-11-02Highlight moving meters in a different color.Hisham Muhammad
2015-11-02Fix moving of metersHisham Muhammad
2015-08-27Improve feedback when moving meters.Hisham Muhammad
2015-08-20Fix mouse click on meters setup function barHisham Muhammad
2015-06-15ignore enter, delete and space on empty panelChristian Hesse
2015-03-23Move FunctionBar inside PanelHisham Muhammad
2015-03-16Fix saving of header states, motion in Setup screen.Hisham Muhammad
2015-02-04Make sure these are initialized.Hisham Muhammad
2015-02-03Complete cursor-based movement of headers.Hisham Muhammad
2015-01-21Sorry about the mega-patch.Hisham Muhammad
This is a work-in-progress, code is currently broken. (Some actions, and notably, the header, are missing.)
2012-12-05Changes in object model: separate class objects to store vtable. Also, nicer ↵Hisham Muhammad
UTF-8 display of big numbers.
2011-12-26Remove old memory debugging routines. We have Valgrind nowadays.Hisham Muhammad
2011-12-26major header cleanupHisham Muhammad
2011-11-05naming consistencyHisham Muhammad
2010-02-25warning fixesHisham Muhammad
2009-06-02changes for htop 0.8.2Hisham Muhammad
2008-03-09Clean up headers by using 'static' whenever possible.Hisham Muhammad
Reduces resulting code size.
2006-05-30Rename ListBox'es to Panel's, matching dit.Hisham Muhammad