Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
clients
python
sakia
Commits
fbcfae3d
Commit
fbcfae3d
authored
9 years ago
by
inso
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/vtexier' into dev
parents
32b996eb
994f82f2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cutecoin/gui/community_tab.py
+5
-2
5 additions, 2 deletions
src/cutecoin/gui/community_tab.py
src/cutecoin/models/network.py
+7
-4
7 additions, 4 deletions
src/cutecoin/models/network.py
with
12 additions
and
6 deletions
src/cutecoin/gui/community_tab.py
+
5
−
2
View file @
fbcfae3d
...
...
@@ -201,5 +201,8 @@ The process to join back the community later will have to be done again."""
QMessageBox
.
Ok
)
def
refresh_person
(
self
,
pubkey
):
index
=
self
.
table_community_members
.
model
().
sourceModel
().
person_index
(
pubkey
)
self
.
table_community_members
.
model
().
sourceModel
().
dataChanged
.
emit
(
index
[
0
],
index
[
1
])
if
self
is
None
:
logging
.
error
(
"
community_tab self is None in refresh_person. Watcher connected to a destroyed tab
"
)
else
:
index
=
self
.
table_community_members
.
model
().
sourceModel
().
person_index
(
pubkey
)
self
.
table_community_members
.
model
().
sourceModel
().
dataChanged
.
emit
(
index
[
0
],
index
[
1
])
This diff is collapsed.
Click to expand it.
src/cutecoin/models/network.py
+
7
−
4
View file @
fbcfae3d
...
...
@@ -5,8 +5,7 @@ Created on 5 févr. 2014
'''
import
logging
from
..core.person
import
Person
from
..tools.exceptions
import
PersonNotFoundError
from
..tools.exceptions
import
NoPeerAvailable
from
..core.net.node
import
Node
from
PyQt5.QtCore
import
QAbstractTableModel
,
Qt
,
QVariant
,
QSortFilterProxyModel
from
PyQt5.QtGui
import
QColor
...
...
@@ -52,7 +51,7 @@ class NetworkFilterProxyModel(QSortFilterProxyModel):
source_data
=
self
.
sourceModel
().
data
(
source_index
,
role
)
if
index
.
column
()
==
self
.
sourceModel
().
column_types
.
index
(
'
is_member
'
)
\
and
role
==
Qt
.
DisplayRole
:
value
=
{
True
:
'
yes
'
,
False
:
'
no
'
}
value
=
{
True
:
'
yes
'
,
False
:
'
no
'
,
None
:
'
offline
'
}
return
value
[
source_data
]
return
source_data
...
...
@@ -100,7 +99,11 @@ class NetworkTableModel(QAbstractTableModel):
:param ..core.net.node.Node node: Network node
:return:
"""
is_member
=
node
.
pubkey
in
self
.
community
.
members_pubkeys
()
try
:
is_member
=
node
.
pubkey
in
self
.
community
.
members_pubkeys
()
except
NoPeerAvailable
as
e
:
logging
.
error
(
e
)
is_member
=
None
address
=
""
if
node
.
endpoint
.
server
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment