I've made a small change to add a menu comnmand to copy txid from the trasnactions window.
That helps when trying to use the new in-wallet block explorer. You can directly copy a tx's txid and paste that in the block explorer. Feel free to use or modify.
From 4e5ca9d431430ea15245f4335ffeca97dd7a45a9 Mon Sep 17 00:00:00 2001
From: moneromooo <moneromooo@users.noreply.github.com>
Date: Sat, 20 Sep 2014 15:18:01 +0100
Subject: [PATCH] transactionview: add a menu command to copy txid
Useful for use with the new block explorer window
---
src/qt/transactionview.cpp | 8 ++++++++
src/qt/transactionview.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index 5dd55db..ef574a0 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -132,6 +132,7 @@ TransactionView::TransactionView(QWidget *parent) :
QAction *copyAddressAction = new QAction(tr("Copy address"), this);
QAction *copyLabelAction = new QAction(tr("Copy label"), this);
QAction *copyAmountAction = new QAction(tr("Copy amount"), this);
+ QAction *copyTXID = new QAction(tr("Copy txid"), this);
QAction *editLabelAction = new QAction(tr("Edit label"), this);
QAction *showDetailsAction = new QAction(tr("Show transaction details"), this);
@@ -139,6 +140,7 @@ TransactionView::TransactionView(QWidget *parent) :
contextMenu->addAction(copyAddressAction);
contextMenu->addAction(copyLabelAction);
contextMenu->addAction(copyAmountAction);
+ contextMenu->addAction(copyTXID);
contextMenu->addAction(editLabelAction);
contextMenu->addAction(showDetailsAction);
@@ -154,6 +156,7 @@ TransactionView::TransactionView(QWidget *parent) :
connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(copyAddress()));
connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(copyLabel()));
connect(copyAmountAction, SIGNAL(triggered()), this, SLOT(copyAmount()));
+ connect(copyTXID, SIGNAL(triggered()), this, SLOT(copyTXID()));
connect(editLabelAction, SIGNAL(triggered()), this, SLOT(editLabel()));
connect(showDetailsAction, SIGNAL(triggered()), this, SLOT(showDetails()));
}
@@ -323,6 +326,11 @@ void TransactionView::copyAmount()
GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::FormattedAmountRole);
}
+void TransactionView::copyTXID()
+{
+ GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::TxIDRole);
+}
+
void TransactionView::editLabel()
{
if(!transactionView->selectionModel() ||!model)
diff --git a/src/qt/transactionview.h b/src/qt/transactionview.h
index 4ade3ec..57f59e7 100644
--- a/src/qt/transactionview.h
+++ b/src/qt/transactionview.h
@@ -65,6 +65,7 @@ private slots:
void editLabel();
void copyLabel();
void copyAmount();
+ void copyTXID();
signals:
void doubleClicked(const QModelIndex&);
--
1.9.3