[vlc-commits] Qt: do not react to right-click to mute volume
Jean-Baptiste Kempf
git at videolan.org
Sat Dec 17 14:04:35 CET 2011
vlc/vlc-1.2 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Dec 17 05:24:03 2011 +0100| [fd07c0382740f71f51eb20b250e74e0954e0e389] | committer: Jean-Baptiste Kempf
Qt: do not react to right-click to mute volume
This is counter-intuitive.
As asked by etix
(cherry picked from commit 7dab7f2f285f99c78f5aca3802a787f8b369e4c1)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=fd07c0382740f71f51eb20b250e74e0954e0e389
---
modules/gui/qt4/components/controller_widget.cpp | 30 +++++++++++-----------
1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/modules/gui/qt4/components/controller_widget.cpp b/modules/gui/qt4/components/controller_widget.cpp
index 25d4804..7a90179 100644
--- a/modules/gui/qt4/components/controller_widget.cpp
+++ b/modules/gui/qt4/components/controller_widget.cpp
@@ -210,25 +210,25 @@ void SoundWidget::setMuted( bool mute )
bool SoundWidget::eventFilter( QObject *obj, QEvent *e )
{
VLC_UNUSED( obj );
- if (e->type() == QEvent::MouseButtonPress )
+ if( e->type() == QEvent::MouseButtonPress )
{
- if( volumeSlider->orientation() == Qt::Vertical )
+ QMouseEvent *event = static_cast<QMouseEvent*>(e);
+ if( event->button() != Qt::RightButton )
{
- QMouseEvent *event = static_cast<QMouseEvent*>(e);
- showVolumeMenu( event->pos() );
+ if( volumeSlider->orientation() == Qt::Vertical )
+ {
+ showVolumeMenu( event->pos() );
+ }
+ else
+ {
+ setMuted( !b_is_muted );
+ }
+ e->accept();
+ return true;
}
- else
- {
- setMuted( !b_is_muted );
- }
- e->accept();
- return true;
- }
- else
- {
- e->ignore();
- return false;
}
+ e->ignore();
+ return false;
}
/**
More information about the vlc-commits
mailing list