From 0e7e1aa077728c1327b8c0869db2e3f0c24ce3f8 Mon Sep 17 00:00:00 2001 From: Chani Armitage Date: Mon, 1 Nov 2010 19:53:22 +0000 Subject: [PATCH] stop using deprecated API, and use activity icons svn path=/trunk/KDE/kdebase/workspace/; revision=1192050 --- useractions.cpp | 13 +++++++------ workspace.cpp | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/useractions.cpp b/useractions.cpp index 5309286b40..60274cd0bb 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -271,7 +271,7 @@ void Workspace::clientPopupAboutToShow() { initDesktopPopup(); } - QStringList act = activityController_.availableActivities(); + QStringList act = openActivityList(); kDebug() << "activities:" << act.size(); if ( act.size() < 2 ) { @@ -544,15 +544,16 @@ void Workspace::activityPopupAboutToShow() action->setChecked( true ); activity_popup->addSeparator(); - foreach (const QString &activity, activityController_.availableActivities()) { - QString name = KActivityInfo::name(activity); + foreach (const QString &id, openActivityList()) { + KActivityInfo activity(id); + QString name = activity.name(); name.replace('&', "&&"); - action = activity_popup->addAction( name ); - action->setData( activity ); + action = activity_popup->addAction( KIcon(activity.icon()), name ); + action->setData( id ); action->setCheckable( true ); if ( active_popup_client && - !active_popup_client->isOnAllActivities() && active_popup_client->isOnActivity(activity) ) + !active_popup_client->isOnAllActivities() && active_popup_client->isOnActivity(id) ) action->setChecked( true ); } } diff --git a/workspace.cpp b/workspace.cpp index 53384ec23d..0bd618eccf 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -373,7 +373,7 @@ void Workspace::init() } if( !setCurrentDesktop( initial_desktop )) setCurrentDesktop( 1 ); - allActivities_ = activityController_.availableActivities(); + allActivities_ = activityController_.listActivities(); updateCurrentActivity( activityController_.currentActivity() ); // Now we know how many desktops we'll have, thus we initialize the positioning object