[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/applets/kickoff/simpleapplet
From: Sebastian Sauer <mail () dipe ! org>
Date: 2008-02-05 14:57:24
Message-ID: 1202223444.163310.31763.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 771241 by sebsauer:
then let's use the right(TM) fix, thanks dfaure :)
M +13 -16 simpleapplet.cpp
--- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/simpleapplet/simpleapplet.cpp \
#771240:771241 @@ -305,11 +305,11 @@
d->menuview->addSeparator();
QAction *switchaction = \
d->menuview->addAction(KIcon("system-switch-user"),i18n("Switch \
User"));
- switchaction->setData(QUrl("leave:/switch"));
+ switchaction->setData(KUrl("leave:/switch"));
QAction *lockaction = \
d->menuview->addAction(KIcon("system-lock-screen"),i18n("Lock"));
- lockaction->setData(QUrl("leave:/lock"));
+ lockaction->setData(KUrl("leave:/lock"));
QAction *logoutaction = \
d->menuview->addAction(KIcon("system-log-out"),i18n("Logout"));
- logoutaction->setData(QUrl("leave:/logout"));
+ logoutaction->setData(KUrl("leave:/logout"));
} break;
case Favorites: {
Kickoff::MenuView *favview = d->createMenuView(new \
Kickoff::FavoritesModel(d->menuview)); @@ -343,21 +343,18 @@
void MenuLauncherApplet::actionTriggered(QAction *action)
{
- if (action->data().type() == QVariant::Url) {
- KUrl url = action->data().toUrl();
- if (url.scheme() == "leave") {
- if ( ! d->launcher ) {
- d->launcher = new Kickoff::UrlItemLauncher(d->menuview);
- }
- d->launcher->openUrl(url.url());
+ KUrl url = action->data().value<KUrl>();
+ if (url.scheme() == "leave") {
+ if ( ! d->launcher ) {
+ d->launcher = new Kickoff::UrlItemLauncher(d->menuview);
}
+ d->launcher->openUrl(url.url());
+ return;
}
- else {
- for(QWidget* w = action->parentWidget(); w; w = w->parentWidget()) {
- if (Kickoff::MenuView *view = dynamic_cast<Kickoff::MenuView*>(w)) {
- view->actionTriggered(action);
- break;
- }
+ for(QWidget* w = action->parentWidget(); w; w = w->parentWidget()) {
+ if (Kickoff::MenuView *view = dynamic_cast<Kickoff::MenuView*>(w)) {
+ view->actionTriggered(action);
+ break;
}
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic