wxVolCtrl *gauge;
int i_y_offset;
- vlc_bool_t b_mute;
intf_thread_t *p_intf;
};
:wxControl( p_parent, -1, wxDefaultPosition, wxSize(64, VLCVOL_HEIGHT ),
wxBORDER_NONE ),
i_y_offset((VLCVOL_HEIGHT - TOOLBAR_BMP_HEIGHT) / 2),
- b_mute(0), p_intf(_p_intf)
+ p_intf(_p_intf)
{
gauge = new wxVolCtrl( p_intf, this, -1, wxPoint( 18, i_y_offset ),
wxSize( 44, TOOLBAR_BMP_HEIGHT ) );
void VLCVolCtrl::OnPaint( wxPaintEvent &evt )
{
+ int i_volume;
+ i_volume = (audio_volume_t)config_GetInt( p_intf, "volume" );
+
wxPaintDC dc( this );
- wxBitmap mPlayBitmap( b_mute ? speaker_mute_xpm : speaker_xpm );
+ wxBitmap mPlayBitmap( i_volume ? speaker_xpm : speaker_mute_xpm );
dc.DrawBitmap( mPlayBitmap, 0, i_y_offset, TRUE );
}
{
int i_volume;
aout_VolumeMute( p_intf, (audio_volume_t *)&i_volume );
- i_volume = (audio_volume_t)config_GetInt( p_intf, "volume" );
- if( i_volume == 0 ) b_mute = 1;
- else b_mute=0;
- Refresh();
}
}
void VLCVolCtrl::UpdateVolume()
{
- int i_volume;
gauge->UpdateVolume();
- i_volume = (audio_volume_t)config_GetInt( p_intf, "volume" );
- if( i_volume == 0 ) b_mute = 1;
- else b_mute=0;
Refresh();
}