mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-02 20:28:14 +02:00
twitter account showing a config dialog
This commit is contained in:
@@ -113,8 +113,10 @@ protected:
|
|||||||
{
|
{
|
||||||
case InfoType:
|
case InfoType:
|
||||||
m_types << "InfoType";
|
m_types << "InfoType";
|
||||||
|
break;
|
||||||
case SipType:
|
case SipType:
|
||||||
m_types << "SipType";
|
m_types << "SipType";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
syncConfig();
|
syncConfig();
|
||||||
|
@@ -144,13 +144,21 @@ void
|
|||||||
AccountManager::loadFromConfig()
|
AccountManager::loadFromConfig()
|
||||||
{
|
{
|
||||||
QStringList pluginIds = TomahawkSettings::instance()->accountPlugins();
|
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 )
|
foreach( const QString& pluginId, pluginIds )
|
||||||
{
|
{
|
||||||
QString pluginFactory = factoryFromId( pluginId );
|
QString pluginFactory = factoryFromId( pluginId );
|
||||||
if( m_accountFactories.contains( pluginFactory ) )
|
if( m_accountFactories.contains( pluginFactory ) )
|
||||||
{
|
{
|
||||||
Account* a = loadPlugin( pluginId );
|
Account* account = loadPlugin( pluginId );
|
||||||
addAccountPlugin( a );
|
addAccountPlugin( account );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -173,6 +181,7 @@ AccountManager::loadPlugin( const QString& pluginId )
|
|||||||
void
|
void
|
||||||
AccountManager::addAccountPlugin( Account* account )
|
AccountManager::addAccountPlugin( Account* account )
|
||||||
{
|
{
|
||||||
|
tDebug() << Q_FUNC_INFO << "adding account plugin";
|
||||||
m_accounts.append( account );
|
m_accounts.append( account );
|
||||||
|
|
||||||
foreach( AccountType type, account->types() )
|
foreach( AccountType type, account->types() )
|
||||||
|
@@ -506,6 +506,7 @@ TomahawkApp::initSIP()
|
|||||||
{
|
{
|
||||||
foreach ( Tomahawk::Accounts::Account* account, Tomahawk::Accounts::AccountManager::instance()->getAccounts() )
|
foreach ( Tomahawk::Accounts::Account* account, Tomahawk::Accounts::AccountManager::instance()->getAccounts() )
|
||||||
{
|
{
|
||||||
|
tDebug() << Q_FUNC_INFO << "testing account with name " << account->accountServiceName();
|
||||||
if ( account->configurationWidget() )
|
if ( account->configurationWidget() )
|
||||||
account->configurationWidget()->show();
|
account->configurationWidget()->show();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user