mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Remove the "Remove folder restriction" button from the Filter Panel as discussed with Sebastian Trüg. This will be replaced by the "From Here" and "Everywhere" buttons later.
svn path=/trunk/KDE/kdebase/apps/; revision=1195690
This commit is contained in:
parent
fb501085e2
commit
e251393981
2 changed files with 1 additions and 19 deletions
|
@ -47,7 +47,6 @@ FilterPanel::FilterPanel(QWidget* parent) :
|
|||
m_initialized(false),
|
||||
m_nepomukEnabled(false),
|
||||
m_lastSetUrlStatJob(0),
|
||||
m_removeFolderRestrictionButton(0),
|
||||
m_facetWidget(0),
|
||||
m_unfacetedRestQuery()
|
||||
{
|
||||
|
@ -81,11 +80,7 @@ void FilterPanel::showEvent(QShowEvent* event)
|
|||
|
||||
if (!m_initialized) {
|
||||
QVBoxLayout* layout = new QVBoxLayout(this);
|
||||
Q_ASSERT(m_removeFolderRestrictionButton == 0);
|
||||
m_removeFolderRestrictionButton = new QPushButton(i18n("Remove folder restriction"), this);
|
||||
connect(m_removeFolderRestrictionButton, SIGNAL(clicked()), SLOT(slotRemoveFolderRestrictionClicked()));
|
||||
|
||||
layout->addWidget(m_removeFolderRestrictionButton);
|
||||
layout->setMargin(0);
|
||||
|
||||
Q_ASSERT(m_facetWidget == 0);
|
||||
m_facetWidget = new Nepomuk::Utils::FacetWidget(this);
|
||||
|
@ -162,21 +157,11 @@ void FilterPanel::slotQueryTermChanged(const Nepomuk::Query::Term& term)
|
|||
emit urlActivated(query.toSearchUrl());
|
||||
}
|
||||
|
||||
void FilterPanel::slotRemoveFolderRestrictionClicked()
|
||||
{
|
||||
Nepomuk::Query::FileQuery query(m_unfacetedRestQuery && m_facetWidget->queryTerm());
|
||||
query.setIncludeFolders(KUrl::List());
|
||||
query.setExcludeFolders(KUrl::List());
|
||||
m_facetWidget->setClientQuery(query);
|
||||
emit urlActivated(query.toSearchUrl());
|
||||
}
|
||||
|
||||
void FilterPanel::setQuery(const Nepomuk::Query::Query& query)
|
||||
{
|
||||
if (query.isValid()) {
|
||||
const bool block = m_facetWidget->blockSignals(true);
|
||||
|
||||
m_removeFolderRestrictionButton->setVisible(query.isFileQuery() && !query.toFileQuery().includeFolders().isEmpty());
|
||||
m_unfacetedRestQuery = m_facetWidget->extractFacetsFromQuery(query);
|
||||
m_facetWidget->setClientQuery(query);
|
||||
setEnabled(true);
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <panels/panel.h>
|
||||
|
||||
class KJob;
|
||||
class QPushButton;
|
||||
|
||||
namespace Nepomuk {
|
||||
namespace Utils {
|
||||
|
@ -56,7 +55,6 @@ protected:
|
|||
private slots:
|
||||
void slotSetUrlStatFinished(KJob*);
|
||||
void slotQueryTermChanged(const Nepomuk::Query::Term& term);
|
||||
void slotRemoveFolderRestrictionClicked();
|
||||
|
||||
private:
|
||||
void setQuery(const Nepomuk::Query::Query& query);
|
||||
|
@ -66,7 +64,6 @@ private:
|
|||
bool m_nepomukEnabled;
|
||||
KJob* m_lastSetUrlStatJob;
|
||||
|
||||
QPushButton* m_removeFolderRestrictionButton;
|
||||
Nepomuk::Utils::FacetWidget* m_facetWidget;
|
||||
Nepomuk::Query::Query m_unfacetedRestQuery;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue