summaryrefslogtreecommitdiffstats
path: root/debian/_buildscripts/local/hook_examples/tdebase/018_kate_save_all.diff
diff options
context:
space:
mode:
Diffstat (limited to 'debian/_buildscripts/local/hook_examples/tdebase/018_kate_save_all.diff')
-rw-r--r--debian/_buildscripts/local/hook_examples/tdebase/018_kate_save_all.diff37
1 files changed, 37 insertions, 0 deletions
diff --git a/debian/_buildscripts/local/hook_examples/tdebase/018_kate_save_all.diff b/debian/_buildscripts/local/hook_examples/tdebase/018_kate_save_all.diff
new file mode 100644
index 000000000..16ac7c7dc
--- /dev/null
+++ b/debian/_buildscripts/local/hook_examples/tdebase/018_kate_save_all.diff
@@ -0,0 +1,37 @@
+diff -Nur ori/tdebase/kate/app/katedocmanager.cpp new/tdebase/kate/app/katedocmanager.cpp
+--- ori/tdebase/kate/app/katedocmanager.cpp 2013-07-27 02:36:57.000000000 +0900
++++ new/tdebase/kate/app/katedocmanager.cpp 2013-12-05 15:56:20.311928016 +0900
+@@ -381,7 +381,6 @@
+ return modified;
+ }
+
+-
+ bool KateDocManager::queryCloseDocuments(KateMainWindow *w)
+ {
+ uint docCount = m_docList.count();
+@@ -436,12 +435,22 @@
+ return true;
+ }
+
+-
+ void KateDocManager::saveAll()
+ {
+ for (TQPtrListIterator<Kate::Document> it(m_docList); it.current(); ++it)
+- if ( it.current()->isModified() && it.current()->views().count() )
+- ((Kate::View*)it.current()->views().first())->save();
++ {
++ if (it.current()->views().count())
++ {
++ if (it.current()->url().isEmpty())
++ {
++ ((Kate::View*)it.current()->views().first())->saveAs();
++ }
++ else if (it.current()->isModified())
++ {
++ ((Kate::View*)it.current()->views().first())->save();
++ }
++ }
++ }
+ }
+
+ void KateDocManager::saveDocumentList (TDEConfig* config)