diff options
author | Friedemann Kleint <[email protected]> | 2009-06-19 16:34:38 +0200 |
---|---|---|
committer | Friedemann Kleint <[email protected]> | 2009-06-19 16:34:38 +0200 |
commit | 2508fa03a09391957933c5d7d83b9ab80cb4ca9e (patch) | |
tree | 919369920a429ada9e3f00b5d56e71c7d807ef6c /src/plugins/git/gitplugin.cpp | |
parent | e05505613a0c316fe15023766b54b085e67249d2 (diff) |
Make the "prompt to submit" setting a per-plugin one.
Provide a checkable message box to be able to turn
prompting off when asked.
Diffstat (limited to 'src/plugins/git/gitplugin.cpp')
-rw-r--r-- | src/plugins/git/gitplugin.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 595090085cb..3919232ac0a 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -690,12 +690,14 @@ bool GitPlugin::editorAboutToClose(Core::IEditor *iEditor) return true; // Prompt user. Force a prompt unless submit was actually invoked (that // is, the editor was closed or shutdown). + GitSettings settings = m_gitClient->settings(); + const bool wantedPrompt = settings.promptToSubmit; const VCSBase::VCSBaseSubmitEditor::PromptSubmitResult answer = editor->promptSubmit(tr("Closing git editor"), tr("Do you want to commit the change?"), tr("The commit message check failed. Do you want to commit the change?"), - !m_submitActionTriggered); - m_submitActionTriggered = false; + &settings.promptToSubmit, !m_submitActionTriggered); + m_submitActionTriggered = false; switch (answer) { case VCSBase::VCSBaseSubmitEditor::SubmitCanceled: return false; // Keep editing and change file @@ -705,6 +707,8 @@ bool GitPlugin::editorAboutToClose(Core::IEditor *iEditor) default: break; } + if (wantedPrompt != settings.promptToSubmit) + m_gitClient->setSettings(settings); // Go ahead! const QStringList fileList = editor->checkedFiles(); if (Git::Constants::debug) |