chiark / gitweb /
Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/disorder
[disorder] / disobedience / queue.c
index d899d3e8223923422af9228af758da359b97e270..748b8e33fababe3fbeb330b5cacf783a79da51d6 100644 (file)
@@ -140,7 +140,7 @@ static gboolean playing_periodic(gpointer attribute((unused)) data) {
    * do it once a minute then the rest of the queue can get out of date too
    * easily.) */
   struct queue_entry *q = ql_queue.q;
-  if(q) {
+  if(q && playing_track && !(last_state&(DISORDER_TRACK_PAUSED))) {
     if(q == playing_track)
       q = q->next;
     if(q) {
@@ -205,9 +205,10 @@ static void queue_drop(struct queuelike attribute((unused)) *ql,
     /* Tell the server to move them.  The log will tell us about the change (if
      * indeed it succeeds!), so no need to rearrange the model now. */
     disorder_eclient_moveafter(client,
+                               queue_drop_completed,
                                after_me ? after_me->id : "",
-                               ntracks, (const char **)ids,
-                               queue_drop_completed, NULL);
+                               (char **)ids, ntracks,
+                               NULL);
   } else {
     /* You can't tell the server to insert after the playing track by ID, you
      * have to send "". */
@@ -215,9 +216,10 @@ static void queue_drop(struct queuelike attribute((unused)) *ql,
       after_me = NULL;
     /* Play the tracks */
     disorder_eclient_playafter(client,
+                               queue_drop_completed,
                                after_me ? after_me->id : "",
-                               ntracks, (const char **)tracks,
-                               queue_drop_completed, NULL);
+                               (char **)tracks, ntracks,
+                               NULL);
   }
 }
 
@@ -237,7 +239,7 @@ static struct menuitem queue_menuitems[] = {
   { "Select all tracks", GTK_STOCK_SELECT_ALL, ql_selectall_activate, ql_selectall_sensitive, 0, 0 },
   { "Deselect all tracks", NULL, ql_selectnone_activate, ql_selectnone_sensitive, 0, 0 },
   { "Scratch playing track", GTK_STOCK_STOP, ql_scratch_activate, ql_scratch_sensitive, 0, 0 },
-  { "Remove track from queue", GTK_STOCK_CUT, ql_remove_activate, ql_remove_sensitive, 0, 0 },
+  { "Remove track from queue", GTK_STOCK_DELETE, ql_remove_activate, ql_remove_sensitive, 0, 0 },
   { "Adopt track", NULL, ql_adopt_activate, ql_adopt_sensitive, 0, 0 },
 };