Reload scripts after saving in scripts KCM
DBus call to start scripting again. This should adjust the state of loaded scripts to the saved selection in the KPluginSelector. REVIEW: 104876
This commit is contained in:
parent
04701b3057
commit
36932d3f2e
2 changed files with 8 additions and 2 deletions
|
@ -21,6 +21,9 @@
|
|||
#include "ui_module.h"
|
||||
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtDBus/QDBusConnection>
|
||||
#include <QtDBus/QDBusMessage>
|
||||
#include <QtDBus/QDBusPendingCall>
|
||||
|
||||
#include <KDE/KAboutData>
|
||||
#include <KDE/KPluginFactory>
|
||||
|
@ -96,6 +99,7 @@ void Module::updateListViewContents()
|
|||
void Module::defaults()
|
||||
{
|
||||
ui->scriptSelector->defaults();
|
||||
emit changed(true);
|
||||
}
|
||||
|
||||
void Module::load()
|
||||
|
@ -109,7 +113,9 @@ void Module::load()
|
|||
void Module::save()
|
||||
{
|
||||
ui->scriptSelector->save();
|
||||
// TODO: reload scripts in KWin
|
||||
m_kwinConfig->sync();
|
||||
QDBusMessage message = QDBusMessage::createMethodCall("org.kde.kwin", "/Scripting", "org.kde.kwin.Scripting", "start");
|
||||
QDBusConnection::sessionBus().asyncCall(message);
|
||||
|
||||
emit changed(false);
|
||||
}
|
||||
|
|
|
@ -202,7 +202,7 @@ public:
|
|||
|
||||
public Q_SLOTS:
|
||||
void scriptDestroyed(QObject *object);
|
||||
void start();
|
||||
Q_SCRIPTABLE void start();
|
||||
|
||||
private Q_SLOTS:
|
||||
void slotScriptsQueried();
|
||||
|
|
Loading…
Reference in a new issue