From fd66ac319abad228b2c041d29d98aa7d350affe9 Mon Sep 17 00:00:00 2001
From: Inso <insomniak.fr@gmail.com>
Date: Mon, 25 May 2015 08:40:12 +0200
Subject: [PATCH] Shortening pubkey in network tab

---
 src/cutecoin/models/network.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/cutecoin/models/network.py b/src/cutecoin/models/network.py
index 50ee9b39..a3325a70 100644
--- a/src/cutecoin/models/network.py
+++ b/src/cutecoin/models/network.py
@@ -54,11 +54,15 @@ class NetworkFilterProxyModel(QSortFilterProxyModel):
         if not source_index.isValid():
             return QVariant()
         source_data = source_model.data(source_index, role)
-        if index.column() == self.sourceModel().columns_types.index('is_member') \
+        if index.column() == source_model.columns_types.index('is_member') \
                 and role == Qt.DisplayRole:
             value = {True: 'yes', False: 'no', None: 'offline'}
             return value[source_data]
 
+        if index.column() == source_model.columns_types.index('pubkey') \
+            and role == Qt.DisplayRole:
+            return source_data[:5]
+
         if role == Qt.TextAlignmentRole:
             if source_index.column() == source_model.columns_types.index('address') or source_index.column() == self.sourceModel().columns_types.index('current_block'):
                 return Qt.AlignRight | Qt.AlignVCenter
-- 
GitLab