diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2011-10-22 16:34:48 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2011-10-22 16:34:48 +0200 |
commit | ba60fbc4274e85fb63d373207f525aa57bc75eb3 (patch) | |
tree | a8ccff14797158942c72f4fbbbf8e37cd8377fbd /src/ui.c | |
parent | 55d6eb4c91a994bc83560a27296329a6ce0d2329 (diff) | |
download | pianobar-ba60fbc4274e85fb63d373207f525aa57bc75eb3.tar.gz pianobar-ba60fbc4274e85fb63d373207f525aa57bc75eb3.tar.bz2 pianobar-ba60fbc4274e85fb63d373207f525aa57bc75eb3.zip |
Support seed stations
Fixes #165
Diffstat (limited to 'src/ui.c')
-rw-r--r-- | src/ui.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -333,13 +333,13 @@ static PianoStation_t **BarSortedStations (PianoStation_t *unsortedStations, * @param called if input was not a number * @return pointer to selected station or NULL */ -PianoStation_t *BarUiSelectStation (BarApp_t *app, const char *prompt, - BarUiSelectStationCallback_t callback) { +PianoStation_t *BarUiSelectStation (BarApp_t *app, PianoStation_t *stations, + const char *prompt, BarUiSelectStationCallback_t callback) { PianoStation_t **sortedStations = NULL, *retStation = NULL; size_t stationCount, i; char buf[100]; - if (app->ph.stations == NULL) { + if (stations == NULL) { BarUiMsg (&app->settings, MSG_ERR, "No station available.\n"); return NULL; } @@ -347,7 +347,7 @@ PianoStation_t *BarUiSelectStation (BarApp_t *app, const char *prompt, memset (buf, 0, sizeof (buf)); /* sort and print stations */ - sortedStations = BarSortedStations (app->ph.stations, &stationCount, + sortedStations = BarSortedStations (stations, &stationCount, app->settings.sortOrder); do { |