[prev in list] [next in list] [prev in thread] [next in thread]
List: kwrite-devel
Subject: New string for Kate
From: Adam Treat <treat () kde ! org>
Date: 2007-11-26 6:05:56
Message-ID: 200711260105.56806.treat () kde ! org
[Download RAW message or body]
Hi,
The attached patch implements 'Reload All' which is rather necessary when
using Kate with git. Ok to add this small string?
Adam
["reloadall.diff" (text/x-diff)]
Index: app/katedocmanager.cpp
===================================================================
--- app/katedocmanager.cpp (revision 741508)
+++ app/katedocmanager.cpp (working copy)
@@ -472,6 +472,12 @@
doc->documentSave();
}
+void KateDocManager::reloadAll()
+{
+ foreach ( KTextEditor::Document *doc, m_docList )
+ doc->documentReload();
+}
+
void KateDocManager::saveDocumentList (KConfig* config)
{
KConfigGroup openDocGroup(config, "Open Documents");
Index: app/katedocmanager.h
===================================================================
--- app/katedocmanager.h (revision 741508)
+++ app/katedocmanager.h (working copy)
@@ -151,6 +151,12 @@
*/
void saveAll();
+ /**
+ * reloads all documents that has at least one view.
+ * documents with no views are ignored :P
+ */
+ void reloadAll();
+
Q_SIGNALS:
/**
Index: app/katemainwindow.cpp
===================================================================
--- app/katemainwindow.cpp (revision 741508)
+++ app/katemainwindow.cpp (working copy)
@@ -292,6 +292,11 @@
connect( a, SIGNAL( triggered() ), KateDocManager::self(), SLOT( saveAll() ) );
a->setWhatsThis(i18n("Save all open, modified documents to disk."));
+ a = static_cast<KAction*>(actionCollection()->addAction( "file_reload_all" ));
+ a->setText( i18n("&Reload All") );
+ connect( a, SIGNAL( triggered() ), KateDocManager::self(), SLOT( reloadAll() ) );
+ a->setWhatsThis(i18n("Reload all open documents."));
+
actionCollection()->addAction( KStandardAction::Close, "file_close", m_viewManager, SLOT( slotDocumentClose() ) )
->setWhatsThis(i18n("Close the current document."));
Index: data/kateui.rc
===================================================================
--- data/kateui.rc (revision 741508)
+++ data/kateui.rc (working copy)
@@ -18,6 +18,7 @@
<Separator />
<DefineGroup name="revert_merge" />
+ <Action name="file_reload_all" />
<DefineGroup name="print_merge" />
<DefineGroup name="export_merge" />
<Separator />
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic