Christian Göttsche
2b62126aea
Mark several non-modified pointer variables const
5 years ago
Christian Göttsche
3f9c63d5c0
MetersPanel: drop color interruption in FunctionBar
5 years ago
Christian Göttsche
e3862aa67e
Rework drawing of FunctionBar
...
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
5 years ago
Christian Göttsche
7e7a53c415
Mark event arrays const
5 years ago
Benny Baumann
0f5262917f
Make all required includes explicit
...
Information as seen by IWYU 0.12 + clang 9 on Linux
5 years ago
Christian Göttsche
b47bc667a2
Add key to pause process list updates
5 years ago
Christian Göttsche
ba282cfe19
Mark Object instances const
6 years ago
Daniel Lange
079c2abf8e
Update License consistently to GPLv2 as per COPYING file
6 years ago
Christian Göttsche
18b1e9fba9
Do not drop qualifier in cast
...
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);
^
6 years ago
Christian Göttsche
71c068ad28
Free movingBar memory on exit
6 years ago
Zev Weiss
a1a027b9bd
Axe automated header generation.
...
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.
6 years ago
Daniel Flanagan
dd33444f7e
Clean up existing whitespace
6 years ago
Christian Hesse
52831955c7
fix fallthough comments for GCC 7.x
...
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.
9 years ago
Richard
d5faf64374
Mark some things as const
...
Several string pointer arrays pointed to const strings
but were not const themselves.
A few various structures and arrays were also marked const.
9 years ago
Explorer09
0108117d0b
Mouse-friendly functions bar for meters panel
...
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.
10 years ago
Explorer09
a41c9b3925
Reword 'Type' to 'Style' for meters.
...
Per @hishamhm's suggestion. This is UI change only.
In code the class names and symbols still refer them as "modes".
10 years ago
Hisham
b7ac416634
Fixes #498 .
10 years ago
Hisham
0e3cf6975f
Fix crash when emptying column. Closes #381 .
10 years ago
Explorer09
71ad9b304d
Fix function bar when moving meters.
...
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
10 years ago
Hisham Muhammad
3cfbcb72c8
Highlight moving meters in a different color.
11 years ago
Hisham Muhammad
f187be9296
Fix moving of meters
11 years ago
Hisham Muhammad
6082db2121
Improve feedback when moving meters.
11 years ago
Hisham Muhammad
c7387fac15
Fix mouse click on meters setup function bar
11 years ago
Christian Hesse
b796362e90
ignore enter, delete and space on empty panel
11 years ago
Hisham Muhammad
d0c72c3fb2
Move FunctionBar inside Panel
11 years ago
Hisham Muhammad
9ff5d2b243
Fix saving of header states, motion in Setup screen.
11 years ago
Hisham Muhammad
6302b3e593
Make sure these are initialized.
11 years ago
Hisham Muhammad
d7c843c23b
Complete cursor-based movement of headers.
11 years ago
Hisham Muhammad
3383d8e556
Sorry about the mega-patch.
...
This is a work-in-progress, code is currently broken.
(Some actions, and notably, the header, are missing.)
11 years ago
Hisham Muhammad
00b324bfc1
Changes in object model: separate class objects to store vtable. Also, nicer UTF-8 display of big numbers.
13 years ago
Hisham Muhammad
45f7a4fc8d
Remove old memory debugging routines. We have Valgrind nowadays.
14 years ago
Hisham Muhammad
84281bdc44
major header cleanup
14 years ago
Hisham Muhammad
4c4cceee5d
naming consistency
15 years ago
Hisham Muhammad
02a30bfecd
warning fixes
16 years ago
Hisham Muhammad
6330ff3a0a
changes for htop 0.8.2
17 years ago
Hisham Muhammad
da23c8c5a1
Clean up headers by using 'static' whenever possible.
...
Reduces resulting code size.
18 years ago
Hisham Muhammad
73de9f1ed4
Rename ListBox'es to Panel's, matching dit.
20 years ago
Hisham Muhammad
c2cdcd0c1d
Rename ListBox to Panel, matching dit.
20 years ago
Hisham Muhammad
a853faaa2d
Rename TypedVector to Vector, matching dit.
20 years ago
Hisham Muhammad
33113fe0d7
- Overhaul meters implementation;
...
- add AllCPUsMeter;
- because of that, the new .htoprc is incompatible with previous released versions.
20 years ago
Hisham Muhammad
d6231bab89
Initial import.
20 years ago