summaryrefslogtreecommitdiffstats
path: root/kmix/kmixdockwidget.cpp
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2022-04-16 21:53:46 +0300
committerMavridis Philippe <mavridisf@gmail.com>2023-06-22 15:18:13 +0300
commit2cc6752c15371d87a0c8cf774515b0b44fc768d9 (patch)
tree54a63dac6a5508912933592aec9a90b2289c34e1 /kmix/kmixdockwidget.cpp
parent5d08ceabaf19206134b1bcd08c8642cdb0b41aa7 (diff)
downloadtdemultimedia-2cc6752c15371d87a0c8cf774515b0b44fc768d9.tar.gz
tdemultimedia-2cc6752c15371d87a0c8cf774515b0b44fc768d9.zip
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 <mavridisf@gmail.com>
Diffstat (limited to 'kmix/kmixdockwidget.cpp')
-rw-r--r--kmix/kmixdockwidget.cpp19
1 files changed, 15 insertions, 4 deletions
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 <tdelocale.h>
#include <tdepopupmenu.h>
#include <tdeglobalsettings.h>
+#include <tdemainwindow.h>
#include <tqapplication.h>
#include <tqcursor.h>
@@ -114,8 +115,18 @@ void KMixDockWidget::createActions()
a->plug(popupMenu);
}
- // Help and quit
popupMenu->insertSeparator();
+
+ // KMix Options
+ TDEMainWindow *toplevel = static_cast<TDEMainWindow*>(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 ) );
}
}