1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-13 20:39:57 +01:00

Merge pull request #335 from samuelrey/master

Ctrl-N and Ctrl-S Shortcuts
This commit is contained in:
Christian Muehlhaeuser 2015-10-18 04:35:14 +02:00
commit 8a98968148
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() ) );