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

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/generic/dataengines/tasks
From:       Matthieu Gallien <matthieu_gallien () yahoo ! fr>
Date:       2010-05-03 20:37:31
Message-ID: 20100503203731.C0712AC8AC () svn ! kde ! org
[Download RAW message or body]

SVN commit 1122423 by mgallien:

adds a new source virtualDesktops to the dataengine tasks
it contains the number of desktops and their names


 M  +1 -0      CMakeLists.txt  
 M  +11 -0     tasksengine.cpp  
 M  +1 -0      tasksengine.h  
 A             virtualdesktopssource.cpp   [License: LGPL (v2+)]
 A             virtualdesktopssource.h   [License: LGPL (v2+)]


--- trunk/KDE/kdebase/workspace/plasma/generic/dataengines/tasks/CMakeLists.txt #1122422:1122423
@@ -3,6 +3,7 @@
     tasksource.cpp
     taskservice.cpp
     taskjob.cpp
+    virtualdesktopssource.cpp
 )
 
 kde4_add_plugin(plasma_engine_tasks ${tasks_engine_SRCS})
--- trunk/KDE/kdebase/workspace/plasma/generic/dataengines/tasks/tasksengine.cpp #1122422:1122423
@@ -17,6 +17,7 @@
  */
 
 #include "tasksengine.h"
+#include "virtualdesktopssource.h"
 
 // own
 #include "tasksource.h"
@@ -109,6 +110,16 @@
     addSource(taskSource);
 }
 
+bool TasksEngine::sourceRequestEvent(const QString &source)
+{
+    if (source == "virtualDesktops") {
+        addSource(new VirtualDesktopsSource);
+        return true;
+    } else {
+        return false;
+    }
+}
+
 K_EXPORT_PLASMA_DATAENGINE(tasks, TasksEngine)
 
 #include "tasksengine.moc"
--- trunk/KDE/kdebase/workspace/plasma/generic/dataengines/tasks/tasksengine.h #1122422:1122423
@@ -56,6 +56,7 @@
         static const QString getStartupName(StartupPtr startup);
         static const QString getTaskName(TaskPtr task);
         virtual void init();
+        bool sourceRequestEvent(const QString &source);
 
     private slots:
         void startupAdded(StartupPtr startup);
[prev in list] [next in list] [prev in thread] [next in thread] 

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