summaryrefslogtreecommitdiffstats
path: root/AvailableMetersPanel.c
AgeCommit message (Collapse)Author
2021-01-11Mark several non-modified pointer variables constChristian Göttsche
2021-01-11Mark several non-modified pointer variables constChristian 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-11-28Update even more snprintfsChristian Göttsche
Use size of actual buffers instead of magic numbers
2020-10-18Make all required includes explicitBenny Baumann
Information as seen by IWYU 0.12 + clang 9 on Linux
2020-10-16Rename StringUtils.[ch] to XUtils.[ch]Benny Baumann
2020-10-16Move xAsprintf, xSnprintf and xStrdup to StringUtils.hBenny Baumann
2020-10-12Add key to pause process list updatesChristian Göttsche
2020-10-07Mark Object instances constChristian Göttsche
2020-10-06Handle Panel_getSelected() returning NULLChristian Göttsche
Found by compiling with LTO: ColumnsPanel.c: In function ‘ColumnsPanel_eventHandler’: ColumnsPanel.c:46:59: error: potential null pointer dereference [-Werror=null-dereference] 46 | ((ListItem*)Panel_getSelected(super))->moving = this->moving; | ^ AvailableColumnsPanel.c: In function ‘AvailableColumnsPanel_eventHandler’: AvailableColumnsPanel.c:31:8: error: potential null pointer dereference [-Werror=null-dereference] 31 | int key = ((ListItem*) Panel_getSelected(super))->key; | ^ AvailableMetersPanel.c: In function ‘AvailableMetersPanel_eventHandler’: AvailableMetersPanel.c:40:24: error: potential null pointer dereference [-Werror=null-dereference] 40 | int param = selected->key & 0xff; | ^ linux/IOPriorityPanel.c: In function ‘IOPriorityPanel_getIOPriority’: linux/IOPriorityPanel.c:37:11: error: potential null pointer dereference [-Werror=null-dereference] 37 | return (IOPriority) ( ((ListItem*) Panel_getSelected(this))->key ); | ^
2020-10-05Update License consistently to GPLv2 as per COPYING fileDaniel Lange
2020-09-29Drop redundant casts to the same typeChristian 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.
2020-08-20Merge branch 'hishamhm-pull-960'Nathan Scott
2019-10-31Clean up existing whitespaceDaniel Flanagan
2019-02-07Honour setting of counting CPUs from 0/1 when presenting metersRicardo Nabinger Sanchez
In the listing of Available Meters for CPUs, the list of CPUs is always presented by counting them from one. However, if the user prefers to count CPUs from zero, this is sometimes confusing when fine-tuning the meters.
2017-07-27Security review: check results of snprintf.Hisham Muhammad
Calls marked with xSnprintf shouldn't fail. Abort program cleanly if any of them does.
2016-03-19Assert (Platform_meterTypes[0]==&CPUMeter_class)Explorer09
Just assume Platform_meterTypes[0] is always &CPUMeter_class for every platform. This removes a conditional in AvailableMetersPanel_new(). Also adds some comments about the logic here. Without assuming Platform_meterTypes[0], the (int i=1) clause in this for loop will not make sense. (I.e. Why not (int i=0)? ) Also replaced a sprintf() call with safer snprintf() in code further below.
2015-08-27Improve feedback when moving meters.Hisham Muhammad
2015-03-23Simplify constructors.Hisham Muhammad
2015-03-23Move FunctionBar inside PanelHisham Muhammad
2015-03-16Fix saving of header states, motion in Setup screen.Hisham Muhammad
2015-02-03Complete cursor-based movement of headers.Hisham Muhammad
2015-02-03Add longer descriptions to available meters.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.)
2014-11-27Move UptimeMeter into platform-dependent area.Hisham Muhammad
Set up environment to move other meters.
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
2010-08-24add support for steal/guest CPU time measurementHisham Muhammad
simplify processor data accounting (add CPUData structure) remove Process_clone trick
2008-03-09Clean up headers by using 'static' whenever possible.Hisham Muhammad
Reduces resulting code size.
2006-06-06Updates for new version of the MakeHeader.py script.Hisham Muhammad
2006-05-30Remove references to ListBoxHisham Muhammad
2006-05-30Rename ListBox'es to Panel's, matching dit.Hisham Muhammad