Commits

Adam Treat  committed 339658d

* Add 'ReloadAll'.

Approved by Albert and Anders.

CCBUG:93412
CCMAIL:kde-i18n-doc@kde.org

svn path=/trunk/KDE/kdesdk/kate/; revision=741957

  • Participants
  • Parent commits 14071ad

Comments (0)

Files changed (4)

File kate/app/katedocmanager.cpp

     doc->documentSave();
 }
 
+void KateDocManager::reloadAll()
+{
+  foreach ( KTextEditor::Document *doc, m_docList )
+    doc->documentReload();
+}
+
 void KateDocManager::saveDocumentList (KConfig* config)
 {
   KConfigGroup openDocGroup(config, "Open Documents");

File kate/app/katedocmanager.h

      */
     void saveAll();
 
+	/**
+	 * reloads all documents that has at least one view.
+	 * documents with no views are ignored :P
+	 */
+	void reloadAll();
+
   Q_SIGNALS:
 
     /**

File kate/app/katemainwindow.cpp

   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."));
 

File kate/data/kateui.rc

     <Separator />
 
     <DefineGroup name="revert_merge" />
+    <Action name="file_reload_all" />
     <DefineGroup name="print_merge" />
     <DefineGroup name="export_merge" />
     <Separator />