1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-01-17 22:38:33 +01:00

Added Ctrl-N and Ctrl-S shortcuts for new playlist and station, respectively.

This commit is contained in:
Samuel Rey 2015-10-17 19:21:36 -07:00
parent 60a3a13262
commit 566c655ac6
2 changed files with 10 additions and 0 deletions

View File

@ -115,6 +115,12 @@ ActionCollection::initActions()
m_actionCollection[ "showOfflineSources" ]->setCheckable( true );
m_actionCollection[ "preferences" ] = new QAction( tr( "&Configure %applicationName..." ), this );
m_actionCollection[ "preferences" ]->setMenuRole( QAction::PreferencesRole );
m_actionCollection[ "createPlaylist" ] = new QAction( tr( "Create Playlist" ), this );
m_actionCollection[ "createPlaylist" ]->setShortcut( QKeySequence( "Ctrl+N" ) );
m_actionCollection[ "createPlaylist" ]->setShortcutContext( Qt::ApplicationShortcut );
m_actionCollection[ "createStation" ] = new QAction( tr( "Create Station" ), this );
m_actionCollection[ "createStation" ]->setShortcut( QKeySequence( "Ctrl+S" ) );
m_actionCollection[ "createStation" ]->setShortcutContext( Qt::ApplicationShortcut );
#ifdef Q_OS_MAC
m_actionCollection[ "minimize" ] = new QAction( tr( "Minimize" ), this );
m_actionCollection[ "minimize" ]->setShortcut( QKeySequence( "Ctrl+M" ) );
@ -163,6 +169,8 @@ ActionCollection::createMenuBar( QWidget *parent )
controlsMenu->addAction( m_actionCollection[ "togglePrivacy" ] );
controlsMenu->addAction( m_actionCollection[ "showOfflineSources" ] );
controlsMenu->addSeparator();
controlsMenu->addAction( m_actionCollection[ "createPlaylist" ] );
controlsMenu->addAction( m_actionCollection[ "createStation" ] );
controlsMenu->addAction( m_actionCollection[ "importPlaylist" ] );
controlsMenu->addAction( m_actionCollection[ "updateCollection" ] );
controlsMenu->addAction( m_actionCollection[ "rescanCollection" ] );

View File

@ -689,6 +689,8 @@ TomahawkWindow::setupSignals()
connect( ac->getAction( "aboutTomahawk" ), SIGNAL( triggered() ), SLOT( showAboutTomahawk() ) );
connect( ac->getAction( "quit" ), SIGNAL( triggered() ), qApp, SLOT( quit() ) );
connect( ac->getAction( "showOfflineSources" ), SIGNAL( triggered() ), SLOT( showOfflineSources() ) );
connect( ac->getAction( "createPlaylist" ), SIGNAL( triggered() ), SLOT( createPlaylist() ) );
connect( ac->getAction( "createStation" ), SIGNAL( triggered() ), SLOT( createStation() ) );
#if defined( Q_OS_MAC )
connect( ac->getAction( "minimize" ), SIGNAL( triggered() ), SLOT( minimize() ) );