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
490cb9dc
Commit
490cb9dc
authored
10 years ago
by
inso
Browse files
Options
Downloads
Patches
Plain Diff
Fixing the way we handle person change and wot tab refresh
parent
4a050f6a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/cutecoin/gui/community_tab.py
+2
-2
2 additions, 2 deletions
src/cutecoin/gui/community_tab.py
src/cutecoin/gui/currency_tab.py
+4
-5
4 additions, 5 deletions
src/cutecoin/gui/currency_tab.py
src/cutecoin/gui/wot_tab.py
+8
-1
8 additions, 1 deletion
src/cutecoin/gui/wot_tab.py
with
14 additions
and
8 deletions
src/cutecoin/gui/community_tab.py
+
2
−
2
View file @
490cb9dc
...
...
@@ -27,7 +27,7 @@ class CommunityTabWidget(QWidget, Ui_CommunityTabWidget):
classdocs
'''
def
__init__
(
self
,
account
,
community
,
password_asker
):
def
__init__
(
self
,
app
,
account
,
community
,
password_asker
):
'''
Constructor
'''
...
...
@@ -50,7 +50,7 @@ class CommunityTabWidget(QWidget, Ui_CommunityTabWidget):
self
.
button_membership
.
setText
(
"
Send membership demand
"
)
self
.
button_leaving
.
hide
()
self
.
wot_tab
=
WotTabWidget
(
account
,
community
,
password_asker
,
self
)
self
.
wot_tab
=
WotTabWidget
(
app
,
account
,
community
,
password_asker
,
self
)
self
.
tabs_information
.
addTab
(
self
.
wot_tab
,
QIcon
(
'
:/icons/wot_icon
'
),
"
WoT
"
)
def
member_context_menu
(
self
,
point
):
...
...
This diff is collapsed.
Click to expand it.
src/cutecoin/gui/currency_tab.py
+
4
−
5
View file @
490cb9dc
...
...
@@ -36,7 +36,8 @@ class CurrencyTabWidget(QWidget, Ui_CurrencyTabWidget):
self
.
community
=
community
self
.
password_asker
=
password_asker
self
.
status_label
=
status_label
self
.
tab_community
=
CommunityTabWidget
(
self
.
app
.
current_account
,
self
.
tab_community
=
CommunityTabWidget
(
self
.
app
,
self
.
app
.
current_account
,
self
.
community
,
self
.
password_asker
)
...
...
@@ -100,7 +101,8 @@ class CurrencyTabWidget(QWidget, Ui_CurrencyTabWidget):
QIcon
(
'
:/icons/tx_icon
'
),
"
Transactions
"
)
self
.
tab_community
=
CommunityTabWidget
(
self
.
app
.
current_account
,
self
.
tab_community
=
CommunityTabWidget
(
self
.
app
,
self
.
app
.
current_account
,
self
.
community
,
self
.
password_asker
)
self
.
tabs_account
.
addTab
(
self
.
tab_community
,
...
...
@@ -140,9 +142,6 @@ class CurrencyTabWidget(QWidget, Ui_CurrencyTabWidget):
if
self
.
tab_wallets
:
self
.
tab_wallets
.
refresh
()
if
self
.
tab_community
:
self
.
tab_community
.
wot_tab
.
refresh
()
if
self
.
tab_history
.
table_history
.
model
():
self
.
tab_history
.
table_history
.
model
().
dataChanged
.
emit
(
QModelIndex
(),
...
...
This diff is collapsed.
Click to expand it.
src/cutecoin/gui/wot_tab.py
+
8
−
1
View file @
490cb9dc
...
...
@@ -3,6 +3,7 @@
import
logging
from
cutecoin.core.graph
import
Graph
from
PyQt5.QtWidgets
import
QWidget
,
QComboBox
from
PyQt5.QtCore
import
pyqtSlot
from
..gen_resources.wot_tab_uic
import
Ui_WotTabWidget
from
cutecoin.gui.views.wot
import
NODE_STATUS_HIGHLIGHTED
,
NODE_STATUS_SELECTED
,
NODE_STATUS_OUT
,
ARC_STATUS_STRONG
,
ARC_STATUS_WEAK
from
ucoinpy.api
import
bma
...
...
@@ -10,7 +11,7 @@ from cutecoin.core.person import Person
class
WotTabWidget
(
QWidget
,
Ui_WotTabWidget
):
def
__init__
(
self
,
account
,
community
,
password_asker
,
parent
=
None
):
def
__init__
(
self
,
app
,
account
,
community
,
password_asker
,
parent
=
None
):
"""
:param cutecoin.core.account.Account account:
...
...
@@ -37,6 +38,7 @@ class WotTabWidget(QWidget, Ui_WotTabWidget):
self
.
graphicsView
.
scene
().
node_contact
.
connect
(
self
.
add_node_as_contact
)
self
.
graphicsView
.
scene
().
node_member
.
connect
(
self
.
member_informations
)
app
.
monitor
.
persons_watcher
(
community
).
person_changed
.
connect
(
self
.
handle_person_change
)
self
.
account
=
account
self
.
community
=
community
self
.
password_asker
=
password_asker
...
...
@@ -106,6 +108,11 @@ class WotTabWidget(QWidget, Ui_WotTabWidget):
"""
self
.
draw_graph
(
self
.
_current_metadata
)
@pyqtSlot
(
str
)
def
handle_person_change
(
self
,
pubkey
):
if
pubkey
==
self
.
_current_metadata
[
'
id
'
]:
self
.
refresh
()
def
search
(
self
):
"""
Search nodes when return is pressed in combobox lineEdit
...
...
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