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

List:       kde-commits
Subject:    KDE/kdebase/workspace/libs/taskmanager
From:       Anton Kreuzkamp <akreuzkamp () web ! de>
Date:       2010-11-14 7:50:13
Message-ID: 20101114075013.0B167AC89E () svn ! kde ! org
[Download RAW message or body]

SVN commit 1196777 by akreuzkamp:

Fixes three bugs that caused the launchers not to work

 M  +19 -4     groupmanager.cpp  
 M  +2 -0      strategies/programgroupingstrategy.cpp  


--- trunk/KDE/kdebase/workspace/libs/taskmanager/groupmanager.cpp #1196776:1196777
@@ -130,9 +130,6 @@
     d->currentDesktop = TaskManager::self()->currentDesktop();
     d->currentActivity = TaskManager::self()->currentActivity();
 
-    connect(d->currentRootGroup(), SIGNAL(itemAdded(AbstractGroupableItem*)), this, \
                SLOT(updateLauncher(AbstractGroupableItem*)));
-    connect(d->currentRootGroup(), SIGNAL(itemRemoved(AbstractGroupableItem*)), \
                this, SLOT(updateLauncher(AbstractGroupableItem*)));
-
     d->rootGroups[d->currentActivity][d->currentDesktop] = new TaskGroup(this, \
"RootGroup", Qt::transparent);  
     d->reloadTimer.setSingleShot(true);
@@ -314,6 +311,8 @@
     }
     geometryTasks.insert(task.data());
 
+	q->updateLauncher(item);
+	
     return true;
 }
 
@@ -335,6 +334,8 @@
         item->parentGroup()->remove(item);
     }
 
+    q->updateLauncher(item);
+
     //the item must exist as long as the TaskPtr does because of activate calls so \
don't delete the item here, it will delete itself.  }
 
@@ -407,6 +408,13 @@
 
     currentActivity = newActivity;
 
+    foreach (AbstractGroupableItem *item, launcherAssociations.values()) {
+        if (item->itemType() == LauncherItemType)
+        {
+            rootGroups[currentActivity][currentDesktop]->add(item);
+        }
+    }
+
     if (onlyGroupWhenFull) {
         QObject::connect(currentRootGroup(), SIGNAL(itemAdded(AbstractGroupableItem \
                *)), q, SLOT(checkIfFull()));
         QObject::connect(currentRootGroup(), \
SIGNAL(itemRemoved(AbstractGroupableItem *)), q, SLOT(checkIfFull())); @@ -441,6 \
+449,13 @@  
     currentDesktop = newDesktop;
 
+	foreach (AbstractGroupableItem *item, launcherAssociations.values()) {
+        if (item->itemType() == LauncherItemType)
+        {
+            rootGroups[currentActivity][currentDesktop]->add(item);
+        }
+	}
+
     if (onlyGroupWhenFull) {
         QObject::connect(currentRootGroup(), SIGNAL(itemAdded(AbstractGroupableItem \
                *)), q, SLOT(checkIfFull()));
         QObject::connect(currentRootGroup(), \
SIGNAL(itemRemoved(AbstractGroupableItem *)), q, SLOT(checkIfFull())); @@ -606,7 \
+621,7 @@  rootGroup->remove(launcher);
                     }
                 }
-            } else if (!d->currentRootGroup()->members().contains(launcher) && \
d->launcherAssociations.values(name).length() == 1) { // Launcher isn't shown but the \
isn't running +            } else if \
(!d->currentRootGroup()->members().contains(launcher) && \
d->launcherAssociations.values(name).length() == 1) { // Launcher isn't shown but the \
task isn't running  typedef QHash<int,TaskGroup*> Metagroup;
                 foreach (Metagroup metagroup, d->rootGroups) {
                     foreach (TaskGroup *rootGroup, metagroup) {
--- trunk/KDE/kdebase/workspace/libs/taskmanager/strategies/programgroupingstrategy.cpp \
#1196776:1196777 @@ -204,6 +204,7 @@
             //TODO: maybe add the condition that the subgroup was created by \
                programGrouping?
             if (programGrouping(taskItem, static_cast<TaskGroup*>(item))) {
                 //kDebug() << "joined subGroup";
+                rootGroup()->add(taskItem);
                 return true;
             }
         } else {
@@ -229,6 +230,7 @@
             groupItem->add(taskItem);
         }
 
+		rootGroup()->add(taskItem);
         return true;
     }
 


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

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