X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/c0f84b88cab9518d29900e02a9fb67776820e902..af52ec8453e492e8a366c77cb63fba1989380c9f:/disobedience/control.c diff --git a/disobedience/control.c b/disobedience/control.c index 663c815..40f347a 100644 --- a/disobedience/control.c +++ b/disobedience/control.c @@ -271,8 +271,8 @@ GtkWidget *control_widget(void) { * sliders hang down from the toolbar so it unavoidably gets the whole width * of the window to play with. */ gtk_toolbar_set_show_arrow(GTK_TOOLBAR(toolbar), FALSE); - gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), - full_mode ? GTK_TOOLBAR_BOTH : GTK_TOOLBAR_ICONS); + if(full_mode) gtk_toolbar_unset_style(GTK_TOOLBAR(toolbar)); + else gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS); for(n = 0; n < NICONS; ++n) { struct icon *const icon = &icons[n]; icon->button = (icon->toggle @@ -364,8 +364,7 @@ GtkWidget *control_widget(void) { static int volume_supported(void) { /* TODO: if the server doesn't know how to set the volume [but isn't using * network play] then we should have volume_supported = FALSE */ - return (!rtp_supported - || (rtp_supported && backend && backend->set_volume)); + return 1; } /** @brief Update the volume control when it changes */ @@ -493,8 +492,7 @@ static void volume_adjusted(GtkAdjustment attribute((unused)) *a, * from the log. */ if(rtp_supported) { int l = nearbyint(left(v, b) * 100), r = nearbyint(right(v, b) * 100); - if(backend && backend->set_volume) - backend->set_volume(&l, &r); + rtp_setvol(&l, &r); } else disorder_eclient_set_volume(client, volume_completed, nearbyint(left(v, b) * 100), @@ -619,8 +617,8 @@ static void control_minimode(const char attribute((unused)) *event, gtk_widget_hide(balance_widget); gtk_scale_set_value_pos(GTK_SCALE(volume_widget), GTK_POS_RIGHT); } - gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), - full_mode ? GTK_TOOLBAR_BOTH : GTK_TOOLBAR_ICONS); + if(full_mode) gtk_toolbar_unset_style(GTK_TOOLBAR(toolbar)); + else gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS); } /*