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

Merge branch 'dev'

parents 780d2cdb 5d08fa7a
Branches
Tags
No related merge requests found
Showing
with 810 additions and 77 deletions
...@@ -39,3 +39,4 @@ nosetests.xml ...@@ -39,3 +39,4 @@ nosetests.xml
# Generated files # Generated files
src/cutecoin/gen_resources/* src/cutecoin/gen_resources/*
src/icons_rc.py
[run]
omit =
src/cutecoin/gen_resources/*
src/cutecoin/gui/*
src/cutecoin/core/*
src/cutecoin/models/*Model*
source = src/cutecoin
[html]
directory = doc/coverage
{
"localAccounts": [
{
"communities": [
{
"currency": "beta_brousouf",
"nodes": [
{
"port": 9101,
"server": "ucoin.twiced.fr"
}
]
}
],
"name": "Inso",
"pgpKeyId": "3EA42BBCAAD72714",
"wallets": [
{
"coins": [],
"currency": "beta_brousouf"
}
]
}
]
}
\ No newline at end of file
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
import sys, os, multiprocessing, subprocess import sys, os, multiprocessing, subprocess
resources = os.path.abspath(os.path.join(os.path.dirname(__file__), 'res')) resources = os.path.abspath(os.path.join(os.path.dirname(__file__), 'res'))
gen_resources = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src', 'cutecoin', 'gen_resources')) gen_ui = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src', 'cutecoin', 'gen_resources'))
gen_resources = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src'))
def convert_ui(args, **kwargs): def convert_ui(args, **kwargs):
subprocess.call(args, **kwargs) subprocess.call(args, **kwargs)
...@@ -14,7 +15,7 @@ def build_resources(): ...@@ -14,7 +15,7 @@ def build_resources():
for f in files: for f in files:
if f.endswith('.ui'): if f.endswith('.ui'):
source = os.path.join(root, f) source = os.path.join(root, f)
dest = os.path.join(gen_resources, os.path.splitext(os.path.basename(source))[0]+'_uic.py') dest = os.path.join(gen_ui, os.path.splitext(os.path.basename(source))[0]+'_uic.py')
exe = 'pyuic5' exe = 'pyuic5'
elif f.endswith('.qrc'): elif f.endswith('.qrc'):
source = os.path.join(root, f) source = os.path.join(root, f)
......
...@@ -11,6 +11,7 @@ from .membership import Membership ...@@ -11,6 +11,7 @@ from .membership import Membership
from .transaction import Transaction from .transaction import Transaction
import re import re
import logging
class Block(Document): class Block(Document):
...@@ -104,7 +105,7 @@ BOTTOM_SIGNATURE ...@@ -104,7 +105,7 @@ BOTTOM_SIGNATURE
self.transactions = transactions self.transactions = transactions
@classmethod @classmethod
def from_signed_raw(cls, raw, signature=None): def from_signed_raw(cls, raw):
lines = raw.splitlines(True) lines = raw.splitlines(True)
n = 0 n = 0
...@@ -211,9 +212,19 @@ BOTTOM_SIGNATURE ...@@ -211,9 +212,19 @@ BOTTOM_SIGNATURE
if Block.re_transactions.match(lines[n]): if Block.re_transactions.match(lines[n]):
n = n + 1 n = n + 1
while not Block.re_signature.match(lines[n]): while not Block.re_signature.match(lines[n]):
transaction = Transaction.from_compact(version, lines[n]) tx_lines = ""
transactions.append(transaction) header_data = Transaction.re_header.match(lines[n])
version = int(header_data.group(1))
issuers_num = int(header_data.group(2))
inputs_num = int(header_data.group(3))
outputs_num = int(header_data.group(4))
has_comment = int(header_data.group(5))
tx_max = n+issuers_num*2+inputs_num+outputs_num+has_comment+1
for i in range(n, tx_max):
tx_lines += lines[n]
n = n + 1 n = n + 1
transaction = Transaction.from_compact(version, tx_lines)
transactions.append(transaction)
signature = Block.re_signature.match(lines[n]).group(1) signature = Block.re_signature.match(lines[n]).group(1)
......
...@@ -7,7 +7,6 @@ Created on 2 déc. 2014 ...@@ -7,7 +7,6 @@ Created on 2 déc. 2014
from . import Document from . import Document
import re import re
class Transaction(Document): class Transaction(Document):
''' '''
Document format : Document format :
...@@ -45,8 +44,8 @@ SIGNATURE ...@@ -45,8 +44,8 @@ SIGNATURE
re_issuers = re.compile("Issuers:\n") re_issuers = re.compile("Issuers:\n")
re_inputs = re.compile("Inputs:\n") re_inputs = re.compile("Inputs:\n")
re_outputs = re.compile("Outputs:\n") re_outputs = re.compile("Outputs:\n")
re_compact_comment = re.compile("-----@@@-----([^\n]+)\n") re_compact_comment = re.compile("([^\n]+)\n")
re_comment = re.compile("Comment:(?:)?([^\n]*)\n") re_comment = re.compile("Comment: ([^\n]*)\n")
re_pubkey = re.compile("([1-9A-Za-z][^OIl]{42,45})\n") re_pubkey = re.compile("([1-9A-Za-z][^OIl]{42,45})\n")
def __init__(self, version, currency, issuers, inputs, outputs, def __init__(self, version, currency, issuers, inputs, outputs,
...@@ -71,13 +70,13 @@ SIGNATURE ...@@ -71,13 +70,13 @@ SIGNATURE
issuers_num = int(header_data.group(2)) issuers_num = int(header_data.group(2))
inputs_num = int(header_data.group(3)) inputs_num = int(header_data.group(3))
outputs_num = int(header_data.group(4)) outputs_num = int(header_data.group(4))
has_comment = int(header_data.group(5))
n = n + 1 n = n + 1
issuers = [] issuers = []
inputs = [] inputs = []
outputs = [] outputs = []
signatures = [] signatures = []
logging.debug(compact)
for i in range(0, issuers_num): for i in range(0, issuers_num):
issuer = Transaction.re_pubkey.match(lines[n]).group(1) issuer = Transaction.re_pubkey.match(lines[n]).group(1)
issuers.append(issuer) issuers.append(issuer)
...@@ -93,8 +92,8 @@ SIGNATURE ...@@ -93,8 +92,8 @@ SIGNATURE
outputs.append(output_source) outputs.append(output_source)
n = n + 1 n = n + 1
comment = None comment = ""
if Transaction.re_comment.match(lines[n]): if has_comment == 1:
comment = Transaction.re_compact_comment.match(lines[n]).group(1) comment = Transaction.re_compact_comment.match(lines[n]).group(1)
n = n + 1 n = n + 1
...@@ -176,9 +175,7 @@ Issuers: ...@@ -176,9 +175,7 @@ Issuers:
doc += "{0}\n".format(o.inline()) doc += "{0}\n".format(o.inline())
doc += "Comment: " doc += "Comment: "
if self.comment: doc += "{0}\n".format(self.comment)
doc += "{0}".format(self.comment)
doc += "\n"
return doc return doc
...@@ -195,19 +192,19 @@ PUBLIC_KEY:AMOUNT ...@@ -195,19 +192,19 @@ PUBLIC_KEY:AMOUNT
... ...
COMMENT COMMENT
""" """
doc = "TX:{0}:{1}:{2}:{3}:{4}".format(self.version, doc = "TX:{0}:{1}:{2}:{3}:{4}\n".format(self.version,
self.issuers.len, len(self.issuers),
self.inputs.len, len(self.inputs),
self.outputs.len, len(self.outputs),
'1' if self.Comment else '0') '1' if self.comment != "" else '0')
for pubkey in self.issuers: for pubkey in self.issuers:
doc += "{0}\n".format(pubkey) doc += "{0}\n".format(pubkey)
for i in self.inputs: for i in self.inputs:
doc += "{0}\n".format(i.compact()) doc += "{0}\n".format(i.compact())
for o in self.outputs: for o in self.outputs:
doc += "{0}\n".format(o.inline()) doc += "{0}\n".format(o.inline())
if self.comment: if self.comment != "":
doc += "-----@@@----- {0}\n".format(self.comment) doc += "{0}\n".format(self.comment)
for s in self.signatures: for s in self.signatures:
doc += "{0}\n".format(s) doc += "{0}\n".format(s)
......
Icons are from the Noun Project.
noun_2651_cc.svg : Created by Sergey Bakin
noun_18704_cc.svg : Created by Ian Mawle
noun_22441_cc.svg : Created by Bruno Castro
noun_29542_cc.svg : Created by Chris Kerr
noun_43022_cc.svg : Created by Jon Prepeluh
noun_63271_cc.svg : Created by Mark Shorter
\ No newline at end of file
<RCC>
<qresource prefix="icons">
<file alias="community_icon">noun_22441_cc.svg</file>
<file alias="wot_icon">noun_2651_cc.svg</file>
<file alias="members_icon">noun_18704_cc.svg</file>
<file alias="wallet_icon">noun_29542_cc.svg</file>
<file alias="tx_icon">noun_63271_cc.svg</file>
<file alias="currency_icon">noun_43022_cc.svg</file>
</qresource>
</RCC>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="100px"
height="100px"
viewBox="5.0 -10.0 100.0 135.0"
enable-background="new 0 0 100 100"
xml:space="preserve"
inkscape:version="0.48.5 r10040"
sodipodi:docname="noun_18704_cc.svg"><metadata
id="metadata31"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs29" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview27"
showgrid="false"
inkscape:zoom="2.36"
inkscape:cx="50"
inkscape:cy="50"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><g
id="g3"
transform="matrix(1.2341921,0,0,1.2341921,-7.7559354,-7.7122004)"><g
id="g5"><path
d="m 58.065,32.624 h -16.13 c -2.584,0 -4.684,2.093 -4.684,4.68 v 21.95 c 0,2.585 2.1,4.682 4.684,4.682 h 0.024 v 15.551 c 0,2.586 2.034,4.682 4.554,4.682 h 6.975 c 2.515,0 4.555,-2.095 4.555,-4.682 V 63.936 h 0.023 c 2.586,0 4.685,-2.095 4.685,-4.682 v -21.95 c -0.004,-2.587 -2.1,-4.68 -4.686,-4.68 z"
id="path7"
inkscape:connector-curvature="0"
style="fill:#000000" /><circle
cx="50"
cy="23.473"
r="7.6399999"
id="circle9"
d="m 57.64,23.473 c 0,4.219455 -3.420545,7.639999 -7.64,7.639999 -4.219455,0 -7.64,-3.420544 -7.64,-7.639999 0,-4.219456 3.420545,-7.64 7.64,-7.64 4.219455,0 7.64,3.420544 7.64,7.64 z"
sodipodi:cx="50"
sodipodi:cy="23.473"
sodipodi:rx="7.6399999"
sodipodi:ry="7.6399999"
style="fill:#000000" /></g><g
id="g11"><path
d="m 85.989,34.448 h -13.82 c -2.221,0 -4.016,1.797 -4.016,4.012 v 18.812 c 0,2.218 1.795,4.012 4.016,4.012 h 0.021 v 13.324 c 0,2.216 1.744,4.01 3.896,4.01 h 5.981 c 2.154,0 3.897,-1.794 3.897,-4.01 V 61.283 h 0.021 c 2.218,0 4.014,-1.797 4.014,-4.014 V 38.458 c 0.002,-2.213 -1.794,-4.01 -4.01,-4.01 z"
id="path13"
inkscape:connector-curvature="0"
style="fill:#000000" /><path
d="m 79.08,20.062 c 3.612,0 6.546,2.931 6.546,6.545 0,3.617 -2.934,6.549 -6.546,6.549 -3.617,0 -6.548,-2.932 -6.548,-6.549 0,-3.614 2.931,-6.545 6.548,-6.545 z"
id="path15"
inkscape:connector-curvature="0"
style="fill:#000000" /></g><g
id="g17"><path
d="m 27.833,34.448 h -13.82 c -2.217,0 -4.012,1.797 -4.012,4.01 V 57.27 c 0,2.217 1.795,4.014 4.012,4.014 h 0.021 v 13.322 c 0,2.218 1.746,4.012 3.9,4.012 h 5.979 c 2.152,0 3.896,-1.794 3.896,-4.012 V 61.283 h 0.021 c 2.216,0 4.012,-1.797 4.012,-4.014 V 38.458 c 0,-2.213 -1.793,-4.01 -4.009,-4.01 z"
id="path19"
inkscape:connector-curvature="0"
style="fill:#000000" /><circle
cx="20.922001"
cy="26.608999"
r="6.546"
id="circle21"
d="m 27.468001,26.608999 c 0,3.615256 -2.930744,6.546 -6.546,6.546 -3.615256,0 -6.546,-2.930744 -6.546,-6.546 0,-3.615256 2.930744,-6.546 6.546,-6.546 3.615256,0 6.546,2.930744 6.546,6.546 z"
sodipodi:cx="20.922001"
sodipodi:cy="26.608999"
sodipodi:rx="6.546"
sodipodi:ry="6.546"
style="fill:#000000" /></g></g></svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
id="Layer_1"
x="0px"
y="0px"
width="100px"
height="100px"
viewBox="5.0 -10.0 100.0 135.0"
enable-background="new 0 0 100 100"
xml:space="preserve"
inkscape:version="0.48.5 r10040"
sodipodi:docname="noun_22441_cc.svg"><metadata
id="metadata190"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs188" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview186"
showgrid="false"
inkscape:zoom="1.668772"
inkscape:cx="56.66954"
inkscape:cy="70.869906"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><g
id="g102"
transform="translate(4.8538692,7.2808029)"><g
id="g104"><path
d="M 49.946,17.395"
id="path106"
inkscape:connector-curvature="0" /><path
d="m 49.944,6.356 c -1.424,0 -2.576,-1.147 -2.576,-2.574 -0.001,-1.42 1.152,-2.578 2.576,-2.578 1.424,0 2.577,1.158 2.577,2.578 0,1.427 -1.153,2.574 -2.577,2.574 z"
id="path108"
inkscape:connector-curvature="0" /><polygon
points="47.791,7.39 41.771,1.164 40.751,1.602 47.114,11.026 47.067,17.411 45.201,32.946 46.95,32.946 50.001,20.032 53.053,32.946 54.801,32.946 52.935,17.411 52.887,11.026 59.251,1.602 58.23,1.164 52.212,7.39 50.004,7.39 49.998,7.39 "
id="polygon110" /></g></g><g
id="g112"
transform="translate(4.8538692,7.2808029)"><g
id="g114"><path
d="M 50.058,82.604"
id="path116"
inkscape:connector-curvature="0" /><path
d="m 50.058,93.644 c 1.421,0 2.576,1.147 2.576,2.573 0,1.42 -1.153,2.58 -2.576,2.58 -1.427,0 -2.579,-1.16 -2.579,-2.58 0,-1.426 1.152,-2.573 2.579,-2.573 z"
id="path118"
inkscape:connector-curvature="0" /><polygon
points="52.212,92.61 58.23,98.837 59.251,98.396 52.887,88.973 52.935,82.588 54.801,67.053 53.053,67.053 50.001,79.969 46.95,67.053 45.201,67.053 47.067,82.588 47.114,88.973 40.751,98.396 41.771,98.837 47.791,92.61 49.998,92.61 50.004,92.61 "
id="polygon120" /></g></g><g
id="g122"
transform="translate(4.8538692,7.2808029)"><g
id="g124"><path
d="M 26.906,26.984"
id="path126"
inkscape:connector-curvature="0" /><path
d="m 19.101,19.181 c -1.006,1.005 -2.634,1.009 -3.643,0 -1.005,-1.004 -1.008,-2.638 -0.002,-3.645 1.009,-1.009 2.644,-1.005 3.647,0 1.008,1.009 1.005,2.636 -0.002,3.645 z"
id="path128"
inkscape:connector-curvature="0" /><polygon
points="18.308,21.432 9.649,21.286 9.236,22.317 20.4,24.482 24.883,29.031 34.548,41.337 35.784,40.1 28.811,28.809 40.1,35.783 41.337,34.547 29.032,24.882 24.483,20.399 22.318,9.236 21.287,9.648 21.433,18.307 19.872,19.868 19.868,19.871 "
id="polygon130" /></g></g><g
id="g132"
transform="translate(4.8538692,7.2808029)"><g
id="g134"><path
d="M 73.095,73.017"
id="path136"
inkscape:connector-curvature="0" /><path
d="m 80.898,80.819 c 1.008,-1.005 2.636,-1.01 3.645,-0.002 1.005,1.006 1.007,2.641 0.002,3.647 -1.009,1.006 -2.643,1.003 -3.648,-0.002 -1.009,-1.006 -1.005,-2.634 10e-4,-3.643 z"
id="path138"
inkscape:connector-curvature="0" /><polygon
points="81.693,78.567 90.354,78.714 90.762,77.683 79.6,75.518 75.116,70.968 65.452,58.665 64.215,59.901 71.19,71.189 59.9,64.216 58.665,65.453 70.968,75.117 75.517,79.6 77.682,90.763 78.715,90.352 78.568,81.693 80.128,80.133 80.132,80.129 "
id="polygon140" /></g></g><g
id="g142"
transform="translate(4.8538692,7.2808029)"><g
id="g144"><path
d="M 17.395,50.056"
id="path146"
inkscape:connector-curvature="0" /><path
d="m 6.357,50.058 c 0,1.422 -1.148,2.575 -2.574,2.575 -1.421,10e-4 -2.579,-1.153 -2.578,-2.575 0,-1.427 1.157,-2.58 2.578,-2.58 1.426,0 2.574,1.153 2.574,2.58 z"
id="path148"
inkscape:connector-curvature="0" /><polygon
points="7.39,52.21 1.164,58.229 1.603,59.249 11.026,52.888 17.411,52.934 32.947,54.8 32.947,53.05 20.032,49.999 32.947,46.949 32.947,45.201 17.412,47.066 11.026,47.113 1.603,40.75 1.164,41.771 7.39,47.789 7.39,49.998 7.39,50.003 "
id="polygon150" /></g></g><g
id="g152"
transform="translate(4.8538692,7.2808029)"><g
id="g154"><path
d="M 82.604,49.945"
id="path156"
inkscape:connector-curvature="0" /><path
d="m 93.641,49.943 c 0.002,-1.423 1.149,-2.577 2.575,-2.576 1.421,-10e-4 2.581,1.152 2.581,2.576 0,1.425 -1.16,2.578 -2.581,2.578 -1.426,0 -2.573,-1.153 -2.575,-2.578 z"
id="path158"
inkscape:connector-curvature="0" /><polygon
points="92.611,47.79 98.837,41.771 98.398,40.75 88.974,47.113 82.587,47.066 67.052,45.201 67.052,46.949 79.968,49.999 67.052,53.05 67.052,54.8 82.587,52.934 88.974,52.888 98.398,59.249 98.837,58.229 92.611,52.21 92.611,50.003 92.611,49.998 "
id="polygon160" /></g></g><g
id="g162"
transform="translate(4.8538692,7.2808029)"><g
id="g164"><path
d="M 26.984,73.096"
id="path166"
inkscape:connector-curvature="0" /><path
d="m 19.181,80.899 c 1.005,1.007 1.01,2.636 10e-4,3.644 -1.004,1.004 -2.639,1.008 -3.646,10e-4 -1.008,-1.008 -1.005,-2.642 0,-3.647 1.009,-1.009 2.636,-1.004 3.645,0.002 z"
id="path168"
inkscape:connector-curvature="0" /><polygon
points="21.432,81.692 21.287,90.352 22.318,90.763 24.482,79.6 29.031,75.117 41.337,65.453 40.1,64.216 28.809,71.191 35.784,59.901 34.548,58.665 24.882,70.968 20.399,75.518 9.236,77.683 9.649,78.714 18.307,78.567 19.868,80.129 19.872,80.133 "
id="polygon170" /></g></g><g
id="g172"
transform="translate(4.8538692,7.2808029)"><g
id="g174"><path
d="M 73.017,26.905"
id="path176"
inkscape:connector-curvature="0" /><path
d="m 80.818,19.1 c -1.005,-1.005 -1.009,-2.634 0,-3.642 1.004,-1.006 2.64,-1.009 3.646,-0.002 1.007,1.009 1.003,2.644 0,3.647 -1.008,1.008 -2.636,1.004 -3.646,-0.003 z"
id="path178"
inkscape:connector-curvature="0" /><polygon
points="78.568,18.307 78.715,9.648 77.682,9.236 75.517,20.399 70.968,24.883 58.665,34.548 59.9,35.783 71.19,28.811 64.215,40.1 65.452,41.337 75.116,29.031 79.6,24.482 90.762,22.318 90.352,21.286 81.693,21.433 80.132,19.871 80.128,19.868 "
id="polygon180" /></g></g></svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="100px"
height="100px"
viewBox="5.0 -10.0 100.0 135.0"
enable-background="new 0 0 100 100"
xml:space="preserve"
inkscape:version="0.48.5 r10040"
sodipodi:docname="noun_2651_cc.svg"><metadata
id="metadata35"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs33" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview31"
showgrid="false"
inkscape:zoom="2.36"
inkscape:cx="50"
inkscape:cy="50"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><g
id="g3"
transform="matrix(1.1932927,0,0,1.1932927,-4.7732679,-6.796496)"><g
id="g5"><path
d="m 19.3,48.049 c -6.816,0 -12.362,-5.546 -12.362,-12.362 0,-6.817 5.546,-12.363 12.362,-12.363 6.816,0 12.362,5.546 12.362,12.363 0,6.816 -5.546,12.362 -12.362,12.362 z m 0,-19.725 c -4.06,0 -7.362,3.303 -7.362,7.363 0,4.06 3.303,7.362 7.362,7.362 4.059,0 7.362,-3.303 7.362,-7.362 0,-4.061 -3.303,-7.363 -7.362,-7.363 z"
id="path7"
inkscape:connector-curvature="0"
style="fill:#000000" /></g><g
id="g9"><path
d="m 50,48.049 c -6.816,0 -12.362,-5.546 -12.362,-12.362 0,-6.817 5.546,-12.363 12.362,-12.363 6.816,0 12.362,5.546 12.362,12.363 0,6.816 -5.546,12.362 -12.362,12.362 z m 0,-19.725 c -4.06,0 -7.362,3.303 -7.362,7.363 0,4.06 3.303,7.362 7.362,7.362 4.059,0 7.362,-3.303 7.362,-7.362 0,-4.061 -3.302,-7.363 -7.362,-7.363 z"
id="path11"
inkscape:connector-curvature="0"
style="fill:#000000" /></g><g
id="g13"><path
d="m 50,78.676 c -6.816,0 -12.362,-5.545 -12.362,-12.363 0,-6.816 5.546,-12.361 12.362,-12.361 6.816,0 12.362,5.545 12.362,12.361 0,6.818 -5.546,12.363 -12.362,12.363 z m 0,-19.725 c -4.06,0 -7.362,3.303 -7.362,7.361 0,4.061 3.303,7.363 7.362,7.363 4.059,0 7.362,-3.303 7.362,-7.363 0,-4.058 -3.302,-7.361 -7.362,-7.361 z"
id="path15"
inkscape:connector-curvature="0"
style="fill:#000000" /></g><g
id="g17"><path
d="m 80.7,48.049 c -6.816,0 -12.362,-5.546 -12.362,-12.362 0,-6.817 5.546,-12.363 12.362,-12.363 6.816,0 12.362,5.546 12.362,12.363 0.001,6.816 -5.545,12.362 -12.362,12.362 z m 0,-19.725 c -4.06,0 -7.362,3.303 -7.362,7.363 0,4.06 3.303,7.362 7.362,7.362 4.059,0 7.362,-3.303 7.362,-7.362 0.001,-4.061 -3.302,-7.363 -7.362,-7.363 z"
id="path19"
inkscape:connector-curvature="0"
style="fill:#000000" /></g><path
d="m 78.2,45.807 v 8.645 c 0,5.238 -4.262,9.5 -9.5,9.5 h -9.283 v 5 H 68.7 c 7.995,0 14.5,-6.506 14.5,-14.5 v -8.645 h -5 z"
id="path21"
inkscape:connector-curvature="0"
style="fill:#000000" /><path
d="M 41.543,63.951 H 31.171 c -5.238,0 -9.5,-4.262 -9.5,-9.5 v -8.645 h -5 v 8.645 c 0,7.994 6.505,14.5 14.5,14.5 h 10.372 v -5 z"
id="path23"
inkscape:connector-curvature="0"
style="fill:#000000" /><rect
x="47.5"
y="44.512001"
width="5"
height="11.658"
id="rect25"
style="fill:#000000" /></g></svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="100px"
height="100px"
viewBox="5.0 -10.0 100.0 135.0"
enable-background="new 0 0 100 100"
xml:space="preserve"
inkscape:version="0.48.5 r10040"
sodipodi:docname="noun_29542_cc.svg"><metadata
id="metadata23"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs21" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview19"
showgrid="false"
inkscape:zoom="2.36"
inkscape:cx="50"
inkscape:cy="42.264259"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><path
d="M 98.625666,40.817494 H 93.61882 l -5.39733,3.785065 h 8.801983 c 0.417331,0 0.830191,0.05259 1.222903,0.147688 2.418944,0.563899 4.218054,2.753486 4.218054,5.362641 v 48.214546 c 2.29476,-1.34597 3.84549,-3.855546 3.84549,-6.73547 V 48.6058 c -7.8e-4,-4.304211 -3.4427,-7.788306 -7.684254,-7.788306 z"
id="path3"
inkscape:connector-curvature="0" /><path
d="M 97.238291,47.840508 H 11.49197 c -0.896198,0 -1.6178555,-0.726134 -1.6178555,-1.617855 0,-0.896199 0.7227765,-1.624569 1.6178555,-1.624569 h 6.604563 l 2.189587,-1.582052 3.043267,-2.198538 H 12.460892 c -4.2840709,0 -7.7558576,3.484095 -7.7558576,7.778236 v 1.511564 49.867086 c 0,4.29973 3.4717867,7.7827 7.7558576,7.7827 h 79.282734 c 4.281828,0 7.756977,-3.48297 7.756977,-7.7827 V 50.107294 c -0.0055,-1.251991 -1.018152,-2.266786 -2.262312,-2.266786 z"
id="path5"
inkscape:connector-curvature="0" /><g
id="g7"
transform="matrix(1.1188486,0,0,1.1188486,0.08083236,2.3167937)"><path
d="m 49.752,26.299 c -5.534,-0.29 -10.249,3.943 -10.524,9.453 -0.036,0.745 0.016,1.472 0.137,2.177 h 19.797 c 0.062,-0.368 0.106,-0.741 0.126,-1.122 0.273,-5.515 -3.998,-10.219 -9.536,-10.508 z"
id="path9"
inkscape:connector-curvature="0"
style="fill:none" /><path
d="m 39.228,35.752 c 0.275,-5.509 4.991,-9.742 10.524,-9.453 5.538,0.289 9.808,4.992 9.536,10.507 -0.02,0.381 -0.064,0.754 -0.126,1.122 H 74.739 L 84.561,30.636 64.814,4.572 19.895,37.929 h 19.47 c -0.121,-0.705 -0.173,-1.432 -0.137,-2.177 z"
id="path11"
inkscape:connector-curvature="0" /></g><polygon
points="51.353,11.92 40.884,5.019 22.209,33.399 "
id="polygon13"
transform="matrix(1.1188486,0,0,1.1188486,0.08083236,2.3167937)" /></svg>
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="100px"
height="100px"
viewBox="5.0 -10.0 100.0 135.0"
enable-background="new 0 0 100 100"
xml:space="preserve"
inkscape:version="0.48.5 r10040"
sodipodi:docname="noun_63271_cc.svg"><metadata
id="metadata23"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs21" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview19"
showgrid="false"
inkscape:zoom="2.36"
inkscape:cx="50"
inkscape:cy="55.110775"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><g
id="g3"
transform="matrix(1.216319,0,0,1.216319,-4.5137983,-2.5214573)"><polygon
points="59.878,16.945 83.293,40.361 59.876,63.777 71.584,63.777 94.998,40.361 95,40.361 71.584,16.947 "
id="polygon5" /><polygon
points="41.901,44.5 41.899,44.502 50.178,36.224 83.293,36.224 83.293,40.361 83.293,44.501 "
id="polygon7" /></g><g
id="g9"
transform="matrix(1.216319,0,0,1.216319,-4.5137983,-2.5214573)"><polygon
points="40.123,83.055 16.709,59.639 40.125,36.224 28.416,36.224 5.002,59.639 5,59.639 28.416,83.053 "
id="polygon11" /><polygon
points="58.099,55.5 58.101,55.498 49.822,63.777 16.707,63.777 16.707,59.639 16.707,55.498 "
id="polygon13" /></g></svg>
\ No newline at end of file
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
<string>Account name</string> <string>Account name (uid)</string>
</property> </property>
</widget> </widget>
</item> </item>
...@@ -132,9 +132,9 @@ ...@@ -132,9 +132,9 @@
<layout class="QHBoxLayout" name="horizontalLayout_5"/> <layout class="QHBoxLayout" name="horizontalLayout_5"/>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="edit_email"> <widget class="QLineEdit" name="edit_salt">
<property name="placeholderText"> <property name="placeholderText">
<string>Your email</string> <string>Your salt</string>
</property> </property>
</widget> </widget>
</item> </item>
...@@ -363,7 +363,7 @@ ...@@ -363,7 +363,7 @@
</hints> </hints>
</connection> </connection>
<connection> <connection>
<sender>edit_email</sender> <sender>edit_salt</sender>
<signal>textChanged(QString)</signal> <signal>textChanged(QString)</signal>
<receiver>AccountConfigurationDialog</receiver> <receiver>AccountConfigurationDialog</receiver>
<slot>action_edit_account_key()</slot> <slot>action_edit_account_key()</slot>
......
...@@ -22,7 +22,20 @@ ...@@ -22,7 +22,20 @@
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>
</property> </property>
<property name="iconSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="elideMode">
<enum>Qt::ElideNone</enum>
</property>
<widget class="QWidget" name="tab_members"> <widget class="QWidget" name="tab_members">
<attribute name="icon">
<iconset resource="../icons/icons.qrc">
<normaloff>:/icons/members_icon</normaloff>:/icons/members_icon</iconset>
</attribute>
<attribute name="title"> <attribute name="title">
<string>Members</string> <string>Members</string>
</attribute> </attribute>
...@@ -68,7 +81,9 @@ ...@@ -68,7 +81,9 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<resources/> <resources>
<include location="../icons/icons.qrc"/>
</resources>
<connections> <connections>
<connection> <connection>
<sender>button_membership</sender> <sender>button_membership</sender>
......
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<property name="windowIcon">
<iconset>
<normaloff>:/icons/noun_43022_cc.svg</normaloff>:/icons/noun_43022_cc.svg</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="verticalLayout_4">
<item> <item>
<widget class="QFrame" name="actionsFrame"> <widget class="QFrame" name="actionsFrame">
...@@ -32,6 +36,10 @@ ...@@ -32,6 +36,10 @@
<number>0</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="tab_wallets"> <widget class="QWidget" name="tab_wallets">
<attribute name="icon">
<iconset resource="../icons/icons.qrc">
<normaloff>:/icons/wallet_icon</normaloff>:/icons/wallet_icon</iconset>
</attribute>
<attribute name="title"> <attribute name="title">
<string>Wallets</string> <string>Wallets</string>
</attribute> </attribute>
...@@ -49,6 +57,10 @@ ...@@ -49,6 +57,10 @@
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_transactions"> <widget class="QWidget" name="tab_transactions">
<attribute name="icon">
<iconset resource="../icons/icons.qrc">
<normaloff>:/icons/tx_icon</normaloff>:/icons/tx_icon</iconset>
</attribute>
<attribute name="title"> <attribute name="title">
<string>Transactions</string> <string>Transactions</string>
</attribute> </attribute>
...@@ -90,7 +102,9 @@ ...@@ -90,7 +102,9 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<resources/> <resources>
<include location="../icons/icons.qrc"/>
</resources>
<connections> <connections>
<connection> <connection>
<sender>list_wallets</sender> <sender>list_wallets</sender>
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>498</width> <width>681</width>
<height>437</height> <height>549</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
...@@ -16,15 +16,15 @@ ...@@ -16,15 +16,15 @@
<widget class="QWidget" name="centralwidget"> <widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout_6"> <layout class="QVBoxLayout" name="verticalLayout_6">
<item> <item>
<widget class="QLabel" name="label_account_name"> <widget class="QTabWidget" name="currencies_tabwidget">
<property name="text"> <property name="iconSize">
<string>Please select an account</string> <size>
<width>24</width>
<height>24</height>
</size>
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QTabWidget" name="currencies_tabwidget"/>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QMenuBar" name="menubar"> <widget class="QMenuBar" name="menubar">
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>498</width> <width>681</width>
<height>20</height> <height>20</height>
</rect> </rect>
</property> </property>
...@@ -42,12 +42,13 @@ ...@@ -42,12 +42,13 @@
</property> </property>
<widget class="QMenu" name="menu_change_account"> <widget class="QMenu" name="menu_change_account">
<property name="title"> <property name="title">
<string>Change account</string> <string>Open</string>
</property> </property>
</widget> </widget>
<addaction name="action_configure_parameters"/>
<addaction name="menu_change_account"/>
<addaction name="action_add_account"/> <addaction name="action_add_account"/>
<addaction name="menu_change_account"/>
<addaction name="action_configure_parameters"/>
<addaction name="action_set_as_default"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="action_export"/> <addaction name="action_export"/>
<addaction name="action_import"/> <addaction name="action_import"/>
...@@ -127,7 +128,7 @@ ...@@ -127,7 +128,7 @@
</action> </action>
<action name="action_add_account"> <action name="action_add_account">
<property name="text"> <property name="text">
<string>Add account</string> <string>Add</string>
</property> </property>
</action> </action>
<action name="action_save"> <action name="action_save">
...@@ -170,6 +171,11 @@ ...@@ -170,6 +171,11 @@
<string>Certification</string> <string>Certification</string>
</property> </property>
</action> </action>
<action name="action_set_as_default">
<property name="text">
<string>Set as default</string>
</property>
</action>
</widget> </widget>
<resources/> <resources/>
<connections> <connections>
...@@ -301,6 +307,22 @@ ...@@ -301,6 +307,22 @@
</hint> </hint>
</hints> </hints>
</connection> </connection>
<connection>
<sender>action_set_as_default</sender>
<signal>triggered()</signal>
<receiver>MainWindow</receiver>
<slot>set_as_default_account()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>340</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections> </connections>
<slots> <slots>
<slot>open_add_account_dialog()</slot> <slot>open_add_account_dialog()</slot>
...@@ -312,5 +334,6 @@ ...@@ -312,5 +334,6 @@
<slot>refresh_wallet_content(QModelIndex)</slot> <slot>refresh_wallet_content(QModelIndex)</slot>
<slot>export_account()</slot> <slot>export_account()</slot>
<slot>open_certification_dialog()</slot> <slot>open_certification_dialog()</slot>
<slot>set_as_default_account()</slot>
</slots> </slots>
</ui> </ui>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PasswordAskerDialog</class>
<widget class="QDialog" name="PasswordAskerDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>274</width>
<height>99</height>
</rect>
</property>
<property name="windowTitle">
<string>Password</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLineEdit" name="edit_password">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
<property name="placeholderText">
<string>Please enter your account password</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QCheckBox" name="check_remember">
<property name="text">
<string>Remember my password during this session</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>PasswordAskerDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>PasswordAskerDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>
...@@ -143,6 +143,9 @@ class Account(object): ...@@ -143,6 +143,9 @@ class Account(object):
received = [] received = []
for w in self.wallets: for w in self.wallets:
for t in w.transactions_received(community): for t in w.transactions_received(community):
# Lets remove transactions from our own wallets
pubkeys = [wallet.pubkey for wallet in self.wallets]
if t.issuers[0] not in pubkeys:
received.append(t) received.append(t)
return received return received
...@@ -150,9 +153,24 @@ class Account(object): ...@@ -150,9 +153,24 @@ class Account(object):
sent = [] sent = []
for w in self.wallets: for w in self.wallets:
for t in w.transactions_sent(community): for t in w.transactions_sent(community):
# Lets remove transactions to our own wallets
pubkeys = [wallet.pubkey for wallet in self.wallets]
outputs = [o for o in t.outputs if o.pubkey not in pubkeys]
if len(outputs) > 0:
sent.append(t) sent.append(t)
return sent return sent
def transactions_awaiting(self, community):
awaiting = []
for w in self.wallets:
for t in w.transactions_awaiting(community):
# Lets remove transactions to our own wallets
pubkeys = [wallet.pubkey for wallet in self.wallets]
outputs = [o for o in t.outputs if o.pubkey not in pubkeys]
if len(outputs) > 0:
awaiting.append(t)
return awaiting
def member_of(self, community): def member_of(self, community):
pubkeys = community.members_pubkeys() pubkeys = community.members_pubkeys()
if self.pubkey not in pubkeys: if self.pubkey not in pubkeys:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment