You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tde-packaging/debian/_buildscripts/local/hook_examples/tdebase/018_kate_save_all.diff

38 lines
1.0 KiB

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)