From bd30bb6ca98374b37db20d14a41542c21acdd5e0 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Fri, 13 Nov 2009 21:03:19 +0000 Subject: 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 --- src/dolphinviewcontainer.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/dolphinviewcontainer.cpp') 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 { -- cgit v1.3