This is the filter to apply to the file list. "
- "File names that do not match the filter will not be shown."
- "You may select from one of the preset filters in the "
- "drop down menu, or you may enter a custom filter "
- "directly into the text area.
"
- "Wildcards such as * and ? are allowed.
");
d->filterLabel = new QLabel(i18n("&Filter:"), this);
- d->filterLabel->setWhatsThis(whatsThisText);
d->filterWidget = new KFileFilterCombo(this);
// Properly let the dialog be resized (to smaller). Otherwise we could have
// huge dialogs that can't be resized to smaller (it would be as big as the longest
// item in this combo box). (ereslibre)
d->filterWidget->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength);
- d->filterWidget->setWhatsThis(whatsThisText);
d->filterLabel->setBuddy(d->filterWidget);
connect(d->filterWidget, SIGNAL(filterChanged()), SLOT(_k_slotFilterChanged()));
d->filterDelayTimer.setSingleShot(true);
d->filterDelayTimer.setInterval(300);
connect(d->filterWidget, SIGNAL(editTextChanged(QString)), &d->filterDelayTimer, SLOT(start()));
connect(&d->filterDelayTimer, SIGNAL(timeout()), SLOT(_k_slotFilterChanged()));
+ d->updateWhatsThis();
+
// the Automatically Select Extension checkbox
// (the text, visibility etc. is set in updateAutoSelectExtension(), which is called by readConfig())
d->autoSelectExtCheckBox = new QCheckBox(this);
@@ -684,6 +677,11 @@
d->locationLabel->setText(text);
}
+void KFileWidget::setFilterLabel(const QString &text)
+{
+ d->filterLabel->setText(text);
+}
+
void KFileWidget::setFilter(const QString &filter)
{
int pos = filter.indexOf('/');
@@ -1329,24 +1327,36 @@
}
}
-void KFileWidgetPrivate::updateLocationWhatsThis()
+void KFileWidgetPrivate::updateWhatsThis()
{
- QString whatsThisText;
+ QString locationWhatsThisText;
+ QString filterWhatsThisText;
if (operationMode == KFileWidget::Saving) {
- whatsThisText = "