Add dbus function to show which effect can be loaded
so now all is ok to know which module can be load/unload svn path=/trunk/KDE/kdebase/workspace/; revision=815903
This commit is contained in:
parent
54ede72bf1
commit
5628d59f1f
5 changed files with 29 additions and 0 deletions
15
effects.cpp
15
effects.cpp
|
@ -721,6 +721,21 @@ QStringList EffectsHandlerImpl::loadedModules() const
|
|||
return listModules;
|
||||
}
|
||||
|
||||
|
||||
QStringList EffectsHandlerImpl::listOfModulesEffect() const
|
||||
{
|
||||
KService::List offers = KServiceTypeTrader::self()->query("KWin/Effect");
|
||||
QStringList listOfModules;
|
||||
// First unload necessary effects
|
||||
foreach( const KService::Ptr &service, offers )
|
||||
{
|
||||
KPluginInfo plugininfo( service );
|
||||
listOfModules<<plugininfo.pluginName();
|
||||
}
|
||||
return listOfModules;
|
||||
}
|
||||
|
||||
|
||||
bool EffectsHandlerImpl::loadEffect( const QString& name )
|
||||
{
|
||||
Workspace::self()->addRepaintFull();
|
||||
|
|
|
@ -142,6 +142,7 @@ class EffectsHandlerImpl : public EffectsHandler
|
|||
void reloadEffect( const QString& name );
|
||||
bool isEffectLoaded( const QString& name );
|
||||
QStringList loadedModules() const;
|
||||
QStringList listOfModulesEffect() const;
|
||||
|
||||
QList<EffectWindow*> elevatedWindows() const;
|
||||
|
||||
|
|
|
@ -50,6 +50,9 @@
|
|||
<method name="loadedModules">
|
||||
<arg type="as" direction="out"/>
|
||||
</method>
|
||||
<method name="listOfModulesEffect">
|
||||
<arg type="as" direction="out"/>
|
||||
</method>
|
||||
<method name="decorationSupportedColors">
|
||||
<arg type="ai" direction="out"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QList<int>"/>
|
||||
|
|
|
@ -742,6 +742,15 @@ QStringList Workspace::loadedModules() const
|
|||
return listModulesLoaded;
|
||||
}
|
||||
|
||||
QStringList Workspace::listOfModulesEffect() const
|
||||
{
|
||||
QStringList listModules;
|
||||
if ( effects )
|
||||
listModules = static_cast<EffectsHandlerImpl*>(effects)->listOfModulesEffect();
|
||||
return listModules;
|
||||
}
|
||||
|
||||
|
||||
void Workspace::slotActivateAttentionWindow()
|
||||
{
|
||||
if( attention_chain.count() > 0 )
|
||||
|
|
|
@ -214,6 +214,7 @@ class Workspace : public QObject, public KDecorationDefines
|
|||
void unloadEffect( const QString& name );
|
||||
|
||||
QStringList loadedModules() const;
|
||||
QStringList listOfModulesEffect() const;
|
||||
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue