[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/applets/tasks
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2009-05-25 7:55:59
Message-ID: 1243238159.451400.15734.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 972519 by aseigo:
add the popup to the list of windows to not show (the window task item path is \
essentially a no-op right now, but at least this will work if other code changes in \
the future) BUG:193997
M +31 -25 abstracttaskitem.cpp
M +5 -0 taskgroupitem.cpp
M +1 -0 taskgroupitem.h
--- trunk/KDE/kdebase/workspace/plasma/applets/tasks/abstracttaskitem.cpp \
#972518:972519 @@ -377,25 +377,42 @@
update();
} else if (event->timerId() == m_hoverEffectTimerId) {
#ifdef Q_WS_X11
- QList<TaskManager::TaskItem *> windows;
+ QList<WId> windows;
if (m_abstractItem->isGroupItem()) {
- foreach (AbstractGroupableItem *item,
- \
static_cast<TaskManager::TaskGroup*>(m_abstractItem)->members()) {
- if (item->isGroupItem()) {
- //TODO: recurse through sub-groups?
- } else {
- TaskManager::TaskItem *taskItem = \
static_cast<TaskManager::TaskItem*>(item);
- if (taskItem->task()) {
- windows.append(taskItem);
+ TaskManager::TaskGroup *group = qobject_cast<TaskManager::TaskGroup \
*>(m_abstractItem); +
+ if (group) {
+ TaskGroupItem *groupItem = qobject_cast<TaskGroupItem *>(this);
+ if (groupItem && groupItem->popupDialog()) {
+ kDebug() << "adding" << groupItem->popupDialog()->winId();
+ windows.append(groupItem->popupDialog()->winId());
+ }
+
+ foreach (AbstractGroupableItem *item, group->members()) {
+ if (item->isGroupItem()) {
+ //TODO: recurse through sub-groups?
+ } else {
+ TaskManager::TaskItem *taskItem = \
qobject_cast<TaskManager::TaskItem *>(item); + if (taskItem && \
taskItem->task()) { + \
windows.append(taskItem->task()->window()); + }
}
}
}
} else {
- TaskManager::TaskItem *taskItem = \
static_cast<TaskManager::TaskItem*>(m_abstractItem);
- if (taskItem->task()) {
- windows.append(taskItem);
+ WindowTaskItem *windowTaskItem = qobject_cast<WindowTaskItem *>(this);
+ if (windowTaskItem && windowTaskItem->parent()) {
+ TaskGroupItem *groupItem = qobject_cast<TaskGroupItem \
*>(windowTaskItem->parent()); + if (groupItem && \
groupItem->popupDialog()) { + \
windows.append(groupItem->popupDialog()->winId()); + }
}
+
+ TaskManager::TaskItem *taskItem = qobject_cast<TaskManager::TaskItem \
*>(m_abstractItem); + if (taskItem && taskItem->task()) {
+ windows.append(taskItem->task()->window());
+ }
}
const int numWindows = windows.count();
@@ -404,19 +421,8 @@
//kDebug() << "setting for" << numWindows;
int actualCount = 0;
for (int i = 0; i < numWindows; ++i) {
- TaskManager::TaskItem *item = windows.at(i);
-
- // we've already checked that the item has a task in the foreach above
- // but this bit of paranoia should lock the deal; the checks in the \
foreach
- // above will help prevent call to data.resize below from happening,
- // but this should catch any odd events that might happen; afaict this \
is
- // currently impossible, but it's too easy to introduce such situations \
in the
- // future with modifications to the code above this and it's easy to do
- // the check here. better safe than sorry, right? :) - aseigo
- if (item->task()) {
- data[i] = item->task()->window();
- ++actualCount;
- }
+ data[i] = windows.at(i);
+ ++actualCount;
}
if (actualCount != numWindows) {
--- trunk/KDE/kdebase/workspace/plasma/applets/tasks/taskgroupitem.cpp #972518:972519
@@ -1228,5 +1228,10 @@
}
}
+QWidget *TaskGroupItem::popupDialog() const
+{
+ return m_popupDialog;
+}
+
#include "taskgroupitem.moc"
--- trunk/KDE/kdebase/workspace/plasma/applets/tasks/taskgroupitem.h #972518:972519
@@ -109,6 +109,7 @@
void setAdditionalMimeData(QMimeData* mimeData);
void publishIconGeometry() const;
void publishIconGeometry(const QRect &rect) const;
+ QWidget *popupDialog() const;
signals:
/** Emitted when a window is selected for activation, minimization, \
iconification */
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic