[PATCH] Fixing the KMix applet

Christian Esken c.esken at cityweb.de
Sun Nov 23 16:39:01 GMT 2003


On Sunday 23 November 2003 14:23, Andras Mantia wrote:

>1. Disabling/enabling a channel from the context menu. It was really a mess.
Yes, it was really. Thanks for your effort.

>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
Nice. These fix ugly bugs.



>-       updateSize(true);
>+       updateSize(false);

Why do you need to change this?
And are you aware that kmixerwidget.cpp is not only part of the applet, but of 
the main application itself? This change could screw up resizing the main 
window (especially after enabling/disabling the "Advanced" checkbox).



>-   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;
>+     }
>+   }

This fix seems OK to me.


> -      emit updateLayout();
> +      QTimer::singleShot(0, m_mixerwidget, SLOT(updateSize()));

I think this might OK, but why is it neccesary? And wouldn't it then be 
neccesary for MixDeviceWidget::setStereoLinked() too?

Chris




More information about the kde-core-devel mailing list