X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsmapi.c;h=e6893b427a014d7357798f6643e7a8b659fe8fec;hb=8264fbe05e119a10711d7377d18f38b2cf1f956a;hp=d1a89a04493bb43eb50295a7981245cc3805c336;hpb=ea22f212529dd40dcfedc75db906f94d4c18d4ad;p=monky diff --git a/src/smapi.c b/src/smapi.c index d1a89a0..e6893b4 100644 --- a/src/smapi.c +++ b/src/smapi.c @@ -24,6 +24,7 @@ #define _GNU_SOURCE #include "conky.h" /* text_buffer_size, PACKAGE_NAME, maybe more */ #include "smapi.h" +#include "temphelper.h" #include "logging.h" #include #include @@ -178,8 +179,8 @@ void print_smapi_bat_bar(struct text_object *obj, char *p, int p_max_size) return; if (obj->data.i >= 0 && smapi_bat_installed(obj->data.i)) - new_bar(obj, p, (int) + new_bar(obj, p, p_max_size, (int) (255 * smapi_get_bat_int(obj->data.i, "remaining_percent") / 100)); else - new_bar(obj, p, 0); + new_bar(obj, p, p_max_size, 0); }