Commit c4efd024 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Reverting to revision 12383 to 12340. This make wxwidgets 2.6.1 work but breaks older versions.

parent 98b9533c
...@@ -89,7 +89,7 @@ public: ...@@ -89,7 +89,7 @@ public:
void OnChange( wxMouseEvent& event ); void OnChange( wxMouseEvent& event );
void UpdateVolume(); void UpdateVolume();
private: private:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
wxVolCtrl *gauge; wxVolCtrl *gauge;
...@@ -99,7 +99,7 @@ private: ...@@ -99,7 +99,7 @@ private:
}; };
BEGIN_EVENT_TABLE(VLCVolCtrl, wxControl) BEGIN_EVENT_TABLE(VLCVolCtrl, wxControl)
EVT_PAINT(VLCVolCtrl::OnPaint) EVT_PAINT(VLCVolCtrl::OnPaint)
/* Mouse events */ /* Mouse events */
EVT_LEFT_UP(VLCVolCtrl::OnChange) EVT_LEFT_UP(VLCVolCtrl::OnChange)
...@@ -1426,11 +1426,13 @@ void wxVolCtrl::UpdateVolume() ...@@ -1426,11 +1426,13 @@ void wxVolCtrl::UpdateVolume()
{ {
audio_volume_t i_volume; audio_volume_t i_volume;
aout_VolumeGet( p_intf, &i_volume ); aout_VolumeGet( p_intf, &i_volume );
int i_gauge_volume = i_volume * 200 * 2 / AOUT_VOLUME_MAX; int i_gauge_volume = i_volume * 200 * 2 / AOUT_VOLUME_MAX;
if( i_gauge_volume == GetValue() ) return; if( i_gauge_volume == GetValue() ) return;
SetValue( i_gauge_volume ); SetValue( i_gauge_volume );
SetToolTip( wxString::Format((wxString)wxU(_("Volume")) + wxT(" %d"),
i_gauge_volume / 2 ) );
} }
#if defined(__WXGTK__) #if defined(__WXGTK__)
...@@ -1472,9 +1474,6 @@ void VLCVolCtrl::UpdateVolume() ...@@ -1472,9 +1474,6 @@ void VLCVolCtrl::UpdateVolume()
gauge->UpdateVolume(); gauge->UpdateVolume();
int i_volume = gauge->GetValue(); int i_volume = gauge->GetValue();
wxWindow::SetToolTip( (wxString)wxU(_("Volume")) +
wxString::Format( wxT(" %d"), i_volume/2 ) );
if( !!i_volume == !b_mute ) return; if( !!i_volume == !b_mute ) return;
b_mute = !b_mute; b_mute = !b_mute;
Refresh(); Refresh();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment