[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kate] part/document: add "New file" message for locally non-existing files
From: Dominik Haumann <dhaumann () kde ! org>
Date: 2013-04-16 15:54:20
Message-ID: 20130416155420.DE09BA605E () git ! kde ! org
[Download RAW message or body]
Git commit 68cac271165d400919671fbfc801d56b8316093d by Dominik Haumann.
Committed on 16/04/2013 at 17:54.
Pushed by dhaumann into branch 'master'.
add "New file" message for locally non-existing files
Albert, since you commented in this previously: If you
think this totally sucks, we can revert. Could you give
it a try? The message vanishes as soon as you scroll,
resize or type something.
CCMAIL: aacid@kde.org
CCMAIL: kwrite-devel@kde.org
M +5 -0 part/document/katebuffer.cpp
http://commits.kde.org/kate/68cac271165d400919671fbfc801d56b8316093d
diff --git a/part/document/katebuffer.cpp b/part/document/katebuffer.cpp
index f240b34..e65966c 100644
--- a/part/document/katebuffer.cpp
+++ b/part/document/katebuffer.cpp
@@ -186,6 +186,11 @@ bool KateBuffer::openFile (const QString &m_file, bool \
enforceTextCodec)
*/
if (m_doc->url().isLocalFile() && !QFile::exists (m_file)) {
clear ();
+ KTextEditor::Message* message = new \
KTextEditor::Message(KTextEditor::Message::Warning, + \
i18nc("short translation, user created new file", "New file")); + \
message->setPosition(KTextEditor::Message::TopInView); + \
message->setAutoHide(1000); + m_doc->postMessage(message);
return true;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic