stop using deprecated API, and use activity icons

svn path=/trunk/KDE/kdebase/workspace/; revision=1192050
This commit is contained in:
Chani Armitage 2010-11-01 19:53:22 +00:00
parent 03165ff8eb
commit 0e7e1aa077
2 changed files with 8 additions and 7 deletions

View file

@ -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 );
}
}

View file

@ -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