~ubuntu-branches/ubuntu/trusty/pianobar/trusty

« back to all changes in this revision

Viewing changes to src/ui_act.c

  • Committer: Package Import Robot
  • Author(s): Luke Faraone
  • Date: 2012-05-06 14:24:34 UTC
  • mfrom: (1.3.9)
  • Revision ID: package-import@ubuntu.com-20120506142434-74kwucnyp97msxdi
Tags: 2012.05.06-1
* New upstream version.
  - JSON api support (closes: #670483, LP: #988395)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
Copyright (c) 2008-2011
 
2
Copyright (c) 2008-2012
3
3
        Lars-Dominik Braun <lars@6xq.net>
4
4
 
5
5
Permission is hereby granted, free of charge, to any person obtaining a copy
50
50
        assert (player != NULL);
51
51
 
52
52
        player->doQuit = 1;
 
53
        /* unlocking an unlocked mutex is forbidden by some implementations */
 
54
        pthread_mutex_trylock (&player->pauseMutex);
53
55
        pthread_mutex_unlock (&player->pauseMutex);
54
56
}
55
57
 
99
101
        assert (selStation != NULL);
100
102
 
101
103
        reqData.musicId = BarUiSelectMusicId (app, selStation,
102
 
                        selSong, "Add artist or title to station: ");
 
104
                        "Add artist or title to station: ");
103
105
        if (reqData.musicId != NULL) {
104
106
                if (!BarTransformIfShared (app, selStation)) {
105
107
                        return;
147
149
        WaitressReturn_t wRet;
148
150
        PianoRequestDataCreateStation_t reqData;
149
151
 
150
 
        reqData.id = BarUiSelectMusicId (app, NULL, NULL,
 
152
        reqData.id = BarUiSelectMusicId (app, NULL,
151
153
                        "Create station from artist or title: ");
152
154
        if (reqData.id != NULL) {
153
155
                reqData.type = "mi";
259
261
                        "rating:\t%i\n"
260
262
                        "stationId:\t%s\n"
261
263
                        "title:\t%s\n"
262
 
                        "trackToken:\t%s\n"
263
 
                        "userSeed:\t%s\n",
 
264
                        "trackToken:\t%s\n",
264
265
                        selSong->album,
265
266
                        selSong->artist,
266
267
                        selSong->audioFormat,
272
273
                        selSong->rating,
273
274
                        selSong->stationId,
274
275
                        selSong->title,
275
 
                        selSong->trackToken,
276
 
                        selSong->userSeed);
 
276
                        selSong->trackToken);
277
277
}
278
278
 
279
279
/*      rate current song
316
316
        reqData.step = 0;
317
317
 
318
318
        reqData.to = BarUiSelectStation (app, app->ph.stations,
319
 
                        "Move song to station: ", NULL);
 
319
                        "Move song to station: ", NULL, false);
320
320
        if (reqData.to != NULL) {
321
321
                /* find original station (just is case we're playing a quickmix
322
322
                 * station) */
379
379
 */
380
380
BarUiActCallback(BarUiActSelectStation) {
381
381
        PianoStation_t *newStation = BarUiSelectStation (app, app->ph.stations,
382
 
                        "Select station: ", NULL);
 
382
                        "Select station: ", NULL, app->settings.autoselect);
383
383
        if (newStation != NULL) {
384
384
                app->curStation = newStation;
385
385
                BarUiPrintStation (&app->settings, app->curStation);
475
475
                PianoStation_t *toggleStation;
476
476
                while ((toggleStation = BarUiSelectStation (app, app->ph.stations,
477
477
                                "Toggle quickmix for station: ",
478
 
                                BarUiActQuickmixCallback)) != NULL) {
 
478
                                BarUiActQuickmixCallback, false)) != NULL) {
479
479
                        toggleStation->useQuickMix = !toggleStation->useQuickMix;
480
480
                }
481
481
                BarUiMsg (&app->settings, MSG_INFO, "Setting quickmix stations... ");
660
660
                        }
661
661
                } else if (selectBuf[0] == 't') {
662
662
                        PianoStation_t *station = BarUiSelectStation (app,
663
 
                                        reqData.info.stationSeeds, "Delete seed station: ", NULL);
 
663
                                        reqData.info.stationSeeds, "Delete seed station: ", NULL,
 
664
                                        false);
664
665
                        if (station != NULL) {
665
666
                                PianoRequestDataDeleteSeed_t subReqData;
666
667