[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/krunner
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2008-02-19 19:35:28
Message-ID: 1203449728.604931.32503.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 777118 by aseigo:
always make the highest ranked item the default
M +8 -6 interface.cpp
--- trunk/KDE/kdebase/workspace/krunner/interface.cpp #777117:777118
@@ -595,14 +595,16 @@
m_defaultMatch = 0;
foreach (const Plasma::SearchMatch *action, m_context.matches()) {
- bool makeDefault = !m_defaultMatch && action->isEnabled();
-
SearchMatch *match = new SearchMatch(action, m_matchList);
- if (makeDefault &&
- action->relevance() > 0 &&
+ if (action->isEnabled() && action->relevance() > 0 &&
+ (!m_defaultMatch || *m_defaultMatch < *match) &&
(action->type() != Plasma::SearchMatch::InformationalMatch ||
- !action->data().toString().isEmpty())) {
+ !action->data().toString().isEmpty())) {
+ if (m_defaultMatch) {
+ m_defaultMatch->setDefault(false);
+ }
+
match->setDefault(true);
m_defaultMatch = match;
m_optionsButton->setEnabled(action->runner()->hasMatchOptions());
@@ -613,7 +615,7 @@
m_matchList->sortItems(Qt::DescendingOrder);
if (!m_defaultMatch) {
- if (m_execQueued && Weaver::instance()->isIdle() ) {
+ if (m_execQueued && Weaver::instance()->isIdle()) {
m_execQueued = false;
}
showOptions(false);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic