mirror of
https://github.com/alsa-project/alsa-tools.git
synced 2025-11-17 07:00:00 -05:00
envy24control: port to GTK 3
Signed-off-by: Andreas Persson <andreasp56@outlook.com>
This commit is contained in:
parent
32495631b1
commit
16bb554fce
12 changed files with 541 additions and 534 deletions
|
|
@ -39,7 +39,7 @@ extern int input_channels, output_channels, pcm_output_channels, spdif_channels,
|
|||
|
||||
static int is_active(GtkWidget *widget)
|
||||
{
|
||||
return GTK_TOGGLE_BUTTON(widget)->active ? 1 : 0;
|
||||
return gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)) ? 1 : 0;
|
||||
}
|
||||
|
||||
void mixer_update_stream(int stream, int vol_flag, int sw_flag)
|
||||
|
|
@ -181,10 +181,10 @@ void mixer_adjust(GtkAdjustment *adj, gpointer data)
|
|||
int stereo = is_active(mixer_stereo_toggle[stream-1]) ? 1 : 0;
|
||||
int vol[2] = { -1, -1 };
|
||||
|
||||
vol[button] = 96 - adj->value;
|
||||
vol[button] = 96 - gtk_adjustment_get_value(adj);
|
||||
if (stereo) {
|
||||
gtk_adjustment_set_value(GTK_ADJUSTMENT(mixer_adj[stream-1][button ^ 1]), adj->value);
|
||||
vol[button ^ 1] = 96 - adj->value;
|
||||
gtk_adjustment_set_value(GTK_ADJUSTMENT(mixer_adj[stream-1][button ^ 1]), gtk_adjustment_get_value(adj));
|
||||
vol[button ^ 1] = 96 - gtk_adjustment_get_value(adj);
|
||||
}
|
||||
set_volume1(stream, vol[0], vol[1]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue