Hisham Muhammad
72ba20fa5f
Introduce screen tabs
...
This is a forward port (by nathans) of Hisham's original code.
2021-12-07 17:04:49 +11:00
Daniel Lange
94ad111391
Update license headers to explicitly say GPLv2+
2021-09-22 14:28:19 +02:00
Christian Göttsche
b9e69223d0
ScreenManager: reduce ScreenManager_resize
...
The main change is the header hight being not included in y1.
This is important if a sub-manager gets resized, e.g. a resize while
editing the Settings or in a pickFromVector selection, and afterwards,
then the sub-manager is closed, the super-ScreenManager gets resized, it
uses the correct header hight.
The header hight might have been changed since the last resize of the
super-manager in the Settings by adding/removing some meters.
This fixes new meters being hidden after added at runtime after a resize
in the main window.
2021-08-22 10:40:59 +02:00
Christian Göttsche
a8b8f5f836
ScreenManager: drop unused member
2021-08-10 17:09:04 +02:00
Christian Göttsche
d72b0a682e
Mark several non-modified pointer variables const
2021-01-11 20:12:34 +01:00
Nathan Scott
fee217551c
Drop unneeded parameters to the ScreenManager constructor
...
All calls to ScreenManager_new always pass the same first
five values, the orientation is always HORIZONTAL and the
y1 parameter is always the height of the passed-in header
struct pointer. I think its safe to assert at this point
that no VERTICAL orientation will arrive (if it does, its
no harm in re-adding this then) - so we can remove unused
conditionals (and TODOs) based on orientation too.
2020-11-26 23:55:53 +01:00
Benny Baumann
0f5262917f
Make all required includes explicit
...
Information as seen by IWYU 0.12 + clang 9 on Linux
2020-10-18 20:09:05 +02:00
Christian Göttsche
b47bc667a2
Add key to pause process list updates
2020-10-12 13:04:00 +02:00
Daniel Lange
079c2abf8e
Update License consistently to GPLv2 as per COPYING file
2020-10-05 10:13:12 +02:00
Benny Baumann
e1c96879f4
Sort headers/includes
2020-09-29 17:41:49 +02:00
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);
^
2020-09-24 20:14:17 +02:00
Hugo Musso Gualandi
b6828d7b86
Remove some unused #includes
...
As suggested by cppclean.
2020-09-12 23:32:31 -03:00
Nathan Scott
8ec5d4a3a0
Further, minor cleanups to headers post-MakeHeaders
...
Remove leftover empty ifdef/endif pairs, whitespace.
The generated htop.h file was also unused - removed.
2020-09-08 17:33:50 +10:00
Zev Weiss
7b7822b896
Remove superfluous 'extern's from function declarations.
...
Applied via:
$ find * -name '*.h' -exec sed -i -r 's/^extern (.+\()/\1/;' {} +
Suggested-by: Bert Wesarg <bert.wesarg@googlemail.com>
2020-09-03 11:59:26 -05:00
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.
2020-09-03 11:58:58 -05:00
Nathan Scott
7ac1c709b7
Re-generate all headers with latest scripts/MakeHeader.py
...
Sync-up missing extern declarations for many functions.
2020-08-18 17:41:49 +10:00
Hisham Muhammad
d0c72c3fb2
Move FunctionBar inside Panel
2015-03-23 15:26:56 -03:00
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.)
2015-01-21 23:27:31 -02:00
Hisham Muhammad
84281bdc44
major header cleanup
2011-12-26 21:35:57 +00:00
Hisham Muhammad
bfd86a60cc
Keep panel structure up-to-date as process list changes when headers are updated during the screen manager. Hopefully closes #3444533 .
2011-12-01 12:31:57 +00:00
Hisham Muhammad
300caa076e
Tempus fugit.
2011-05-26 16:35:07 +00:00
Hisham Muhammad
a9c0ea3753
* Option for counting CPUs from zero
...
(thanks to Sean Noonan)
* Meters update in every screen (no longer halting while on Setup, etc.)
2011-03-22 20:37:08 +00:00
Hisham Muhammad
a600d5a6e9
Tempus fugit.
2010-02-25 02:08:18 +00:00
Hisham Muhammad
02a30bfecd
warning fixes
2010-02-25 01:43:18 +00:00
Hisham Muhammad
da23c8c5a1
Clean up headers by using 'static' whenever possible.
...
Reduces resulting code size.
2008-03-09 08:58:38 +00:00
Hisham Muhammad
e685bdeea0
Fix GCC 4.3 issues: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=416852
2007-08-10 05:59:36 +00:00
Hisham Muhammad
f6e0b7d0c0
Regenerated all headers.
2006-06-06 20:28:42 +00:00
Hisham Muhammad
c2cdcd0c1d
Rename ListBox to Panel, matching dit.
2006-05-30 13:47:28 +00:00
Hisham Muhammad
a853faaa2d
Rename TypedVector to Vector, matching dit.
2006-05-30 13:45:40 +00:00
Hisham Muhammad
d6231bab89
Initial import.
2006-03-04 18:16:49 +00:00