From 077e8b61a0b8eb8be6f22d2d6d49bb674b14cfad Mon Sep 17 00:00:00 2001 From: Frank Gevaerts Date: Sat, 25 Feb 2012 22:02:09 +0100 Subject: Clean up some variables. Renames origional_* variables to original_* Removes original_(width,height) variables that weren't actually used Change-Id: I604c2ef9ce9d806551e8c52080a5c895415e088c --- apps/gui/bitmap/list-skinned.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'apps/gui/bitmap/list-skinned.c') diff --git a/apps/gui/bitmap/list-skinned.c b/apps/gui/bitmap/list-skinned.c index 47bfec3608..38004dc732 100644 --- a/apps/gui/bitmap/list-skinned.c +++ b/apps/gui/bitmap/list-skinned.c @@ -200,8 +200,7 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list) viewport; viewport = SKINOFFSETTOPTR(get_skin_buffer(wps.data), viewport->next)) { - int origional_x, origional_y; - int origional_w, origional_h; + int original_x, original_y; skin_viewport = SKINOFFSETTOPTR(get_skin_buffer(wps.data), viewport->data); char *viewport_label = SKINOFFSETTOPTR(get_skin_buffer(wps.data), skin_viewport->label); if (viewport->children == 0 || !viewport_label || @@ -213,24 +212,22 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list) memcpy(&listcfg[screen]->selected_item_vp, skin_viewport, sizeof(struct skin_viewport)); skin_viewport = &listcfg[screen]->selected_item_vp; } - origional_x = skin_viewport->vp.x; - origional_y = skin_viewport->vp.y; - origional_w = skin_viewport->vp.width; - origional_h = skin_viewport->vp.height; + original_x = skin_viewport->vp.x; + original_y = skin_viewport->vp.y; if (listcfg[screen]->tile) { int cols = (parent->width / listcfg[screen]->width); current_column = (cur_line)%cols; current_row = (cur_line)/cols; - skin_viewport->vp.x = parent->x + listcfg[screen]->width*current_column + origional_x; - skin_viewport->vp.y = parent->y + listcfg[screen]->height*current_row + origional_y; + skin_viewport->vp.x = parent->x + listcfg[screen]->width*current_column + original_x; + skin_viewport->vp.y = parent->y + listcfg[screen]->height*current_row + original_y; } else { current_row = cur_line; - skin_viewport->vp.x = parent->x + origional_x; - skin_viewport->vp.y = parent->y + origional_y + + skin_viewport->vp.x = parent->x + original_x; + skin_viewport->vp.y = parent->y + original_y + (listcfg[screen]->height*cur_line); } display->set_viewport(&skin_viewport->vp); @@ -255,10 +252,8 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list) if (!is_selected) { display->scroll_stop(&skin_viewport->vp); - skin_viewport->vp.x = origional_x; - skin_viewport->vp.y = origional_y; - skin_viewport->vp.width = origional_w; - skin_viewport->vp.height = origional_h; + skin_viewport->vp.x = original_x; + skin_viewport->vp.y = original_y; } } } -- cgit v1.2.3