chiark / gitweb /
configure.ac, debian/: Set up correct dependencies for GStreamer.
[disorder] / disobedience / control.c
index f45492f1e191ed767f273fe452d3f18c26721462..663c8155c916c39541e94ca5ae649d03e92bf47e 100644 (file)
@@ -183,70 +183,70 @@ static int rtp_sensitive(void) {
 /** @brief Table of all icons */
 static struct icon icons[] = {
   {
-    toggle: TRUE,
-    stock: TRUE,
-    icon: GTK_STOCK_MEDIA_PAUSE,
-    label: "Pause",
-    tip_on: "Resume playing track",
-    tip_off: "Pause playing track",
-    menuitem: "<GdisorderMain>/Control/Playing",
-    on: pause_resume_on,
-    sensitive: pause_resume_sensitive,
-    action_go_on: disorder_eclient_pause,
-    action_go_off: disorder_eclient_resume,
-    events: "pause-changed playing-changed rights-changed playing-track-changed",
-    menu_invert: TRUE,
+    .toggle = TRUE,
+    .stock = TRUE,
+    .icon = GTK_STOCK_MEDIA_PAUSE,
+    .label = "Pause",
+    .tip_on = "Resume playing track",
+    .tip_off = "Pause playing track",
+    .menuitem = "<GdisorderMain>/Control/Playing",
+    .on = pause_resume_on,
+    .sensitive = pause_resume_sensitive,
+    .action_go_on = disorder_eclient_pause,
+    .action_go_off = disorder_eclient_resume,
+    .events = "pause-changed playing-changed rights-changed playing-track-changed",
+    .menu_invert = TRUE,
   },
   {
-    stock: TRUE,
-    icon: GTK_STOCK_STOP,
-    label: "Scratch",
-    tip_on: "Cancel playing track",
-    menuitem: "<GdisorderMain>/Control/Scratch",
-    sensitive: scratch_sensitive,
-    action_go_off: disorder_eclient_scratch_playing,
-    events: "playing-track-changed rights-changed",
+    .stock = TRUE,
+    .icon = GTK_STOCK_STOP,
+    .label = "Scratch",
+    .tip_on = "Cancel playing track",
+    .menuitem = "<GdisorderMain>/Control/Scratch",
+    .sensitive = scratch_sensitive,
+    .action_go_off = disorder_eclient_scratch_playing,
+    .events = "playing-track-changed rights-changed",
   },
   {
-    toggle: TRUE,
-    stock: FALSE,
-    icon: "cards24.png",
-    label: "Random",
-    tip_on: "Disable random play",
-    tip_off: "Enable random play",
-    menuitem: "<GdisorderMain>/Control/Random play",
-    on: random_enabled,
-    sensitive: random_sensitive,
-    action_go_on: disorder_eclient_random_enable,
-    action_go_off: disorder_eclient_random_disable,
-    events: "random-changed rights-changed",
+    .toggle = TRUE,
+    .stock = FALSE,
+    .icon = "cards24.png",
+    .label = "Random",
+    .tip_on = "Disable random play",
+    .tip_off = "Enable random play",
+    .menuitem = "<GdisorderMain>/Control/Random play",
+    .on = random_enabled,
+    .sensitive = random_sensitive,
+    .action_go_on = disorder_eclient_random_enable,
+    .action_go_off = disorder_eclient_random_disable,
+    .events = "random-changed rights-changed",
   },
   {
-    toggle: TRUE,
-    stock: TRUE,
-    icon: GTK_STOCK_MEDIA_PLAY,
-    label: "Play",
-    tip_on: "Disable play",
-    tip_off: "Enable play",
-    on: playing_enabled,
-    sensitive: playing_sensitive,
-    action_go_on: disorder_eclient_enable,
-    action_go_off: disorder_eclient_disable,
-    events: "enabled-changed rights-changed",
+    .toggle = TRUE,
+    .stock = TRUE,
+    .icon = GTK_STOCK_MEDIA_PLAY,
+    .label = "Play",
+    .tip_on = "Disable play",
+    .tip_off = "Enable play",
+    .on = playing_enabled,
+    .sensitive = playing_sensitive,
+    .action_go_on = disorder_eclient_enable,
+    .action_go_off = disorder_eclient_disable,
+    .events = "enabled-changed rights-changed",
   },
   {
-    toggle: TRUE,
-    stock: TRUE,
-    icon: GTK_STOCK_CONNECT,
-    label: "RTP",
-    tip_on: "Stop playing network stream",
-    tip_off: "Play network stream",
-    menuitem: "<GdisorderMain>/Control/Network player",
-    on: rtp_enabled,
-    sensitive: rtp_sensitive,
-    action_go_on: enable_rtp,
-    action_go_off: disable_rtp,
-    events: "rtp-changed",
+    .toggle = TRUE,
+    .stock = TRUE,
+    .icon = GTK_STOCK_CONNECT,
+    .label = "RTP",
+    .tip_on = "Stop playing network stream",
+    .tip_off = "Play network stream",
+    .menuitem = "<GdisorderMain>/Control/Network player",
+    .on = rtp_enabled,
+    .sensitive = rtp_sensitive,
+    .action_go_on = enable_rtp,
+    .action_go_off = disable_rtp,
+    .events = "rtp-changed",
   },
 };
 
@@ -468,9 +468,7 @@ static void toggled_menu(GtkCheckMenuItem attribute((unused)) *menuitem,
 
 /** @brief Called when a volume command completes */
 static void volume_completed(void attribute((unused)) *v,
-                             const char *err,
-                             int attribute((unused)) l,
-                             int attribute((unused)) r) {
+                             const char *err) {
   if(err)
     popup_protocol_error(0, err);
   /* We don't set the UI's notion of the volume here, it is set from the log
@@ -498,10 +496,10 @@ static void volume_adjusted(GtkAdjustment attribute((unused)) *a,
     if(backend && backend->set_volume)
       backend->set_volume(&l, &r);
   } else
-    disorder_eclient_volume(client, volume_completed,
-                            nearbyint(left(v, b) * 100),
-                            nearbyint(right(v, b) * 100),
-                            0);
+    disorder_eclient_set_volume(client, volume_completed,
+                                nearbyint(left(v, b) * 100),
+                                nearbyint(right(v, b) * 100),
+                                0);
 }
 
 /** @brief Formats the volume value */