[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: [PATCH] Fixing the KMix applet
From: Andras Mantia <amantia () kde ! org>
Date: 2003-11-23 13:23:11
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
The attached patch fixes several problems with the KMix applet:
1. Disabling/enabling a channel from the context menu. It was really a mess.
2. Enabling the last visible channel makes it really visible. (layouting
problem)
3. After restarting KDE or kicker the mixer applet was very wide, there was
quite some much space between the mixer widgets. A hide/show restored the
results. Now it is still visible that the size of the applet is not good, but
it's restored immediately. Don't know how to fix it without such visual
artifact.
There is still a problem: some of the mixer widgets are taller than the
others...
Andras
- --
Quanta Plus developer - http://quanta.sourceforge.net
K Desktop Environment - http://www.kde.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
iD8DBQE/wLTDTQdfac6L/08RAnr0AJwOb/cCZ74snilSQoqoMXm11jfR8QCg397P
k/uoZF0VSZqxwfdzmlHD2DQ=
=1cgB
-----END PGP SIGNATURE-----
["kmix.diff" (text/x-diff)]
Index: kmixerwidget.cpp
===================================================================
RCS file: /home/kde/kdemultimedia/kmix/kmixerwidget.cpp,v
retrieving revision 1.57
diff -u -r1.57 kmixerwidget.cpp
--- kmixerwidget.cpp 1 Nov 2003 15:25:51 -0000 1.57
+++ kmixerwidget.cpp 23 Nov 2003 13:07:45 -0000
@@ -250,7 +250,7 @@
m_balanceSlider = 0;
}
- updateSize(true);
+ updateSize(false);
// we have to expliciteley set the size, as
}
@@ -435,10 +435,18 @@
if(id >= static_cast<int>(m_channels.count())) // too big
return;
- Channel *chn = m_channels.at(id);
+ Channel *chn = 0L;
+ QString menuText = m_toggleMixerChannels->popupMenu()->text(id);
+ for (Channel *it=m_channels.first(); it!=0; it=m_channels.next())
+ {
+ if (it->dev->name() == menuText)
+ {
+ chn = it;
+ break;
+ }
+ }
if(!chn)
return;
-
bool gotCheck = m_toggleMixerChannels->popupMenu()->isItemChecked(id);
chn->dev->setDisabled(gotCheck);
Index: mixdevicewidget.cpp
===================================================================
RCS file: /home/kde/kdemultimedia/kmix/mixdevicewidget.cpp,v
retrieving revision 1.62
diff -u -r1.62 mixdevicewidget.cpp
--- mixdevicewidget.cpp 12 Oct 2003 15:50:22 -0000 1.62
+++ mixdevicewidget.cpp 23 Nov 2003 13:07:54 -0000
@@ -551,24 +551,24 @@
setVolume( vol );
}
-void
+void
MixDeviceWidget::toggleRecsrc()
{
setRecsrc( !m_mixdevice->isRecordable() );
}
-void
+void
MixDeviceWidget::setDisabled( bool value )
{
if ( m_disabled!=value)
{
value ? hide() : show();
m_disabled = value;
- emit updateLayout();
+ QTimer::singleShot(0, m_mixerwidget, SLOT(updateSize()));
}
}
-void
+void
MixDeviceWidget::defineKeys()
{
if (m_keys) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic