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
1d5a1caf
Commit
1d5a1caf
authored
10 years ago
by
inso
Browse files
Options
Downloads
Patches
Plain Diff
Fixed issues
#56
and
#68
parent
7c4d3a1e
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/core/account.py
+1
-1
1 addition, 1 deletion
src/cutecoin/core/account.py
src/cutecoin/core/community.py
+1
-1
1 addition, 1 deletion
src/cutecoin/core/community.py
src/cutecoin/models/txhistory.py
+10
-12
10 additions, 12 deletions
src/cutecoin/models/txhistory.py
with
12 additions
and
14 deletions
src/cutecoin/core/account.py
+
1
−
1
View file @
1d5a1caf
...
@@ -22,7 +22,7 @@ from ..tools.exceptions import NoPeerAvailable, ContactAlreadyExists
...
@@ -22,7 +22,7 @@ from ..tools.exceptions import NoPeerAvailable, ContactAlreadyExists
def
quantitative
(
units
,
community
):
def
quantitative
(
units
,
community
):
return
units
return
int
(
units
)
def
relative
(
units
,
community
):
def
relative
(
units
,
community
):
...
...
This diff is collapsed.
Click to expand it.
src/cutecoin/core/community.py
+
1
−
1
View file @
1d5a1caf
...
@@ -132,7 +132,7 @@ class Community(object):
...
@@ -132,7 +132,7 @@ class Community(object):
vowels
=
(
'
a
'
,
'
e
'
,
'
i
'
,
'
o
'
,
'
u
'
,
'
y
'
)
vowels
=
(
'
a
'
,
'
e
'
,
'
i
'
,
'
o
'
,
'
u
'
,
'
y
'
)
shortened
=
self
.
currency
shortened
=
self
.
currency
shortened
=
''
.
join
([
c
for
c
in
shortened
if
c
not
in
vowels
])
shortened
=
''
.
join
([
c
for
c
in
shortened
if
c
not
in
vowels
])
return
shortened
return
shortened
.
upper
()
@property
@property
def
currency_symbol
(
self
):
def
currency_symbol
(
self
):
...
...
This diff is collapsed.
Click to expand it.
src/cutecoin/models/txhistory.py
+
10
−
12
View file @
1d5a1caf
...
@@ -74,18 +74,19 @@ class TxFilterProxyModel(QSortFilterProxyModel):
...
@@ -74,18 +74,19 @@ class TxFilterProxyModel(QSortFilterProxyModel):
if
source_index
.
column
()
==
self
.
sourceModel
().
columns
.
index
(
'
Date
'
):
if
source_index
.
column
()
==
self
.
sourceModel
().
columns
.
index
(
'
Date
'
):
date
=
QDateTime
.
fromTime_t
(
source_data
)
date
=
QDateTime
.
fromTime_t
(
source_data
)
return
date
.
date
()
return
date
.
date
()
if
source_index
.
column
()
==
self
.
sourceModel
().
columns
.
index
(
'
Payment
'
):
if
source_index
.
column
()
==
self
.
sourceModel
().
columns
.
index
(
'
Payment
'
)
or
\
source_index
.
column
()
==
self
.
sourceModel
().
columns
.
index
(
'
Deposit
'
):
if
source_data
is
not
""
:
if
source_data
is
not
""
:
amount_ref
=
self
.
account
.
units_to_diff_ref
(
source_data
,
amount_ref
=
self
.
account
.
units_to_diff_ref
(
source_data
,
self
.
community
)
self
.
community
)
ref_name
=
self
.
account
.
diff_ref_name
(
self
.
community
.
short_currency
)
ref_name
=
self
.
account
.
diff_ref_name
(
self
.
community
.
short_currency
)
return
"
{0:.2f} {1}
"
.
format
(
amount_ref
,
ref_name
)
if
source_index
.
column
()
==
self
.
sourceModel
().
columns
.
index
(
'
Deposit
'
)
:
if
type
(
amount_ref
)
is
int
:
if
source_data
is
not
""
:
formatter
=
"
{0} {1}
"
amount_ref
=
self
.
account
.
units_to_diff_ref
(
source_data
,
else
:
self
.
community
)
formatter
=
"
{0:.2f} {1}
"
ref_name
=
self
.
account
.
diff_ref_name
(
self
.
community
.
short_currency
)
return
"
{0:.2f} {1}
"
.
format
(
amount_ref
,
ref_name
)
return
formatter
.
format
(
amount_ref
,
ref_name
)
if
role
==
Qt
.
FontRole
:
if
role
==
Qt
.
FontRole
:
font
=
QFont
()
font
=
QFont
()
...
@@ -152,10 +153,7 @@ class HistoryTableModel(QAbstractTableModel):
...
@@ -152,10 +153,7 @@ class HistoryTableModel(QAbstractTableModel):
date_ts
=
transfer
.
metadata
[
'
time
'
]
date_ts
=
transfer
.
metadata
[
'
time
'
]
amount_ref
=
self
.
account
.
units_to_ref
(
amount
,
self
.
community
)
return
(
date_ts
,
sender
,
""
,
amount
,
ref_name
=
self
.
account
.
ref_name
(
self
.
community
.
short_currency
)
return
(
date_ts
,
sender
,
""
,
amount
,
"
{0:.2f} {1}
"
.
format
(
amount_ref
,
ref_name
),
comment
,
transfer
.
state
)
comment
,
transfer
.
state
)
def
data_sent
(
self
,
transfer
):
def
data_sent
(
self
,
transfer
):
...
...
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