Post
Topic
Board Announcements (Altcoins)
Re: [ANN] [PMP] PreminePlus Launch ~ Logo Contest ~ Oct giveaway SIGNUP NOW!
by
TheMightyX
on 20/09/2014, 16:01:18 UTC
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.

Code:
From 4e5ca9d431430ea15245f4335ffeca97dd7a45a9 Mon Sep 17 00:00:00 2001
From: moneromooo
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

Very helpful as usual!
I'll add that as soon as I'm finished a side project I'm working on.
I got tired of waiting for that flake to fix the old dice site so I'm creating one myself.
This way, the team has full control over it and it is secure.

It's up and working!! Tested and deposits working correctly.

Just updating the nameservers to point to the VPS now.
I want to make some changes to the front end and then I'll be releasing it to the community.
I have another service on the way as well Cheesy