mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 03:10:12 +02:00
* Alt/Cmd+Left & +Right to jump between pages and Ctrl+Up & Down to change the volume.
This commit is contained in:
@@ -287,11 +287,21 @@ TomahawkWindow::setupToolBar()
|
|||||||
ViewManager::instance(),
|
ViewManager::instance(),
|
||||||
SLOT( historyBack() ) );
|
SLOT( historyBack() ) );
|
||||||
m_backAction->setToolTip( tr( "Go back one page" ) );
|
m_backAction->setToolTip( tr( "Go back one page" ) );
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
m_backAction->setShortcut( QKeySequence( "Ctrl+Left" ) );
|
||||||
|
#else
|
||||||
|
m_backAction->setShortcut( QKeySequence( "Alt+Left" ) );
|
||||||
|
#endif
|
||||||
m_forwardAction = m_toolbar->addAction( ImageRegistry::instance()->pixmap( RESPATH "images/forward.svg", m_toolbar->iconSize() ),
|
m_forwardAction = m_toolbar->addAction( ImageRegistry::instance()->pixmap( RESPATH "images/forward.svg", m_toolbar->iconSize() ),
|
||||||
tr( "Forward" ),
|
tr( "Forward" ),
|
||||||
ViewManager::instance(),
|
ViewManager::instance(),
|
||||||
SLOT( historyForward() ) );
|
SLOT( historyForward() ) );
|
||||||
m_forwardAction->setToolTip( tr( "Go forward one page" ) );
|
m_forwardAction->setToolTip( tr( "Go forward one page" ) );
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
m_forwardAction->setShortcut( QKeySequence( "Ctrl+Right" ) );
|
||||||
|
#else
|
||||||
|
m_forwardAction->setShortcut( QKeySequence( "Alt+Right" ) );
|
||||||
|
#endif
|
||||||
|
|
||||||
m_toolbarLeftBalancer = new QWidget( this );
|
m_toolbarLeftBalancer = new QWidget( this );
|
||||||
m_toolbarLeftBalancer->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
|
m_toolbarLeftBalancer->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
|
||||||
@@ -457,6 +467,16 @@ TomahawkWindow::setupShortcuts()
|
|||||||
QShortcut* shortcut = new QShortcut( QKeySequence( QKeySequence::Close ), this );
|
QShortcut* shortcut = new QShortcut( QKeySequence( QKeySequence::Close ), this );
|
||||||
QObject::connect( shortcut, SIGNAL( activated() ), ViewManager::instance(), SLOT( destroyCurrentPage() ) );
|
QObject::connect( shortcut, SIGNAL( activated() ), ViewManager::instance(), SLOT( destroyCurrentPage() ) );
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
// Ctrl Up for raising the volume
|
||||||
|
QShortcut* shortcut = new QShortcut( QKeySequence( QKeySequence( "Ctrl+Up" ) ), this );
|
||||||
|
QObject::connect( shortcut, SIGNAL( activated() ), AudioEngine::instance(), SLOT( raiseVolume() ) );
|
||||||
|
}
|
||||||
|
{
|
||||||
|
// Ctrl Down for lowering the volume
|
||||||
|
QShortcut* shortcut = new QShortcut( QKeySequence( QKeySequence( "Ctrl+Down" ) ), this );
|
||||||
|
QObject::connect( shortcut, SIGNAL( activated() ), AudioEngine::instance(), SLOT( lowerVolume() ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user