Commit 9282e0bd authored by Waqar Ahmed's avatar Waqar Ahmed Committed by Christoph Cullmann
Browse files

Add show file history action to Documents plugin

parent a4935fc3
Pipeline #227704 passed with stage
in 34 minutes and 9 seconds
......@@ -8,6 +8,7 @@
// BEGIN Includes
#include "katefiletree.h"
#include "filehistorywidget.h"
#include "katefiletreedebug.h"
#include "katefiletreemodel.h"
#include "katefiletreeproxymodel.h"
......@@ -374,6 +375,14 @@ void KateFileTree::contextMenuEvent(QContextMenuEvent *event)
menu.addAction(m_filelistDeleteDocument);
menu.addAction(m_filelistReloadDocument);
auto a = menu.addAction(i18n("Show File Git History"));
connect(a, &QAction::triggered, this, [doc] {
auto url = doc->url();
if (url.isValid() && url.isLocalFile()) {
FileHistory::showFileHistory(url.toLocalFile());
}
});
menu.addSeparator();
menu.addAction(m_filelistOpenContainingFolder);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment