1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-19 07:22:32 +02:00

twitter account showing a config dialog

This commit is contained in:
Jeff Mitchell 2011-09-24 17:53:58 -04:00
parent 88350b6a6c
commit abd7edab36
3 changed files with 14 additions and 2 deletions

View File

@ -113,8 +113,10 @@ protected:
{
case InfoType:
m_types << "InfoType";
break;
case SipType:
m_types << "SipType";
break;
}
}
syncConfig();

View File

@ -144,13 +144,21 @@ void
AccountManager::loadFromConfig()
{
QStringList pluginIds = TomahawkSettings::instance()->accountPlugins();
//FIXME: this is just for debugging
if ( pluginIds.isEmpty() )
{
Account* account = m_accountFactories[ "twitteraccount" ]->createAccount();
addAccountPlugin( account );
}
foreach( const QString& pluginId, pluginIds )
{
QString pluginFactory = factoryFromId( pluginId );
if( m_accountFactories.contains( pluginFactory ) )
{
Account* a = loadPlugin( pluginId );
addAccountPlugin( a );
Account* account = loadPlugin( pluginId );
addAccountPlugin( account );
}
}
}
@ -173,6 +181,7 @@ AccountManager::loadPlugin( const QString& pluginId )
void
AccountManager::addAccountPlugin( Account* account )
{
tDebug() << Q_FUNC_INFO << "adding account plugin";
m_accounts.append( account );
foreach( AccountType type, account->types() )

View File

@ -506,6 +506,7 @@ TomahawkApp::initSIP()
{
foreach ( Tomahawk::Accounts::Account* account, Tomahawk::Accounts::AccountManager::instance()->getAccounts() )
{
tDebug() << Q_FUNC_INFO << "testing account with name " << account->accountServiceName();
if ( account->configurationWidget() )
account->configurationWidget()->show();
}