From 2cc6752c15371d87a0c8cf774515b0b44fc768d9 Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Sat, 16 Apr 2022 21:53:46 +0300 Subject: KMix: ported settings to TDEConfigXT/Designer This commit includes an improved Preferences dialog for KMix. It also exposes some previously hidden options and features, some of which experimental (build-time option, off by default). It also includes some minor UI improvements. Signed-off-by: Mavridis Philippe --- kmix/kmixdockwidget.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'kmix/kmixdockwidget.cpp') diff --git a/kmix/kmixdockwidget.cpp b/kmix/kmixdockwidget.cpp index 7e08f71e..8867b40b 100644 --- a/kmix/kmixdockwidget.cpp +++ b/kmix/kmixdockwidget.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -114,8 +115,18 @@ void KMixDockWidget::createActions() a->plug(popupMenu); } - // Help and quit popupMenu->insertSeparator(); + + // KMix Options + TDEMainWindow *toplevel = static_cast(parent()); + a = toplevel->actionCollection()->action(KStdAction::name(KStdAction::Preferences)); + + if (a) + { + a->plug(popupMenu); + } + + // Help and quit popupMenu->insertItem(SmallIcon("help"), KStdGuiItem::help().text(), (new KHelpMenu(this, TDEGlobal::instance()->aboutData(), false))->menu(), false); popupMenu->insertSeparator(); a = actionCollection()->action(KStdAction::name(KStdAction::Quit)); @@ -349,7 +360,7 @@ KMixDockWidget::mousePressEvent(TQMouseEvent *me) // esken: Due to overwhelming request, LeftButton shows the ViewDockAreaPopup, if configured // to do so. Otherwise the main window will be shown. - if ( me->button() == Qt::LeftButton ) + if ( me->button() == TQt::LeftButton ) { if ( ! _volumePopup ) { // Case 1: User wants to show main window => This is the KSystemTray default action @@ -393,7 +404,7 @@ KMixDockWidget::mousePressEvent(TQMouseEvent *me) TQWidget::mousePressEvent(me); // KSystemTray's shouldn't do the default action for this return; } // LeftMouseButton pressed - else if ( me->button() == Qt::MidButton ) { + else if ( me->button() == TQt::MidButton ) { if ( ! _dockIconMuting ) { toggleActive(); } else { @@ -443,7 +454,7 @@ KMixDockWidget::wheelEvent(TQWheelEvent *e) // Mhhh, it doesn't work. TQt does not show it again. setVolumeTip(); // Simulate a mouse move to make TQt show the tooltip again - TQApplication::postEvent( this, new TQMouseEvent( TQEvent::MouseMove, TQCursor::pos(), Qt::NoButton, Qt::NoButton ) ); + TQApplication::postEvent( this, new TQMouseEvent( TQEvent::MouseMove, TQCursor::pos(), TQt::NoButton, TQt::NoButton ) ); } } -- cgit v1.2.3