diff --git a/kcmkwin/kwindesktop/main.cpp b/kcmkwin/kwindesktop/main.cpp index 55cf498a4f..5f00ee7e91 100644 --- a/kcmkwin/kwindesktop/main.cpp +++ b/kcmkwin/kwindesktop/main.cpp @@ -22,6 +22,7 @@ along with this program. If not, see . #include #include +#include #include #include @@ -285,6 +286,16 @@ void KWinDesktopConfig::load() slotEffectSelectionChanged( m_ui->effectComboBox->currentIndex() ); // TODO: plasma stuff + QDBusInterface interface( "org.kde.plasma-desktop", "/App" ); + if( interface.isValid() ) + { + bool perVirtualDesktopViews = interface.call( "perVirtualDesktopViews" ).arguments().first().toBool(); + m_ui->activityCheckBox->setEnabled( true ); + m_ui->activityCheckBox->setChecked( perVirtualDesktopViews ); + } + else + m_ui->activityCheckBox->setEnabled( false ); + emit changed(false); } @@ -350,8 +361,11 @@ void KWinDesktopConfig::save() m_config->sync(); // Send signal to all kwin instances - QDBusMessage message = QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig"); - QDBusConnection::sessionBus().send(message); + QDBusMessage message = QDBusMessage::createSignal( "/KWin", "org.kde.KWin", "reloadConfig" ); + QDBusConnection::sessionBus().send( message ); + + QDBusInterface interface( "org.kde.plasma-desktop", "/App" ); + interface.call( "setPerVirtualDesktopViews", ( m_ui->activityCheckBox->isChecked() ) ); emit changed(false); } diff --git a/kcmkwin/kwindesktop/main.ui b/kcmkwin/kwindesktop/main.ui index a41ee6adb1..cb26c70271 100644 --- a/kcmkwin/kwindesktop/main.ui +++ b/kcmkwin/kwindesktop/main.ui @@ -84,9 +84,6 @@ - - false - Different activity for each desktop