From: Mark Wooding Date: Sun, 15 Aug 2021 10:58:44 +0000 (+0100) Subject: Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/disorder X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/commitdiff_plain/f2b44f108345bccc414643968de04115093ecf37?hp=5f624baebe43889bb2810720cb9cc6d0812f49cb Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/disorder * 'master' of git.distorted.org.uk:~mdw/publish/public-git/disorder: disobedience/control.c: Force internal event when buttons are frobbed. configure.ac: Use Automake `silent-rules' by default. doc/disorder_protocol.5.in: Document `sofar' field in track-info line. --- diff --git a/configure.ac b/configure.ac index ef4e47c..fcec0af 100644 --- a/configure.ac +++ b/configure.ac @@ -25,6 +25,10 @@ AC_CONFIG_SRCDIR([server/disorderd.c]) AM_CONFIG_HEADER([config.h]) AC_CONFIG_MACRO_DIR([m4]) +m4_ifdef([AM_SILENT_RULES], + [AM_SILENT_RULES([yes])], + [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) + # Find host type AC_CANONICAL_HOST diff --git a/disobedience/control.c b/disobedience/control.c index 9153f33..ab41d15 100644 --- a/disobedience/control.c +++ b/disobedience/control.c @@ -133,6 +133,9 @@ struct icon { /** @brief Events that change this icon, separated by spaces */ const char *events; + /** @brief Event to raise when the icon is frobbed */ + const char *raise; + /** @brief @ref eclient.h function to call to go from off to on * * For action buttons, this should be NULL. @@ -227,6 +230,7 @@ static struct icon icons[] = { .action_go_on = pause_track, .action_go_off = resume_track, .events = "pause-changed playing-changed rights-changed playing-track-changed", + .raise = "pause-changed", .menu_invert = TRUE, }, { @@ -252,6 +256,7 @@ static struct icon icons[] = { .action_go_on = enable_random, .action_go_off = disable_random, .events = "random-changed rights-changed", + .raise = "random-changed", }, { .toggle = TRUE, @@ -265,6 +270,7 @@ static struct icon icons[] = { .action_go_on = enable_playing, .action_go_off = disable_playing, .events = "enabled-changed rights-changed", + .raise = "playing-changed", }, { .toggle = TRUE, @@ -475,6 +481,8 @@ static void clicked_icon(GtkToolButton attribute((unused)) *button, if(suppress_actions) return; icon->action_go_off(client, icon_action_completed, 0); + if(icon->raise) + event_raise(icon->raise, 0); } static void toggled_icon(GtkToggleToolButton attribute((unused)) *button, @@ -489,6 +497,8 @@ static void toggled_icon(GtkToggleToolButton attribute((unused)) *button, else icon->action_go_on(client, icon_action_completed, 0); icon_changed(0, 0, user_data); + if(icon->raise) + event_raise(icon->raise, 0); } static void clicked_menu(GtkMenuItem attribute((unused)) *menuitem, diff --git a/doc/disorder_protocol.5.in b/doc/disorder_protocol.5.in index df32a4d..3389bd9 100644 --- a/doc/disorder_protocol.5.in +++ b/doc/disorder_protocol.5.in @@ -649,6 +649,9 @@ In the queue, hasn't been played yet. The track was terminated because the server is shutting down. .RE .TP +.B sofar +The number of seconds of the track that have been played so far. +.TP .B submitter The user that submitted the track. .TP