diff options
author | raveit65 <[email protected]> | 2020-08-30 18:04:32 +0200 |
---|---|---|
committer | Luke from DC <[email protected]> | 2020-08-30 18:13:21 +0000 |
commit | 19cf719782152bba59cd8e4442dcfdeaa3daf75a (patch) | |
tree | 227987aff1f2cdd7d806b8ccf25a36040d8a9dae /multiload/load-graph.c | |
parent | ca0e34a0c7920cfe18f68101597db6c0c9e13a85 (diff) | |
download | mate-applets-19cf719782152bba59cd8e4442dcfdeaa3daf75a.tar.bz2 mate-applets-19cf719782152bba59cd8e4442dcfdeaa3daf75a.tar.xz |
multiload: improve code-style
- tab to spaces
- fix some indents
Diffstat (limited to 'multiload/load-graph.c')
-rw-r--r-- | multiload/load-graph.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/multiload/load-graph.c b/multiload/load-graph.c index 07a425f4..953dc5b2 100644 --- a/multiload/load-graph.c +++ b/multiload/load-graph.c @@ -30,17 +30,17 @@ static void shift_right(LoadGraph *g) { - unsigned i; - int* last_data; + unsigned i; + int* last_data; - /* data[g->draw_width - 1] becomes data[0] */ - last_data = g->data[g->draw_width - 1]; + /* data[g->draw_width - 1] becomes data[0] */ + last_data = g->data[g->draw_width - 1]; - /* data[i+1] = data[i] */ - for(i = g->draw_width - 1; i != 0; --i) - g->data[i] = g->data[i - 1]; + /* data[i+1] = data[i] */ + for(i = g->draw_width - 1; i != 0; --i) + g->data[i] = g->data[i - 1]; - g->data[0] = last_data; + g->data[0] = last_data; } @@ -179,7 +179,7 @@ load_graph_draw (LoadGraph *g) /* this is Load graph */ else { - guint maxload = 1; + guint maxload = 1; for (i = 0; i < g->draw_width; i++) { g->pos [i] = g->draw_height - 1; @@ -219,7 +219,7 @@ load_graph_draw (LoadGraph *g) spacing = ((double) g->draw_height/load) * (k+1); cairo_move_to (cr, 0.5, spacing); cairo_line_to (cr, g->draw_width-0.5, spacing); - } + } cairo_stroke (cr); } @@ -233,12 +233,12 @@ static gboolean load_graph_update (LoadGraph *g) { if (g->data == NULL) - return TRUE; + return TRUE; shift_right(g); if (g->tooltip_update) - multiload_applet_tooltip_update(g); + multiload_applet_tooltip_update(g); g->get_data (g->draw_height, g->data [0], g); @@ -252,7 +252,7 @@ load_graph_unalloc (LoadGraph *g) guint i; if (!g->allocated) - return; + return; for (i = 0; i < g->draw_width; i++) { |