* USA
*/
#include "disobedience.h"
+#include "popup.h"
#include "queue-generic.h"
/** @brief The actual queue */
time_t last_playing;
static void queue_completed(void *v,
- const char *error,
+ const char *err,
struct queue_entry *q);
static void playing_completed(void *v,
- const char *error,
+ const char *err,
struct queue_entry *q);
/** @brief Called when either the actual queue or the playing track change */
/** @brief Update the queue itself */
static void queue_completed(void attribute((unused)) *v,
- const char *error,
+ const char *err,
struct queue_entry *q) {
- if(error) {
- popup_protocol_error(0, error);
+ if(err) {
+ popup_protocol_error(0, err);
return;
}
actual_queue = q;
/** @brief Update the playing track */
static void playing_completed(void attribute((unused)) *v,
- const char *error,
+ const char *err,
struct queue_entry *q) {
- if(error) {
- popup_protocol_error(0, error);
+ if(err) {
+ popup_protocol_error(0, err);
return;
}
actual_playing_track = q;
};
/** @brief Pop-up menu for queue */
-static struct queue_menuitem queue_menuitems[] = {
+static struct menuitem queue_menuitems[] = {
{ "Track properties", ql_properties_activate, ql_properties_sensitive, 0, 0 },
{ "Select all tracks", ql_selectall_activate, ql_selectall_sensitive, 0, 0 },
{ "Deselect all tracks", ql_selectnone_activate, ql_selectnone_sensitive, 0, 0 },
static int queue_drag_target = -1;
static void queue_move_completed(void attribute((unused)) *v,
- const char *error) {
- if(error) {
- popup_protocol_error(0, error);
+ const char *err) {
+ if(err) {
+ popup_protocol_error(0, err);
return;
}
/* The log should tell us the queue changed so we do no more here */
struct queue_entry *q;
D(("queued %s", track));
+ /* Queue will contain resolved name */
+ track = namepart_resolve(track);
for(q = ql_queue.q; q; q = q->next)
if(!strcmp(q->track, track))
return 1;