KDirLister* dirLister,
KDirModel* dirModel,
DolphinSortFilterProxyModel* proxyModel,
- Mode mode,
- bool showHiddenFiles) :
+ Mode mode) :
QWidget(parent),
m_active(true),
m_blockContentsMovedSignal(false),
void DolphinView::startDirLister(const KUrl& url, bool reload)
{
if (!url.isValid()) {
- // TODO: temporary deactivated due to DolphinView/DolphinViewController split
-
- //const QString location(url.pathOrUrl());
- //if (location.isEmpty()) {
- // m_statusBar->setMessage(i18n("The location is empty."), DolphinStatusBar::Error);
- //} else {
- // m_statusBar->setMessage(i18n("The location '%1' is invalid.", location),
- // DolphinStatusBar::Error);
- //}
+ const QString location(url.pathOrUrl());
+ if (location.isEmpty()) {
+ emit errorMessage(i18n("The location is empty."));
+ } else {
+ emit errorMessage(i18n("The location '%1' is invalid.", location));
+ }
return;
}
startDirLister(url);
emit urlChanged(url);
-
- // TODO: temporary deactivated due to DolphinView/DolphinViewController split
- //m_statusBar->clear();
}
void DolphinView::changeSelection(const KFileItemList& selection)
KDirLister* dirLister,
KDirModel* dirModel,
DolphinSortFilterProxyModel* proxyModel,
- Mode mode = IconsView,
- bool showHiddenFiles = false);
+ Mode mode);
virtual ~DolphinView();
*/
void urlsDropped(const KUrl::List& urls, const KUrl& destination);
+ /**
+ * Is emitted if an information message with the content \a msg
+ * should be shown.
+ */
+ void infoMessage(const QString& msg);
+
+ /**
+ * Is emitted if an error message with the content \a msg
+ * should be shown.
+ */
+ void errorMessage(const QString& msg);
+
protected:
/** @see QWidget::mouseReleaseEvent */
virtual void mouseReleaseEvent(QMouseEvent* event);
m_dirLister,
m_dirModel,
m_proxyModel,
- mode,
- showHiddenFiles);
+ mode);
connect(m_view, SIGNAL(urlChanged(const KUrl&)),
m_urlNavigator, SLOT(setUrl(const KUrl&)));
connect(m_view, SIGNAL(requestContextMenu(KFileItem*, const KUrl&)),
m_mainWindow, SLOT(dropUrls(const KUrl::List&, const KUrl&)));
connect(m_view, SIGNAL(requestItemInfo(const KUrl&)),
this, SLOT(showItemInfo(const KUrl&)));
+ connect(m_view, SIGNAL(errorMessage(const QString&)),
+ this, SLOT(showErrorMessage(const QString&)));
+ connect(m_view, SIGNAL(infoMessage(const QString&)),
+ this, SLOT(showInfoMessage(const QString&)));
connect(m_urlNavigator, SIGNAL(urlChanged(const KUrl&)),
m_view, SLOT(setUrl(const KUrl&)));