From 5850207d332f78d4fcf4a7ec22ae8b95b921a183 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Mon, 24 Aug 2009 00:03:59 +0000 Subject: Slightly change parts of the previous commit to reuse existing code, and enforce enum statusbar_values instead of just int, git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22485 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/statusbar.c | 10 ++-------- apps/gui/statusbar.h | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) (limited to 'apps/gui') diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c index 1a724406ef..7a361e58ed 100644 --- a/apps/gui/statusbar.c +++ b/apps/gui/statusbar.c @@ -827,13 +827,7 @@ void gui_statusbar_changed( enum screen_type screen, enum statusbar_values old) { /* clear and update the statusbar area to remove old parts */ - enum statusbar_values bar; -#ifdef HAVE_REMOTE_LCD - if (screen == SCREEN_REMOTE) - bar = global_settings.remote_statusbar; - else -#endif - bar = global_settings.statusbar; + enum statusbar_values bar = statusbar_position(screen); struct screen *display = &screens[screen]; struct viewport vp; @@ -850,7 +844,7 @@ void gui_statusbar_changed( enum screen_type screen, #endif #ifdef HAVE_REMOTE_LCD -int statusbar_position(int screen) +enum statusbar_values statusbar_position(int screen) { if (screen == SCREEN_REMOTE) return global_settings.remote_statusbar; diff --git a/apps/gui/statusbar.h b/apps/gui/statusbar.h index 169b76b15a..84d37858e2 100644 --- a/apps/gui/statusbar.h +++ b/apps/gui/statusbar.h @@ -107,7 +107,7 @@ void gui_statusbar_changed(enum screen_type screen, #if !defined(HAVE_REMOTE_LCD) || defined(__PCTOOL__) #define statusbar_position(a) (global_settings.statusbar) #else -int statusbar_position(int screen); +enum statusbar_values statusbar_position(int screen); #endif #endif /*_GUI_STATUSBAR_H_*/ -- cgit v1.2.3