summaryrefslogtreecommitdiff
path: root/apps/gui/select.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-12-05 23:37:14 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-12-05 23:37:14 +0000
commitb05eec8b1ea4cbad0b668a8974c87272acc78ed6 (patch)
treed3df417790fe731d9ef7f65d01a11cbd374285dc /apps/gui/select.c
parentf981ea93fb411019133a022c7dd873166d66b5dd (diff)
downloadrockbox-b05eec8b1ea4cbad0b668a8974c87272acc78ed6.zip
rockbox-b05eec8b1ea4cbad0b668a8974c87272acc78ed6.tar.gz
rockbox-b05eec8b1ea4cbad0b668a8974c87272acc78ed6.tar.bz2
rockbox-b05eec8b1ea4cbad0b668a8974c87272acc78ed6.tar.xz
Big Code Police raid. Pretty pretty please, we do no macrofy simple
assignments and things just to make them appear as function calls. That makes code harder to follow. Did some gcc4 warning fixes as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8163 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/select.c')
-rw-r--r--apps/gui/select.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/gui/select.c b/apps/gui/select.c
index 2f3bdde..12b3c91 100644
--- a/apps/gui/select.c
+++ b/apps/gui/select.c
@@ -60,11 +60,11 @@ void gui_select_draw(struct gui_select * select, struct screen * display)
screen_set_xmargin(display, 0);
#endif
gui_textarea_clear(display);
- display->puts_scroll(0, 0, option_select_get_title(&(select->options)));
+ display->puts_scroll(0, 0, (unsigned char *)select->options.title);
- if(gui_select_is_canceled(select))
+ if(select->canceled)
display->puts_scroll(0, 0, str(LANG_MENU_SETTING_CANCEL));
- display->puts_scroll(0, 1, selected);
+ display->puts_scroll(0, 1, (unsigned char *)selected);
gui_textarea_update(display);
}
@@ -77,31 +77,31 @@ void gui_syncselect_draw(struct gui_select * select)
bool gui_syncselect_do_button(struct gui_select * select, int button)
{
- gui_select_limit_loop(select, false);
+ select->options.limit_loop = false;
switch(button)
{
case SELECT_INC | BUTTON_REPEAT :
#ifdef SELECT_RC_INC
case SELECT_RC_INC | BUTTON_REPEAT :
#endif
- gui_select_limit_loop(select, true);
+ select->options.limit_loop = true;
case SELECT_INC :
#ifdef SELECT_RC_INC
case SELECT_RC_INC :
#endif
- gui_select_next(select);
+ option_select_next(&select->options);
return(true);
case SELECT_DEC | BUTTON_REPEAT :
#ifdef SELECT_RC_DEC
case SELECT_RC_DEC | BUTTON_REPEAT :
#endif
- gui_select_limit_loop(select, true);
+ select->options.limit_loop = true;
case SELECT_DEC :
#ifdef SELECT_RC_DEC
case SELECT_RC_DEC :
#endif
- gui_select_prev(select);
+ option_select_prev(&select->options);
return(true);
case SELECT_OK :
@@ -114,7 +114,7 @@ bool gui_syncselect_do_button(struct gui_select * select, int button)
#ifdef SELECT_OK2
case SELECT_OK2 :
#endif
- gui_select_validate(select);
+ select->validated=true;
return(false);
case SELECT_CANCEL :
@@ -127,7 +127,7 @@ bool gui_syncselect_do_button(struct gui_select * select, int button)
#ifdef SELECT_RC_CANCEL2
case SELECT_RC_CANCEL2 :
#endif
- gui_select_cancel(select);
+ select->canceled = true;
gui_syncselect_draw(select);
sleep(HZ/2);
return(false);