mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-22 08:52:12 +02:00
* Added shortcut (Ctrl+W / Cmd+W) for closing the current (temporary) page.
This commit is contained in:
parent
24f10f2391
commit
41aeff750b
@ -135,11 +135,12 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
|
||||
setupMenuBar();
|
||||
setupToolBar();
|
||||
setupSideBar();
|
||||
statusBar()->addPermanentWidget( m_audioControls, 1 );
|
||||
setupStatusBar();
|
||||
|
||||
setupUpdateCheck();
|
||||
loadSettings();
|
||||
setupSignals();
|
||||
setupShortcuts();
|
||||
|
||||
if ( qApp->arguments().contains( "--debug" ) )
|
||||
{
|
||||
@ -307,10 +308,6 @@ TomahawkWindow::setupToolBar()
|
||||
m_searchWidget->setFixedWidth( scaledX( 340 ) );
|
||||
connect( m_searchWidget, SIGNAL( returnPressed() ), SLOT( onFilterEdited() ) );
|
||||
|
||||
// Use Ctrl+F to focus the searchWidget
|
||||
QShortcut* shortcut = new QShortcut( QKeySequence( QKeySequence::Find ), this );
|
||||
QObject::connect( shortcut, SIGNAL( activated() ), m_searchWidget, SLOT( setFocus() ) );
|
||||
|
||||
m_toolbar->addWidget( m_searchWidget )->setProperty( "kind", QString( "search" ) );
|
||||
|
||||
QWidget* rightSpacer = new QWidget( this );
|
||||
@ -440,6 +437,29 @@ TomahawkWindow::setupSideBar()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::setupStatusBar()
|
||||
{
|
||||
statusBar()->addPermanentWidget( m_audioControls, 1 );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::setupShortcuts()
|
||||
{
|
||||
{
|
||||
// Use Ctrl+F to focus the searchWidget
|
||||
QShortcut* shortcut = new QShortcut( QKeySequence( QKeySequence::Find ), this );
|
||||
QObject::connect( shortcut, SIGNAL( activated() ), m_searchWidget, SLOT( setFocus() ) );
|
||||
}
|
||||
{
|
||||
// Use Ctrl+W to close current page
|
||||
QShortcut* shortcut = new QShortcut( QKeySequence( QKeySequence::Close ), this );
|
||||
QObject::connect( shortcut, SIGNAL( activated() ), ViewManager::instance(), SLOT( destroyCurrentPage() ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::setupUpdateCheck()
|
||||
{
|
||||
|
@ -154,6 +154,8 @@ private:
|
||||
void setupMenuBar();
|
||||
void setupToolBar();
|
||||
void setupSideBar();
|
||||
void setupStatusBar();
|
||||
void setupShortcuts();
|
||||
void setupUpdateCheck();
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
|
Loading…
x
Reference in New Issue
Block a user