From a68e5d835f7ea64ff4eb073ee8b38d2d41038693 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Wed, 7 Jan 2009 10:57:51 +0000 Subject: remove some useless/unused stuff from gwps.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19705 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/gwps-common.c | 7 ----- apps/gui/gwps.c | 82 ++++---------------------------------------------- apps/gui/gwps.h | 3 -- 3 files changed, 6 insertions(+), 86 deletions(-) (limited to 'apps/gui') diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index e218c123f3..d50069eac1 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c @@ -451,13 +451,6 @@ bool update(struct gui_wps *gwps) else{ gui_wps_refresh(gwps, 0, WPS_REFRESH_ALL); } - - if (gwps->state->id3) - { - strncpy(gwps->state->current_track_path, gwps->state->id3->path, - sizeof(gwps->state->current_track_path)); - gwps->state->current_track_path[sizeof(gwps->state->current_track_path)-1] = '\0'; - } } if (gwps->state->id3) diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c index c1e7606634..d586a9a9e2 100644 --- a/apps/gui/gwps.c +++ b/apps/gui/gwps.c @@ -64,23 +64,13 @@ #include "appevents.h" #include "viewport.h" -/* currently only on wps_state is needed */ +/* currently only one wps_state is needed */ struct wps_state wps_state; struct gui_wps gui_wps[NB_SCREENS]; static struct wps_data wps_datas[NB_SCREENS]; -/* change the path to the current played track */ -static void wps_state_update_ctp(const char *path); /* initial setup of wps_data */ static void wps_state_init(void); -/* initial setup of a wps */ -static void gui_wps_init(struct gui_wps *gui_wps); -/* connects a wps with a format-description of the displayed content */ -static void gui_wps_set_data(struct gui_wps *gui_wps, struct wps_data *data); -/* connects a wps with a screen */ -static void gui_wps_set_disp(struct gui_wps *gui_wps, struct screen *display); -/* connects a wps with a statusbar*/ -static void gui_wps_set_statusbar(struct gui_wps *gui_wps, struct gui_statusbar *statusbar); static void prev_track(unsigned skip_thresh) { @@ -167,7 +157,6 @@ long gui_wps_show(void) return 0; FOR_NB_SCREENS(i) gui_wps_refresh(&gui_wps[i], 0, WPS_REFRESH_ALL); - wps_state_update_ctp(wps_state.id3->path); } restore = true; @@ -738,71 +727,10 @@ static void wps_state_init(void) wps_state.paused = false; wps_state.id3 = NULL; wps_state.nid3 = NULL; - wps_state.current_track_path[0] = '\0'; } -#if 0 -/* these are obviously not used? */ - -void wps_state_update_ff_rew(bool ff_rew) -{ - wps_state.ff_rewind = ff_rew; -} - -void wps_state_update_paused(bool paused) -{ - wps_state.paused = paused; -} -void wps_state_update_id3_nid3(struct mp3entry *id3, struct mp3entry *nid3) -{ - wps_state.id3 = id3; - wps_state.nid3 = nid3; -} -#endif - -static void wps_state_update_ctp(const char *path) -{ - strncpy(wps_state.current_track_path, path, - sizeof(wps_state.current_track_path)); - wps_state.current_track_path[sizeof(wps_state.current_track_path)-1] = '\0'; -} /* wps_state end*/ -/* initial setup of a wps */ -static void gui_wps_init(struct gui_wps *gui_wps) -{ - gui_wps->data = NULL; - gui_wps->display = NULL; - gui_wps->statusbar = NULL; - /* Currently no seperate wps_state needed/possible - so use the only aviable ( "global" ) one */ - gui_wps->state = &wps_state; -} - -/* connects a wps with a format-description of the displayed content */ -static void gui_wps_set_data(struct gui_wps *gui_wps, struct wps_data *data) -{ - gui_wps->data = data; -} - -/* connects a wps with a screen */ -static void gui_wps_set_disp(struct gui_wps *gui_wps, struct screen *display) -{ - gui_wps->display = display; -} - -static void gui_wps_set_statusbar(struct gui_wps *gui_wps, struct gui_statusbar *statusbar) -{ - gui_wps->statusbar = statusbar; -} -/* gui_wps end */ - -void gui_sync_wps_screen_init(void) -{ - int i; - FOR_NB_SCREENS(i) - gui_wps_set_disp(&gui_wps[i], &screens[i]); -} #ifdef HAVE_LCD_BITMAP static void statusbar_toggle_handler(void *data) { @@ -841,9 +769,11 @@ void gui_sync_wps_init(void) #ifdef HAVE_REMOTE_LCD wps_datas[i].remote_wps = (i != 0); #endif - gui_wps_init(&gui_wps[i]); - gui_wps_set_data(&gui_wps[i], &wps_datas[i]); - gui_wps_set_statusbar(&gui_wps[i], &statusbars.statusbars[i]); + gui_wps[i].data = &wps_datas[i]; + gui_wps[i].display = &screens[i]; + /* Currently no seperate wps_state needed/possible + so use the only aviable ( "global" ) one */ + gui_wps[i].state = &wps_state; } #ifdef HAVE_LCD_BITMAP add_event(GUI_EVENT_STATUSBAR_TOGGLE, false, statusbar_toggle_handler); diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h index 6311bc058b..3836d9291b 100644 --- a/apps/gui/gwps.h +++ b/apps/gui/gwps.h @@ -469,7 +469,6 @@ struct wps_state bool wps_time_countup; struct mp3entry* id3; struct mp3entry* nid3; - char current_track_path[MAX_PATH]; }; @@ -491,7 +490,6 @@ struct gui_wps struct screen *display; struct wps_data *data; struct wps_state *state; - struct gui_statusbar *statusbar; }; /* gui_wps end */ @@ -503,7 +501,6 @@ extern struct wps_state wps_state; extern struct gui_wps gui_wps[NB_SCREENS]; void gui_sync_wps_init(void); -void gui_sync_wps_screen_init(void); #ifdef HAVE_ALBUMART /* gives back if WPS contains an albumart tag */ -- cgit v1.2.3