+ //kDebug() << oldUrl << newUrl << "currentUrl=" << url();
+ if (oldUrl.equals(url(), KUrl::CompareWithoutTrailingSlash /* #207572 */)) {
+ KParts::ReadOnlyPart::setUrl(newUrl);
+ const QString prettyUrl = newUrl.pathOrUrl();
+ emit m_extension->setLocationBarUrl(prettyUrl);
+ }
+}
+
+
+void DolphinPart::slotEditMimeType()
+{
+ const KFileItemList items = m_view->selectedItems();
+ if (!items.isEmpty()) {
+ KonqOperations::editMimeType(items.first().mimetype(), m_view);
+ }
+}
+
+void DolphinPart::slotSelectItemsMatchingPattern()
+{
+ openSelectionDialog(i18nc("@title:window", "Select"),
+ i18n("Select all items matching this pattern:"),
+ true);
+}
+
+void DolphinPart::slotUnselectItemsMatchingPattern()
+{
+ openSelectionDialog(i18nc("@title:window", "Unselect"),
+ i18n("Unselect all items matching this pattern:"),
+ false);
+}
+
+void DolphinPart::openSelectionDialog(const QString& title, const QString& text, bool selectItems)
+{
+ bool okClicked;
+ QString pattern = KInputDialog::getText(title, text, "*", &okClicked, m_view);
+
+ if (okClicked && !pattern.isEmpty()) {
+ QRegExp patternRegExp(pattern, Qt::CaseSensitive, QRegExp::Wildcard);
+ m_view->selectItems(patternRegExp, selectItems);
+ }
+}
+
+void DolphinPart::setCurrentViewMode(const QString& viewModeName)
+{
+ QAction* action = actionCollection()->action(viewModeName);
+ Q_ASSERT(action);
+ action->trigger();
+}
+
+QString DolphinPart::currentViewMode() const
+{
+ return m_actionHandler->currentViewModeActionName();
+}
+
+void DolphinPart::setNameFilter(const QString& nameFilter)
+{
+ // This is the "/home/dfaure/*.diff" kind of name filter (KDirLister::setNameFilter)
+ // which is unrelated to DolphinView::setNameFilter which is substring filtering in a proxy.
+ m_nameFilter = nameFilter;
+ // TODO save/restore name filter in saveState/restoreState like KonqDirPart did in kde3?