summaryrefslogtreecommitdiffstats
path: root/Meter.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2008-09-23 06:21:28 +0000
committerHisham Muhammad <hisham@gobolinux.org>2008-09-23 06:21:28 +0000
commit11931f1bc856ae34de6666423efc9257960506ce (patch)
tree8cc2f01566914eb722c892cb50c109d7d97d5467 /Meter.c
parentc3550e18e8f3cdc1e66599b01d15ba005515312b (diff)
ACPI Battery meter
contributed by Ian Hands
Diffstat (limited to 'Meter.c')
-rw-r--r--Meter.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Meter.c b/Meter.c
index 7ed241d0..eec5ca56 100644
--- a/Meter.c
+++ b/Meter.c
@@ -96,8 +96,10 @@ typedef enum {
#include "TasksMeter.h"
#include "LoadAverageMeter.h"
#include "UptimeMeter.h"
+#include "BatteryMeter.h"
#include "ClockMeter.h"
+
#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
#endif
@@ -120,6 +122,7 @@ MeterType* Meter_types[] = {
&SwapMeter,
&TasksMeter,
&UptimeMeter,
+ &BatteryMeter,
&AllCPUsMeter,
NULL
};
@@ -242,8 +245,8 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
w -= 2;
attrset(CRT_colors[METER_TEXT]);
- mvaddstr(y, x, this->caption);
- int captionLen = strlen(this->caption);
+ int captionLen = 3;
+ mvaddnstr(y, x, this->caption, captionLen);
x += captionLen;
w -= captionLen;
attrset(CRT_colors[BAR_BORDER]);

© 2014-2024 Faster IT GmbH | imprint | privacy policy