mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-07 06:36:55 +02:00
* Clear window title when playback stopped.
This commit is contained in:
@@ -364,7 +364,7 @@ TomahawkWindow::setupSignals()
|
|||||||
|
|
||||||
// Menus for accounts that support them
|
// Menus for accounts that support them
|
||||||
connect( AccountManager::instance(), SIGNAL( added( Tomahawk::Accounts::Account* ) ), this, SLOT( onAccountAdded( Tomahawk::Accounts::Account* ) ) );
|
connect( AccountManager::instance(), SIGNAL( added( Tomahawk::Accounts::Account* ) ), this, SLOT( onAccountAdded( Tomahawk::Accounts::Account* ) ) );
|
||||||
foreach( Account* account, AccountManager::instance()->accounts( Tomahawk::Accounts::SipType ) )
|
foreach ( Account* account, AccountManager::instance()->accounts( Tomahawk::Accounts::SipType ) )
|
||||||
{
|
{
|
||||||
if ( !account || !account->sipPlugin() )
|
if ( !account || !account->sipPlugin() )
|
||||||
continue;
|
continue;
|
||||||
@@ -442,7 +442,7 @@ TomahawkWindow::keyPressEvent( QKeyEvent* e )
|
|||||||
{
|
{
|
||||||
bool accept = true;
|
bool accept = true;
|
||||||
#if ! defined ( Q_WS_MAC )
|
#if ! defined ( Q_WS_MAC )
|
||||||
#define KEY_PRESSED Q_FUNC_INFO << "Multimedia Key Pressed: "
|
#define KEY_PRESSED Q_FUNC_INFO << "Multimedia Key Pressed:"
|
||||||
switch( e->key() )
|
switch( e->key() )
|
||||||
{
|
{
|
||||||
case Qt::Key_MediaPlay:
|
case Qt::Key_MediaPlay:
|
||||||
@@ -477,7 +477,7 @@ TomahawkWindow::keyPressEvent( QKeyEvent* e )
|
|||||||
accept = false;
|
accept = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(accept)
|
if ( accept )
|
||||||
e->accept();
|
e->accept();
|
||||||
|
|
||||||
QMainWindow::keyPressEvent( e );
|
QMainWindow::keyPressEvent( e );
|
||||||
@@ -570,9 +570,9 @@ TomahawkWindow::pluginMenuAdded( QMenu* menu )
|
|||||||
void
|
void
|
||||||
TomahawkWindow::pluginMenuRemoved( QMenu* menu )
|
TomahawkWindow::pluginMenuRemoved( QMenu* menu )
|
||||||
{
|
{
|
||||||
foreach( QAction* action, ui->menuNetwork->actions() )
|
foreach ( QAction* action, ui->menuNetwork->actions() )
|
||||||
{
|
{
|
||||||
if( action->menu() == menu )
|
if ( action->menu() == menu )
|
||||||
{
|
{
|
||||||
ui->menuNetwork->removeAction( action );
|
ui->menuNetwork->removeAction( action );
|
||||||
return;
|
return;
|
||||||
@@ -760,8 +760,14 @@ TomahawkWindow::audioStarted()
|
|||||||
void
|
void
|
||||||
TomahawkWindow::audioStopped()
|
TomahawkWindow::audioStopped()
|
||||||
{
|
{
|
||||||
|
|
||||||
ui->actionPlay->setText( tr( "Play" ) );
|
ui->actionPlay->setText( tr( "Play" ) );
|
||||||
|
|
||||||
|
tDebug() << Q_FUNC_INFO << AudioEngine::instance()->isStopped();
|
||||||
|
if ( AudioEngine::instance()->isStopped() )
|
||||||
|
{
|
||||||
|
m_currentTrack = result_ptr();
|
||||||
|
setWindowTitle( m_windowTitle );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -797,6 +803,7 @@ TomahawkWindow::onAccountAdded( Account* acc )
|
|||||||
connect( acc->sipPlugin(), SIGNAL( removeMenu( QMenu* ) ), this, SLOT( pluginMenuRemoved( QMenu* ) ) );
|
connect( acc->sipPlugin(), SIGNAL( removeMenu( QMenu* ) ), this, SLOT( pluginMenuRemoved( QMenu* ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TomahawkWindow::onAccountError()
|
TomahawkWindow::onAccountError()
|
||||||
{
|
{
|
||||||
@@ -806,7 +813,7 @@ TomahawkWindow::onAccountError()
|
|||||||
// TODO real error message from plugin kthxbbq
|
// TODO real error message from plugin kthxbbq
|
||||||
QMessageBox::warning( this,
|
QMessageBox::warning( this,
|
||||||
tr( "Authentication Error" ),
|
tr( "Authentication Error" ),
|
||||||
QString( "Error connecting to SIP: Authentication failed!" ),
|
tr( "Error connecting to SIP: Authentication failed!" ),
|
||||||
QMessageBox::Ok );
|
QMessageBox::Ok );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user