Add 'Show Window' to KDE builds as well
This commit is contained in:
committed by
craig.p.drummond
parent
5101f31dbc
commit
cdc5743b2d
@@ -30,7 +30,7 @@
|
||||
using QGtkStyle.
|
||||
16. Add a custom spinbox to closer match Gtk3's large button spinbox style.
|
||||
Only for linux builds NOT run under KDE, and using QGtkStyle.
|
||||
17. Add 'Show Window' action to Linux Qt-only build - so that we have a way of
|
||||
17. Add 'Show Window' action to Linux builds - so that we have a way of
|
||||
restoring the Cantata window from the Unity menubar.
|
||||
18. Use freedesktop.org notifications for Qt-only Linux builds.
|
||||
19. Show menubar when run under Unity (Qt-only build).
|
||||
|
||||
@@ -287,11 +287,11 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
quitAction = ActionCollection::get()->createAction("quit", i18n("Quit"), "application-exit");
|
||||
connect(quitAction, SIGNAL(triggered(bool)), qApp, SLOT(quit()));
|
||||
quitAction->setShortcut(QKeySequence::Quit);
|
||||
#endif // ENABLE_KDE_SUPPORT
|
||||
#if !defined Q_OS_WIN
|
||||
restoreAction = ActionCollection::get()->createAction("showwindow", i18n("Show Window"));
|
||||
connect(restoreAction, SIGNAL(triggered(bool)), this, SLOT(restoreWindow()));
|
||||
#endif // !Q_OS_WIN
|
||||
#endif // ENABLE_KDE_SUPPORT
|
||||
|
||||
smallPlaybackButtonsAction = ActionCollection::get()->createAction("smallplaybackbuttons", i18n("Small Playback Buttons"));
|
||||
smallControlButtonsAction = ActionCollection::get()->createAction("smallcontrolbuttons", i18n("Small Control Buttons"));
|
||||
|
||||
@@ -388,7 +388,7 @@ private:
|
||||
#endif
|
||||
Action *expandInterfaceAction;
|
||||
Action *quitAction;
|
||||
#if !defined ENABLE_KDE_SUPPORT && !defined Q_OS_WIN
|
||||
#if !defined Q_OS_WIN
|
||||
Action *restoreAction;
|
||||
#endif
|
||||
Action *locateTrackAction;
|
||||
|
||||
@@ -75,6 +75,8 @@ void TrayItem::setup()
|
||||
trayItem->setContextMenu(trayItemMenu);
|
||||
if (qgetenv("XDG_CURRENT_DESKTOP")=="Unity") {
|
||||
trayItem->setStatus(KStatusNotifierItem::Active);
|
||||
trayItemMenu->addSeparator();
|
||||
trayItemMenu->addAction(mw->restoreAction);
|
||||
}
|
||||
connect(trayItem, SIGNAL(scrollRequested(int, Qt::Orientation)), this, SLOT(trayItemScrollRequested(int, Qt::Orientation)));
|
||||
connect(trayItem, SIGNAL(secondaryActivateRequested(const QPoint &)), mw, SLOT(playPauseTrack()));
|
||||
@@ -92,8 +94,10 @@ void TrayItem::setup()
|
||||
trayItemMenu->addAction(mw->stopTrackAction);
|
||||
trayItemMenu->addAction(mw->nextTrackAction);
|
||||
#if !defined Q_OS_WIN
|
||||
trayItemMenu->addSeparator();
|
||||
trayItemMenu->addAction(mw->restoreAction);
|
||||
if (qgetenv("XDG_CURRENT_DESKTOP")=="Unity") {
|
||||
trayItemMenu->addSeparator();
|
||||
trayItemMenu->addAction(mw->restoreAction);
|
||||
}
|
||||
#endif
|
||||
trayItemMenu->addSeparator();
|
||||
trayItemMenu->addAction(mw->quitAction);
|
||||
|
||||
Reference in New Issue
Block a user