[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: KDE/kdebase/workspace/plasma/desktop/shell
From: Chani Armitage <chanika () gmail ! com>
Date: 2010-11-08 9:24:30
Message-ID: 20101108092430.5D25CAC89B () svn ! kde ! org
[Download RAW message or body]
SVN commit 1194120 by chani:
containments with invalid ID are deleted instead of respawning
(unless the activitymanager is down, of course)
do you think I should do the same for all orphans, if a migration has
already happened?
CCMAIL:plasma-devel@kde.org
M +9 -11 desktopcorona.cpp
--- trunk/KDE/kdebase/workspace/plasma/desktop/shell/desktopcorona.cpp #1194119:1194120
@@ -533,9 +533,8 @@
QStringList newActivities;
QString newCurrentActivity;
- QHash<QString,QString> invalidIds;
//migration checks:
- //-containments with an invalid id are given a new one and kept together.
+ //-containments with an invalid id are deleted.
//-containments that claim they were on a screen are kept together, and are preferred if we
//need to initialize the current activity.
//-containments that don't know where they were or who they were with just get made into their
@@ -548,15 +547,13 @@
QString oldId = context->currentActivityId();
if (!oldId.isEmpty()) {
if (existingActivities.contains(oldId)) {
- continue;
+ continue; //it's already claimed
}
kDebug() << "invalid id" << oldId;
- if (invalidIds.contains(oldId)) {
- //it belongs with one of the already-rescued ones
- context->setCurrentActivityId(invalidIds.value(oldId));
+ //byebye
+ cont->destroy(false);
continue;
}
- }
if (cont->screen() > -1) {
//it belongs on the current activity
if (!newCurrentActivity.isEmpty()) {
@@ -572,9 +569,6 @@
QString id = m_activityController->addActivity(context->currentActivity());
context->setCurrentActivityId(id);
newActivities << id;
- if (!oldId.isEmpty()) {
- invalidIds.insert(oldId, id);
- }
if (cont->screen() > -1) {
newCurrentActivity = id;
}
@@ -598,7 +592,11 @@
if (existingActivities.isEmpty()) {
if (newCurrentActivity.isEmpty()) {
if (newActivities.isEmpty()) {
- kDebug() << "no activities!?! can't happen!!!";
+ kDebug() << "no activities!?! Bad activitymanager, no cookie!";
+ QString id = m_activityController->addActivity(i18n("unnamed"));
+ activityAdded(id);
+ m_activityController->setCurrentActivity(id);
+ kDebug() << "created emergency activity" << id;
} else {
m_activityController->setCurrentActivity(newActivities.first());
}
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic