[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/office/kile/src
From: Michel Ludwig <michel.ludwig () kdemail ! net>
Date: 2010-02-28 12:46:48
Message-ID: 1267361208.825184.25214.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1097089 by mludwig:
Add the command "wqa".
M +15 -7 editorcommands.cpp
--- trunk/extragear/office/kile/src/editorcommands.cpp #1097088:1097089
@@ -23,7 +23,7 @@
EditorCommands::EditorCommands(KileInfo *info)
: m_ki(info)
{
- m_commandList << "w" << "wa" << "wq" << "q";
+ m_commandList << "w" << "wa" << "wq" << "q" << "wqa";
KTextEditor::CommandInterface *commandInterface
= qobject_cast<KTextEditor::CommandInterface*>(m_ki->docManager()->getEditor());
@@ -63,9 +63,16 @@
return result;
}
}
- else if(cmd == "q" || cmd == "wq") {
- if(cmd == "wq") {
- if(!m_ki->docManager()->fileSave(view)) {
+ else if(cmd == "q" || cmd == "wq" || cmd == "wqa") {
+ if(cmd == "wq" || cmd == "wqa") {
+ bool result = true;
+ if(cmd == "wq") {
+ result = m_ki->docManager()->fileSave(view);
+ }
+ else {
+ result = m_ki->docManager()->fileSaveAll();
+ }
+ if(!result) {
msg = i18n("Saving failed and quitting canceled.");
return false;
}
@@ -87,10 +94,11 @@
"<b>wa</b> saves all the documents.</p>";
return true;
}
- else if(cmd == "q" || cmd == "wq") {
- msg = "<p><b>q/wq</b>: Quit Kile</p>"
+ else if(cmd == "q" || cmd == "wq" || cmd == "wqa") {
+ msg = "<p><b>q/wq/wqa</b>: Quit Kile</p>"
"<p><b>wq</b> additionally saves the current document to disk "
- "before quitting.</p>";
+ "before quitting, whereas <b>wqa</b> saves all the documents "
+ "before exiting.</p>";
return true;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic