-/** @brief Called whenever last_state changes in any way
- *
- * TODO we should only update things that have changed.
- */
-static void control_changed(const char attribute((unused)) *event,
- void attribute((unused)) *evendata,
- void attribute((unused)) *callbackdata) {
- int n;
- gboolean volume_supported;
-
- D(("control_changed"));
- /* Update all the icons */
- for(n = 0; n < NICONS; ++n)
- update_icon(&icons[n]);
- /* Only display volume/balance controls if they will work */
- if(!rtp_supported
- || (rtp_supported && mixer_supported(DEFAULT_BACKEND)))
- volume_supported = TRUE;
- else
- volume_supported = FALSE;
- (volume_supported ? gtk_widget_show : gtk_widget_hide)(volume_widget);
- (volume_supported ? gtk_widget_show : gtk_widget_hide)(balance_widget);
-}
-