┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-06-08 14:14:34 +0000
committerPeter Penz <[email protected]>2007-06-08 14:14:34 +0000
commit6dddb2e81c6b7f3cfc2a7e9d26fab407f7bc85e6 (patch)
tree74e52b10e698695dd390aceeb3c52fe661f49b08 /src
parent3a053415f9d7f8ae635e660f2a1537617feeff40 (diff)
added signals errorMessage(const QString&) and infoMessage(const QString&) for the DolphinView
svn path=/trunk/KDE/kdebase/apps/; revision=672944
Diffstat (limited to 'src')
-rw-r--r--src/dolphinview.cpp21
-rw-r--r--src/dolphinview.h15
-rw-r--r--src/dolphinviewcontainer.cpp7
3 files changed, 25 insertions, 18 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp
index 0154453b6..ae56c6ea2 100644
--- a/src/dolphinview.cpp
+++ b/src/dolphinview.cpp
@@ -58,8 +58,7 @@ DolphinView::DolphinView(QWidget* parent,
KDirLister* dirLister,
KDirModel* dirModel,
DolphinSortFilterProxyModel* proxyModel,
- Mode mode,
- bool showHiddenFiles) :
+ Mode mode) :
QWidget(parent),
m_active(true),
m_blockContentsMovedSignal(false),
@@ -542,15 +541,12 @@ void DolphinView::emitSelectionChangedSignal()
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;
}
@@ -679,9 +675,6 @@ void DolphinView::setUrl(const KUrl& url)
startDirLister(url);
emit urlChanged(url);
-
- // TODO: temporary deactivated due to DolphinView/DolphinViewController split
- //m_statusBar->clear();
}
void DolphinView::changeSelection(const KFileItemList& selection)
diff --git a/src/dolphinview.h b/src/dolphinview.h
index 97ab01dad..bcccb7404 100644
--- a/src/dolphinview.h
+++ b/src/dolphinview.h
@@ -123,8 +123,7 @@ public:
KDirLister* dirLister,
KDirModel* dirModel,
DolphinSortFilterProxyModel* proxyModel,
- Mode mode = IconsView,
- bool showHiddenFiles = false);
+ Mode mode);
virtual ~DolphinView();
@@ -373,6 +372,18 @@ signals:
*/
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);
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp
index 8eab3efac..a2a899bea 100644
--- a/src/dolphinviewcontainer.cpp
+++ b/src/dolphinviewcontainer.cpp
@@ -131,8 +131,7 @@ DolphinViewContainer::DolphinViewContainer(DolphinMainWindow* mainWindow,
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&)),
@@ -141,6 +140,10 @@ DolphinViewContainer::DolphinViewContainer(DolphinMainWindow* mainWindow,
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&)));