X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fexec.c;h=286079a87917faac8d8f22adacaa29e5e3cdb01b;hb=04fd11b631494e3985d6911dd5876c1860948ba3;hp=575297e2220535f60a66d489e900f7b656baa254;hpb=a1ddcc07866e65a94c5ba412d2221b95794a4c0f;p=monky diff --git a/src/exec.c b/src/exec.c index 575297e..286079a 100644 --- a/src/exec.c +++ b/src/exec.c @@ -10,7 +10,7 @@ * Please see COPYING for details * * Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen - * Copyright (c) 2005-2009 Brenden Matthews, Philip Kovacs, et. al. + * Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al. * (see AUTHORS) * All rights reserved. * @@ -361,7 +361,6 @@ void print_texeci(struct text_object *obj, char *p, int p_max_size) } } -#ifdef X11 void print_execgauge(struct text_object *obj, char *p, int p_max_size) { double barnum; @@ -371,10 +370,11 @@ void print_execgauge(struct text_object *obj, char *p, int p_max_size) if (barnum >= 0.0) { barnum /= 100; - new_gauge(obj, p, round_to_int(barnum * 255.0)); + new_gauge(obj, p, p_max_size, round_to_int(barnum * 255.0)); } } +#ifdef X11 void print_execgraph(struct text_object *obj, char *p, int p_max_size) { double barnum; @@ -387,7 +387,7 @@ void print_execgraph(struct text_object *obj, char *p, int p_max_size) barnum = get_barnum(p); if (barnum > 0) { - new_graph(obj, p, round_to_int(barnum)); + new_graph(obj, p, p_max_size, round_to_int(barnum)); } } @@ -409,8 +409,9 @@ void print_execigraph(struct text_object *obj, char *p, int p_max_size) } ed->last_update = current_update_time; } - new_graph(obj, p, (int) (ed->barnum)); + new_graph(obj, p, p_max_size, (int) (ed->barnum)); } +#endif /* X11 */ void print_execigauge(struct text_object *obj, char *p, int p_max_size) { @@ -430,9 +431,8 @@ void print_execigauge(struct text_object *obj, char *p, int p_max_size) } ed->last_update = current_update_time; } - new_gauge(obj, p, round_to_int(ed->barnum)); + new_gauge(obj, p, p_max_size, round_to_int(ed->barnum)); } -#endif /* X11 */ void print_execbar(struct text_object *obj, char *p, int p_max_size) { @@ -441,13 +441,8 @@ void print_execbar(struct text_object *obj, char *p, int p_max_size) barnum = get_barnum(p); if (barnum >= 0.0) { -#ifdef X11 - if(output_methods & TO_X) { - barnum /= 100; - new_bar(obj, p, round_to_int(barnum * 255.0)); - }else -#endif /* X11 */ - new_bar_in_shell(obj, p, p_max_size, barnum); + barnum /= 100; + new_bar(obj, p, p_max_size, round_to_int(barnum * 255.0)); } } @@ -468,12 +463,7 @@ void print_execibar(struct text_object *obj, char *p, int p_max_size) } ed->last_update = current_update_time; } -#ifdef X11 - if(output_methods & TO_X) { - new_bar(obj, p, round_to_int(ed->barnum * 2.55)); - } else -#endif /* X11 */ - new_bar_in_shell(obj, p, p_max_size, round_to_int(ed->barnum)); + new_bar(obj, p, p_max_size, round_to_int(ed->barnum * 2.55)); } void free_exec(struct text_object *obj)