chiark / gitweb /
DisOrder 4.2
[disorder] / disobedience / control.c
index 3ccd7c22c104b2a7d435de19e34ecf0886807948..6ed9fb3564db522c00afc5e0e5f3ceb00df196e3 100644 (file)
@@ -128,8 +128,6 @@ struct icon {
   GtkWidget *image_off;
 };
 
-/* TODO: Add rights into the mix below */
-
 static int pause_resume_on(void) {
   return !(last_state & DISORDER_TRACK_PAUSED);
 }
@@ -277,6 +275,7 @@ GtkWidget *control_widget(void) {
     char **events = split(icons[n].events, 0, 0, 0, 0);
     while(*events)
       event_register(*events++, icon_changed, &icons[n]);
+    event_register("connected-changed", icon_changed, &icons[n]);
   }
   /* create the adjustments for the volume control */
   volume_adj = GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, goesupto,
@@ -391,9 +390,9 @@ static void icon_changed(const char attribute((unused)) *event,
 }
 
 static void icon_action_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);
 }
 
 static void clicked_icon(GtkButton attribute((unused)) *button,
@@ -420,11 +419,11 @@ 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 *error,
+                             const char *err,
                              int attribute((unused)) l,
                              int attribute((unused)) r) {
-  if(error)
-    popup_protocol_error(0, error);
+  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
    * regardless of the reason it changed */
 }