diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2015-01-23 03:08:21 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-01-23 03:08:21 -0200 |
commit | c2108e5a482dfb8760849bb01264ed4bdb9f604f (patch) | |
tree | 29bd336760c5ca9cbebed5e4a1e007642064cbc4 /linux/Platform.c | |
parent | 3383d8e5561dfc6fb2b65e0a194df94ccb5e08af (diff) |
Another mega-patch for the refactoring process.
Kinda runs, but functionality from the original main loop
is still missing. Patience.
Diffstat (limited to 'linux/Platform.c')
-rw-r--r-- | linux/Platform.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/linux/Platform.c b/linux/Platform.c index a5704d23..0a763362 100644 --- a/linux/Platform.c +++ b/linux/Platform.c @@ -27,6 +27,7 @@ in the source distribution for its full text. /*{ #include "Action.h" +#include "MainPanel.h" #include "BatteryMeter.h" }*/ @@ -41,7 +42,7 @@ static Htop_Reaction Platform_actionSetIOPriority(State* st) { void* set = Action_pickFromVector(st, ioprioPanel, 21, fuFunctions); if (set) { IOPriority ioprio = IOPriorityPanel_getIOPriority(ioprioPanel); - bool ok = Action_foreachProcess(panel, (Action_ForeachProcessFn) LinuxProcess_setIOPriority, (size_t) ioprio, NULL); + bool ok = MainPanel_foreachProcess((MainPanel*)panel, (MainPanel_ForeachProcessFn) LinuxProcess_setIOPriority, (size_t) ioprio, NULL); if (!ok) beep(); } @@ -106,23 +107,6 @@ int Platform_getMaxPid() { return maxPid; } -void Platform_getBatteryLevel(double* level, ACPresence* isOnAC) { - - double percent = Battery_getProcBatData(); - - if (percent == 0) { - percent = Battery_getSysBatData(); - if (percent == 0) { - *level = -1; - *isOnAC = AC_ERROR; - return; - } - } - - *isOnAC = Battery_isOnAC(); - *level = percent; -} - double Platform_setCPUValues(Meter* this, int cpu) { LinuxProcessList* pl = (LinuxProcessList*) this->pl; CPUData* cpuData = &(pl->cpus[cpu]); |