044b996587
* Bug fixes
67 lines
1.8 KiB
Text
67 lines
1.8 KiB
Text
$NetBSD: patch-aa,v 1.2 2004/06/30 12:33:53 martti Exp $
|
|
|
|
--- panel-plugin/cpu.c.orig 2004-06-12 01:25:31.000000000 +0000
|
|
+++ panel-plugin/cpu.c 2004-06-30 15:18:42.000000000 +0000
|
|
@@ -38,2 +38,3 @@
|
|
xmlChar *value;
|
|
+ CPUGraph *base;
|
|
|
|
@@ -42,3 +43,3 @@
|
|
|
|
- CPUGraph *base = (CPUGraph *)control->data;
|
|
+ base = (CPUGraph *)control->data;
|
|
|
|
@@ -653,2 +654,4 @@
|
|
{
|
|
+ int startx, starty;
|
|
+ float step;
|
|
GdkGC *fg1, *fg2, *bg, *fc;
|
|
@@ -671,4 +674,4 @@
|
|
|
|
- int startx = base->m_Frame ? 1 : 0;
|
|
- int starty = base->m_Frame ? 1 : 0;
|
|
+ startx = base->m_Frame ? 1 : 0;
|
|
+ starty = base->m_Frame ? 1 : 0;
|
|
|
|
@@ -691,3 +694,3 @@
|
|
|
|
- float step = base->m_Height/100.0;
|
|
+ step = base->m_Height/100.0;
|
|
|
|
@@ -731,8 +734,10 @@
|
|
GdkGC *gc;
|
|
+ int nrx, nry;
|
|
+ float tstep;
|
|
+ int x, y;
|
|
if (base->m_ColorMode > 0)
|
|
gc = gdk_gc_new (da->window);
|
|
- int nrx = (base->m_Width+1)/3.0;
|
|
- int nry = (base->m_Height+1)/2.0;
|
|
- float tstep = nry/100.0;
|
|
- int x, y;
|
|
+ nrx = (base->m_Width+1)/3.0;
|
|
+ nry = (base->m_Height+1)/2.0;
|
|
+ tstep = nry/100.0;
|
|
for (x=nrx-1;x>=0;x--)
|
|
@@ -774,8 +779,11 @@
|
|
GdkGC *gc;
|
|
+ int y;
|
|
+ float usage;
|
|
+ int tmp;
|
|
+ int length;
|
|
if (base->m_ColorMode > 0)
|
|
gc = gdk_gc_new (da->window);
|
|
- int y;
|
|
- float usage = base->m_History[0]*step;
|
|
- int tmp=0;
|
|
- int length = base->m_Height - (base->m_Height - usage);
|
|
+ usage = base->m_History[0]*step;
|
|
+ tmp=0;
|
|
+ length = base->m_Height - (base->m_Height - usage);
|
|
for (y=base->m_Height-1;y>=base->m_Height - usage;y--)
|
|
@@ -948,4 +956,4 @@
|
|
{
|
|
- base->m_History = (long *)realloc (base->m_History, size*sizeof (long));
|
|
int i;
|
|
+ base->m_History = (long *)realloc (base->m_History, size*sizeof (long));
|
|
for (i=size-1;i>=base->m_Values;i--)
|