[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra] active: Add empty list message
From: Shantanu Tushar <shaan7in () gmail ! com>
Date: 2012-07-02 14:53:49
Message-ID: 20120702145349.C6D1CA60A6 () git ! kde ! org
[Download RAW message or body]
Git commit d484040b2d5630a698b4f373d3aa5eacb71089e1 by Shantanu Tushar.
Committed on 02/07/2012 at 16:51.
Pushed by shantanu into branch 'master'.
Add empty list message
M +6 -0 active/qml/RecentFiles.qml
M +3 -5 active/src/MainWindow.cpp
http://commits.kde.org/calligra/d484040b2d5630a698b4f373d3aa5eacb71089e1
diff --git a/active/qml/RecentFiles.qml b/active/qml/RecentFiles.qml
index 8b169ec..1d904fc 100644
--- a/active/qml/RecentFiles.qml
+++ b/active/qml/RecentFiles.qml
@@ -71,5 +71,11 @@ ListView {
metadataModel.filterRegExp = "";
}
}
+
+ PlasmaComponents.Label {
+ text: "No files here"
+ anchors.centerIn: parent
+ visible: recentFilesListView.count == 0 && typeFilter != ""
+ }
}
diff --git a/active/src/MainWindow.cpp b/active/src/MainWindow.cpp
index e92d9d3..99309ca 100644
--- a/active/src/MainWindow.cpp
+++ b/active/src/MainWindow.cpp
@@ -86,7 +86,9 @@ MainWindow::MainWindow (QWidget* parent)
connect (m_view, SIGNAL (sceneResized (QSize)), SLOT (adjustWindowSize (QSize)));
resize (800, 600);
- QTimer::singleShot(1000, this, SLOT(checkForAndOpenDocument()));
+ if (!documentPath.isEmpty()) {
+ QTimer::singleShot(1000, this, SLOT(checkForAndOpenDocument()));
+ }
}
void MainWindow::openFile (const QString& path)
@@ -132,10 +134,6 @@ MainWindow::~MainWindow()
void MainWindow::checkForAndOpenDocument()
{
- if (documentPath.isEmpty()) {
- return;
- }
-
QObject* object = m_view->rootObject();
QMetaObject::invokeMethod (object, "openDocument", Q_ARG (QVariant, QVariant (documentPath)));
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic