summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-11-27 17:07:37 +0100
committerinfirit <[email protected]>2014-11-27 17:14:38 +0100
commit11a661f6d9f554a73ccd8508ad56fdb5be5e7b91 (patch)
treed53a5c1ead98fffed23f525d3c5b08cea7ceab2d
parent8397197bdad2f4a067d4891f18702c78fa7ca969 (diff)
downloadmate-applets-11a661f6d9f554a73ccd8508ad56fdb5be5e7b91.tar.bz2
mate-applets-11a661f6d9f554a73ccd8508ad56fdb5be5e7b91.tar.xz
multiload: Remove unused code
-rw-r--r--multiload/linux-proc.c7
-rw-r--r--multiload/load-graph.c3
-rw-r--r--multiload/properties.c2
3 files changed, 2 insertions, 10 deletions
diff --git a/multiload/linux-proc.c b/multiload/linux-proc.c
index e1687224..13ebc5ff 100644
--- a/multiload/linux-proc.c
+++ b/multiload/linux-proc.c
@@ -226,7 +226,7 @@ GetMemory (int Maximum, int data [5], LoadGraph *g)
void
GetSwap (int Maximum, int data [2], LoadGraph *g)
{
- int used, free;
+ int used;
glibtop_swap swap;
@@ -235,11 +235,9 @@ GetSwap (int Maximum, int data [2], LoadGraph *g)
if (swap.total == 0) {
used = 0;
- free = Maximum;
}
else {
used = rint (Maximum * (float)swap.used / swap.total);
- free = rint (Maximum * (float)swap.free / swap.total);
}
data [0] = used;
@@ -252,7 +250,7 @@ GetLoadAvg (int Maximum, int data [2], LoadGraph *g)
const float per_cpu_max_loadavg = 5.0f;
float max_loadavg;
float loadavg1;
- float used, free;
+ float used;
glibtop_loadavg loadavg;
glibtop_get_loadavg (&loadavg);
@@ -265,7 +263,6 @@ GetLoadAvg (int Maximum, int data [2], LoadGraph *g)
loadavg1 = MIN(loadavg.loadavg[0], max_loadavg);
used = loadavg1 / max_loadavg;
- free = (max_loadavg - loadavg1) / max_loadavg;
data [0] = rint ((float) Maximum * used);
data [1] = Maximum - data[0];
diff --git a/multiload/load-graph.c b/multiload/load-graph.c
index 3a15d4ba..b8d648a6 100644
--- a/multiload/load-graph.c
+++ b/multiload/load-graph.c
@@ -51,7 +51,6 @@ shift_right(LoadGraph *g)
static void
load_graph_draw (LoadGraph *g)
{
- GtkStyle *style;
guint i, j;
cairo_t *cr;
@@ -64,8 +63,6 @@ load_graph_draw (LoadGraph *g)
CAIRO_CONTENT_COLOR,
g->draw_width, g->draw_height);
- style = gtk_widget_get_style (g->disp);
-
cr = cairo_create (g->surface);
cairo_set_line_width (cr, 1.0);
cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
diff --git a/multiload/properties.c b/multiload/properties.c
index 9d233662..45b9eba8 100644
--- a/multiload/properties.c
+++ b/multiload/properties.c
@@ -226,8 +226,6 @@ color_picker_set_cb(GtkColorButton *color_picker, gchar *key)
ma = g_object_get_data (G_OBJECT (color_picker), "MultiloadApplet");
- prop_type = 0;
-
if (strstr(key, "cpuload"))
prop_type = PROP_CPU;
else if (strstr(key, "memload"))