[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenetwork/kopete/kopete
From: Martijn Klingens <klingens () kde ! org>
Date: 2003-10-19 13:19:09
[Download RAW message or body]
CVS commit by mklingens:
Store plugin config properly when adding/removing plugins from DCOP or the
Add Account Wizard.
Fixes problem reported by
CCMAIL: Jason Harris <jharris@30doradus.org>
M +24 -10 kopeteiface.cpp 1.31
M +6 -7 config/accounts/addaccountwizard.cpp 1.10
--- kdenetwork/kopete/kopete/kopeteiface.cpp #1.30:1.31
@@ -187,18 +187,32 @@ void KopeteIface::disconnect(const QStri
}
-bool KopeteIface::loadPlugin( const QString& name )
+bool KopeteIface::loadPlugin( const QString &name )
{
- QString argument=name;
+ if ( KopetePluginManager::self()->setPluginEnabled( name ) )
+ {
+ QString argument = name;
if ( !argument.startsWith( "kopete_" ) )
argument.prepend( "kopete_" );
- return KopetePluginManager::self()->loadPlugin(argument);
+ return KopetePluginManager::self()->loadPlugin( argument );
+ }
+ else
+ {
+ return false;
+ }
}
-bool KopeteIface::unloadPlugin( const QString& name )
+bool KopeteIface::unloadPlugin( const QString &name )
{
- QString argument=name;
+ if ( KopetePluginManager::self()->setPluginEnabled( name, false ) )
+ {
+ QString argument = name;
if ( !argument.startsWith( "kopete_" ) )
argument.prepend( "kopete_" );
return KopetePluginManager::self()->unloadPlugin( argument );
+ }
+ else
+ {
+ return false;
+ }
}
--- kdenetwork/kopete/kopete/config/accounts/addaccountwizard.cpp #1.9:1.10
@@ -156,7 +156,6 @@ void AddAccountWizard::next()
{
kdDebug( 14100 ) << k_funcinfo << "Trying to load plugin " \
<< m_protocolItems[ lvi ]->pluginName() << " by name" << endl;
- KopetePlugin *pl = KopetePluginManager::self()->loadPlugin( \
m_protocolItems[ lvi ]->pluginName() );
-
- m_proto = dynamic_cast<KopeteProtocol *>( pl );
+ KopetePluginManager::self()->setPluginEnabled( \
m_protocolItems[ lvi ]->pluginName() ); + m_proto = \
dynamic_cast<KopeteProtocol *>( KopetePluginManager::self()->loadPlugin( \
m_protocolItems[ lvi ]->pluginName() ) ); if ( m_proto )
{
@@ -190,13 +189,13 @@ void AddAccountWizard::next()
else
{
- KMessageBox::queuedMessageBox( this, \
KMessageBox::Error, i18n( "Impossible to load the protocol `%1'." ).arg( \
m_protocolItems[ lvi ]->name() ),
- i18n( "Error While Adding Account" ) );
+ KMessageBox::queuedMessageBox( this, \
KMessageBox::Error, + i18n( "Impossible to \
load the protocol '%1'." ).arg( m_protocolItems[ lvi ]->name() ), i18n( "Error While \
Adding Account" ) ); }
}
return;
}
- else if( indexOf( currentPage() ) == 2 )
+ else if ( indexOf( currentPage() ) == 2 )
{
- if( !m_accountPage->validateData() )
+ if ( !m_accountPage->validateData() )
return;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic