mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-21 08:19:42 +01:00
Show Connecting... state for jabber and in delegate
This commit is contained in:
parent
f751c1559b
commit
8d039cdc91
@ -226,8 +226,15 @@ JabberPlugin::connectPlugin( bool startup )
|
||||
void
|
||||
JabberPlugin::disconnectPlugin()
|
||||
{
|
||||
if(!m_client->isConnected())
|
||||
if (!m_client->isConnected())
|
||||
{
|
||||
if ( m_state != Disconnected ) // might be Connecting
|
||||
{
|
||||
m_state = Disconnected;
|
||||
emit stateChanged( m_state );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
foreach(const Jreen::JID &peer, m_peers.keys())
|
||||
{
|
||||
@ -366,6 +373,9 @@ QString JabberPlugin::errorMessage(Jreen::Client::DisconnectReason reason)
|
||||
break;
|
||||
}
|
||||
|
||||
m_state == Disconnected;
|
||||
emit stateChanged( m_state );
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
@ -172,9 +172,13 @@ SipConfigDelegate::paint ( QPainter* painter, const QStyleOptionViewItem& option
|
||||
|
||||
QPixmap p;
|
||||
QString statusText;
|
||||
if( index.data( SipModel::ConnectionStateRole ).toInt() == SipPlugin::Connected ) {
|
||||
SipPlugin::ConnectionState state = static_cast< SipPlugin::ConnectionState >( index.data( SipModel::ConnectionStateRole ).toInt() );
|
||||
if( state == SipPlugin::Connected ) {
|
||||
p = QPixmap( RESPATH "images/sipplugin-online.png" );
|
||||
statusText = tr( "Online" );
|
||||
} else if( state == SipPlugin::Connecting ) {
|
||||
p = QPixmap( RESPATH "images/sipplugin-offline.png" );
|
||||
statusText = tr( "Connecting..." );
|
||||
} else {
|
||||
p = QPixmap( RESPATH "images/sipplugin-offline.png" );
|
||||
statusText = tr( "Offline" );
|
||||
|
Loading…
x
Reference in New Issue
Block a user