#include "cpumem_status_area_item.h"
-#define LA_ICON_WIDTH 16
-#define LA_ICON_HEIGHT 16
-#define LA_BOX_WIDTH 5
-#define LA_BOX_HEIGHT 3
-#define LA_CPU_MAX 5
+#define CPUMEM_ICON_WIDTH 16
+#define CPUMEM_ICON_HEIGHT 16
+#define CPUMEM_BOX_WIDTH 5
+#define CPUMEM_BOX_HEIGHT 3
+#define CPUMEM_CPU_MAX 5
x = 9;
y = 1;
if (level > 4)
- gdk_pixbuf_composite(priv->pixbuf_on, priv->pixbuf, x, y, LA_BOX_WIDTH, LA_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
+ gdk_pixbuf_composite(priv->pixbuf_on, priv->pixbuf, x, y, CPUMEM_BOX_WIDTH, CPUMEM_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
y = 5;
if (level > 3)
- gdk_pixbuf_composite(priv->pixbuf_on, priv->pixbuf, x, y, LA_BOX_WIDTH, LA_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
+ gdk_pixbuf_composite(priv->pixbuf_on, priv->pixbuf, x, y, CPUMEM_BOX_WIDTH, CPUMEM_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
y = 9;
if (level > 2)
- gdk_pixbuf_composite(priv->pixbuf_on, priv->pixbuf, x, y, LA_BOX_WIDTH, LA_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
+ gdk_pixbuf_composite(priv->pixbuf_on, priv->pixbuf, x, y, CPUMEM_BOX_WIDTH, CPUMEM_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
y = 13;
if (level > 1)
- gdk_pixbuf_composite(priv->pixbuf_on, priv->pixbuf, x, y, LA_BOX_WIDTH, LA_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
+ gdk_pixbuf_composite(priv->pixbuf_on, priv->pixbuf, x, y, CPUMEM_BOX_WIDTH, CPUMEM_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
else
- gdk_pixbuf_composite(priv->pixbuf_off, priv->pixbuf, x, y, LA_BOX_WIDTH, LA_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
+ gdk_pixbuf_composite(priv->pixbuf_off, priv->pixbuf, x, y, CPUMEM_BOX_WIDTH, CPUMEM_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
}
if (level > 4)
{
if (priv->red == TRUE) {
- gdk_pixbuf_composite(priv->pixbuf_red, priv->pixbuf, x, y, LA_BOX_WIDTH, LA_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
+ gdk_pixbuf_composite(priv->pixbuf_red, priv->pixbuf, x, y, CPUMEM_BOX_WIDTH, CPUMEM_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
priv->red = FALSE;
} else {
- gdk_pixbuf_composite(priv->pixbuf_on, priv->pixbuf, x, y, LA_BOX_WIDTH, LA_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
+ gdk_pixbuf_composite(priv->pixbuf_on, priv->pixbuf, x, y, CPUMEM_BOX_WIDTH, CPUMEM_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
priv->red = TRUE;
}
}
y = 5;
if (level > 3)
- gdk_pixbuf_composite(priv->pixbuf_on, priv->pixbuf, x, y, LA_BOX_WIDTH, LA_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
+ gdk_pixbuf_composite(priv->pixbuf_on, priv->pixbuf, x, y, CPUMEM_BOX_WIDTH, CPUMEM_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
y = 9;
if (level > 2)
- gdk_pixbuf_composite(priv->pixbuf_on, priv->pixbuf, x, y, LA_BOX_WIDTH, LA_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
+ gdk_pixbuf_composite(priv->pixbuf_on, priv->pixbuf, x, y, CPUMEM_BOX_WIDTH, CPUMEM_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
y = 13;
if (level > 1)
- gdk_pixbuf_composite(priv->pixbuf_on, priv->pixbuf, x, y, LA_BOX_WIDTH, LA_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
+ gdk_pixbuf_composite(priv->pixbuf_on, priv->pixbuf, x, y, CPUMEM_BOX_WIDTH, CPUMEM_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
else
- gdk_pixbuf_composite(priv->pixbuf_off, priv->pixbuf, x, y, LA_BOX_WIDTH, LA_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
+ gdk_pixbuf_composite(priv->pixbuf_off, priv->pixbuf, x, y, CPUMEM_BOX_WIDTH, CPUMEM_BOX_HEIGHT, x, y, 1, 1, GDK_INTERP_NEAREST, 255);
}
if ((current_mem_level != priv->last_mem_level) || (current_cpu_level != priv->last_cpu_level)) {
la_blit_memory_bars (current_mem_level, priv);
la_blit_cpu_bars (current_cpu_level, priv);
- if (current_cpu_level == LA_CPU_MAX)
+ if (current_cpu_level == CPUMEM_CPU_MAX)
priv->red = FALSE;
hd_status_plugin_item_set_status_area_icon (HD_STATUS_PLUGIN_ITEM(data), priv->pixbuf);
priv->last_mem_level = current_mem_level;
priv->last_cpu_level = current_cpu_level;
- } else if (current_cpu_level == LA_CPU_MAX) {
+ } else if (current_cpu_level == CPUMEM_CPU_MAX) {
//Pulsate max CPU load icon also when CPU load stays at max
la_blit_cpu_bars (current_cpu_level, priv);
hd_status_plugin_item_set_status_area_icon (HD_STATUS_PLUGIN_ITEM(data), priv->pixbuf);
item->priv->last_cpu_level = -1;
item->priv->timeout_id = -1;
item->priv->red = FALSE;
- item->priv->pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, LA_ICON_WIDTH, LA_ICON_HEIGHT);
+ item->priv->pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, CPUMEM_ICON_WIDTH, CPUMEM_ICON_HEIGHT);
gdk_pixbuf_fill(item->priv->pixbuf, 0x00000000);
- item->priv->pixbuf_on = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, LA_BOX_WIDTH, LA_BOX_HEIGHT);
+ item->priv->pixbuf_on = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, CPUMEM_BOX_WIDTH, CPUMEM_BOX_HEIGHT);
gdk_pixbuf_fill(item->priv->pixbuf_on, 0xffffffff);
- item->priv->pixbuf_red = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, LA_BOX_WIDTH, LA_BOX_HEIGHT);
+ item->priv->pixbuf_red = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, CPUMEM_BOX_WIDTH, CPUMEM_BOX_HEIGHT);
gdk_pixbuf_fill(item->priv->pixbuf_red, 0xff0000ff);
- item->priv->pixbuf_off = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, LA_BOX_WIDTH, LA_BOX_HEIGHT);
+ item->priv->pixbuf_off = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, CPUMEM_BOX_WIDTH, CPUMEM_BOX_HEIGHT);
gdk_pixbuf_fill(item->priv->pixbuf_off, 0x777777ff);
cpumem_applet_status_area_item_set_area_icon(item);