summaryrefslogtreecommitdiffstats
path: root/kate/app/katemainwindow.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2016-05-23 16:17:18 +1000
committerMichele Calgaro <michele.calgaro@yahoo.it>2016-05-23 16:17:18 +1000
commit8644afed0d8e383cf3576c598b2ca76833a74e33 (patch)
tree720198d0f64d169f1b241d1cf02110c494e4ec20 /kate/app/katemainwindow.cpp
parent074f8c7ccb685fb9fa2a51dec5049637e727a9c2 (diff)
downloadtdebase-8644afed0d8e383cf3576c598b2ca76833a74e33.tar.gz
tdebase-8644afed0d8e383cf3576c598b2ca76833a74e33.zip
Kate session panel: added support for switch/shutdown session options and fixed up logic where required.
Fixed Kate quit process to support correct shutdown. Improved handling of configuration option changes. Some code rework. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kate/app/katemainwindow.cpp')
-rw-r--r--kate/app/katemainwindow.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/kate/app/katemainwindow.cpp b/kate/app/katemainwindow.cpp
index 19a76ee27..4493eae12 100644
--- a/kate/app/katemainwindow.cpp
+++ b/kate/app/katemainwindow.cpp
@@ -329,9 +329,9 @@ void KateMainWindow::slotDocumentCloseAll() {
}
bool KateMainWindow::queryClose_internal() {
- uint documentCount=KateDocManager::self()->documents();
+ uint documentCount=KateDocManager::self()->documents();
- if ( ! showModOnDiskPrompt() )
+ if ( !showModOnDiskPrompt() )
return false;
TQPtrList<Kate::Document> modifiedDocuments=KateDocManager::self()->modifiedDocumentList();
@@ -360,23 +360,22 @@ bool KateMainWindow::queryClose()
// just test, not close them actually
if (KateApp::self()->sessionSaving())
{
- return queryClose_internal ();
+ return queryClose_internal();
}
// normal closing of window
// allow to close all windows until the last without restrictions
- if ( KateApp::self()->mainWindows () > 1 )
+ if (KateApp::self()->mainWindows() > 1)
+ {
return true;
+ }
- // last one: check if we can close all documents, try run
+ // last one: check if we can close all documents and sessions, try run
// and save docs if we really close down !
- if ( queryClose_internal () )
+ if (queryClose_internal() && KateApp::self()->query_session_close())
{
- KateApp::self()->sessionManager()->saveActiveSession();
-
// detach the dcopClient
KateApp::self()->dcopClient()->detach();
-
return true;
}
@@ -403,7 +402,7 @@ void KateMainWindow::slotNewToolbarConfig()
void KateMainWindow::slotFileQuit()
{
- KateApp::self()->shutdownKate (this);
+ KateApp::self()->shutdownKate(this);
}
void KateMainWindow::readOptions ()
@@ -574,6 +573,9 @@ void KateMainWindow::slotConfigure()
dlg->exec();
delete dlg;
+
+ // Inform Kate that options may have been changed
+ KateApp::self()->reparse_config();
}
KURL KateMainWindow::activeDocumentUrl()