Hello community, here is the log from the commit of package kdemultimedia3 checked in at Thu Nov 23 16:25:17 CET 2006. -------- --- KDE/kdemultimedia3/kdemultimedia3.changes 2006-11-14 23:49:15.000000000 +0100 +++ kdemultimedia3/kdemultimedia3.changes 2006-11-22 18:33:31.000000000 +0100 @@ -1,0 +2,5 @@ +Wed Nov 22 18:32:24 CET 2006 - dmueller@suse.de + +- add default keybindings to kmix (#219919) + +------------------------------------------------------------------- New: ---- kmix-default-keybindings.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdemultimedia3.spec ++++++ --- /var/tmp/diff_new_pack.Cuse0v/_old 2006-11-23 16:24:37.000000000 +0100 +++ /var/tmp/diff_new_pack.Cuse0v/_new 2006-11-23 16:24:37.000000000 +0100 @@ -20,7 +20,7 @@ Group: System/GUI/KDE Summary: KDE Multimedia Libraries Version: 3.5.5 -Release: 24 +Release: 28 Url: http://www.kde.org Requires: kdelibs3 >= %( echo `rpm -q --queryformat '%{VERSION}' kdelibs3`) BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -34,6 +34,7 @@ Patch9: initial-preferences.diff Patch11: fix-aliasing.diff Patch12: kmix-autostart.diff +Patch13: kmix-default-keybindings.diff Patch14: disable-cddb-usage-by-default.diff Patch50: juk-kdemm-support.diff Patch51: kdemmbackends-3.4.diff @@ -275,6 +276,7 @@ %patch9 %patch11 %patch12 +%patch13 %patch14 %if %suse_version > 930 tar xfj %SOURCE5 @@ -654,6 +656,8 @@ /opt/kde3/share/services/videothumbnail.desktop %changelog -n kdemultimedia3 +* Wed Nov 22 2006 - dmueller@suse.de +- add default keybindings to kmix (#219919) * Tue Nov 14 2006 - dmueller@suse.de - autostart kmix only once (#159352, #204751) * Wed Nov 08 2006 - stbinner@suse.de ++++++ kmix-default-keybindings.diff ++++++ Index: kmix/kmix.cpp =================================================================== --- kmix/kmix.cpp (revision 606690) +++ kmix/kmix.cpp (working copy) @@ -121,11 +121,11 @@ KMixWindow::initActions() m_globalAccel = new KGlobalAccel( this ); m_globalAccel->insert( "Increase volume", i18n( "Increase Volume of Master Channel"), QString::null, - KShortcut(), KShortcut(), this, SLOT( increaseVolume() ) ); + KShortcut(Key_VolumeUp), KShortcut(Key_VolumeUp), this, SLOT( increaseVolume() ) ); m_globalAccel->insert( "Decrease volume", i18n( "Decrease Volume of Master Channel"), QString::null, - KShortcut(), KShortcut(), this, SLOT( decreaseVolume() ) ); + KShortcut(Key_VolumeDown), KShortcut(Key_VolumeDown), this, SLOT( decreaseVolume() ) ); m_globalAccel->insert( "Toggle mute", i18n( "Toggle Mute of Master Channel"), QString::null, - KShortcut(), KShortcut(), this, SLOT( toggleMuted() ) ); + KShortcut(Key_VolumeMute), KShortcut(Key_VolumeMute), this, SLOT( toggleMuted() ) ); m_globalAccel->readSettings(); m_globalAccel->updateConnections(); @@ -538,9 +538,7 @@ KMixWindow::applyPrefs( KMixPrefDlg *pre show(); } - this->repaint(); // make KMix look fast (saveConfig() often uses several seconds) - kapp->processEvents(); - saveConfig(); + QTimer::singleShot(0, this, SLOT(saveConfig())); } @@ -607,24 +605,33 @@ void KMixWindow::toggleMuted() { MixDevice* md = Mixer::masterCardDevice(); - if ( md != 0 && md->hasMute() ) + if ( md != 0 && md->hasMute() ) { + if (!isVisible() && m_dockWidget) + m_dockWidget->prepareOSD(); Mixer::masterCard()->toggleMute(md->num()); + } } void KMixWindow::increaseVolume() { MixDevice* md = Mixer::masterCardDevice(); - if ( md != 0 ) - Mixer::masterCard()->increaseVolume(md->num()); + if ( md != 0 ) { + if (!isVisible() && m_dockWidget) + m_dockWidget->prepareOSD(); + Mixer::masterCard()->increaseVolume(md->num()); + } } void KMixWindow::decreaseVolume() { MixDevice* md = Mixer::masterCardDevice(); - if ( md != 0 ) + if ( md != 0 ) { + if (!isVisible() && m_dockWidget) + m_dockWidget->prepareOSD(); Mixer::masterCard()->decreaseVolume(md->num()); + } } #include "kmix.moc" Index: kmix/kmix.h =================================================================== --- kmix/kmix.h (revision 606690) +++ kmix/kmix.h (working copy) @@ -64,7 +64,6 @@ KMixWindow : public KMainWindow void saveSettings(); protected: - void saveConfig(); void loadConfig(); void initPrefDlg(); @@ -79,6 +78,7 @@ KMixWindow : public KMainWindow void hideEvent( QHideEvent * ); public slots: + void saveConfig(); void quit(); void showSettings(); void showHelp(); Index: kmix/kmixdockwidget.cpp =================================================================== --- kmix/kmixdockwidget.cpp (revision 606690) +++ kmix/kmixdockwidget.cpp (working copy) @@ -68,6 +68,7 @@ KMixDockWidget::KMixDockWidget( Mixer *m createActions(); createMasterVolWidget(); connect(this, SIGNAL(quitSelected()), kapp, SLOT(quitExtended())); + connect(&_volumePopupHide, SIGNAL(timeout()), SLOT(hideDockAreaPopup())); } KMixDockWidget::~KMixDockWidget() @@ -206,6 +207,22 @@ KMixDockWidget::setVolumeTip() _oldToolTipValue = newToolTipValue; } +void KMixDockWidget::prepareOSD() +{ + if (_dockAreaPopup && !_dockAreaPopup->isVisible()) { + + popupVolumePopup(); + _volumePopupHide.stop(); + _volumePopupHide.start(2000, true /* single shot */); + } +} + +void KMixDockWidget::hideDockAreaPopup() +{ + if (_dockAreaPopup && _dockAreaPopup->isVisible()) + _dockAreaPopup->hide(); +} + void KMixDockWidget::updatePixmap() { @@ -241,6 +258,34 @@ KMixDockWidget::updatePixmap() } void +KMixDockWidget::popupVolumePopup() +{ + int h = _dockAreaPopup->height(); + int x = this->mapToGlobal( QPoint( 0, 0 ) ).x() + this->width()/2 - _dockAreaPopup->width()/2; + int y = this->mapToGlobal( QPoint( 0, 0 ) ).y() - h; + if ( y < 0 ) + y = y + h + this->height(); + + _dockAreaPopup->move(x, y); // so that the mouse is outside of the widget + + // Now handle Multihead displays. And also make sure that the dialog is not + // moved out-of-the screen on the right (see Bug 101742). + QDesktopWidget* vdesktop = QApplication::desktop(); + const QRect& vScreenSize = vdesktop->screenGeometry(_dockAreaPopup); + if ( (x+_dockAreaPopup->width()) > (vScreenSize.width() + vScreenSize.x()) ) { + // move horizontally, so that it is completely visible + _dockAreaPopup->move(vScreenSize.width() + vScreenSize.x() - _dockAreaPopup->width() -1 , y); + } // horizontally out-of bound + else if ( x < vScreenSize.x() ) { + _dockAreaPopup->move(vScreenSize.x(), y); + } + // the above stuff could also be implemented vertically + + _dockAreaPopup->show(); + KWin::setState(_dockAreaPopup->winId(), NET::StaysOnTop | NET::SkipTaskbar | NET::SkipPager ); +} + +void KMixDockWidget::mousePressEvent(QMouseEvent *me) { if ( _dockAreaPopup == 0 ) { @@ -265,31 +310,7 @@ KMixDockWidget::mousePressEvent(QMouseEv _dockAreaPopup->hide(); return; } - - int h = _dockAreaPopup->height(); - int x = this->mapToGlobal( QPoint( 0, 0 ) ).x() + this->width()/2 - _dockAreaPopup->width()/2; - int y = this->mapToGlobal( QPoint( 0, 0 ) ).y() - h; - if ( y < 0 ) - y = y + h + this->height(); - - _dockAreaPopup->move(x, y); // so that the mouse is outside of the widget - - // Now handle Multihead displays. And also make sure that the dialog is not - // moved out-of-the screen on the right (see Bug 101742). - QDesktopWidget* vdesktop = QApplication::desktop(); - const QRect& vScreenSize = vdesktop->screenGeometry(_dockAreaPopup); - if ( (x+_dockAreaPopup->width()) > (vScreenSize.width() + vScreenSize.x()) ) { - // move horizontally, so that it is completely visible - _dockAreaPopup->move(vScreenSize.width() + vScreenSize.x() - _dockAreaPopup->width() -1 , y); - } // horizontally out-of bound - else if ( x < vScreenSize.x() ) { - _dockAreaPopup->move(vScreenSize.x(), y); - } - // the above stuff could also be implemented vertically - - _dockAreaPopup->show(); - KWin::setState(_dockAreaPopup->winId(), NET::StaysOnTop | NET::SkipTaskbar | NET::SkipPager ); - + popupVolumePopup(); QWidget::mousePressEvent(me); // KSystemTray's shouldn't do the default action for this return; } // LeftMouseButton pressed Index: kmix/kmixdockwidget.h =================================================================== --- kmix/kmixdockwidget.h (revision 606690) +++ kmix/kmixdockwidget.h (working copy) @@ -57,6 +57,9 @@ class KMixDockWidget : public KSystemTra public slots: void setVolumeTip(); void updatePixmap(); + void prepareOSD(); + + void hideDockAreaPopup(); protected: void createMasterVolWidget(); @@ -73,6 +76,8 @@ class KMixDockWidget : public KSystemTra int _oldToolTipValue; char _oldPixmapType; bool _volumePopup; + QTimer _volumePopupHide; + void popupVolumePopup(); private slots: void dockMute(); void selectMaster(); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org