[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Different activities for each desktop KCM
From:       Marco Martin <notmart () gmail ! com>
Date:       2009-09-30 22:08:38
Message-ID: 200910010008.38247.notmart () gmail ! com
[Download RAW message or body]

Hi all,
i noticed in the kwin multiple desktops config there is a checkbox for 
enabling the  different activities for each desktop thing in plasma, but it 
was a but uuh, fake.
this patch enables it, using a new plasma dbus call done for that.

Cheers,
Marco Martin

["activityforeachdesktop.diff" (text/x-patch)]

Index: main.ui
===================================================================
--- main.ui	(revision 1027345)
+++ main.ui	(working copy)
@@ -84,9 +84,6 @@
           </item>
           <item row="2" column="0" colspan="2">
            <widget class="QCheckBox" name="activityCheckBox">
-            <property name="enabled">
-             <bool>false</bool>
-            </property>
             <property name="text">
              <string>Different activity for each desktop</string>
             </property>
Index: main.cpp
===================================================================
--- main.cpp	(revision 1027345)
+++ main.cpp	(working copy)
@@ -22,6 +22,7 @@
 
 #include <QDBusMessage>
 #include <QDBusConnection>
+#include <QDBusInterface>
 
 #include <KAboutApplicationDialog>
 #include <KActionCollection>
@@ -286,6 +287,10 @@
     slotEffectSelectionChanged( m_ui->effectComboBox->currentIndex() );
     // TODO: plasma stuff
 
+    QDBusInterface interface("org.kde.plasma-desktop", "/App");
+    bool perVirtualDesktopViews = interface.call("perVirtualDesktopViews").arguments().first().toBool();
+    m_ui->activityCheckBox->setChecked(perVirtualDesktopViews);
+
     emit changed(false);
     }
 
@@ -353,6 +358,9 @@
     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);
     }
 


_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic