fix padding of $processes
authorPhil Sutter <phil@nwl.cc>
Sun, 1 Mar 2009 20:06:23 +0000 (21:06 +0100)
committerPhil Sutter <phil@nwl.cc>
Sun, 1 Mar 2009 20:12:16 +0000 (21:12 +0100)
Padding to 4 digits allows for max 9999 processes, which should really
be more than enough for systems running conky. ;)

ChangeLog
src/conky.c

index 2268b28..4b277c2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
        * Added if_updatenr
        * Rewrite human_readable() to minimise amount of padding
        * Fix padding in temp_print()
+       * Fix padding of $processes and $running_processes
 
 2009-02-17
        * Added $battery_short patch, sf.net id #2300911 (thanks Swoog)
index 611d4da..21328cc 100644 (file)
@@ -4119,10 +4119,10 @@ static void generate_text_internal(char *p, int p_max_size,
                                new_outline(p, obj->data.l);
                        }
                        OBJ(processes) {
-                               spaced_print(p, p_max_size, "%hu", 5, cur->procs);
+                               spaced_print(p, p_max_size, "%hu", 4, cur->procs);
                        }
                        OBJ(running_processes) {
-                               spaced_print(p, p_max_size, "%hu", 3, cur->run_procs);
+                               spaced_print(p, p_max_size, "%hu", 4, cur->run_procs);
                        }
                        OBJ(text) {
                                snprintf(p, p_max_size, "%s", obj->data.s);