┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinviewcontainer.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2009-11-13 21:03:19 +0000
committerPeter Penz <[email protected]>2009-11-13 21:03:19 +0000
commitbd30bb6ca98374b37db20d14a41542c21acdd5e0 (patch)
tree276188af9fe38b22cd6698a53269fcffac318736 /src/dolphinviewcontainer.cpp
parenta87760d22c0213306380322ec6d9e23809ee4c93 (diff)
search finetuning:
* trigger progress information when starting a search * let the information panel hide the meta data for the search string * get the search string from the configurator svn path=/trunk/KDE/kdebase/apps/; revision=1048721
Diffstat (limited to 'src/dolphinviewcontainer.cpp')
-rw-r--r--src/dolphinviewcontainer.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp
index 7bb4b7bec..bdeaab258 100644
--- a/src/dolphinviewcontainer.cpp
+++ b/src/dolphinviewcontainer.cpp
@@ -112,6 +112,8 @@ DolphinViewContainer::DolphinViewContainer(DolphinMainWindow* mainWindow,
m_proxyModel->setSourceModel(m_dolphinModel);
m_proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
+ connect(m_dirLister, SIGNAL(started(KUrl)),
+ this, SLOT(initializeProgress()));
connect(m_dirLister, SIGNAL(clear()),
this, SLOT(delayedStatusBarUpdate()));
connect(m_dirLister, SIGNAL(percent(int)),
@@ -266,7 +268,7 @@ void DolphinViewContainer::updateStatusBar()
// - shows already the item count information or
// - shows only a not very important information
// - if any progress is given don't show the item count info at all
- const QString msg(m_statusBar->message());
+ const QString msg = m_statusBar->message();
const bool updateStatusBarMsg = (msg.isEmpty()
|| (msg == m_statusBar->defaultText())
|| (m_statusBar->type() == DolphinStatusBar::Information))
@@ -280,6 +282,16 @@ void DolphinViewContainer::updateStatusBar()
}
}
+void DolphinViewContainer::initializeProgress()
+{
+ if (m_view->url().protocol() == "nepomuksearch") {
+ // The Nepomuk IO-slave does not provide any progress information. Give
+ // an immediate hint to the user that a searching is done:
+ m_statusBar->setProgressText(i18nc("@info", "Searching..."));
+ m_statusBar->setProgress(-1);
+ }
+ }
+
void DolphinViewContainer::updateProgress(int percent)
{
if (m_statusBar->progressText().isEmpty()) {
@@ -418,7 +430,7 @@ void DolphinViewContainer::restoreView(const KUrl& url)
"Protocol not supported by Dolphin, Konqueror has been launched"));
}
- QString secureUrl = KShell::quoteArg(url.pathOrUrl());
+ const QString secureUrl = KShell::quoteArg(url.pathOrUrl());
const QString command = app + ' ' + secureUrl;
KRun::runCommand(command, app, app, this);
} else {