[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-multimedia
Subject: fix for bug 91013
From: Diego Iastrubni <elcuco () kdemail ! net>
Date: 2004-10-09 19:51:03
Message-ID: 200410092151.03774.elcuco () kdemail ! net
[Download RAW message or body]
Hi all,
I attach here a fix for bug number 91013:
"When you run kmix in reverse mode, the balance bar beheaves differently: the
max value is on the left, and the min on the right.
What happens is that I set the balance to the right, and I hear only the left
speaker (and the oposite as well)."
I just made a new slot in the main widget and connected that to the
valueChanged(). (now the signal is connected to the mixer->setBalance()
slot).
May I commit to head and branch?
--
diego, kde-il translation team, http://www.kde.org/il
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
["kmix-balance-rtl.diff" (text/x-diff)]
Index: kmixerwidget.cpp
===================================================================
RCS file: /home/kde/kdemultimedia/kmix/kmixerwidget.cpp,v
retrieving revision 1.68
diff -u -r1.68 kmixerwidget.cpp
--- kmixerwidget.cpp 2 Jul 2004 21:55:29 -0000 1.68
+++ kmixerwidget.cpp 9 Oct 2004 19:45:58 -0000
@@ -26,6 +26,7 @@
#include <qslider.h>
#include <qstring.h>
#include <qtooltip.h>
+#include <qapplication.h> // for QApplication::revsreseLayout()
// KDE
#include <kconfig.h>
@@ -159,7 +160,7 @@
balanceAndDetail->addWidget( mixerName );
balanceAndDetail->addSpacing( 10 );
- connect( m_balanceSlider, SIGNAL(valueChanged(int)), _mixer, SLOT(setBalance(int)) );
+ connect( m_balanceSlider, SIGNAL(valueChanged(int)), this, SLOT(balanceChanged(int)) );
QToolTip::add( m_balanceSlider, i18n("Left/Right balancing") );
// --- "MenuBar" toggling from the various View's ---
@@ -276,5 +277,14 @@
emit toggleMenuBar();
}
+// in RTL mode, the slider be reversed, we cannot just connect the signal to setBalance()
+// hack arround it before calling setBalance()
+void KMixerWidget::balanceChanged(int balance)
+{
+ if (QApplication::reverseLayout())
+ balance = -balance;
+
+ _mixer->setBalance( balance );
+}
#include "kmixerwidget.moc"
Index: kmixerwidget.h
===================================================================
RCS file: /home/kde/kdemultimedia/kmix/kmixerwidget.h,v
retrieving revision 1.33
diff -u -r1.33 kmixerwidget.h
--- kmixerwidget.h 27 Jun 2004 13:40:12 -0000 1.33
+++ kmixerwidget.h 9 Oct 2004 19:45:58 -0000
@@ -87,6 +87,7 @@
private slots:
//void updateBalance();
+ void balanceChanged(int balance);
private:
Mixer *_mixer;
_______________________________________________
kde-multimedia mailing list
kde-multimedia@kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic