chiark / gitweb /
Disobedience checks server version and expects rights-changed
[disorder] / disobedience / control.c
index b62fc06778d448bdbfd782f583d13d3268b0ea24..50aaebe421f5e8ac8882bf1c08d0683e0956f315 100644 (file)
@@ -351,15 +351,18 @@ static void volume_changed(const char attribute((unused)) *event,
 static void icon_changed(const char attribute((unused)) *event,
                          void attribute((unused)) *evendata,
                          void *callbackdata) {
+  //fprintf(stderr, "icon_changed (%s)\n", event);
   const struct icon *const icon = callbackdata;
   int on = icon->on ? icon->on() : 1;
   int sensitive = icon->sensitive ? icon->sensitive() : 1;
+  //fprintf(stderr, "sensitive->%d\n", sensitive);
   GtkWidget *child, *newchild;
 
   ++suppress_actions;
   /* If the connection is down nothing is ever usable */
   if(!(last_state & DISORDER_CONNECTED))
     sensitive = 0;
+  //fprintf(stderr, "(checked connected) sensitive->%d\n", sensitive);
   /* Replace the child */
   newchild = on ? icon->image_on : icon->image_off;
   child = gtk_bin_get_child(GTK_BIN(icon->button));
@@ -371,7 +374,7 @@ static void icon_changed(const char attribute((unused)) *event,
   }
   /* If you disable play or random play NOT via the icon (for instance, via the
    * edit menu or via a completely separate command line invocation) then the
-   * icon shows up as insensitive.  Hover the mouse over it and the corrcet
+   * icon shows up as insensitive.  Hover the mouse over it and the correct
    * state is immediately displayed.  sensitive and GTK_WIDGET_SENSITIVE show
    * it to be in the correct state, so I think this is may be a GTK+ bug. */
   if(icon->tip_on)
@@ -388,9 +391,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,
@@ -417,11 +420,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 */
 }