Skip to content
Snippets Groups Projects
Commit fd66ac31 authored by inso's avatar inso
Browse files

Shortening pubkey in network tab

parent 1112d9d6
Branches
Tags
No related merge requests found
...@@ -54,11 +54,15 @@ class NetworkFilterProxyModel(QSortFilterProxyModel): ...@@ -54,11 +54,15 @@ class NetworkFilterProxyModel(QSortFilterProxyModel):
if not source_index.isValid(): if not source_index.isValid():
return QVariant() return QVariant()
source_data = source_model.data(source_index, role) 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: and role == Qt.DisplayRole:
value = {True: 'yes', False: 'no', None: 'offline'} value = {True: 'yes', False: 'no', None: 'offline'}
return value[source_data] 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 role == Qt.TextAlignmentRole:
if source_index.column() == source_model.columns_types.index('address') or source_index.column() == self.sourceModel().columns_types.index('current_block'): 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 return Qt.AlignRight | Qt.AlignVCenter
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment