Merge branch 'v0.6' into fabric_task_improvements

This commit is contained in:
coffeedogs 2018-06-27 10:41:11 +01:00 committed by coffeedogs
commit 7e2cb2176e
No known key found for this signature in database
GPG Key ID: 9D818C503D0B7E70
44 changed files with 3010 additions and 2645 deletions

4
.gitignore vendored
View File

@ -3,6 +3,7 @@
**.DS_Store **.DS_Store
src/build src/build
src/dist src/dist
src/.eggs
src/.project src/.project
src/.pydevproject src/.pydevproject
src/.settings/ src/.settings/
@ -13,3 +14,6 @@ build/lib.*
build/temp.* build/temp.*
dist dist
*.egg-info *.egg-info
docs/_*/*
docs/autodoc/
pyan/

View File

@ -7,6 +7,5 @@ addons:
- build-essential - build-essential
- libcap-dev - libcap-dev
install: install:
- pip install -r requirements.txt
- python setup.py install - python setup.py install
script: pybitmessage -t script: pybitmessage -t

View File

@ -1,15 +1,33 @@
## Code contributions to the Bitmessage project ## Repository contributions to the PyBitmessage project
- try to explain what the code is about
- try to follow [PEP0008](https://www.python.org/dev/peps/pep-0008/)
- make the pull request against the ["v0.6" branch](https://github.com/Bitmessage/PyBitmessage/tree/v0.6)
- PGP-sign the commits included in the pull request
- try to use a good editor that removes trailing whitespace, highlights potential python issues and uses unix line endings
- You can get paid for merged commits if you register at [Tip4Commit](https://tip4commit.com/github/Bitmessage/PyBitmessage) - You can get paid for merged commits if you register at [Tip4Commit](https://tip4commit.com/github/Bitmessage/PyBitmessage)
If for some reason you don't want to use github, you can submit the patch using Bitmessage to the "bitmessage" chan, or to one of the developers. ### Code
- Try to refer to github issue tracker or other permanent sources of discussion about the issue.
- It is clear from the diff *what* you have done, it may be less clear *why* you have done it so explain why this change is necessary rather than what it does
### Documentation
- If there has been a change to the code, there's a good possibility there should be a corresponding change to the documentation
- If you can't run `fab build_docs` successfully, ask for someone to run it against your branch
### Tests
- If there has been a change to the code, there's a good possibility there should be a corresponding change to the tests
- If you can't run `fab tests` successfully, ask for someone to run it against your branch
## Translations ## Translations
For helping with translations, please use [Transifex](https://www.transifex.com/bitmessage-project/pybitmessage/). There is no need to submit pull requests for translations. - For helping with translations, please use [Transifex](https://www.transifex.com/bitmessage-project/pybitmessage/).
For translating technical terms it is recommended to consult the [Microsoft Language Portal](https://www.microsoft.com/Language/en-US/Default.aspx). - There is no need to submit pull requests for translations.
- For translating technical terms it is recommended to consult the [Microsoft Language Portal](https://www.microsoft.com/Language/en-US/Default.aspx).
### Gitiquette
- Make the pull request against the ["v0.6" branch](https://github.com/Bitmessage/PyBitmessage/tree/v0.6)
- PGP-sign the commits included in the pull request
- Use references to tickets, e.g. `addresses #123` or `fixes #234` in your commit messages
- Try to use a good editor that removes trailing whitespace, highlights potential python issues and uses unix line endings
- If for some reason you don't want to use github, you can submit the patch using Bitmessage to the "bitmessage" chan, or to one of the developers.

203
checkdeps.py Normal file → Executable file
View File

@ -1,3 +1,4 @@
#!/usr/bin/env python2
""" """
Check dependendies and give recommendations about how to satisfy them Check dependendies and give recommendations about how to satisfy them
@ -9,112 +10,24 @@ Limitations:
EXTRAS_REQUIRE. This is fine because most developers do, too. EXTRAS_REQUIRE. This is fine because most developers do, too.
""" """
import os
from distutils.errors import CompileError from distutils.errors import CompileError
try: try:
from setuptools.dist import Distribution from setuptools.dist import Distribution
from setuptools.extension import Extension from setuptools.extension import Extension
from setuptools.command.build_ext import build_ext from setuptools.command.build_ext import build_ext
HAVE_SETUPTOOLS = True HAVE_SETUPTOOLS = True
# another import from setuptools is in setup.py
from setup import EXTRAS_REQUIRE
except ImportError: except ImportError:
HAVE_SETUPTOOLS = False HAVE_SETUPTOOLS = False
EXTRAS_REQUIRE = []
from importlib import import_module from importlib import import_module
import os
import sys
from setup import EXTRAS_REQUIRE from src.depends import detectOS, PACKAGES, PACKAGE_MANAGER
PROJECT_ROOT = os.path.abspath('..')
sys.path.insert(0, PROJECT_ROOT)
# OS-specific dependencies for optional components listed in EXTRAS_REQUIRE
EXTRAS_REQUIRE_DEPS = {
# The values from setup.EXTRAS_REQUIRE
'python_prctl': {
# The packages needed for this requirement, by OS
"OpenBSD": [""],
"FreeBSD": [""],
"Debian": ["libcap-dev"],
"Ubuntu": [""],
"Ubuntu 12": [""],
"openSUSE": [""],
"Fedora": [""],
"Guix": [""],
"Gentoo": [""],
},
}
PACKAGE_MANAGER = {
"OpenBSD": "pkg_add",
"FreeBSD": "pkg install",
"Debian": "apt-get install",
"Ubuntu": "apt-get install",
"Ubuntu 12": "apt-get install",
"openSUSE": "zypper install",
"Fedora": "dnf install",
"Guix": "guix package -i",
"Gentoo": "emerge"
}
PACKAGES = {
"PyQt4": {
"OpenBSD": "py-qt4",
"FreeBSD": "py27-qt4",
"Debian": "python-qt4",
"Ubuntu": "python-qt4",
"Ubuntu 12": "python-qt4",
"openSUSE": "python-qt",
"Fedora": "PyQt4",
"Guix": "python2-pyqt@4.11.4",
"Gentoo": "dev-python/PyQt4",
'optional': True,
'description': "You only need PyQt if you want to use the GUI. " \
"When only running as a daemon, this can be skipped.\n" \
"However, you would have to install it manually " \
"because setuptools does not support PyQt."
},
"msgpack": {
"OpenBSD": "py-msgpack",
"FreeBSD": "py27-msgpack-python",
"Debian": "python-msgpack",
"Ubuntu": "python-msgpack",
"Ubuntu 12": "msgpack-python",
"openSUSE": "python-msgpack-python",
"Fedora": "python2-msgpack",
"Guix": "python2-msgpack",
"Gentoo": "dev-python/msgpack",
"optional": True,
"description": "python-msgpack is recommended for improved performance of message encoding/decoding"
},
"pyopencl": {
"FreeBSD": "py27-pyopencl",
"Debian": "python-pyopencl",
"Ubuntu": "python-pyopencl",
"Ubuntu 12": "python-pyopencl",
"Fedora": "python2-pyopencl",
"openSUSE": "",
"OpenBSD": "",
"Guix": "",
"Gentoo": "dev-python/pyopencl",
"optional": True,
'description': "If you install pyopencl, you will be able to use " \
"GPU acceleration for proof of work. \n" \
"You also need a compatible GPU and drivers."
},
"setuptools": {
"OpenBSD": "py-setuptools",
"FreeBSD": "py27-setuptools",
"Debian": "python-setuptools",
"Ubuntu": "python-setuptools",
"Ubuntu 12": "python-setuptools",
"Fedora": "python2-setuptools",
"openSUSE": "python-setuptools",
"Guix": "python2-setuptools",
"Gentoo": "",
"optional": False,
}
}
COMPILING = { COMPILING = {
"Debian": "build-essential libssl-dev", "Debian": "build-essential libssl-dev",
"Ubuntu": "build-essential libssl-dev", "Ubuntu": "build-essential libssl-dev",
@ -123,46 +36,23 @@ COMPILING = {
"optional": False, "optional": False,
} }
def detectOSRelease(): # OS-specific dependencies for optional components listed in EXTRAS_REQUIRE
with open("/etc/os-release", 'r') as osRelease: EXTRAS_REQUIRE_DEPS = {
version = None # The values from setup.EXTRAS_REQUIRE
for line in osRelease: 'python_prctl': {
if line.startswith("NAME="): # The packages needed for this requirement, by OS
line = line.lower() "OpenBSD": [""],
if "fedora" in line: "FreeBSD": [""],
detectOS.result = "Fedora" "Debian": ["libcap-dev python-prctl"],
elif "opensuse" in line: "Ubuntu": ["libcap-dev python-prctl"],
detectOS.result = "openSUSE" "Ubuntu 12": ["libcap-dev python-prctl"],
elif "ubuntu" in line: "openSUSE": [""],
detectOS.result = "Ubuntu" "Fedora": ["prctl"],
elif "debian" in line: "Guix": [""],
detectOS.result = "Debian" "Gentoo": ["dev-python/python-prctl"],
elif "gentoo" in line or "calculate" in line: },
detectOS.result = "Gentoo" }
else:
detectOS.result = None
if line.startswith("VERSION_ID="):
try:
version = float(line.split("=")[1].replace("\"", ""))
except ValueError:
pass
if detectOS.result == "Ubuntu" and version < 14:
detectOS.result = "Ubuntu 12"
def detectOS():
if detectOS.result is not None:
return detectOS.result
if sys.platform.startswith('openbsd'):
detectOS.result = "OpenBSD"
elif sys.platform.startswith('freebsd'):
detectOS.result = "FreeBSD"
elif sys.platform.startswith('win'):
detectOS.result = "Windows"
elif os.path.isfile("/etc/os-release"):
detectOSRelease()
elif os.path.isfile("/etc/config.scm"):
detectOS.result = "Guix"
return detectOS.result
def detectPrereqs(missing=True): def detectPrereqs(missing=True):
available = [] available = []
@ -176,18 +66,21 @@ def detectPrereqs(missing=True):
available.append(module) available.append(module)
return available return available
def prereqToPackages(): def prereqToPackages():
if not detectPrereqs(): if not detectPrereqs():
return return
print "%s %s" % ( print("%s %s" % (
PACKAGE_MANAGER[detectOS()], " ".join( PACKAGE_MANAGER[detectOS()], " ".join(
PACKAGES[x][detectOS()] for x in detectPrereqs())) PACKAGES[x][detectOS()] for x in detectPrereqs())))
def compilerToPackages(): def compilerToPackages():
if not detectOS() in COMPILING: if not detectOS() in COMPILING:
return return
print "%s %s" % ( print("%s %s" % (
PACKAGE_MANAGER[detectOS.result], COMPILING[detectOS.result]) PACKAGE_MANAGER[detectOS.result], COMPILING[detectOS.result]))
def testCompiler(): def testCompiler():
if not HAVE_SETUPTOOLS: if not HAVE_SETUPTOOLS:
@ -214,30 +107,30 @@ def testCompiler():
fullPath = os.path.join(cmd.build_lib, cmd.get_ext_filename("bitmsghash")) fullPath = os.path.join(cmd.build_lib, cmd.get_ext_filename("bitmsghash"))
return os.path.isfile(fullPath) return os.path.isfile(fullPath)
detectOS.result = None
prereqs = detectPrereqs()
prereqs = detectPrereqs()
compiler = testCompiler() compiler = testCompiler()
if (not compiler or prereqs) and detectOS() in PACKAGE_MANAGER: if (not compiler or prereqs) and detectOS() in PACKAGE_MANAGER:
print "It looks like you're using %s. " \ print(
"It is highly recommended to use the package manager\n" \ "It looks like you're using %s. "
"to install the missing dependencies." % (detectOS.result) "It is highly recommended to use the package manager\n"
"to install the missing dependencies." % detectOS.result)
if not compiler: if not compiler:
print "Building the bitmsghash module failed.\n" \ print(
"You may be missing a C++ compiler and/or the OpenSSL headers." "Building the bitmsghash module failed.\n"
"You may be missing a C++ compiler and/or the OpenSSL headers.")
if prereqs: if prereqs:
mandatory = list(x for x in prereqs if "optional" not in PACKAGES[x] or not PACKAGES[x]["optional"]) mandatory = [x for x in prereqs if not PACKAGES[x].get("optional")]
optional = list(x for x in prereqs if "optional" in PACKAGES[x] and PACKAGES[x]["optional"]) optional = [x for x in prereqs if PACKAGES[x].get("optional")]
if mandatory: if mandatory:
print "Missing mandatory dependencies: %s" % (" ".join(mandatory)) print("Missing mandatory dependencies: %s" % " ".join(mandatory))
if optional: if optional:
print "Missing optional dependencies: %s" % (" ".join(optional)) print("Missing optional dependencies: %s" % " ".join(optional))
for package in optional: for package in optional:
print PACKAGES[package].get('description') print(PACKAGES[package].get('description'))
# Install the system dependencies of optional extras_require components # Install the system dependencies of optional extras_require components
OPSYS = detectOS() OPSYS = detectOS()
@ -259,12 +152,14 @@ for lhs, rhs in EXTRAS_REQUIRE.items():
if x in EXTRAS_REQUIRE_DEPS if x in EXTRAS_REQUIRE_DEPS
]), ]),
]) ])
print "Optional dependency `pip install .[{}]` would require `{}` to be run as root".format(lhs, rhs_cmd) print(
"Optional dependency `pip install .[{}]` would require `{}`"
" to be run as root".format(lhs, rhs_cmd))
if (not compiler or prereqs) and detectOS() in PACKAGE_MANAGER: if (not compiler or prereqs) and OPSYS in PACKAGE_MANAGER:
print "You can install the missing dependencies by running, as root:" print("You can install the missing dependencies by running, as root:")
if not compiler: if not compiler:
compilerToPackages() compilerToPackages()
prereqToPackages() prereqToPackages()
else: else:
print "All the dependencies satisfied, you can install PyBitmessage" print("All the dependencies satisfied, you can install PyBitmessage")

20
docs/Makefile Normal file
View File

@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = PyBitmessage
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

210
docs/conf.py Normal file
View File

@ -0,0 +1,210 @@
# -*- coding: utf-8 -*-
"""
Configuration file for the Sphinx documentation builder.
This file does only contain a selection of the most common options. For a
full list see the documentation:
http://www.sphinx-doc.org/en/master/config
-- Path setup --------------------------------------------------------------
If extensions (or modules to document with autodoc) are in another directory,
add these directories to sys.path here. If the directory is relative to the
documentation root, use os.path.abspath to make it absolute, like shown here.
"""
import os
import sys
from sphinx.apidoc import main
from mock import Mock as MagicMock
sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('../src'))
sys.path.insert(0, os.path.abspath('../src/pyelliptic'))
import version
# -- Project information -----------------------------------------------------
project = u'PyBitmessage'
copyright = u'2018, The Bitmessage Team' # pylint: disable=redefined-builtin
author = u'The Bitmessage Team'
# The short X.Y version
version = unicode(version.softwareVersion)
# The full version, including alpha/beta/rc tags
release = version
# -- General configuration ---------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
# 'sphinx.ext.doctest', # Currently disabled due to bad doctests
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.imgmath',
'sphinx.ext.viewcode',
'm2r',
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
source_suffix = ['.rst', '.md']
# The master toctree document.
master_doc = 'index'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = [u'_build', 'Thumbs.db', '.DS_Store']
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}
# Deal with long lines in source view
html_theme_options = {
'page_width': '1366px',
}
# -- Options for HTMLHelp output ---------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = 'PyBitmessagedoc'
# -- Options for LaTeX output ------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'PyBitmessage.tex', u'PyBitmessage Documentation',
u'The Bitmessage Team', 'manual'),
]
# -- Options for manual page output ------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'pybitmessage', u'PyBitmessage Documentation',
[author], 1)
]
# -- Options for Texinfo output ----------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'PyBitmessage', u'PyBitmessage Documentation',
author, 'PyBitmessage', 'One line description of project.',
'Miscellaneous'),
]
# -- Options for Epub output -------------------------------------------------
# Bibliographic Dublin Core info.
epub_title = project
epub_author = author
epub_publisher = author
epub_copyright = copyright
# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#
# epub_identifier = ''
# A unique identification for the text.
#
# epub_uid = ''
# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']
# -- Extension configuration -------------------------------------------------
# -- Options for intersphinx extension ---------------------------------------
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
# -- Options for todo extension ----------------------------------------------
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True

View File

@ -0,0 +1,18 @@
Documentation
=============
Sphinx is used to pull richly formatted comments out of code, merge them with hand-written documentation and render it
in HTML and other formats.
To build the docs, simply run `$ fab -H localhost build_docs` once you have set up Fabric.
Restructured Text (RsT) vs MarkDown (md)
----------------------------------------
There's much on the internet about this. Suffice to say RsT_ is preferred for Python documentation while md is preferred for web markup or for certain other languages.
.. _Rst: [http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html]` style is preferred,
`md` files can also be incorporated by using mdinclude directives in the indices. They are translated to RsT before rendering to the various formats. Headers are translated as a hard-coded level `(H1: =, H2: -, H3: ^, H4: ~, H5: ", H6: #`. This represents a small consideration for both styles. If markup is not translated to rst well enough, switch to rst.

View File

@ -0,0 +1,2 @@
.. mdinclude:: fabfile/README.md

View File

@ -0,0 +1,38 @@
Operational Security
====================
Bitmessage has many features that are designed to protect your anonymity during normal use. There are other things that you must or should do if you value your anonymity.
Castles in the sand
-------------------
You cannot build a strong castle on unstable foundations. If your operating system is not wholly owned by you then it is impossible to make guarantees about an application.
* Carefully choose your operating system
* Ensure your operating system is up to date
* Ensure any dependencies and requirements are up to date
Extrordinary claims require extrordinary evidence
-------------------------------------------------
If we are to make bold claims about protecting your privacy we should demonstrate this by strong actions.
- PGP signed commits
- looking to audit
- warrant canary
Digital foootprint
------------------
Your internet use can reveal metadata you wouldn't expect. This can be connected with other information about you if you're not careful.
* Use separate addresses for different puprose
* Don't make the same mistakes all the time
* Your language use is unique. The more you type, the more you fingerprint yourself. The words you know and use often vs the words you don't know or use often.
Cleaning history
----------------
* Tell your browser not to store BitMessage addresses
* Microsoft Office seems to offer the ability to define sensitive informations types. If browsers don't already they may in the future. Consider adding `BM-\w{x..y}`.

View File

@ -0,0 +1,88 @@
Developing
==========
Devops tasks
------------
Bitmessage makes use of fabric_ to define tasks such as building documentation or running checks and tests on the code. If you can install
.. _fabric: https://fabfile.org
Code style and linters
----------------------
We aim to be PEP8 compliant but we recognise that we have a long way still to go. Currently we have style and lint exceptions specified at the most specific place we can. We are ignoring certain issues project-wide in order to avoid alert-blindess, avoid style and lint regressions and to allow continuous integration to hook into the output from the tools. While it is hoped that all new changes pass the checks, fixing some existing violations are mini-projects in themselves. Current thinking on ignorable violations is reflected in the options and comments in setup.cfg. Module and line-level lint warnings represent refactoring opportunities.
Pull requests
-------------
There is a template at PULL_REQUEST_TEMPLATE.md that appears in the pull-request description. Please replace this text with something appropriate to your changes based off the ideas in the template.
Bike-shedding
-------------
Beyond having well-documented, Pythonic code with static analysis tool checks, extensive test coverage and powerful devops tools, what else can we have? Without violating any linters there is room for making arbirary decisions solely for the sake of project consistency. These are the stuff of the pedant's PR comments. Rather than have such conversations in PR comments, we can lay out the result of discussion here.
I'm putting up a strawman for each topic here, mostly based on my memory of reading related Stack Overflow articles etc. If contributors feel strongly (and we don't have anything better to do) then maybe we can convince each other to update this section.
Trailing vs hanging braces
Data
Hanging closing brace is preferred, trailing commas always to help reduce churn in diffs
Function, class, method args
Inline until line-length, then style as per data
Nesting
Functions
Short: group hanging close parentheses
Long: one closing parentheses per line
Single vs double quotes
Single quotes are preferred; less strain on the hands, eyes
Double quotes are only better so as to contain single quotes, but we want to contain doubles as often
Line continuation
Implicit parentheses continuation is preferred
British vs American spelling
We should be consistent, it looks like we have American to British at approx 140 to 60 in the code. There's not enough occurrences that we couldn't be consistent one way or the other. It breaks my heart that British spelling could lose this one but I'm happy to 'z' things up for the sake of consistency. So I put forward British to be preferred. Either that strawman wins out, or I incite interest in ~bike-shedding~ guiding the direction of this crucial topic from others.
Dependency graph
----------------
These images are not very useful right now but the aim is to tweak the settings of one or more of them to be informative, and/or divide them up into smaller grapghs.
To re-build them, run `fab build_docs:dep_graphs=true`. Note that the dot graph takes a lot of time.
.. figure:: ../../../../_static/deps-neato.png
:alt: neato graph of dependencies
:width: 100 pc
:index:`Neato` graph of dependencies
.. figure:: ../../../../_static/deps-sfdp.png
:alt: SFDP graph of dependencies
:width: 100 pc
:index:`SFDP` graph of dependencies
.. figure:: ../../../../_static/deps-dot.png
:alt: Dot graph of dependencies
:width: 100 pc
:index:`Dot` graph of dependencies
Key management
--------------
Nitro key
^^^^^^^^^
Regular contributors are enouraged to take further steps to protect their key and the Nitro Key (Start) is recommended by the BitMessage project for this purpose.
Debian-quirks
~~~~~~~~~~~~~
Stretch makes use of the directory ~/.gnupg/private-keys-v1.d/ to store the private keys. This simplifies some steps of the Nitro Key instructions. See step 5 of Debian's subkeys_ wiki page
.. _subkeys: https://wiki.debian.org/Subkeys

View File

@ -0,0 +1,4 @@
Testing
=======
Currently there is a Travis job somewhere which runs python setup.py test. This doesn't find any tests when run locally for some reason.

View File

@ -0,0 +1,4 @@
TODO list
=========
.. todolist::

View File

@ -0,0 +1,8 @@
Developing
==========
.. toctree::
:maxdepth: 2
:glob:
develop.dir/*

View File

@ -0,0 +1,28 @@
Processes
=========
In other to keep the Bitmessage project running the team run a number of systems and accounts that form the
development pipeline and continuous delivery process. We are always striving to improve the process. Towards
that end it is documented here.
Project website
---------------
The bitmessage website_
Github
------
Our official Github_ account is Bitmessage. Our issue tracker is here as well.
BitMessage
----------
We eat our own dog food! You can send us bug reports via the Bitmessage chan at xxx
.. _website: https://bitmessage.org
.. _Github: https://github.com/Bitmessage/PyBitmessage

25
docs/contribute.rst Normal file
View File

@ -0,0 +1,25 @@
Contributing
============
.. toctree::
:maxdepth: 2
:glob:
contribute.dir/*
- Report_
- Develop_(develop)
- Translate_
- Donate_
- Fork the code and open a PR_ on github
- Search the `issue tracker` on github or open a new issue
- Send bug report to the chan
.. _Report: https://github.com/Bitmessage/PyBitmessage/issues
.. _Develop: https://github.com/Bitmessage/PyBitmessage
.. _Translate: https://www.transifex.com/bitmessage-project/pybitmessage/
.. _Donate: https://tip4commit.com/github/Bitmessage/PyBitmessage
.. _PR: https://github.com/Bitmessage/PyBitmessage/pulls
.. _`issue tracker`: https://github.com/Bitmessage/PyBitmessage/issues
contributing/*

15
docs/index.rst Normal file
View File

@ -0,0 +1,15 @@
.. mdinclude:: ../README.md
.. toctree::
:maxdepth: 2
overview
usage
contribute
Indices and tables
------------------
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

36
docs/make.bat Normal file
View File

@ -0,0 +1,36 @@
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
set SPHINXPROJ=PyBitmessage
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
:end
popd

21
docs/usage.rst Normal file
View File

@ -0,0 +1,21 @@
Usage
=====
GUI
---
Bitmessage has a PyQT GUI_
CLI
---
Bitmessage has a CLI_
API
---
Bitmessage has an XML-RPC API_
.. _GUI: https://bitmessage.org/wiki/PyBitmessage_Help
.. _CLI: https://bitmessage.org/wiki/PyBitmessage_Help
.. _API: https://bitmessage.org/wiki/API_Reference

View File

@ -85,3 +85,17 @@ Host github
HostName github.com HostName github.com
IdentityFile ~/.ssh/id_rsa_github IdentityFile ~/.ssh/id_rsa_github
``` ```
# Ideas for further development
## Smaller
* Decorators and context managers are useful for accepting common params like verbosity, force or doing command-level help
* if `git status` or `git status --staged` produce results, prefer that to generate the file list
## Larger
* Support documentation translations, aim for current transifex'ed languages
* Fabric 2 is finally out, go @bitprophet! Invoke/Fabric2 is a rewrite of Fabric supporting Python3. Probably makes
sense for us to stick to the battle-hardened 1.x branch, at least until we support Python3.

View File

@ -17,7 +17,7 @@ For more help on a particular command
from fabric.api import env from fabric.api import env
from fabfile.tasks import code_quality, test from fabfile.tasks import code_quality, build_docs, push_docs, clean, test
# Without this, `fab -l` would display the whole docstring as preamble # Without this, `fab -l` would display the whole docstring as preamble
@ -27,6 +27,9 @@ __doc__ = ""
__all__ = [ __all__ = [
"code_quality", "code_quality",
"test", "test",
"build_docs",
"push_docs",
"clean",
] ]
# Honour the user's ssh client configuration # Honour the user's ssh client configuration

View File

@ -1,12 +1,17 @@
# pylint: disable=not-context-manager # pylint: disable=not-context-manager
""" """
Fabric tasks for PyBitmessage devops operations. Fabric tasks for PyBitmessage devops operations.
Note that where tasks declare params to be bools, they use coerce_bool() and so will accept any commandline (string)
representation of true or false that coerce_bool() understands.
""" """
import os import os
import sys import sys
from fabric.api import run, task, hide, cd from fabric.api import run, task, hide, cd, settings, sudo
from fabric.contrib.project import rsync_project
from fabvenv import virtualenv from fabvenv import virtualenv
from fabfile.lib import ( from fabfile.lib import (
@ -14,6 +19,9 @@ from fabfile.lib import (
get_filtered_pycodestyle_output, get_filtered_flake8_output, get_filtered_pylint_output, get_filtered_pycodestyle_output, get_filtered_flake8_output, get_filtered_pylint_output,
) )
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'src'))) # noqa:E402
from version import softwareVersion # pylint: disable=wrong-import-position
def get_tool_results(file_list): def get_tool_results(file_list):
"""Take a list of files and resuln the results of applying the tools""" """Take a list of files and resuln the results of applying the tools"""
@ -114,6 +122,43 @@ def generate_file_list(filename):
return file_list return file_list
def create_dependency_graphs():
"""
To better understand the relationship between methods, dependency graphs can be drawn between functions and
methods.
Since the resulting images are large and could be out of date on the next commit, storing them in the repo is
pointless. Instead, it makes sense to build a dependency graph for a particular, documented version of the code.
.. todo:: Consider saving a hash of the intermediate dotty file so unnecessary image generation can be avoided.
"""
with virtualenv(VENV_ROOT):
with hide('running', 'stdout'):
# .. todo:: consider a better place to put this, use a particular commit
with cd(PROJECT_ROOT):
with settings(warn_only=True):
if run('stat pyan').return_code:
run('git clone https://github.com/davidfraser/pyan.git')
with cd(os.path.join(PROJECT_ROOT, 'pyan')):
run('git checkout pre-python3')
# .. todo:: Use better settings. This is MVP to make a diagram
with cd(PROJECT_ROOT):
file_list = run("find . -type f -name '*.py' ! -path './src/.eggs/*'").split('\r\n')
for cmd in [
'neato -Goverlap=false -Tpng > deps-neato.png',
'sfdp -Goverlap=false -Tpng > deps-sfdp.png',
'dot -Goverlap=false -Tpng > deps-dot.png',
]:
pyan_cmd = './pyan/pyan.py {} --dot'.format(' '.join(file_list))
sed_cmd = r"sed s'/http\-old/http_old/'g" # dot doesn't like dashes
run('|'.join([pyan_cmd, sed_cmd, cmd]))
run('mv *.png docs/_build/html/_static/')
@task @task
@default_hosts(['localhost']) @default_hosts(['localhost'])
def code_quality(verbose=True, details=False, fix=False, filename=None, top=10, rev=None): def code_quality(verbose=True, details=False, fix=False, filename=None, top=10, rev=None):
@ -137,11 +182,9 @@ def code_quality(verbose=True, details=False, fix=False, filename=None, top=10,
:type details: bool, default False :type details: bool, default False
:param fix: Run autopep8 aggressively on the displayed file(s) :param fix: Run autopep8 aggressively on the displayed file(s)
:type fix: bool, default False :type fix: bool, default False
:param filename: Rather than analysing all files and displaying / fixing the top N, just analyse / display / fix :param filename: Don't test/fix the top N, just the specified file
the specified file
:type filename: string, valid path to a file, default all files in the project :type filename: string, valid path to a file, default all files in the project
:return: This fabric task has an exit status equal to the total number of violations and uses stdio but it does :return: None, exit status equals total number of violations
not return anything if you manage to call it successfully from Python
:rtype: None :rtype: None
Intended to be temporary until we have improved code quality and have safeguards to maintain it in place. Intended to be temporary until we have improved code quality and have safeguards to maintain it in place.
@ -180,3 +223,96 @@ def test():
run('pybitmessage -t') run('pybitmessage -t')
run('python setup.py test') run('python setup.py test')
@task
@default_hosts(['localhost'])
def build_docs(dep_graph=False, apidoc=True):
"""
Build the documentation locally.
:param dep_graph: Build the dependency graphs
:type dep_graph: Bool, default False
:param apidoc: Build the automatically generated rst files from the source code
:type apidoc: Bool, default True
Default usage:
$ fab -H localhost build_docs
Implementation:
First, a dependency graph is generated and converted into an image that is referenced in the development page.
Next, the sphinx-apidoc command is (usually) run which searches the code. As part of this it loads the modules and
if this has side-effects then they will be evident. Any documentation strings that make use of Python documentation
conventions (like parameter specification) or the Restructured Text (RsT) syntax will be extracted.
Next, the `make html` command is run to generate HTML output. Other formats (epub, pdf) are available.
.. todo:: support other languages
"""
apidoc = coerce_bool(apidoc)
if coerce_bool(dep_graph):
create_dependency_graphs()
with virtualenv(VENV_ROOT):
with hide('running'):
apidoc_result = 0
if apidoc:
run('mkdir -p {}'.format(os.path.join(PROJECT_ROOT, 'docs', 'autodoc')))
with cd(os.path.join(PROJECT_ROOT, 'docs', 'autodoc')):
with settings(warn_only=True):
run('rm *.rst')
with cd(os.path.join(PROJECT_ROOT, 'docs')):
apidoc_result = run('sphinx-apidoc -o autodoc ..').return_code
with cd(os.path.join(PROJECT_ROOT, 'docs')):
make_result = run('make html').return_code
return_code = apidoc_result + make_result
sys.exit(return_code)
@task
@default_hosts(['localhost'])
def push_docs(path=None):
"""
Upload the generated docs to a public server.
Default usage:
$ fab -H localhost push_docs
.. todo:: support other languages
.. todo:: integrate with configuration management data to get web root and webserver restart command
"""
# Making assumptions
WEB_ROOT = path if path is not None else os.path.join('var', 'www', 'html', 'pybitmessage', 'en', 'latest')
VERSION_ROOT = os.path.join(os.path.dirname(WEB_ROOT), softwareVersion)
rsync_project(
remote_dir=VERSION_ROOT,
local_dir=os.path.join(PROJECT_ROOT, 'docs', '_build', 'html')
)
result = run('ln -sf {0} {1}'.format(WEB_ROOT, VERSION_ROOT))
if result.return_code:
print 'Linking the new release failed'
# More assumptions
sudo('systemctl restart apache2')
@task
@default_hosts(['localhost'])
def clean():
"""Clean up files generated by fabric commands."""
with hide('running', 'stdout'):
with cd(PROJECT_ROOT):
run(r"find . -name '*.pyc' -exec rm '{}' \;")

View File

View File

@ -15,7 +15,14 @@ EXTRAS_REQUIRE = {
'pyopencl': ['pyopencl'], 'pyopencl': ['pyopencl'],
'prctl': ['python_prctl'], # Named threads 'prctl': ['python_prctl'], # Named threads
'qrcode': ['qrcode'], 'qrcode': ['qrcode'],
'sound;platform_system=="Windows"': ['winsound'] 'sound;platform_system=="Windows"': ['winsound'],
'docs': [
'sphinx', # fab build_docs
'graphviz', # fab build_docs
'curses', # src/depends.py
'python2-pythondialog', # src/depends.py
'm2r', # fab build_docs
],
} }

View File

@ -5,66 +5,68 @@ import xmlrpclib
import json import json
import time import time
api = xmlrpclib.ServerProxy("http://bradley:password@localhost:8442/") if __name__ == '__main__':
print 'Let\'s test the API first.' api = xmlrpclib.ServerProxy("http://bradley:password@localhost:8442/")
inputstr1 = "hello"
inputstr2 = "world"
print api.helloWorld(inputstr1, inputstr2)
print api.add(2,3)
print 'Let\'s set the status bar message.' print 'Let\'s test the API first.'
print api.statusBar("new status bar message") inputstr1 = "hello"
inputstr2 = "world"
print api.helloWorld(inputstr1, inputstr2)
print api.add(2,3)
print 'Let\'s list our addresses:' print 'Let\'s set the status bar message.'
print api.listAddresses() print api.statusBar("new status bar message")
print 'Let\'s list our address again, but this time let\'s parse the json data into a Python data structure:' print 'Let\'s list our addresses:'
jsonAddresses = json.loads(api.listAddresses()) print api.listAddresses()
print jsonAddresses
print 'Now that we have our address data in a nice Python data structure, let\'s look at the first address (index 0) and print its label:'
print jsonAddresses['addresses'][0]['label']
print 'Uncomment the next two lines to create a new random address with a slightly higher difficulty setting than normal.' print 'Let\'s list our address again, but this time let\'s parse the json data into a Python data structure:'
#addressLabel = 'new address label'.encode('base64') jsonAddresses = json.loads(api.listAddresses())
#print api.createRandomAddress(addressLabel,False,1.05,1.1111) print jsonAddresses
print 'Now that we have our address data in a nice Python data structure, let\'s look at the first address (index 0) and print its label:'
print jsonAddresses['addresses'][0]['label']
print 'Uncomment these next four lines to create new deterministic addresses.' print 'Uncomment the next two lines to create a new random address with a slightly higher difficulty setting than normal.'
#passphrase = 'asdfasdfqwser'.encode('base64') #addressLabel = 'new address label'.encode('base64')
#jsonDeterministicAddresses = api.createDeterministicAddresses(passphrase, 2, 4, 1, False) #print api.createRandomAddress(addressLabel,False,1.05,1.1111)
#print jsonDeterministicAddresses
#print json.loads(jsonDeterministicAddresses)
#print 'Uncomment this next line to print the first deterministic address that would be generated with the given passphrase. This will Not add it to the Bitmessage interface or the keys.dat file.' print 'Uncomment these next four lines to create new deterministic addresses.'
#print api.getDeterministicAddress('asdfasdfqwser'.encode('base64'),4,1) #passphrase = 'asdfasdfqwser'.encode('base64')
#jsonDeterministicAddresses = api.createDeterministicAddresses(passphrase, 2, 4, 1, False)
#print jsonDeterministicAddresses
#print json.loads(jsonDeterministicAddresses)
#print 'Uncomment this line to subscribe to an address. (You must use your own address, this one is invalid).' #print 'Uncomment this next line to print the first deterministic address that would be generated with the given passphrase. This will Not add it to the Bitmessage interface or the keys.dat file.'
#print api.addSubscription('2D94G5d8yp237GGqAheoecBYpdehdT3dha','test sub'.encode('base64')) #print api.getDeterministicAddress('asdfasdfqwser'.encode('base64'),4,1)
#print 'Uncomment this line to unsubscribe from an address.' #print 'Uncomment this line to subscribe to an address. (You must use your own address, this one is invalid).'
#print api.deleteSubscription('2D94G5d8yp237GGqAheoecBYpdehdT3dha') #print api.addSubscription('2D94G5d8yp237GGqAheoecBYpdehdT3dha','test sub'.encode('base64'))
print 'Let\'s now print all of our inbox messages:' #print 'Uncomment this line to unsubscribe from an address.'
print api.getAllInboxMessages() #print api.deleteSubscription('2D94G5d8yp237GGqAheoecBYpdehdT3dha')
inboxMessages = json.loads(api.getAllInboxMessages())
print inboxMessages
print 'Uncomment this next line to decode the actual message data in the first message:' print 'Let\'s now print all of our inbox messages:'
#print inboxMessages['inboxMessages'][0]['message'].decode('base64') print api.getAllInboxMessages()
inboxMessages = json.loads(api.getAllInboxMessages())
print inboxMessages
print 'Uncomment this next line in the code to delete a message' print 'Uncomment this next line to decode the actual message data in the first message:'
#print api.trashMessage('584e5826947242a82cb883c8b39ac4a14959f14c228c0fbe6399f73e2cba5b59') #print inboxMessages['inboxMessages'][0]['message'].decode('base64')
print 'Uncomment these lines to send a message. The example addresses are invalid; you will have to put your own in.' print 'Uncomment this next line in the code to delete a message'
#subject = 'subject!'.encode('base64') #print api.trashMessage('584e5826947242a82cb883c8b39ac4a14959f14c228c0fbe6399f73e2cba5b59')
#message = 'Hello, this is the message'.encode('base64')
#ackData = api.sendMessage('BM-Gtsm7PUabZecs3qTeXbNPmqx3xtHCSXF', 'BM-2DCutnUZG16WiW3mdAm66jJUSCUv88xLgS', subject,message)
#print 'The ackData is:', ackData
#while True:
# time.sleep(2)
# print 'Current status:', api.getStatus(ackData)
print 'Uncomment these lines to send a broadcast. The example address is invalid; you will have to put your own in.' print 'Uncomment these lines to send a message. The example addresses are invalid; you will have to put your own in.'
#subject = 'subject within broadcast'.encode('base64') #subject = 'subject!'.encode('base64')
#message = 'Hello, this is the message within a broadcast.'.encode('base64') #message = 'Hello, this is the message'.encode('base64')
#print api.sendBroadcast('BM-onf6V1RELPgeNN6xw9yhpAiNiRexSRD4e', subject,message) #ackData = api.sendMessage('BM-Gtsm7PUabZecs3qTeXbNPmqx3xtHCSXF', 'BM-2DCutnUZG16WiW3mdAm66jJUSCUv88xLgS', subject,message)
#print 'The ackData is:', ackData
#while True:
# time.sleep(2)
# print 'Current status:', api.getStatus(ackData)
print 'Uncomment these lines to send a broadcast. The example address is invalid; you will have to put your own in.'
#subject = 'subject within broadcast'.encode('base64')
#message = 'Hello, this is the message within a broadcast.'.encode('base64')
#print api.sendBroadcast('BM-onf6V1RELPgeNN6xw9yhpAiNiRexSRD4e', subject,message)

View File

@ -51,8 +51,6 @@ from class_singleCleaner import singleCleaner
from class_objectProcessor import objectProcessor from class_objectProcessor import objectProcessor
from class_singleWorker import singleWorker from class_singleWorker import singleWorker
from class_addressGenerator import addressGenerator from class_addressGenerator import addressGenerator
from class_smtpDeliver import smtpDeliver
from class_smtpServer import smtpServer
from bmconfigparser import BMConfigParser from bmconfigparser import BMConfigParser
from inventory import Inventory from inventory import Inventory
@ -245,6 +243,19 @@ class Main:
state.enableGUI = False # run without a UI state.enableGUI = False # run without a UI
# is the application already running? If yes then exit. # is the application already running? If yes then exit.
if state.enableGUI and not state.curses and not depends.check_pyqt():
sys.exit(
'PyBitmessage requires PyQt unless you want'
' to run it as a daemon and interact with it'
' using the API. You can download PyQt from '
'http://www.riverbankcomputing.com/software/pyqt/download'
' or by searching Google for \'PyQt Download\'.'
' If you want to run in daemon mode, see '
'https://bitmessage.org/wiki/Daemon\n'
'You can also run PyBitmessage with'
' the new curses interface by providing'
' \'-c\' as a commandline argument.'
)
shared.thisapp = singleinstance("", daemon) shared.thisapp = singleinstance("", daemon)
if daemon and not state.testmode: if daemon and not state.testmode:
@ -297,12 +308,14 @@ class Main:
# SMTP delivery thread # SMTP delivery thread
if daemon and BMConfigParser().safeGet( if daemon and BMConfigParser().safeGet(
"bitmessagesettings", "smtpdeliver", '') != '': "bitmessagesettings", "smtpdeliver", '') != '':
from class_smtpDeliver import smtpDeliver
smtpDeliveryThread = smtpDeliver() smtpDeliveryThread = smtpDeliver()
smtpDeliveryThread.start() smtpDeliveryThread.start()
# SMTP daemon thread # SMTP daemon thread
if daemon and BMConfigParser().safeGetBoolean( if daemon and BMConfigParser().safeGetBoolean(
"bitmessagesettings", "smtpd"): "bitmessagesettings", "smtpd"):
from class_smtpServer import smtpServer
smtpServerThread = smtpServer() smtpServerThread = smtpServer()
smtpServerThread.start() smtpServerThread.start()
@ -381,26 +394,14 @@ class Main:
BMConfigParser().remove_option('bitmessagesettings', 'dontconnect') BMConfigParser().remove_option('bitmessagesettings', 'dontconnect')
elif daemon is False: elif daemon is False:
if state.curses: if state.curses:
# if depends.check_curses(): if not depends.check_curses():
sys.exit()
print('Running with curses') print('Running with curses')
import bitmessagecurses import bitmessagecurses
bitmessagecurses.runwrapper() bitmessagecurses.runwrapper()
elif depends.check_pyqt(): else:
import bitmessageqt import bitmessageqt
bitmessageqt.run() bitmessageqt.run()
else:
sys.exit(
'PyBitmessage requires PyQt unless you want'
' to run it as a daemon and interact with it'
' using the API. You can download PyQt from '
'http://www.riverbankcomputing.com/software/pyqt/download'
' or by searching Google for \'PyQt Download\'.'
' If you want to run in daemon mode, see '
'https://bitmessage.org/wiki/Daemon\n'
'You can also run PyBitmessage with'
' the new curses interface by providing'
' \'-c\' as a commandline argument.'
)
if daemon: if daemon:
if state.testmode: if state.testmode:

View File

@ -1,9 +1,5 @@
# pylint: disable=too-many-lines,broad-except,too-many-instance-attributes,global-statement,too-few-public-methods
# pylint: disable=too-many-statements,too-many-branches,attribute-defined-outside-init,too-many-arguments,no-member
# pylint: disable=unused-argument,no-self-use,too-many-locals,unused-variable,too-many-nested-blocks
# pylint: disable=too-many-return-statements,protected-access,super-init-not-called,non-parent-init-called
""" """
Initialise the QT interface PyQt based UI for bitmessage, the main module
""" """
import hashlib import hashlib
@ -15,64 +11,51 @@ import sys
import textwrap import textwrap
import time import time
from datetime import datetime, timedelta from datetime import datetime, timedelta
from sqlite3 import register_adapter
from PyQt4 import QtCore, QtGui
from PyQt4.QtNetwork import QLocalSocket, QLocalServer
import debug
from debug import logger from debug import logger
from tr import _translate
from addresses import decodeAddress, addBMIfNotPresent
try: import shared
from PyQt4 import QtCore, QtGui from bitmessageui import Ui_MainWindow
from PyQt4.QtNetwork import QLocalSocket, QLocalServer from bmconfigparser import BMConfigParser
except ImportError:
logmsg = (
'PyBitmessage requires PyQt unless you want to run it as a daemon and interact with it using the API. You can'
' download it from http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for '
'\'PyQt Download\' (without quotes).'
)
logger.critical(logmsg, exc_info=True)
sys.exit()
from sqlite3 import register_adapter # pylint: disable=wrong-import-order
import defaults import defaults
from namecoin import namecoinConnection
from messageview import MessageView
from migrationwizard import Ui_MigrationWizard
from foldertree import (
AccountMixin, Ui_FolderWidget, Ui_AddressWidget, Ui_SubscriptionWidget,
MessageList_AddressWidget, MessageList_SubjectWidget,
Ui_AddressBookWidgetItemLabel, Ui_AddressBookWidgetItemAddress)
from settings import Ui_settingsDialog
import settingsmixin
import support
import debug
from helper_ackPayload import genAckPayload
from helper_sql import sqlQuery, sqlExecute, sqlExecuteChunked, sqlStoredProcedure
import helper_search import helper_search
import knownnodes
import l10n import l10n
import openclpow import openclpow
from utils import str_broadcast_subscribers, avatarize
from account import (
getSortedAccounts, getSortedSubscriptions, accountClass, BMAccount,
GatewayAccount, MailchuckAccount, AccountColor)
import dialogs
from helper_generic import powQueueSize
from network.stats import pendingDownload, pendingUpload
from uisignaler import UISignaler
import knownnodes
import paths import paths
from proofofwork import getPowType
import queues import queues
import shared
import shutdown import shutdown
import state import state
import upnp from statusbar import BMStatusBar
from bitmessageqt import sound, support, dialogs
from bitmessageqt.foldertree import (
AccountMixin, Ui_FolderWidget, Ui_AddressWidget, Ui_SubscriptionWidget, MessageList_AddressWidget,
MessageList_SubjectWidget, Ui_AddressBookWidgetItemLabel, Ui_AddressBookWidgetItemAddress,
)
from bitmessageqt.account import (
getSortedAccounts, getSortedSubscriptions, accountClass, BMAccount, GatewayAccount, MailchuckAccount, AccountColor,
)
from bitmessageqt.bitmessageui import Ui_MainWindow, settingsmixin
from bitmessageqt.messageview import MessageView
from bitmessageqt.migrationwizard import Ui_MigrationWizard
from bitmessageqt.settings import Ui_settingsDialog
from bitmessageqt.utils import str_broadcast_subscribers, avatarize
from bitmessageqt.uisignaler import UISignaler
from bitmessageqt.statusbar import BMStatusBar
from addresses import decodeAddress, addBMIfNotPresent
from bmconfigparser import BMConfigParser
from namecoin import namecoinConnection
from helper_ackPayload import genAckPayload
from helper_generic import powQueueSize
from helper_sql import sqlQuery, sqlExecute, sqlExecuteChunked, sqlStoredProcedure
from network.stats import pendingDownload, pendingUpload
from network.asyncore_pollchoose import set_rates from network.asyncore_pollchoose import set_rates
from proofofwork import getPowType import sound
from tr import _translate
try: try:
@ -81,15 +64,8 @@ except ImportError:
get_plugins = False get_plugins = False
qmytranslator = None
qsystranslator = None
def change_translation(newlocale): def change_translation(newlocale):
"""Change a translation to a new locale"""
global qmytranslator, qsystranslator global qmytranslator, qsystranslator
try: try:
if not qmytranslator.isEmpty(): if not qmytranslator.isEmpty():
QtGui.QApplication.removeTranslator(qmytranslator) QtGui.QApplication.removeTranslator(qmytranslator)
@ -102,16 +78,15 @@ def change_translation(newlocale):
pass pass
qmytranslator = QtCore.QTranslator() qmytranslator = QtCore.QTranslator()
translationpath = os.path.join(paths.codePath(), 'translations', 'bitmessage_' + newlocale) translationpath = os.path.join (paths.codePath(), 'translations', 'bitmessage_' + newlocale)
qmytranslator.load(translationpath) qmytranslator.load(translationpath)
QtGui.QApplication.installTranslator(qmytranslator) QtGui.QApplication.installTranslator(qmytranslator)
qsystranslator = QtCore.QTranslator() qsystranslator = QtCore.QTranslator()
if paths.frozen: if paths.frozen:
translationpath = os.path.join(paths.codePath(), 'translations', 'qt_' + newlocale) translationpath = os.path.join (paths.codePath(), 'translations', 'qt_' + newlocale)
else: else:
translationpath = os.path.join(str(QtCore.QLibraryInfo.location( translationpath = os.path.join (str(QtCore.QLibraryInfo.location(QtCore.QLibraryInfo.TranslationsPath)), 'qt_' + newlocale)
QtCore.QLibraryInfo.TranslationsPath)), 'qt_' + newlocale)
qsystranslator.load(translationpath) qsystranslator.load(translationpath)
QtGui.QApplication.installTranslator(qsystranslator) QtGui.QApplication.installTranslator(qsystranslator)
@ -132,8 +107,7 @@ def change_translation(newlocale):
logger.error("Failed to set locale to %s", lang, exc_info=True) logger.error("Failed to set locale to %s", lang, exc_info=True)
class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-methods class MyForm(settingsmixin.SMainWindow):
"""TBC"""
# the last time that a message arrival sound was played # the last time that a message arrival sound was played
lastSoundTime = datetime.now() - timedelta(days=1) lastSoundTime = datetime.now() - timedelta(days=1)
@ -145,8 +119,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
REPLY_TYPE_CHAN = 1 REPLY_TYPE_CHAN = 1
def init_file_menu(self): def init_file_menu(self):
"""Initialise the file menu"""
QtCore.QObject.connect(self.ui.actionExit, QtCore.SIGNAL( QtCore.QObject.connect(self.ui.actionExit, QtCore.SIGNAL(
"triggered()"), self.quit) "triggered()"), self.quit)
QtCore.QObject.connect(self.ui.actionNetworkSwitch, QtCore.SIGNAL( QtCore.QObject.connect(self.ui.actionNetworkSwitch, QtCore.SIGNAL(
@ -161,10 +133,9 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
QtCore.SIGNAL( QtCore.SIGNAL(
"triggered()"), "triggered()"),
self.click_actionRegenerateDeterministicAddresses) self.click_actionRegenerateDeterministicAddresses)
QtCore.QObject.connect( QtCore.QObject.connect(self.ui.pushButtonAddChan, QtCore.SIGNAL(
self.ui.pushButtonAddChan, "clicked()"),
QtCore.SIGNAL("clicked()"), self.click_actionJoinChan) # also used for creating chans.
self.click_actionJoinChan) # also used for creating chans.
QtCore.QObject.connect(self.ui.pushButtonNewAddress, QtCore.SIGNAL( QtCore.QObject.connect(self.ui.pushButtonNewAddress, QtCore.SIGNAL(
"clicked()"), self.click_NewAddressDialog) "clicked()"), self.click_NewAddressDialog)
QtCore.QObject.connect(self.ui.pushButtonAddAddressBook, QtCore.SIGNAL( QtCore.QObject.connect(self.ui.pushButtonAddAddressBook, QtCore.SIGNAL(
@ -189,8 +160,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
"triggered()"), self.click_actionHelp) "triggered()"), self.click_actionHelp)
def init_inbox_popup_menu(self, connectSignal=True): def init_inbox_popup_menu(self, connectSignal=True):
"""Popup menu for the Inbox tab""" # Popup menu for the Inbox tab
self.ui.inboxContextMenuToolbar = QtGui.QToolBar() self.ui.inboxContextMenuToolbar = QtGui.QToolBar()
# Actions # Actions
self.actionReply = self.ui.inboxContextMenuToolbar.addAction(_translate( self.actionReply = self.ui.inboxContextMenuToolbar.addAction(_translate(
@ -227,28 +197,24 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.ui.tableWidgetInbox.setContextMenuPolicy( self.ui.tableWidgetInbox.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu) QtCore.Qt.CustomContextMenu)
if connectSignal: if connectSignal:
self.connect( self.connect(self.ui.tableWidgetInbox, QtCore.SIGNAL(
self.ui.tableWidgetInbox, 'customContextMenuRequested(const QPoint&)'),
QtCore.SIGNAL('customContextMenuRequested(const QPoint&)'), self.on_context_menuInbox)
self.on_context_menuInbox)
self.ui.tableWidgetInboxSubscriptions.setContextMenuPolicy( self.ui.tableWidgetInboxSubscriptions.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu) QtCore.Qt.CustomContextMenu)
if connectSignal: if connectSignal:
self.connect( self.connect(self.ui.tableWidgetInboxSubscriptions, QtCore.SIGNAL(
self.ui.tableWidgetInboxSubscriptions, 'customContextMenuRequested(const QPoint&)'),
QtCore.SIGNAL('customContextMenuRequested(const QPoint&)'), self.on_context_menuInbox)
self.on_context_menuInbox)
self.ui.tableWidgetInboxChans.setContextMenuPolicy( self.ui.tableWidgetInboxChans.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu) QtCore.Qt.CustomContextMenu)
if connectSignal: if connectSignal:
self.connect( self.connect(self.ui.tableWidgetInboxChans, QtCore.SIGNAL(
self.ui.tableWidgetInboxChans, 'customContextMenuRequested(const QPoint&)'),
QtCore.SIGNAL('customContextMenuRequested(const QPoint&)'), self.on_context_menuInbox)
self.on_context_menuInbox)
def init_identities_popup_menu(self, connectSignal=True): def init_identities_popup_menu(self, connectSignal=True):
"""Popup menu for the Your Identities tab""" # Popup menu for the Your Identities tab
self.ui.addressContextMenuToolbarYourIdentities = QtGui.QToolBar() self.ui.addressContextMenuToolbarYourIdentities = QtGui.QToolBar()
# Actions # Actions
self.actionNewYourIdentities = self.ui.addressContextMenuToolbarYourIdentities.addAction(_translate( self.actionNewYourIdentities = self.ui.addressContextMenuToolbarYourIdentities.addAction(_translate(
@ -283,10 +249,9 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.ui.treeWidgetYourIdentities.setContextMenuPolicy( self.ui.treeWidgetYourIdentities.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu) QtCore.Qt.CustomContextMenu)
if connectSignal: if connectSignal:
self.connect( self.connect(self.ui.treeWidgetYourIdentities, QtCore.SIGNAL(
self.ui.treeWidgetYourIdentities, 'customContextMenuRequested(const QPoint&)'),
QtCore.SIGNAL('customContextMenuRequested(const QPoint&)'), self.on_context_menuYourIdentities)
self.on_context_menuYourIdentities)
# load all gui.menu plugins with prefix 'address' # load all gui.menu plugins with prefix 'address'
self.menu_plugins = {'address': []} self.menu_plugins = {'address': []}
@ -301,8 +266,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
)) ))
def init_chan_popup_menu(self, connectSignal=True): def init_chan_popup_menu(self, connectSignal=True):
"""Popup menu for the Channels tab""" # Popup menu for the Channels tab
self.ui.addressContextMenuToolbar = QtGui.QToolBar() self.ui.addressContextMenuToolbar = QtGui.QToolBar()
# Actions # Actions
self.actionNew = self.ui.addressContextMenuToolbar.addAction(_translate( self.actionNew = self.ui.addressContextMenuToolbar.addAction(_translate(
@ -332,14 +296,12 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.ui.treeWidgetChans.setContextMenuPolicy( self.ui.treeWidgetChans.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu) QtCore.Qt.CustomContextMenu)
if connectSignal: if connectSignal:
self.connect( self.connect(self.ui.treeWidgetChans, QtCore.SIGNAL(
self.ui.treeWidgetChans, 'customContextMenuRequested(const QPoint&)'),
QtCore.SIGNAL('customContextMenuRequested(const QPoint&)'), self.on_context_menuChan)
self.on_context_menuChan)
def init_addressbook_popup_menu(self, connectSignal=True): def init_addressbook_popup_menu(self, connectSignal=True):
"""Popup menu for the Address Book page""" # Popup menu for the Address Book page
self.ui.addressBookContextMenuToolbar = QtGui.QToolBar() self.ui.addressBookContextMenuToolbar = QtGui.QToolBar()
# Actions # Actions
self.actionAddressBookSend = self.ui.addressBookContextMenuToolbar.addAction( self.actionAddressBookSend = self.ui.addressBookContextMenuToolbar.addAction(
@ -371,14 +333,12 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.ui.tableWidgetAddressBook.setContextMenuPolicy( self.ui.tableWidgetAddressBook.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu) QtCore.Qt.CustomContextMenu)
if connectSignal: if connectSignal:
self.connect( self.connect(self.ui.tableWidgetAddressBook, QtCore.SIGNAL(
self.ui.tableWidgetAddressBook, 'customContextMenuRequested(const QPoint&)'),
QtCore.SIGNAL('customContextMenuRequested(const QPoint&)'), self.on_context_menuAddressBook)
self.on_context_menuAddressBook)
def init_subscriptions_popup_menu(self, connectSignal=True): def init_subscriptions_popup_menu(self, connectSignal=True):
"""Popup menu for the Subscriptions page""" # Popup menu for the Subscriptions page
self.ui.subscriptionsContextMenuToolbar = QtGui.QToolBar() self.ui.subscriptionsContextMenuToolbar = QtGui.QToolBar()
# Actions # Actions
self.actionsubscriptionsNew = self.ui.subscriptionsContextMenuToolbar.addAction( self.actionsubscriptionsNew = self.ui.subscriptionsContextMenuToolbar.addAction(
@ -401,14 +361,12 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.ui.treeWidgetSubscriptions.setContextMenuPolicy( self.ui.treeWidgetSubscriptions.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu) QtCore.Qt.CustomContextMenu)
if connectSignal: if connectSignal:
self.connect( self.connect(self.ui.treeWidgetSubscriptions, QtCore.SIGNAL(
self.ui.treeWidgetSubscriptions, 'customContextMenuRequested(const QPoint&)'),
QtCore.SIGNAL('customContextMenuRequested(const QPoint&)'), self.on_context_menuSubscriptions)
self.on_context_menuSubscriptions)
def init_sent_popup_menu(self, connectSignal=True): def init_sent_popup_menu(self, connectSignal=True):
"""Popup menu for the Sent page""" # Popup menu for the Sent page
self.ui.sentContextMenuToolbar = QtGui.QToolBar() self.ui.sentContextMenuToolbar = QtGui.QToolBar()
# Actions # Actions
self.actionTrashSentMessage = self.ui.sentContextMenuToolbar.addAction( self.actionTrashSentMessage = self.ui.sentContextMenuToolbar.addAction(
@ -421,10 +379,11 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.actionForceSend = self.ui.sentContextMenuToolbar.addAction( self.actionForceSend = self.ui.sentContextMenuToolbar.addAction(
_translate( _translate(
"MainWindow", "Force send"), self.on_action_ForceSend) "MainWindow", "Force send"), self.on_action_ForceSend)
# self.popMenuSent = QtGui.QMenu( self )
# self.popMenuSent.addAction( self.actionSentClipboard )
# self.popMenuSent.addAction( self.actionTrashSentMessage )
def rerenderTabTreeSubscriptions(self): def rerenderTabTreeSubscriptions(self):
"""TBC"""
treeWidget = self.ui.treeWidgetSubscriptions treeWidget = self.ui.treeWidgetSubscriptions
folders = Ui_FolderWidget.folderWeight.keys() folders = Ui_FolderWidget.folderWeight.keys()
folders.remove("new") folders.remove("new")
@ -434,16 +393,17 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
treeWidget.header().setSortIndicator( treeWidget.header().setSortIndicator(
0, QtCore.Qt.AscendingOrder) 0, QtCore.Qt.AscendingOrder)
# init dictionary # init dictionary
db = getSortedSubscriptions(True) db = getSortedSubscriptions(True)
for address in db: for address in db:
for folder in folders: for folder in folders:
if folder not in db[address]: if not folder in db[address]:
db[address][folder] = {} db[address][folder] = {}
if treeWidget.isSortingEnabled(): if treeWidget.isSortingEnabled():
treeWidget.setSortingEnabled(False) treeWidget.setSortingEnabled(False)
widgets = {}
i = 0 i = 0
while i < treeWidget.topLevelItemCount(): while i < treeWidget.topLevelItemCount():
widget = treeWidget.topLevelItem(i) widget = treeWidget.topLevelItem(i)
@ -451,8 +411,8 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
toAddress = widget.address toAddress = widget.address
else: else:
toAddress = None toAddress = None
if toAddress not in db: if not toAddress in db:
treeWidget.takeTopLevelItem(i) treeWidget.takeTopLevelItem(i)
# no increment # no increment
continue continue
@ -471,7 +431,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
j += 1 j += 1
# add missing folders # add missing folders
if db[toAddress]: if len(db[toAddress]) > 0:
j = 0 j = 0
for f, c in db[toAddress].iteritems(): for f, c in db[toAddress].iteritems():
try: try:
@ -482,14 +442,10 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
widget.setUnreadCount(unread) widget.setUnreadCount(unread)
db.pop(toAddress, None) db.pop(toAddress, None)
i += 1 i += 1
i = 0 i = 0
for toAddress in db: for toAddress in db:
widget = Ui_SubscriptionWidget( widget = Ui_SubscriptionWidget(treeWidget, i, toAddress, db[toAddress]["inbox"]['count'], db[toAddress]["inbox"]['label'], db[toAddress]["inbox"]['enabled'])
treeWidget, i, toAddress,
db[toAddress]["inbox"]['count'],
db[toAddress]["inbox"]['label'],
db[toAddress]["inbox"]['enabled'])
j = 0 j = 0
unread = 0 unread = 0
for folder in folders: for folder in folders:
@ -501,28 +457,23 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
j += 1 j += 1
widget.setUnreadCount(unread) widget.setUnreadCount(unread)
i += 1 i += 1
treeWidget.setSortingEnabled(True) treeWidget.setSortingEnabled(True)
def rerenderTabTreeMessages(self):
"""TBC"""
def rerenderTabTreeMessages(self):
self.rerenderTabTree('messages') self.rerenderTabTree('messages')
def rerenderTabTreeChans(self): def rerenderTabTreeChans(self):
"""TBC"""
self.rerenderTabTree('chan') self.rerenderTabTree('chan')
def rerenderTabTree(self, tab): def rerenderTabTree(self, tab):
"""TBC"""
if tab == 'messages': if tab == 'messages':
treeWidget = self.ui.treeWidgetYourIdentities treeWidget = self.ui.treeWidgetYourIdentities
elif tab == 'chan': elif tab == 'chan':
treeWidget = self.ui.treeWidgetChans treeWidget = self.ui.treeWidgetChans
folders = Ui_FolderWidget.folderWeight.keys() folders = Ui_FolderWidget.folderWeight.keys()
# sort ascending when creating # sort ascending when creating
if treeWidget.topLevelItemCount() == 0: if treeWidget.topLevelItemCount() == 0:
treeWidget.header().setSortIndicator( treeWidget.header().setSortIndicator(
@ -530,12 +481,14 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
# init dictionary # init dictionary
db = {} db = {}
enabled = {} enabled = {}
for toAddress in getSortedAccounts(): for toAddress in getSortedAccounts():
isEnabled = BMConfigParser().getboolean( isEnabled = BMConfigParser().getboolean(
toAddress, 'enabled') toAddress, 'enabled')
isChan = BMConfigParser().safeGetBoolean( isChan = BMConfigParser().safeGetBoolean(
toAddress, 'chan') toAddress, 'chan')
isMaillinglist = BMConfigParser().safeGetBoolean(
toAddress, 'mailinglist')
if treeWidget == self.ui.treeWidgetYourIdentities: if treeWidget == self.ui.treeWidgetYourIdentities:
if isChan: if isChan:
@ -547,13 +500,12 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
db[toAddress] = {} db[toAddress] = {}
for folder in folders: for folder in folders:
db[toAddress][folder] = 0 db[toAddress][folder] = 0
enabled[toAddress] = isEnabled enabled[toAddress] = isEnabled
# get number of (unread) messages # get number of (unread) messages
total = 0 total = 0
queryreturn = sqlQuery( queryreturn = sqlQuery('SELECT toaddress, folder, count(msgid) as cnt FROM inbox WHERE read = 0 GROUP BY toaddress, folder')
'SELECT toaddress, folder, count(msgid) as cnt FROM inbox WHERE read = 0 GROUP BY toaddress, folder')
for row in queryreturn: for row in queryreturn:
toaddress, folder, cnt = row toaddress, folder, cnt = row
total += cnt total += cnt
@ -566,10 +518,11 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
db[None]["sent"] = 0 db[None]["sent"] = 0
db[None]["trash"] = 0 db[None]["trash"] = 0
enabled[None] = True enabled[None] = True
if treeWidget.isSortingEnabled(): if treeWidget.isSortingEnabled():
treeWidget.setSortingEnabled(False) treeWidget.setSortingEnabled(False)
widgets = {}
i = 0 i = 0
while i < treeWidget.topLevelItemCount(): while i < treeWidget.topLevelItemCount():
widget = treeWidget.topLevelItem(i) widget = treeWidget.topLevelItem(i)
@ -577,8 +530,8 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
toAddress = widget.address toAddress = widget.address
else: else:
toAddress = None toAddress = None
if toAddress not in db: if not toAddress in db:
treeWidget.takeTopLevelItem(i) treeWidget.takeTopLevelItem(i)
# no increment # no increment
continue continue
@ -598,7 +551,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
j += 1 j += 1
# add missing folders # add missing folders
if db[toAddress]: if len(db[toAddress]) > 0:
j = 0 j = 0
for f, c in db[toAddress].iteritems(): for f, c in db[toAddress].iteritems():
if toAddress is not None and tab == 'messages' and folder == "new": if toAddress is not None and tab == 'messages' and folder == "new":
@ -610,7 +563,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
widget.setUnreadCount(unread) widget.setUnreadCount(unread)
db.pop(toAddress, None) db.pop(toAddress, None)
i += 1 i += 1
i = 0 i = 0
for toAddress in db: for toAddress in db:
widget = Ui_AddressWidget(treeWidget, i, toAddress, db[toAddress]["inbox"], enabled[toAddress]) widget = Ui_AddressWidget(treeWidget, i, toAddress, db[toAddress]["inbox"], enabled[toAddress])
@ -625,12 +578,10 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
j += 1 j += 1
widget.setUnreadCount(unread) widget.setUnreadCount(unread)
i += 1 i += 1
treeWidget.setSortingEnabled(True) treeWidget.setSortingEnabled(True)
def __init__(self, parent=None): def __init__(self, parent=None):
"""TBC"""
QtGui.QWidget.__init__(self, parent) QtGui.QWidget.__init__(self, parent)
self.ui = Ui_MainWindow() self.ui = Ui_MainWindow()
self.ui.setupUi(self) self.ui.setupUi(self)
@ -638,14 +589,12 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
# Ask the user if we may delete their old version 1 addresses if they # Ask the user if we may delete their old version 1 addresses if they
# have any. # have any.
for addressInKeysFile in getSortedAccounts(): for addressInKeysFile in getSortedAccounts():
status, addressVersionNumber, streamNumber, addressHash = decodeAddress( status, addressVersionNumber, streamNumber, hash = decodeAddress(
addressInKeysFile) addressInKeysFile)
if addressVersionNumber == 1: if addressVersionNumber == 1:
displayMsg = _translate( displayMsg = _translate(
"MainWindow", "MainWindow", "One of your addresses, %1, is an old version 1 address. Version 1 addresses are no longer supported. "
'One of your addresses, %1, is an old version 1 address. Version 1 addresses are no longer ' + "May we delete it now?").arg(addressInKeysFile)
'supported. May we delete it now?'
).arg(addressInKeysFile)
reply = QtGui.QMessageBox.question( reply = QtGui.QMessageBox.question(
self, 'Message', displayMsg, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No) self, 'Message', displayMsg, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
if reply == QtGui.QMessageBox.Yes: if reply == QtGui.QMessageBox.Yes:
@ -655,13 +604,11 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
# Configure Bitmessage to start on startup (or remove the # Configure Bitmessage to start on startup (or remove the
# configuration) based on the setting in the keys.dat file # configuration) based on the setting in the keys.dat file
if 'win32' in sys.platform or 'win64' in sys.platform: if 'win32' in sys.platform or 'win64' in sys.platform:
# Auto-startup for Windows # Auto-startup for Windows
RUN_PATH = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run" RUN_PATH = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run"
self.settings = QtCore.QSettings(RUN_PATH, QtCore.QSettings.NativeFormat) self.settings = QtCore.QSettings(RUN_PATH, QtCore.QSettings.NativeFormat)
# In case the user moves the program and the registry entry is no longer self.settings.remove(
# valid, this will delete the old registry entry. "PyBitmessage") # In case the user moves the program and the registry entry is no longer valid, this will delete the old registry entry.
self.settings.remove("PyBitmessage")
if BMConfigParser().getboolean('bitmessagesettings', 'startonlogon'): if BMConfigParser().getboolean('bitmessagesettings', 'startonlogon'):
self.settings.setValue("PyBitmessage", sys.argv[0]) self.settings.setValue("PyBitmessage", sys.argv[0])
elif 'darwin' in sys.platform: elif 'darwin' in sys.platform:
@ -673,13 +620,13 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
# e.g. for editing labels # e.g. for editing labels
self.recurDepth = 0 self.recurDepth = 0
# switch back to this when replying # switch back to this when replying
self.replyFromTab = None self.replyFromTab = None
# so that quit won't loop # so that quit won't loop
self.quitAccepted = False self.quitAccepted = False
self.init_file_menu() self.init_file_menu()
self.init_inbox_popup_menu() self.init_inbox_popup_menu()
self.init_identities_popup_menu() self.init_identities_popup_menu()
@ -775,13 +722,13 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.unreadCount = 0 self.unreadCount = 0
# Set the icon sizes for the identicons # Set the icon sizes for the identicons
identicon_size = 3 * 7 identicon_size = 3*7
self.ui.tableWidgetInbox.setIconSize(QtCore.QSize(identicon_size, identicon_size)) self.ui.tableWidgetInbox.setIconSize(QtCore.QSize(identicon_size, identicon_size))
self.ui.treeWidgetChans.setIconSize(QtCore.QSize(identicon_size, identicon_size)) self.ui.treeWidgetChans.setIconSize(QtCore.QSize(identicon_size, identicon_size))
self.ui.treeWidgetYourIdentities.setIconSize(QtCore.QSize(identicon_size, identicon_size)) self.ui.treeWidgetYourIdentities.setIconSize(QtCore.QSize(identicon_size, identicon_size))
self.ui.treeWidgetSubscriptions.setIconSize(QtCore.QSize(identicon_size, identicon_size)) self.ui.treeWidgetSubscriptions.setIconSize(QtCore.QSize(identicon_size, identicon_size))
self.ui.tableWidgetAddressBook.setIconSize(QtCore.QSize(identicon_size, identicon_size)) self.ui.tableWidgetAddressBook.setIconSize(QtCore.QSize(identicon_size, identicon_size))
self.UISignalThread = UISignaler.get() self.UISignalThread = UISignaler.get()
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.writeNewAddressToTable) "writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.writeNewAddressToTable)
@ -791,15 +738,10 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
"updateSentItemStatusByToAddress(PyQt_PyObject,PyQt_PyObject)"), self.updateSentItemStatusByToAddress) "updateSentItemStatusByToAddress(PyQt_PyObject,PyQt_PyObject)"), self.updateSentItemStatusByToAddress)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"updateSentItemStatusByAckdata(PyQt_PyObject,PyQt_PyObject)"), self.updateSentItemStatusByAckdata) "updateSentItemStatusByAckdata(PyQt_PyObject,PyQt_PyObject)"), self.updateSentItemStatusByAckdata)
QtCore.QObject.connect( QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
self.UISignalThread, QtCore.SIGNAL( "displayNewInboxMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.displayNewInboxMessage)
"displayNewInboxMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
self.displayNewInboxMessage) "displayNewSentMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.displayNewSentMessage)
QtCore.QObject.connect(
self.UISignalThread, QtCore.SIGNAL(
("displayNewSentMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,"
"PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)")),
self.displayNewSentMessage)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"setStatusIcon(PyQt_PyObject)"), self.setStatusIcon) "setStatusIcon(PyQt_PyObject)"), self.setStatusIcon)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
@ -840,16 +782,16 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.rerenderComboBoxSendFrom() self.rerenderComboBoxSendFrom()
self.rerenderComboBoxSendFromBroadcast() self.rerenderComboBoxSendFromBroadcast()
# Put the TTL slider in the correct spot # Put the TTL slider in the correct spot
TTL = BMConfigParser().getint('bitmessagesettings', 'ttl') TTL = BMConfigParser().getint('bitmessagesettings', 'ttl')
if TTL < 3600: # an hour if TTL < 3600: # an hour
TTL = 3600 TTL = 3600
elif TTL > 28 * 24 * 60 * 60: # 28 days elif TTL > 28*24*60*60: # 28 days
TTL = 28 * 24 * 60 * 60 TTL = 28*24*60*60
self.ui.horizontalSliderTTL.setSliderPosition((TTL - 3600) ** (1 / 3.199)) self.ui.horizontalSliderTTL.setSliderPosition((TTL - 3600) ** (1/3.199))
self.updateHumanFriendlyTTLDescription(TTL) self.updateHumanFriendlyTTLDescription(TTL)
QtCore.QObject.connect(self.ui.horizontalSliderTTL, QtCore.SIGNAL( QtCore.QObject.connect(self.ui.horizontalSliderTTL, QtCore.SIGNAL(
"valueChanged(int)"), self.updateTTL) "valueChanged(int)"), self.updateTTL)
@ -861,24 +803,20 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
# Hide the 'Fetch Namecoin ID' button if we can't. # Hide the 'Fetch Namecoin ID' button if we can't.
if BMConfigParser().safeGetBoolean( if BMConfigParser().safeGetBoolean(
'bitmessagesettings', 'dontconnect' 'bitmessagesettings', 'dontconnect'
) or self.namecoin.test()[0] == 'failed': ) or self.namecoin.test()[0] == 'failed':
logger.warning( logger.warning(
'There was a problem testing for a Namecoin daemon. Hiding the' 'There was a problem testing for a Namecoin daemon. Hiding the'
' Fetch Namecoin ID button') ' Fetch Namecoin ID button')
self.ui.pushButtonFetchNamecoinID.hide() self.ui.pushButtonFetchNamecoinID.hide()
def updateTTL(self, sliderPosition): def updateTTL(self, sliderPosition):
"""TBC"""
TTL = int(sliderPosition ** 3.199 + 3600) TTL = int(sliderPosition ** 3.199 + 3600)
self.updateHumanFriendlyTTLDescription(TTL) self.updateHumanFriendlyTTLDescription(TTL)
BMConfigParser().set('bitmessagesettings', 'ttl', str(TTL)) BMConfigParser().set('bitmessagesettings', 'ttl', str(TTL))
BMConfigParser().save() BMConfigParser().save()
def updateHumanFriendlyTTLDescription(self, TTL): def updateHumanFriendlyTTLDescription(self, TTL):
"""TBC""" numberOfHours = int(round(TTL / (60*60)))
numberOfHours = int(round(TTL / (60 * 60)))
font = QtGui.QFont() font = QtGui.QFont()
stylesheet = "" stylesheet = ""
@ -887,28 +825,19 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
_translate("MainWindow", "%n hour(s)", None, QtCore.QCoreApplication.CodecForTr, numberOfHours) + _translate("MainWindow", "%n hour(s)", None, QtCore.QCoreApplication.CodecForTr, numberOfHours) +
", " + ", " +
_translate("MainWindow", "not recommended for chans", None, QtCore.QCoreApplication.CodecForTr) _translate("MainWindow", "not recommended for chans", None, QtCore.QCoreApplication.CodecForTr)
) )
stylesheet = "QLabel { color : red; }" stylesheet = "QLabel { color : red; }"
font.setBold(True) font.setBold(True)
else: else:
numberOfDays = int(round(TTL / (24 * 60 * 60))) numberOfDays = int(round(TTL / (24*60*60)))
self.ui.labelHumanFriendlyTTLDescription.setText( self.ui.labelHumanFriendlyTTLDescription.setText(_translate("MainWindow", "%n day(s)", None, QtCore.QCoreApplication.CodecForTr, numberOfDays))
_translate(
"MainWindow",
"%n day(s)",
None,
QtCore.QCoreApplication.CodecForTr,
numberOfDays))
font.setBold(False) font.setBold(False)
self.ui.labelHumanFriendlyTTLDescription.setStyleSheet(stylesheet) self.ui.labelHumanFriendlyTTLDescription.setStyleSheet(stylesheet)
self.ui.labelHumanFriendlyTTLDescription.setFont(font) self.ui.labelHumanFriendlyTTLDescription.setFont(font)
# Show or hide the application window after clicking an item within the
# tray icon or, on Windows, the try icon itself.
def appIndicatorShowOrHideWindow(self): def appIndicatorShowOrHideWindow(self):
"""
Show or hide the application window after clicking an item within the tray icon or, on Windows,
the try icon itself.
"""
if not self.actionShow.isChecked(): if not self.actionShow.isChecked():
self.hide() self.hide()
else: else:
@ -918,18 +847,16 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.raise_() self.raise_()
self.activateWindow() self.activateWindow()
# show the application window
def appIndicatorShow(self): def appIndicatorShow(self):
"""show the application window"""
if self.actionShow is None: if self.actionShow is None:
return return
if not self.actionShow.isChecked(): if not self.actionShow.isChecked():
self.actionShow.setChecked(True) self.actionShow.setChecked(True)
self.appIndicatorShowOrHideWindow() self.appIndicatorShowOrHideWindow()
# unchecks the show item on the application indicator
def appIndicatorHide(self): def appIndicatorHide(self):
"""unchecks the show item on the application indicator"""
if self.actionShow is None: if self.actionShow is None:
return return
if self.actionShow.isChecked(): if self.actionShow.isChecked():
@ -937,16 +864,25 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.appIndicatorShowOrHideWindow() self.appIndicatorShowOrHideWindow()
def appIndicatorSwitchQuietMode(self): def appIndicatorSwitchQuietMode(self):
"""TBC"""
BMConfigParser().set( BMConfigParser().set(
'bitmessagesettings', 'showtraynotifications', 'bitmessagesettings', 'showtraynotifications',
str(not self.actionQuiet.isChecked()) str(not self.actionQuiet.isChecked())
) )
def appIndicatorInbox(self, item=None): # application indicator show or hide
"""Show the program window and select inbox tab""" """# application indicator show or hide
def appIndicatorShowBitmessage(self):
#if self.actionShow == None:
# return
print self.actionShow.isChecked()
if not self.actionShow.isChecked():
self.hide()
#self.setWindowState(self.windowState() & QtCore.Qt.WindowMinimized)
else:
self.appIndicatorShowOrHideWindow()"""
# Show the program window and select inbox tab
def appIndicatorInbox(self, item=None):
self.appIndicatorShow() self.appIndicatorShow()
# select inbox # select inbox
self.ui.tabWidget.setCurrentIndex( self.ui.tabWidget.setCurrentIndex(
@ -962,24 +898,22 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
else: else:
self.ui.tableWidgetInbox.setCurrentCell(0, 0) self.ui.tableWidgetInbox.setCurrentCell(0, 0)
# Show the program window and select send tab
def appIndicatorSend(self): def appIndicatorSend(self):
"""Show the program window and select send tab"""
self.appIndicatorShow() self.appIndicatorShow()
self.ui.tabWidget.setCurrentIndex( self.ui.tabWidget.setCurrentIndex(
self.ui.tabWidget.indexOf(self.ui.send) self.ui.tabWidget.indexOf(self.ui.send)
) )
# Show the program window and select subscriptions tab
def appIndicatorSubscribe(self): def appIndicatorSubscribe(self):
"""Show the program window and select subscriptions tab"""
self.appIndicatorShow() self.appIndicatorShow()
self.ui.tabWidget.setCurrentIndex( self.ui.tabWidget.setCurrentIndex(
self.ui.tabWidget.indexOf(self.ui.subscriptions) self.ui.tabWidget.indexOf(self.ui.subscriptions)
) )
# Show the program window and select channels tab
def appIndicatorChannel(self): def appIndicatorChannel(self):
"""Show the program window and select channels tab"""
self.appIndicatorShow() self.appIndicatorShow()
self.ui.tabWidget.setCurrentIndex( self.ui.tabWidget.setCurrentIndex(
self.ui.tabWidget.indexOf(self.ui.chans) self.ui.tabWidget.indexOf(self.ui.chans)
@ -1025,12 +959,9 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
for col in (0, 1, 2): for col in (0, 1, 2):
related.item(rrow, col).setUnread(not status) related.item(rrow, col).setUnread(not status)
def propagateUnreadCount(self, address=None, folder="inbox", widget=None, type_arg=1): def propagateUnreadCount(self, address = None, folder = "inbox", widget = None, type = 1):
"""TBC"""
widgets = [self.ui.treeWidgetYourIdentities, self.ui.treeWidgetSubscriptions, self.ui.treeWidgetChans] widgets = [self.ui.treeWidgetYourIdentities, self.ui.treeWidgetSubscriptions, self.ui.treeWidgetChans]
queryReturn = sqlQuery( queryReturn = sqlQuery("SELECT toaddress, folder, COUNT(msgid) AS cnt FROM inbox WHERE read = 0 GROUP BY toaddress, folder")
"SELECT toaddress, folder, COUNT(msgid) AS cnt FROM inbox WHERE read = 0 GROUP BY toaddress, folder")
totalUnread = {} totalUnread = {}
normalUnread = {} normalUnread = {}
for row in queryReturn: for row in queryReturn:
@ -1042,15 +973,12 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
totalUnread[row[1]] += row[2] totalUnread[row[1]] += row[2]
else: else:
totalUnread[row[1]] = row[2] totalUnread[row[1]] = row[2]
queryReturn = sqlQuery( queryReturn = sqlQuery("SELECT fromaddress, folder, COUNT(msgid) AS cnt FROM inbox WHERE read = 0 AND toaddress = ? GROUP BY fromaddress, folder", str_broadcast_subscribers)
"SELECT fromaddress, folder, COUNT(msgid) AS cnt FROM inbox "
"WHERE read = 0 AND toaddress = ? GROUP BY fromaddress, folder",
str_broadcast_subscribers)
broadcastsUnread = {} broadcastsUnread = {}
for row in queryReturn: for row in queryReturn:
broadcastsUnread[row[0]] = {} broadcastsUnread[row[0]] = {}
broadcastsUnread[row[0]][row[1]] = row[2] broadcastsUnread[row[0]][row[1]] = row[2]
for treeWidget in widgets: for treeWidget in widgets:
root = treeWidget.invisibleRootItem() root = treeWidget.invisibleRootItem()
for i in range(root.childCount()): for i in range(root.childCount()):
@ -1077,8 +1005,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
if addressItem.type == AccountMixin.ALL and folderName in totalUnread: if addressItem.type == AccountMixin.ALL and folderName in totalUnread:
newCount = totalUnread[folderName] newCount = totalUnread[folderName]
elif addressItem.type == AccountMixin.SUBSCRIPTION: elif addressItem.type == AccountMixin.SUBSCRIPTION:
if addressItem.address in broadcastsUnread and folderName in broadcastsUnread[ if addressItem.address in broadcastsUnread and folderName in broadcastsUnread[addressItem.address]:
addressItem.address]:
newCount = broadcastsUnread[addressItem.address][folderName] newCount = broadcastsUnread[addressItem.address][folderName]
elif addressItem.address in normalUnread and folderName in normalUnread[addressItem.address]: elif addressItem.address in normalUnread and folderName in normalUnread[addressItem.address]:
newCount = normalUnread[addressItem.address][folderName] newCount = normalUnread[addressItem.address][folderName]
@ -1086,20 +1013,16 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
folderItem.setUnreadCount(newCount) folderItem.setUnreadCount(newCount)
def addMessageListItem(self, tableWidget, items): def addMessageListItem(self, tableWidget, items):
"""TBC"""
sortingEnabled = tableWidget.isSortingEnabled() sortingEnabled = tableWidget.isSortingEnabled()
if sortingEnabled: if sortingEnabled:
tableWidget.setSortingEnabled(False) tableWidget.setSortingEnabled(False)
tableWidget.insertRow(0) tableWidget.insertRow(0)
for i, _ in enumerate(items): for i in range(len(items)):
tableWidget.setItem(0, i, items[i]) tableWidget.setItem(0, i, items[i])
if sortingEnabled: if sortingEnabled:
tableWidget.setSortingEnabled(True) tableWidget.setSortingEnabled(True)
def addMessageListItemSent(self, tableWidget, toAddress, fromAddress, subject, status, ackdata, lastactiontime): def addMessageListItemSent(self, tableWidget, toAddress, fromAddress, subject, status, ackdata, lastactiontime):
"""TBC"""
acct = accountClass(fromAddress) acct = accountClass(fromAddress)
if acct is None: if acct is None:
acct = BMAccount(fromAddress) acct = BMAccount(fromAddress)
@ -1138,19 +1061,14 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
statusText = _translate( statusText = _translate(
"MainWindow", "Doing work necessary to send broadcast.") "MainWindow", "Doing work necessary to send broadcast.")
elif status == 'broadcastsent': elif status == 'broadcastsent':
statusText = _translate( statusText = _translate("MainWindow", "Broadcast on %1").arg(
"MainWindow", "Broadcast on %1").arg( l10n.formatTimestamp(lastactiontime))
l10n.formatTimestamp(lastactiontime))
elif status == 'toodifficult': elif status == 'toodifficult':
statusText = _translate( statusText = _translate("MainWindow", "Problem: The work demanded by the recipient is more difficult than you are willing to do. %1").arg(
"MainWindow", l10n.formatTimestamp(lastactiontime))
"Problem: The work demanded by the recipient is more difficult than you are willing to do. %1").arg(
l10n.formatTimestamp(lastactiontime))
elif status == 'badkey': elif status == 'badkey':
statusText = _translate( statusText = _translate("MainWindow", "Problem: The recipient\'s encryption key is no good. Could not encrypt message. %1").arg(
"MainWindow", l10n.formatTimestamp(lastactiontime))
"Problem: The recipient\'s encryption key is no good. Could not encrypt message. %1").arg(
l10n.formatTimestamp(lastactiontime))
elif status == 'forcepow': elif status == 'forcepow':
statusText = _translate( statusText = _translate(
"MainWindow", "Forced difficulty override. Send should start soon.") "MainWindow", "Forced difficulty override. Send should start soon.")
@ -1168,8 +1086,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
return acct return acct
def addMessageListItemInbox(self, tableWidget, msgfolder, msgid, toAddress, fromAddress, subject, received, read): def addMessageListItemInbox(self, tableWidget, msgfolder, msgid, toAddress, fromAddress, subject, received, read):
"""TBC"""
font = QtGui.QFont() font = QtGui.QFont()
font.setBold(True) font.setBold(True)
if toAddress == str_broadcast_subscribers: if toAddress == str_broadcast_subscribers:
@ -1181,9 +1097,9 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
if acct is None: if acct is None:
acct = BMAccount(fromAddress) acct = BMAccount(fromAddress)
acct.parseMessage(toAddress, fromAddress, subject, "") acct.parseMessage(toAddress, fromAddress, subject, "")
items = [] items = []
# to #to
MessageList_AddressWidget(items, toAddress, unicode(acct.toLabel, 'utf-8'), not read) MessageList_AddressWidget(items, toAddress, unicode(acct.toLabel, 'utf-8'), not read)
# from # from
MessageList_AddressWidget(items, fromAddress, unicode(acct.fromLabel, 'utf-8'), not read) MessageList_AddressWidget(items, fromAddress, unicode(acct.fromLabel, 'utf-8'), not read)
@ -1202,9 +1118,8 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.addMessageListItem(tableWidget, items) self.addMessageListItem(tableWidget, items)
return acct return acct
# Load Sent items from database
def loadSent(self, tableWidget, account, where="", what=""): def loadSent(self, tableWidget, account, where="", what=""):
"""Load Sent items from database"""
if tableWidget == self.ui.tableWidgetInboxSubscriptions: if tableWidget == self.ui.tableWidgetInboxSubscriptions:
tableWidget.setColumnHidden(0, True) tableWidget.setColumnHidden(0, True)
tableWidget.setColumnHidden(1, False) tableWidget.setColumnHidden(1, False)
@ -1236,9 +1151,8 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
tableWidget.horizontalHeaderItem(3).setText(_translate("MainWindow", "Sent", None)) tableWidget.horizontalHeaderItem(3).setText(_translate("MainWindow", "Sent", None))
tableWidget.setUpdatesEnabled(True) tableWidget.setUpdatesEnabled(True)
def loadMessagelist(self, tableWidget, account, folder="inbox", where="", what="", unreadOnly=False): # Load messages from database file
"""Load messages from database file""" def loadMessagelist(self, tableWidget, account, folder="inbox", where="", what="", unreadOnly = False):
if folder == 'sent': if folder == 'sent':
self.loadSent(tableWidget, account, where, what) self.loadSent(tableWidget, account, where, what)
return return
@ -1259,11 +1173,10 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
tableWidget.setRowCount(0) tableWidget.setRowCount(0)
queryreturn = helper_search.search_sql(xAddress, account, folder, where, what, unreadOnly) queryreturn = helper_search.search_sql(xAddress, account, folder, where, what, unreadOnly)
for row in queryreturn: for row in queryreturn:
msgfolder, msgid, toAddress, fromAddress, subject, received, read = row msgfolder, msgid, toAddress, fromAddress, subject, received, read = row
self.addMessageListItemInbox(tableWidget, msgfolder, msgid, toAddress, self.addMessageListItemInbox(tableWidget, msgfolder, msgid, toAddress, fromAddress, subject, received, read)
fromAddress, subject, received, read)
tableWidget.horizontalHeader().setSortIndicator( tableWidget.horizontalHeader().setSortIndicator(
3, QtCore.Qt.DescendingOrder) 3, QtCore.Qt.DescendingOrder)
@ -1272,10 +1185,9 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
tableWidget.horizontalHeaderItem(3).setText(_translate("MainWindow", "Received", None)) tableWidget.horizontalHeaderItem(3).setText(_translate("MainWindow", "Received", None))
tableWidget.setUpdatesEnabled(True) tableWidget.setUpdatesEnabled(True)
def appIndicatorInit(self, this_app): # create application indicator
"""create application indicator""" def appIndicatorInit(self, app):
self.initTrayIcon("can-icon-24px-red.png", app)
self.initTrayIcon("can-icon-24px-red.png", this_app)
traySignal = "activated(QSystemTrayIcon::ActivationReason)" traySignal = "activated(QSystemTrayIcon::ActivationReason)"
QtCore.QObject.connect(self.tray, QtCore.SIGNAL( QtCore.QObject.connect(self.tray, QtCore.SIGNAL(
traySignal), self.__icon_activated) traySignal), self.__icon_activated)
@ -1297,7 +1209,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.actionShow.setChecked(not BMConfigParser().getboolean( self.actionShow.setChecked(not BMConfigParser().getboolean(
'bitmessagesettings', 'startintray')) 'bitmessagesettings', 'startintray'))
self.actionShow.triggered.connect(self.appIndicatorShowOrHideWindow) self.actionShow.triggered.connect(self.appIndicatorShowOrHideWindow)
if sys.platform[0:3] != 'win': if not sys.platform[0:3] == 'win':
m.addAction(self.actionShow) m.addAction(self.actionShow)
# quiet mode # quiet mode
@ -1338,9 +1250,8 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.tray.setContextMenu(m) self.tray.setContextMenu(m)
self.tray.show() self.tray.show()
# returns the number of unread messages and subscriptions
def getUnread(self): def getUnread(self):
"""returns the number of unread messages and subscriptions"""
counters = [0, 0] counters = [0, 0]
queryreturn = sqlQuery(''' queryreturn = sqlQuery('''
@ -1355,15 +1266,12 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
return counters return counters
def playSound(self, category, label): # pylint: disable=inconsistent-return-statements # play a sound
"""play a sound""" def playSound(self, category, label):
# filename of the sound to be played # filename of the sound to be played
soundFilename = None soundFilename = None
def _choose_ext(basename): # pylint: disable=inconsistent-return-statements def _choose_ext(basename):
"""TBC"""
for ext in sound.extensions: for ext in sound.extensions:
if os.path.isfile(os.extsep.join([basename, ext])): if os.path.isfile(os.extsep.join([basename, ext])):
return os.extsep + ext return os.extsep + ext
@ -1385,23 +1293,24 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
# elapsed time since the last sound was played # elapsed time since the last sound was played
dt = datetime.now() - self.lastSoundTime dt = datetime.now() - self.lastSoundTime
# suppress sounds which are more frequent than the threshold # suppress sounds which are more frequent than the threshold
if not dt.total_seconds() < self.maxSoundFrequencySec: if dt.total_seconds() < self.maxSoundFrequencySec:
return
# the sound is for an address which exists in the address book # the sound is for an address which exists in the address book
if category is sound.SOUND_KNOWN: if category is sound.SOUND_KNOWN:
soundFilename = state.appdata + 'sounds/known' soundFilename = state.appdata + 'sounds/known'
# the sound is for an unknown address # the sound is for an unknown address
elif category is sound.SOUND_UNKNOWN: elif category is sound.SOUND_UNKNOWN:
soundFilename = state.appdata + 'sounds/unknown' soundFilename = state.appdata + 'sounds/unknown'
# initial connection sound # initial connection sound
elif category is sound.SOUND_CONNECTED: elif category is sound.SOUND_CONNECTED:
soundFilename = state.appdata + 'sounds/connected' soundFilename = state.appdata + 'sounds/connected'
# disconnected sound # disconnected sound
elif category is sound.SOUND_DISCONNECTED: elif category is sound.SOUND_DISCONNECTED:
soundFilename = state.appdata + 'sounds/disconnected' soundFilename = state.appdata + 'sounds/disconnected'
# sound when the connection status becomes green # sound when the connection status becomes green
elif category is sound.SOUND_CONNECTION_GREEN: elif category is sound.SOUND_CONNECTION_GREEN:
soundFilename = state.appdata + 'sounds/green' soundFilename = state.appdata + 'sounds/green'
if soundFilename is None: if soundFilename is None:
logger.warning("Probably wrong category number in playSound()") logger.warning("Probably wrong category number in playSound()")
@ -1425,14 +1334,13 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self._player(soundFilename) self._player(soundFilename)
# Adapters and converters for QT <-> sqlite
def sqlInit(self): def sqlInit(self):
"""Adapters and converters for QT <-> sqlite"""
register_adapter(QtCore.QByteArray, str) register_adapter(QtCore.QByteArray, str)
# Try init the distro specific appindicator,
# for example the Ubuntu MessagingMenu
def indicatorInit(self): def indicatorInit(self):
""" Try init the distro specific appindicator, for example the Ubuntu MessagingMenu"""
def _noop_update(*args, **kwargs): def _noop_update(*args, **kwargs):
pass pass
@ -1442,9 +1350,8 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
logger.warning("No indicator plugin found") logger.warning("No indicator plugin found")
self.indicatorUpdate = _noop_update self.indicatorUpdate = _noop_update
# initialise the message notifier
def notifierInit(self): def notifierInit(self):
"""initialise the message notifier"""
def _simple_notify( def _simple_notify(
title, subtitle, category, label=None, icon=None): title, subtitle, category, label=None, icon=None):
self.tray.showMessage(title, subtitle, 1, 2000) self.tray.showMessage(title, subtitle, 1, 2000)
@ -1474,34 +1381,27 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
def notifierShow( def notifierShow(
self, title, subtitle, category, label=None, icon=None): self, title, subtitle, category, label=None, icon=None):
"""TBC"""
self.playSound(category, label) self.playSound(category, label)
self._notifier( self._notifier(
unicode(title), unicode(subtitle), category, label, icon) unicode(title), unicode(subtitle), category, label, icon)
# tree
def treeWidgetKeyPressEvent(self, event): def treeWidgetKeyPressEvent(self, event):
"""tree"""
return self.handleKeyPress(event, self.getCurrentTreeWidget()) return self.handleKeyPress(event, self.getCurrentTreeWidget())
# inbox / sent
def tableWidgetKeyPressEvent(self, event): def tableWidgetKeyPressEvent(self, event):
"""inbox / sent"""
return self.handleKeyPress(event, self.getCurrentMessagelist()) return self.handleKeyPress(event, self.getCurrentMessagelist())
# messageview
def textEditKeyPressEvent(self, event): def textEditKeyPressEvent(self, event):
"""messageview"""
return self.handleKeyPress(event, self.getCurrentMessageTextedit()) return self.handleKeyPress(event, self.getCurrentMessageTextedit())
def handleKeyPress(self, event, focus=None): # pylint: disable=inconsistent-return-statements def handleKeyPress(self, event, focus = None):
"""TBC"""
messagelist = self.getCurrentMessagelist() messagelist = self.getCurrentMessagelist()
folder = self.getCurrentFolder() folder = self.getCurrentFolder()
if event.key() == QtCore.Qt.Key_Delete: if event.key() == QtCore.Qt.Key_Delete:
if isinstance(focus, (MessageView, QtGui.QTableWidget)): if isinstance (focus, MessageView) or isinstance(focus, QtGui.QTableWidget):
if folder == "sent": if folder == "sent":
self.on_action_SentTrash() self.on_action_SentTrash()
else: else:
@ -1537,116 +1437,60 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.ui.lineEditTo.setFocus() self.ui.lineEditTo.setFocus()
event.ignore() event.ignore()
elif event.key() == QtCore.Qt.Key_F: elif event.key() == QtCore.Qt.Key_F:
searchline = self.getCurrentSearchLine(retObj=True) searchline = self.getCurrentSearchLine(retObj = True)
if searchline: if searchline:
searchline.setFocus() searchline.setFocus()
event.ignore() event.ignore()
if not event.isAccepted(): if not event.isAccepted():
return return
if isinstance(focus, MessageView): if isinstance (focus, MessageView):
return MessageView.keyPressEvent(focus, event) return MessageView.keyPressEvent(focus, event)
elif isinstance(focus, QtGui.QTableWidget): elif isinstance (focus, QtGui.QTableWidget):
return QtGui.QTableWidget.keyPressEvent(focus, event) return QtGui.QTableWidget.keyPressEvent(focus, event)
elif isinstance(focus, QtGui.QTreeWidget): elif isinstance (focus, QtGui.QTreeWidget):
return QtGui.QTreeWidget.keyPressEvent(focus, event) return QtGui.QTreeWidget.keyPressEvent(focus, event)
# menu button 'manage keys'
def click_actionManageKeys(self): def click_actionManageKeys(self):
"""menu button 'manage keys'"""
if 'darwin' in sys.platform or 'linux' in sys.platform: if 'darwin' in sys.platform or 'linux' in sys.platform:
if state.appdata == '': if state.appdata == '':
# reply = QtGui.QMessageBox.information(self, 'keys.dat?','You # reply = QtGui.QMessageBox.information(self, 'keys.dat?','You
# may manage your keys by editing the keys.dat file stored in # may manage your keys by editing the keys.dat file stored in
# the same directory as this program. It is important that you # the same directory as this program. It is important that you
# back up this file.', QMessageBox.Ok) # back up this file.', QMessageBox.Ok)
reply = QtGui.QMessageBox.information( reply = QtGui.QMessageBox.information(self, 'keys.dat?', _translate(
self, "MainWindow", "You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file."), QtGui.QMessageBox.Ok)
'keys.dat?',
_translate(
"MainWindow",
("You may manage your keys by editing the keys.dat file stored in the same directory as this "
"program. It is important that you back up this file.")),
QtGui.QMessageBox.Ok)
else: else:
QtGui.QMessageBox.information( QtGui.QMessageBox.information(self, 'keys.dat?', _translate(
self, "MainWindow", "You may manage your keys by editing the keys.dat file stored in\n %1 \nIt is important that you back up this file.").arg(state.appdata), QtGui.QMessageBox.Ok)
'keys.dat?',
_translate(
"MainWindow",
("You may manage your keys by editing the keys.dat file stored in\n %1 \nIt is important "
"that you back up this file.")).arg(
state.appdata),
QtGui.QMessageBox.Ok)
elif sys.platform == 'win32' or sys.platform == 'win64': elif sys.platform == 'win32' or sys.platform == 'win64':
if state.appdata == '': if state.appdata == '':
reply = QtGui.QMessageBox.question( reply = QtGui.QMessageBox.question(self, _translate("MainWindow", "Open keys.dat?"), _translate(
self, "MainWindow", "You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.)"), QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
_translate(
"MainWindow",
"Open keys.dat?"),
_translate(
"MainWindow",
("You may manage your keys by editing the keys.dat file stored in the same directory as this "
"program. It is important that you back up this file. Would you like to open the file now? "
"(Be sure to close Bitmessage before making any changes.)")),
QtGui.QMessageBox.Yes,
QtGui.QMessageBox.No)
else: else:
reply = QtGui.QMessageBox.question( reply = QtGui.QMessageBox.question(self, _translate("MainWindow", "Open keys.dat?"), _translate(
self, "MainWindow", "You may manage your keys by editing the keys.dat file stored in\n %1 \nIt is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.)").arg(state.appdata), QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
_translate(
"MainWindow",
"Open keys.dat?"),
_translate(
"MainWindow",
("You may manage your keys by editing the keys.dat file stored in\n %1 \nIt is important "
"that you back up this file. Would you like to open the file now? (Be sure to close "
"Bitmessage before making any changes.)")).arg(
state.appdata),
QtGui.QMessageBox.Yes,
QtGui.QMessageBox.No)
if reply == QtGui.QMessageBox.Yes: if reply == QtGui.QMessageBox.Yes:
shared.openKeysFile() shared.openKeysFile()
# menu button 'delete all treshed messages'
def click_actionDeleteAllTrashedMessages(self): def click_actionDeleteAllTrashedMessages(self):
"""menu button 'delete all treshed messages'""" if QtGui.QMessageBox.question(self, _translate("MainWindow", "Delete trash?"), _translate("MainWindow", "Are you sure you want to delete all trashed messages?"), QtGui.QMessageBox.Yes, QtGui.QMessageBox.No) == QtGui.QMessageBox.No:
if QtGui.QMessageBox.question(
self,
_translate(
"MainWindow",
"Delete trash?"),
_translate(
"MainWindow",
"Are you sure you want to delete all trashed messages?"),
QtGui.QMessageBox.Yes,
QtGui.QMessageBox.No) == QtGui.QMessageBox.No:
return return
sqlStoredProcedure('deleteandvacuume') sqlStoredProcedure('deleteandvacuume')
self.rerenderTabTreeMessages() self.rerenderTabTreeMessages()
self.rerenderTabTreeSubscriptions() self.rerenderTabTreeSubscriptions()
self.rerenderTabTreeChans() self.rerenderTabTreeChans()
if self.getCurrentFolder(self.ui.treeWidgetYourIdentities) == "trash": if self.getCurrentFolder(self.ui.treeWidgetYourIdentities) == "trash":
self.loadMessagelist( self.loadMessagelist(self.ui.tableWidgetInbox, self.getCurrentAccount(self.ui.treeWidgetYourIdentities), "trash")
self.ui.tableWidgetInbox, self.getCurrentAccount(
self.ui.treeWidgetYourIdentities), "trash")
elif self.getCurrentFolder(self.ui.treeWidgetSubscriptions) == "trash": elif self.getCurrentFolder(self.ui.treeWidgetSubscriptions) == "trash":
self.loadMessagelist( self.loadMessagelist(self.ui.tableWidgetInboxSubscriptions, self.getCurrentAccount(self.ui.treeWidgetSubscriptions), "trash")
self.ui.tableWidgetInboxSubscriptions,
self.getCurrentAccount(
self.ui.treeWidgetSubscriptions),
"trash")
elif self.getCurrentFolder(self.ui.treeWidgetChans) == "trash": elif self.getCurrentFolder(self.ui.treeWidgetChans) == "trash":
self.loadMessagelist( self.loadMessagelist(self.ui.tableWidgetInboxChans, self.getCurrentAccount(self.ui.treeWidgetChans), "trash")
self.ui.tableWidgetInboxChans,
self.getCurrentAccount(
self.ui.treeWidgetChans),
"trash")
# menu button 'regenerate deterministic addresses'
def click_actionRegenerateDeterministicAddresses(self): def click_actionRegenerateDeterministicAddresses(self):
"""menu button 'regenerate deterministic addresses'"""
dialog = dialogs.RegenerateAddressesDialog(self) dialog = dialogs.RegenerateAddressesDialog(self)
if dialog.exec_(): if dialog.exec_():
if dialog.lineEditPassphrase.text() == "": if dialog.lineEditPassphrase.text() == "":
@ -1693,14 +1537,11 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.ui.tabWidget.indexOf(self.ui.chans) self.ui.tabWidget.indexOf(self.ui.chans)
) )
# opens 'join chan' dialog
def click_actionJoinChan(self): def click_actionJoinChan(self):
"""opens 'join chan' dialog"""
dialogs.NewChanDialog(self) dialogs.NewChanDialog(self)
def showConnectDialog(self): def showConnectDialog(self):
"""TBC"""
dialog = dialogs.ConnectDialog(self) dialog = dialogs.ConnectDialog(self)
if dialog.exec_(): if dialog.exec_():
if dialog.radioButtonConnectNow.isChecked(): if dialog.radioButtonConnectNow.isChecked():
@ -1713,8 +1554,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self._firstrun = False self._firstrun = False
def showMigrationWizard(self, level): def showMigrationWizard(self, level):
"""TBC"""
self.migrationWizardInstance = Ui_MigrationWizard(["a"]) self.migrationWizardInstance = Ui_MigrationWizard(["a"])
if self.migrationWizardInstance.exec_(): if self.migrationWizardInstance.exec_():
pass pass
@ -1722,8 +1561,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
pass pass
def changeEvent(self, event): def changeEvent(self, event):
"""TBC"""
if event.type() == QtCore.QEvent.LanguageChange: if event.type() == QtCore.QEvent.LanguageChange:
self.ui.retranslateUi(self) self.ui.retranslateUi(self)
self.init_inbox_popup_menu(False) self.init_inbox_popup_menu(False)
@ -1735,17 +1572,15 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.ui.blackwhitelist.init_blacklist_popup_menu(False) self.ui.blackwhitelist.init_blacklist_popup_menu(False)
if event.type() == QtCore.QEvent.WindowStateChange: if event.type() == QtCore.QEvent.WindowStateChange:
if self.windowState() & QtCore.Qt.WindowMinimized: if self.windowState() & QtCore.Qt.WindowMinimized:
if BMConfigParser().getboolean('bitmessagesettings', 'minimizetotray'): if BMConfigParser().getboolean('bitmessagesettings', 'minimizetotray') and not 'darwin' in sys.platform:
if 'darwin' not in sys.platform: QtCore.QTimer.singleShot(0, self.appIndicatorHide)
QtCore.QTimer.singleShot(0, self.appIndicatorHide)
elif event.oldState() & QtCore.Qt.WindowMinimized: elif event.oldState() & QtCore.Qt.WindowMinimized:
# The window state has just been changed to # The window state has just been changed to
# Normal/Maximised/FullScreen # Normal/Maximised/FullScreen
pass pass
# QtGui.QWidget.changeEvent(self, event)
def __icon_activated(self, reason): def __icon_activated(self, reason):
"""TBC"""
if reason == QtGui.QSystemTrayIcon.Trigger: if reason == QtGui.QSystemTrayIcon.Trigger:
self.actionShow.setChecked(not self.actionShow.isChecked()) self.actionShow.setChecked(not self.actionShow.isChecked())
self.appIndicatorShowOrHideWindow() self.appIndicatorShowOrHideWindow()
@ -1754,8 +1589,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
connected = False connected = False
def setStatusIcon(self, color): def setStatusIcon(self, color):
"""Set the status icon""" # print 'setting status icon color'
_notifications_enabled = not BMConfigParser().getboolean( _notifications_enabled = not BMConfigParser().getboolean(
'bitmessagesettings', 'hidetrayconnectionnotifications') 'bitmessagesettings', 'hidetrayconnectionnotifications')
if color == 'red': if color == 'red':
@ -1769,7 +1603,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
_translate("MainWindow", "Connection lost"), _translate("MainWindow", "Connection lost"),
sound.SOUND_DISCONNECTED) sound.SOUND_DISCONNECTED)
if not BMConfigParser().safeGetBoolean('bitmessagesettings', 'upnp') and \ if not BMConfigParser().safeGetBoolean('bitmessagesettings', 'upnp') and \
BMConfigParser().get('bitmessagesettings', 'socksproxytype') == "none": BMConfigParser().get('bitmessagesettings', 'socksproxytype') == "none":
self.updateStatusBar( self.updateStatusBar(
_translate( _translate(
"MainWindow", "MainWindow",
@ -1783,9 +1617,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
"MainWindow", "Not Connected")) "MainWindow", "Not Connected"))
self.setTrayIconFile("can-icon-24px-red.png") self.setTrayIconFile("can-icon-24px-red.png")
if color == 'yellow': if color == 'yellow':
if self.statusbar.currentMessage() == ('Warning: You are currently not connected. Bitmessage will do ' if self.statusbar.currentMessage() == 'Warning: You are currently not connected. Bitmessage will do the work necessary to send the message but it won\'t send until you connect.':
'the work necessary to send the message but it won\'t send until '
'you connect.'):
self.statusbar.clearMessage() self.statusbar.clearMessage()
self.pushButtonStatusIcon.setIcon( self.pushButtonStatusIcon.setIcon(
QtGui.QIcon(":/newPrefix/images/yellowicon.png")) QtGui.QIcon(":/newPrefix/images/yellowicon.png"))
@ -1803,9 +1635,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
"MainWindow", "Connected")) "MainWindow", "Connected"))
self.setTrayIconFile("can-icon-24px-yellow.png") self.setTrayIconFile("can-icon-24px-yellow.png")
if color == 'green': if color == 'green':
if self.statusbar.currentMessage() == ('Warning: You are currently not connected. Bitmessage will do the ' if self.statusbar.currentMessage() == 'Warning: You are currently not connected. Bitmessage will do the work necessary to send the message but it won\'t send until you connect.':
'work necessary to send the message but it won\'t send until you '
'connect.'):
self.statusbar.clearMessage() self.statusbar.clearMessage()
self.pushButtonStatusIcon.setIcon( self.pushButtonStatusIcon.setIcon(
QtGui.QIcon(":/newPrefix/images/greenicon.png")) QtGui.QIcon(":/newPrefix/images/greenicon.png"))
@ -1822,23 +1652,17 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
"MainWindow", "Connected")) "MainWindow", "Connected"))
self.setTrayIconFile("can-icon-24px-green.png") self.setTrayIconFile("can-icon-24px-green.png")
def initTrayIcon(self, iconFileName, this_app): def initTrayIcon(self, iconFileName, app):
"""TBC"""
self.currentTrayIconFileName = iconFileName self.currentTrayIconFileName = iconFileName
self.tray = QtGui.QSystemTrayIcon( self.tray = QtGui.QSystemTrayIcon(
self.calcTrayIcon(iconFileName, self.findInboxUnreadCount()), this_app) self.calcTrayIcon(iconFileName, self.findInboxUnreadCount()), app)
def setTrayIconFile(self, iconFileName): def setTrayIconFile(self, iconFileName):
"""TBC"""
self.currentTrayIconFileName = iconFileName self.currentTrayIconFileName = iconFileName
self.drawTrayIcon(iconFileName, self.findInboxUnreadCount()) self.drawTrayIcon(iconFileName, self.findInboxUnreadCount())
def calcTrayIcon(self, iconFileName, inboxUnreadCount): def calcTrayIcon(self, iconFileName, inboxUnreadCount):
"""TBC""" pixmap = QtGui.QPixmap(":/newPrefix/images/"+iconFileName)
pixmap = QtGui.QPixmap(":/newPrefix/images/" + iconFileName)
if inboxUnreadCount > 0: if inboxUnreadCount > 0:
# choose font and calculate font parameters # choose font and calculate font parameters
fontName = "Lucida" fontName = "Lucida"
@ -1850,7 +1674,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
rect = fontMetrics.boundingRect(txt) rect = fontMetrics.boundingRect(txt)
# margins that we add in the top-right corner # margins that we add in the top-right corner
marginX = 2 marginX = 2
marginY = 0 # it looks like -2 is also ok due to the error of metric marginY = 0 # it looks like -2 is also ok due to the error of metric
# if it renders too wide we need to change it to a plus symbol # if it renders too wide we need to change it to a plus symbol
if rect.width() > 20: if rect.width() > 20:
txt = "+" txt = "+"
@ -1864,18 +1688,14 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
painter.setPen( painter.setPen(
QtGui.QPen(QtGui.QColor(255, 0, 0), QtCore.Qt.SolidPattern)) QtGui.QPen(QtGui.QColor(255, 0, 0), QtCore.Qt.SolidPattern))
painter.setFont(font) painter.setFont(font)
painter.drawText(24 - rect.right() - marginX, -rect.top() + marginY, txt) painter.drawText(24-rect.right()-marginX, -rect.top()+marginY, txt)
painter.end() painter.end()
return QtGui.QIcon(pixmap) return QtGui.QIcon(pixmap)
def drawTrayIcon(self, iconFileName, inboxUnreadCount): def drawTrayIcon(self, iconFileName, inboxUnreadCount):
"""TBC"""
self.tray.setIcon(self.calcTrayIcon(iconFileName, inboxUnreadCount)) self.tray.setIcon(self.calcTrayIcon(iconFileName, inboxUnreadCount))
def changedInboxUnread(self, row=None): def changedInboxUnread(self, row=None):
"""TBC"""
self.drawTrayIcon( self.drawTrayIcon(
self.currentTrayIconFileName, self.findInboxUnreadCount()) self.currentTrayIconFileName, self.findInboxUnreadCount())
self.rerenderTabTreeMessages() self.rerenderTabTreeMessages()
@ -1883,8 +1703,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.rerenderTabTreeChans() self.rerenderTabTreeChans()
def findInboxUnreadCount(self, count=None): def findInboxUnreadCount(self, count=None):
"""TBC"""
if count is None: if count is None:
queryreturn = sqlQuery('''SELECT count(*) from inbox WHERE folder='inbox' and read=0''') queryreturn = sqlQuery('''SELECT count(*) from inbox WHERE folder='inbox' and read=0''')
cnt = 0 cnt = 0
@ -1896,14 +1714,11 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
return self.unreadCount return self.unreadCount
def updateSentItemStatusByToAddress(self, toAddress, textToDisplay): def updateSentItemStatusByToAddress(self, toAddress, textToDisplay):
"""TBC"""
for sent in [self.ui.tableWidgetInbox, self.ui.tableWidgetInboxSubscriptions, self.ui.tableWidgetInboxChans]: for sent in [self.ui.tableWidgetInbox, self.ui.tableWidgetInboxSubscriptions, self.ui.tableWidgetInboxChans]:
treeWidget = self.widgetConvert(sent) treeWidget = self.widgetConvert(sent)
if self.getCurrentFolder(treeWidget) != "sent": if self.getCurrentFolder(treeWidget) != "sent":
continue continue
if treeWidget in [self.ui.treeWidgetSubscriptions, if treeWidget in [self.ui.treeWidgetSubscriptions, self.ui.treeWidgetChans] and self.getCurrentAccount(treeWidget) != toAddress:
self.ui.treeWidgetChans] and self.getCurrentAccount(treeWidget) != toAddress:
continue continue
for i in range(sent.rowCount()): for i in range(sent.rowCount()):
@ -1912,7 +1727,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
sent.item(i, 3).setToolTip(textToDisplay) sent.item(i, 3).setToolTip(textToDisplay)
try: try:
newlinePosition = textToDisplay.indexOf('\n') newlinePosition = textToDisplay.indexOf('\n')
except: # If no "_translate" appended to string before passing in, there's no qstring except: # If someone misses adding a "_translate" to a string before passing it to this function, this function won't receive a qstring which will cause an exception.
newlinePosition = 0 newlinePosition = 0
if newlinePosition > 1: if newlinePosition > 1:
sent.item(i, 3).setText( sent.item(i, 3).setText(
@ -1921,9 +1736,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
sent.item(i, 3).setText(textToDisplay) sent.item(i, 3).setText(textToDisplay)
def updateSentItemStatusByAckdata(self, ackdata, textToDisplay): def updateSentItemStatusByAckdata(self, ackdata, textToDisplay):
"""TBC""" if type(ackdata) is str:
if isinstance(ackdata, str):
ackdata = QtCore.QByteArray(ackdata) ackdata = QtCore.QByteArray(ackdata)
for sent in [self.ui.tableWidgetInbox, self.ui.tableWidgetInboxSubscriptions, self.ui.tableWidgetInboxChans]: for sent in [self.ui.tableWidgetInbox, self.ui.tableWidgetInboxSubscriptions, self.ui.tableWidgetInboxChans]:
treeWidget = self.widgetConvert(sent) treeWidget = self.widgetConvert(sent)
@ -1940,7 +1753,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
sent.item(i, 3).setToolTip(textToDisplay) sent.item(i, 3).setToolTip(textToDisplay)
try: try:
newlinePosition = textToDisplay.indexOf('\n') newlinePosition = textToDisplay.indexOf('\n')
except: # If no "_translate" appended to string before passing in, there's no qstring except: # If someone misses adding a "_translate" to a string before passing it to this function, this function won't receive a qstring which will cause an exception.
newlinePosition = 0 newlinePosition = 0
if newlinePosition > 1: if newlinePosition > 1:
sent.item(i, 3).setText( sent.item(i, 3).setText(
@ -1949,80 +1762,50 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
sent.item(i, 3).setText(textToDisplay) sent.item(i, 3).setText(textToDisplay)
def removeInboxRowByMsgid(self, msgid): # msgid and inventoryHash are the same thing def removeInboxRowByMsgid(self, msgid): # msgid and inventoryHash are the same thing
"""TBC"""
for inbox in ([ for inbox in ([
self.ui.tableWidgetInbox, self.ui.tableWidgetInbox,
self.ui.tableWidgetInboxSubscriptions, self.ui.tableWidgetInboxSubscriptions,
self.ui.tableWidgetInboxChans]): self.ui.tableWidgetInboxChans]):
for i in range(inbox.rowCount()): for i in range(inbox.rowCount()):
if msgid == str(inbox.item(i, 3).data(QtCore.Qt.UserRole).toPyObject()): if msgid == str(inbox.item(i, 3).data(QtCore.Qt.UserRole).toPyObject()):
self.updateStatusBar( self.updateStatusBar(
_translate("MainWindow", "Message trashed")) _translate("MainWindow", "Message trashed"))
treeWidget = self.widgetConvert(inbox) treeWidget = self.widgetConvert(inbox)
self.propagateUnreadCount( self.propagateUnreadCount(inbox.item(i, 1 if inbox.item(i, 1).type == AccountMixin.SUBSCRIPTION else 0).data(QtCore.Qt.UserRole), self.getCurrentFolder(treeWidget), treeWidget, 0)
inbox.item(
i,
1 if inbox.item(
i,
1).type == AccountMixin.SUBSCRIPTION else 0).data(
QtCore.Qt.UserRole),
self.getCurrentFolder(treeWidget),
treeWidget,
0)
inbox.removeRow(i) inbox.removeRow(i)
break break
def newVersionAvailable(self, version): def newVersionAvailable(self, version):
"""TBC"""
self.notifiedNewVersion = ".".join(str(n) for n in version) self.notifiedNewVersion = ".".join(str(n) for n in version)
self.updateStatusBar( self.updateStatusBar(_translate(
_translate( "MainWindow",
"MainWindow", "New version of PyBitmessage is available: %1. Download it"
"New version of PyBitmessage is available: %1. Download it" " from https://github.com/Bitmessage/PyBitmessage/releases/latest"
" from https://github.com/Bitmessage/PyBitmessage/releases/latest"
).arg(self.notifiedNewVersion) ).arg(self.notifiedNewVersion)
) )
def displayAlert(self, title, text, exitAfterUserClicksOk): def displayAlert(self, title, text, exitAfterUserClicksOk):
"""TBC"""
self.updateStatusBar(text) self.updateStatusBar(text)
QtGui.QMessageBox.critical(self, title, text, QtGui.QMessageBox.Ok) QtGui.QMessageBox.critical(self, title, text, QtGui.QMessageBox.Ok)
if exitAfterUserClicksOk: if exitAfterUserClicksOk:
sys.exit(0) os._exit(0)
def rerenderMessagelistFromLabels(self): def rerenderMessagelistFromLabels(self):
"""TBC""" for messagelist in (self.ui.tableWidgetInbox, self.ui.tableWidgetInboxChans, self.ui.tableWidgetInboxSubscriptions):
for messagelist in (
self.ui.tableWidgetInbox,
self.ui.tableWidgetInboxChans,
self.ui.tableWidgetInboxSubscriptions):
for i in range(messagelist.rowCount()): for i in range(messagelist.rowCount()):
messagelist.item(i, 1).setLabel() messagelist.item(i, 1).setLabel()
def rerenderMessagelistToLabels(self): def rerenderMessagelistToLabels(self):
"""TBC""" for messagelist in (self.ui.tableWidgetInbox, self.ui.tableWidgetInboxChans, self.ui.tableWidgetInboxSubscriptions):
for messagelist in (
self.ui.tableWidgetInbox,
self.ui.tableWidgetInboxChans,
self.ui.tableWidgetInboxSubscriptions):
for i in range(messagelist.rowCount()): for i in range(messagelist.rowCount()):
messagelist.item(i, 0).setLabel() messagelist.item(i, 0).setLabel()
def rerenderAddressBook(self): def rerenderAddressBook(self):
"""TBC""" def addRow (address, label, type):
def addRow(address, label, arg_type):
"""TBC"""
self.ui.tableWidgetAddressBook.insertRow(0) self.ui.tableWidgetAddressBook.insertRow(0)
newItem = Ui_AddressBookWidgetItemLabel(address, unicode(label, 'utf-8'), arg_type) newItem = Ui_AddressBookWidgetItemLabel(address, unicode(label, 'utf-8'), type)
self.ui.tableWidgetAddressBook.setItem(0, 0, newItem) self.ui.tableWidgetAddressBook.setItem(0, 0, newItem)
newItem = Ui_AddressBookWidgetItemAddress(address, unicode(label, 'utf-8'), arg_type) newItem = Ui_AddressBookWidgetItemAddress(address, unicode(label, 'utf-8'), type)
self.ui.tableWidgetAddressBook.setItem(0, 1, newItem) self.ui.tableWidgetAddressBook.setItem(0, 1, newItem)
oldRows = {} oldRows = {}
@ -2054,7 +1837,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
newRows[address] = [label, AccountMixin.NORMAL] newRows[address] = [label, AccountMixin.NORMAL]
completerList = [] completerList = []
for address in sorted(oldRows, key=lambda x: oldRows[x][2], reverse=True): for address in sorted(oldRows, key = lambda x: oldRows[x][2], reverse = True):
if address in newRows: if address in newRows:
completerList.append(unicode(newRows[address][0], encoding="UTF-8") + " <" + address + ">") completerList.append(unicode(newRows[address][0], encoding="UTF-8") + " <" + address + ">")
newRows.pop(address) newRows.pop(address)
@ -2071,42 +1854,22 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.ui.lineEditTo.completer().model().setStringList(completerList) self.ui.lineEditTo.completer().model().setStringList(completerList)
def rerenderSubscriptions(self): def rerenderSubscriptions(self):
"""TBC"""
self.rerenderTabTreeSubscriptions() self.rerenderTabTreeSubscriptions()
def click_pushButtonTTL(self): def click_pushButtonTTL(self):
"""TBC"""
QtGui.QMessageBox.information(self, 'Time To Live', _translate( QtGui.QMessageBox.information(self, 'Time To Live', _translate(
"MainWindow", "MainWindow", """The TTL, or Time-To-Live is the length of time that the network will hold the message.
("The TTL, or Time-To-Live is the length of time that the network will hold the message." The recipient must get it during this time. If your Bitmessage client does not hear an acknowledgement, it
"The recipient must get it during this time. If your Bitmessage client does not hear an " will resend the message automatically. The longer the Time-To-Live, the
"acknowledgement, it will resend the message automatically. The longer the Time-To-Live, " more work your computer must do to send the message. A Time-To-Live of four or five days is often appropriate."""), QtGui.QMessageBox.Ok)
"the more work your computer must do to send the message. A Time-To-Live of four or five "
"days is often appropriate.")), QtGui.QMessageBox.Ok)
def click_pushButtonClear(self): def click_pushButtonClear(self):
"""TBC"""
self.ui.lineEditSubject.setText("") self.ui.lineEditSubject.setText("")
self.ui.lineEditTo.setText("") self.ui.lineEditTo.setText("")
self.ui.textEditMessage.setText("") self.ui.textEditMessage.setText("")
self.ui.comboBoxSendFrom.setCurrentIndex(0) self.ui.comboBoxSendFrom.setCurrentIndex(0)
def click_pushButtonSend(self): def click_pushButtonSend(self):
"""
TBC
Regarding the line below `if len(message) > (2 ** 18 - 500):`:
The whole network message must fit in 2^18 bytes.
Let's assume 500 bytes of overhead. If someone wants to get that
too an exact number you are welcome to but I think that it would
be a better use of time to support message continuation so that
users can send messages of any length.
"""
encoding = 3 if QtGui.QApplication.queryKeyboardModifiers() & QtCore.Qt.ShiftModifier else 2 encoding = 3 if QtGui.QApplication.queryKeyboardModifiers() & QtCore.Qt.ShiftModifier else 2
self.statusbar.clearMessage() self.statusbar.clearMessage()
@ -2131,6 +1894,13 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
subject = str(self.ui.lineEditSubjectBroadcast.text().toUtf8()) subject = str(self.ui.lineEditSubjectBroadcast.text().toUtf8())
message = str( message = str(
self.ui.textEditMessageBroadcast.document().toPlainText().toUtf8()) self.ui.textEditMessageBroadcast.document().toPlainText().toUtf8())
"""
The whole network message must fit in 2^18 bytes.
Let's assume 500 bytes of overhead. If someone wants to get that
too an exact number you are welcome to but I think that it would
be a better use of time to support message continuation so that
users can send messages of any length.
"""
if len(message) > (2 ** 18 - 500): if len(message) > (2 ** 18 - 500):
QtGui.QMessageBox.about( QtGui.QMessageBox.about(
self, _translate("MainWindow", "Message too long"), self, _translate("MainWindow", "Message too long"),
@ -2144,13 +1914,11 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
acct = accountClass(fromAddress) acct = accountClass(fromAddress)
if sendMessageToPeople: # To send a message to specific people (rather than broadcast) if sendMessageToPeople: # To send a message to specific people (rather than broadcast)
toAddressesList = [s.strip() toAddressesList = [s.strip()
for s in toAddresses.replace(',', ';').split(';')] for s in toAddresses.replace(',', ';').split(';')]
# remove duplicate addresses. If the user has one address with a BM- and toAddressesList = list(set(
# the same address without the BM-, this will not catch it. They'll send toAddressesList)) # remove duplicate addresses. If the user has one address with a BM- and the same address without the BM-, this will not catch it. They'll send the message to the person twice.
# the message to the person twice.
toAddressesList = list(set(toAddressesList))
for toAddress in toAddressesList: for toAddress in toAddressesList:
if toAddress != '': if toAddress != '':
# label plus address # label plus address
@ -2163,30 +1931,25 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
subject = acct.subject subject = acct.subject
toAddress = acct.toAddress toAddress = acct.toAddress
else: else:
if QtGui.QMessageBox.question( if QtGui.QMessageBox.question(self, "Sending an email?", _translate("MainWindow",
self, "Sending an email?", "You are trying to send an email instead of a bitmessage. This requires registering with a gateway. Attempt to register?"),
_translate( QtGui.QMessageBox.Yes|QtGui.QMessageBox.No) != QtGui.QMessageBox.Yes:
"MainWindow",
("You are trying to send an email instead of a bitmessage. This requires "
"registering with a gateway. Attempt to register?")),
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No) != QtGui.QMessageBox.Yes:
continue continue
email = acct.getLabel() email = acct.getLabel()
if email[-14:] != "@mailchuck.com": # attempt register if email[-14:] != "@mailchuck.com": #attempt register
# 12 character random email address # 12 character random email address
email = ''.join(random.SystemRandom().choice(string.ascii_lowercase) email = ''.join(random.SystemRandom().choice(string.ascii_lowercase) for _ in range(12)) + "@mailchuck.com"
for _ in range(12)) + "@mailchuck.com"
acct = MailchuckAccount(fromAddress) acct = MailchuckAccount(fromAddress)
acct.register(email) acct.register(email)
BMConfigParser().set(fromAddress, 'label', email) BMConfigParser().set(fromAddress, 'label', email)
BMConfigParser().set(fromAddress, 'gateway', 'mailchuck') BMConfigParser().set(fromAddress, 'gateway', 'mailchuck')
BMConfigParser().save() BMConfigParser().save()
self.updateStatusBar( self.updateStatusBar(_translate(
_translate( "MainWindow",
"MainWindow", "Error: Your account wasn't registered at"
("Error: Your account wasn't registered at an email gateway. Sending registration" " an email gateway. Sending registration"
" now as %1, please wait for the registration to be processed before retrying " " now as %1, please wait for the registration"
"sending.") " to be processed before retrying sending."
).arg(email) ).arg(email)
) )
return return
@ -2204,19 +1967,19 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
"MainWindow", "MainWindow",
"Error: Bitmessage addresses start with" "Error: Bitmessage addresses start with"
" BM- Please check the recipient address %1" " BM- Please check the recipient address %1"
).arg(toAddress)) ).arg(toAddress))
elif status == 'checksumfailed': elif status == 'checksumfailed':
self.updateStatusBar(_translate( self.updateStatusBar(_translate(
"MainWindow", "MainWindow",
"Error: The recipient address %1 is not" "Error: The recipient address %1 is not"
" typed or copied correctly. Please check it." " typed or copied correctly. Please check it."
).arg(toAddress)) ).arg(toAddress))
elif status == 'invalidcharacters': elif status == 'invalidcharacters':
self.updateStatusBar(_translate( self.updateStatusBar(_translate(
"MainWindow", "MainWindow",
"Error: The recipient address %1 contains" "Error: The recipient address %1 contains"
" invalid characters. Please check it." " invalid characters. Please check it."
).arg(toAddress)) ).arg(toAddress))
elif status == 'versiontoohigh': elif status == 'versiontoohigh':
self.updateStatusBar(_translate( self.updateStatusBar(_translate(
"MainWindow", "MainWindow",
@ -2224,7 +1987,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
" %1 is too high. Either you need to upgrade" " %1 is too high. Either you need to upgrade"
" your Bitmessage software or your" " your Bitmessage software or your"
" acquaintance is being clever." " acquaintance is being clever."
).arg(toAddress)) ).arg(toAddress))
elif status == 'ripetooshort': elif status == 'ripetooshort':
self.updateStatusBar(_translate( self.updateStatusBar(_translate(
"MainWindow", "MainWindow",
@ -2232,7 +1995,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
" address %1 is too short. There might be" " address %1 is too short. There might be"
" something wrong with the software of" " something wrong with the software of"
" your acquaintance." " your acquaintance."
).arg(toAddress)) ).arg(toAddress))
elif status == 'ripetoolong': elif status == 'ripetoolong':
self.updateStatusBar(_translate( self.updateStatusBar(_translate(
"MainWindow", "MainWindow",
@ -2240,7 +2003,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
" address %1 is too long. There might be" " address %1 is too long. There might be"
" something wrong with the software of" " something wrong with the software of"
" your acquaintance." " your acquaintance."
).arg(toAddress)) ).arg(toAddress))
elif status == 'varintmalformed': elif status == 'varintmalformed':
self.updateStatusBar(_translate( self.updateStatusBar(_translate(
"MainWindow", "MainWindow",
@ -2248,55 +2011,39 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
" address %1 is malformed. There might be" " address %1 is malformed. There might be"
" something wrong with the software of" " something wrong with the software of"
" your acquaintance." " your acquaintance."
).arg(toAddress)) ).arg(toAddress))
else: else:
self.updateStatusBar(_translate( self.updateStatusBar(_translate(
"MainWindow", "MainWindow",
"Error: Something is wrong with the" "Error: Something is wrong with the"
" recipient address %1." " recipient address %1."
).arg(toAddress)) ).arg(toAddress))
elif fromAddress == '': elif fromAddress == '':
self.updateStatusBar(_translate( self.updateStatusBar(_translate(
"MainWindow", "MainWindow",
("Error: You must specify a From address. If you don\'t have one, go to the" "Error: You must specify a From address. If you"
" \'Your Identities\' tab."))) " don\'t have one, go to the"
" \'Your Identities\' tab.")
)
else: else:
toAddress = addBMIfNotPresent(toAddress) toAddress = addBMIfNotPresent(toAddress)
if addressVersionNumber > 4 or addressVersionNumber <= 1: if addressVersionNumber > 4 or addressVersionNumber <= 1:
QtGui.QMessageBox.about( QtGui.QMessageBox.about(self, _translate("MainWindow", "Address version number"), _translate(
self, "MainWindow", "Concerning the address %1, Bitmessage cannot understand address version numbers of %2. Perhaps upgrade Bitmessage to the latest version.").arg(toAddress).arg(str(addressVersionNumber)))
_translate(
"MainWindow",
"Address version number"),
_translate(
"MainWindow",
("Concerning the address %1, Bitmessage cannot understand address version "
"numbers of %2. Perhaps upgrade Bitmessage to the latest version.")
).arg(toAddress).arg(
str(addressVersionNumber)))
continue continue
if streamNumber > 1 or streamNumber == 0: if streamNumber > 1 or streamNumber == 0:
QtGui.QMessageBox.about( QtGui.QMessageBox.about(self, _translate("MainWindow", "Stream number"), _translate(
self, "MainWindow", "Concerning the address %1, Bitmessage cannot handle stream numbers of %2. Perhaps upgrade Bitmessage to the latest version.").arg(toAddress).arg(str(streamNumber)))
_translate(
"MainWindow",
"Stream number"),
_translate(
"MainWindow",
("Concerning the address %1, Bitmessage cannot handle stream numbers of %2. "
"Perhaps upgrade Bitmessage to the latest version.")
).arg(toAddress).arg(
str(streamNumber)))
continue continue
self.statusbar.clearMessage() self.statusbar.clearMessage()
if shared.statusIconColor == 'red': if shared.statusIconColor == 'red':
self.updateStatusBar( self.updateStatusBar(_translate(
_translate( "MainWindow",
"MainWindow", "Warning: You are currently not connected."
("Warning: You are currently not connected. Bitmessage will do the work necessary" " Bitmessage will do the work necessary to"
" to send the message but it won\'t send until you connect.") " send the message but it won\'t send until"
) " you connect.")
) )
stealthLevel = BMConfigParser().safeGetInt( stealthLevel = BMConfigParser().safeGetInt(
'bitmessagesettings', 'ackstealthlevel') 'bitmessagesettings', 'ackstealthlevel')
@ -2311,15 +2058,15 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
subject, subject,
message, message,
ackdata, ackdata,
int(time.time()), # sentTime (this will never change) int(time.time()), # sentTime (this will never change)
int(time.time()), # lastActionTime int(time.time()), # lastActionTime
0, # sleepTill time. This will get set when the POW gets done. 0, # sleepTill time. This will get set when the POW gets done.
'msgqueued', 'msgqueued',
0, # retryNumber 0, # retryNumber
'sent', # folder 'sent', # folder
encoding, # encodingtype encoding, # encodingtype
BMConfigParser().getint('bitmessagesettings', 'ttl') BMConfigParser().getint('bitmessagesettings', 'ttl')
) )
toLabel = '' toLabel = ''
queryreturn = sqlQuery('''select label from addressbook where address=?''', queryreturn = sqlQuery('''select label from addressbook where address=?''',
@ -2361,28 +2108,27 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
ackdata = genAckPayload(streamNumber, 0) ackdata = genAckPayload(streamNumber, 0)
toAddress = str_broadcast_subscribers toAddress = str_broadcast_subscribers
ripe = '' ripe = ''
t = ( t = ('', # msgid. We don't know what this will be until the POW is done.
'', # msgid. We don't know what this will be until the POW is done. toAddress,
toAddress, ripe,
ripe, fromAddress,
fromAddress, subject,
subject, message,
message, ackdata,
ackdata, int(time.time()), # sentTime (this will never change)
int(time.time()), # sentTime (this will never change) int(time.time()), # lastActionTime
int(time.time()), # lastActionTime 0, # sleepTill time. This will get set when the POW gets done.
0, # sleepTill time. This will get set when the POW gets done. 'broadcastqueued',
'broadcastqueued', 0, # retryNumber
0, # retryNumber 'sent', # folder
'sent', # folder encoding, # encoding type
encoding, # encoding type BMConfigParser().getint('bitmessagesettings', 'ttl')
BMConfigParser().getint('bitmessagesettings', 'ttl') )
)
sqlExecute( sqlExecute(
'''INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)''', *t) '''INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)''', *t)
toLabel = str_broadcast_subscribers toLabel = str_broadcast_subscribers
self.displayNewSentMessage( self.displayNewSentMessage(
toAddress, toLabel, fromAddress, subject, message, ackdata) toAddress, toLabel, fromAddress, subject, message, ackdata)
@ -2399,8 +2145,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
"MainWindow", "Broadcast queued.")) "MainWindow", "Broadcast queued."))
def click_pushButtonLoadFromAddressBook(self): def click_pushButtonLoadFromAddressBook(self):
"""TBC"""
self.ui.tabWidget.setCurrentIndex(5) self.ui.tabWidget.setCurrentIndex(5)
for i in range(4): for i in range(4):
time.sleep(0.1) time.sleep(0.1)
@ -2413,8 +2157,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
)) ))
def click_pushButtonFetchNamecoinID(self): def click_pushButtonFetchNamecoinID(self):
"""TBC"""
nc = namecoinConnection() nc = namecoinConnection()
identities = str(self.ui.lineEditTo.text().toUtf8()).split(";") identities = str(self.ui.lineEditTo.text().toUtf8()).split(";")
err, addr = nc.query(identities[-1].strip()) err, addr = nc.query(identities[-1].strip())
@ -2428,8 +2170,8 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
"MainWindow", "Fetched address from namecoin identity.")) "MainWindow", "Fetched address from namecoin identity."))
def setBroadcastEnablementDependingOnWhetherThisIsAMailingListAddress(self, address): def setBroadcastEnablementDependingOnWhetherThisIsAMailingListAddress(self, address):
"""If this is a chan then don't let people broadcast because no one should subscribe to chan addresses.""" # If this is a chan then don't let people broadcast because no one
# should subscribe to chan addresses.
self.ui.tabWidgetSend.setCurrentIndex( self.ui.tabWidgetSend.setCurrentIndex(
self.ui.tabWidgetSend.indexOf( self.ui.tabWidgetSend.indexOf(
self.ui.sendBroadcast self.ui.sendBroadcast
@ -2438,20 +2180,17 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
)) ))
def rerenderComboBoxSendFrom(self): def rerenderComboBoxSendFrom(self):
"""TBC"""
self.ui.comboBoxSendFrom.clear() self.ui.comboBoxSendFrom.clear()
for addressInKeysFile in getSortedAccounts(): for addressInKeysFile in getSortedAccounts():
isEnabled = BMConfigParser().getboolean(
# I realize that this is poor programming practice but I don't care. It's easier for others to read. addressInKeysFile, 'enabled') # I realize that this is poor programming practice but I don't care. It's easier for others to read.
isEnabled = BMConfigParser().getboolean(addressInKeysFile, 'enabled')
isMaillinglist = BMConfigParser().safeGetBoolean(addressInKeysFile, 'mailinglist') isMaillinglist = BMConfigParser().safeGetBoolean(addressInKeysFile, 'mailinglist')
if isEnabled and not isMaillinglist: if isEnabled and not isMaillinglist:
label = unicode(BMConfigParser().get(addressInKeysFile, 'label'), 'utf-8', 'ignore').strip() label = unicode(BMConfigParser().get(addressInKeysFile, 'label'), 'utf-8', 'ignore').strip()
if label == "": if label == "":
label = addressInKeysFile label = addressInKeysFile
self.ui.comboBoxSendFrom.addItem(avatarize(addressInKeysFile), label, addressInKeysFile) self.ui.comboBoxSendFrom.addItem(avatarize(addressInKeysFile), label, addressInKeysFile)
# self.ui.comboBoxSendFrom.model().sort(1, Qt.AscendingOrder)
for i in range(self.ui.comboBoxSendFrom.count()): for i in range(self.ui.comboBoxSendFrom.count()):
address = str(self.ui.comboBoxSendFrom.itemData( address = str(self.ui.comboBoxSendFrom.itemData(
i, QtCore.Qt.UserRole).toString()) i, QtCore.Qt.UserRole).toString())
@ -2459,26 +2198,22 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
i, AccountColor(address).accountColor(), i, AccountColor(address).accountColor(),
QtCore.Qt.ForegroundRole) QtCore.Qt.ForegroundRole)
self.ui.comboBoxSendFrom.insertItem(0, '', '') self.ui.comboBoxSendFrom.insertItem(0, '', '')
if self.ui.comboBoxSendFrom.count() == 2: if(self.ui.comboBoxSendFrom.count() == 2):
self.ui.comboBoxSendFrom.setCurrentIndex(1) self.ui.comboBoxSendFrom.setCurrentIndex(1)
else: else:
self.ui.comboBoxSendFrom.setCurrentIndex(0) self.ui.comboBoxSendFrom.setCurrentIndex(0)
def rerenderComboBoxSendFromBroadcast(self): def rerenderComboBoxSendFromBroadcast(self):
"""TBC"""
self.ui.comboBoxSendFromBroadcast.clear() self.ui.comboBoxSendFromBroadcast.clear()
for addressInKeysFile in getSortedAccounts(): for addressInKeysFile in getSortedAccounts():
isEnabled = BMConfigParser().getboolean(
# I realize that this is poor programming practice but I don't care. It's easier for others to read. addressInKeysFile, 'enabled') # I realize that this is poor programming practice but I don't care. It's easier for others to read.
isEnabled = BMConfigParser().getboolean(addressInKeysFile, 'enabled')
isChan = BMConfigParser().safeGetBoolean(addressInKeysFile, 'chan') isChan = BMConfigParser().safeGetBoolean(addressInKeysFile, 'chan')
if isEnabled and not isChan: if isEnabled and not isChan:
label = unicode(BMConfigParser().get(addressInKeysFile, 'label'), 'utf-8', 'ignore').strip() label = unicode(BMConfigParser().get(addressInKeysFile, 'label'), 'utf-8', 'ignore').strip()
if label == "": if label == "":
label = addressInKeysFile label = addressInKeysFile
self.ui.comboBoxSendFromBroadcast.addItem(avatarize(addressInKeysFile), label, addressInKeysFile) self.ui.comboBoxSendFromBroadcast.addItem(avatarize(addressInKeysFile), label, addressInKeysFile)
for i in range(self.ui.comboBoxSendFromBroadcast.count()): for i in range(self.ui.comboBoxSendFromBroadcast.count()):
address = str(self.ui.comboBoxSendFromBroadcast.itemData( address = str(self.ui.comboBoxSendFromBroadcast.itemData(
i, QtCore.Qt.UserRole).toString()) i, QtCore.Qt.UserRole).toString())
@ -2486,19 +2221,16 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
i, AccountColor(address).accountColor(), i, AccountColor(address).accountColor(),
QtCore.Qt.ForegroundRole) QtCore.Qt.ForegroundRole)
self.ui.comboBoxSendFromBroadcast.insertItem(0, '', '') self.ui.comboBoxSendFromBroadcast.insertItem(0, '', '')
if self.ui.comboBoxSendFromBroadcast.count() == 2: if(self.ui.comboBoxSendFromBroadcast.count() == 2):
self.ui.comboBoxSendFromBroadcast.setCurrentIndex(1) self.ui.comboBoxSendFromBroadcast.setCurrentIndex(1)
else: else:
self.ui.comboBoxSendFromBroadcast.setCurrentIndex(0) self.ui.comboBoxSendFromBroadcast.setCurrentIndex(0)
# This function is called by the processmsg function when that function
# receives a message to an address that is acting as a
# pseudo-mailing-list. The message will be broadcast out. This function
# puts the message on the 'Sent' tab.
def displayNewSentMessage(self, toAddress, toLabel, fromAddress, subject, message, ackdata): def displayNewSentMessage(self, toAddress, toLabel, fromAddress, subject, message, ackdata):
"""
This function is called by the processmsg function when that function
receives a message to an address that is acting as a
pseudo-mailing-list. The message will be broadcast out. This function
puts the message on the 'Sent' tab.
"""
acct = accountClass(fromAddress) acct = accountClass(fromAddress)
acct.parseMessage(toAddress, fromAddress, subject, message) acct.parseMessage(toAddress, fromAddress, subject, message)
tab = -1 tab = -1
@ -2509,37 +2241,18 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
treeWidget = self.widgetConvert(sent) treeWidget = self.widgetConvert(sent)
if self.getCurrentFolder(treeWidget) != "sent": if self.getCurrentFolder(treeWidget) != "sent":
continue continue
if all( if treeWidget == self.ui.treeWidgetYourIdentities and self.getCurrentAccount(treeWidget) not in (fromAddress, None, False):
[
treeWidget == self.ui.treeWidgetYourIdentities,
self.getCurrentAccount(treeWidget) not in (fromAddress, None, False),
]
):
continue continue
elif all( elif treeWidget in [self.ui.treeWidgetSubscriptions, self.ui.treeWidgetChans] and self.getCurrentAccount(treeWidget) != toAddress:
[
treeWidget in [self.ui.treeWidgetSubscriptions, self.ui.treeWidgetChans],
self.getCurrentAccount(treeWidget) != toAddress,
]
):
continue continue
elif not helper_search.check_match( elif not helper_search.check_match(toAddress, fromAddress, subject, message, self.getCurrentSearchOption(tab), self.getCurrentSearchLine(tab)):
toAddress,
fromAddress,
subject,
message,
self.getCurrentSearchOption(tab),
self.getCurrentSearchLine(tab),
):
continue continue
self.addMessageListItemSent(sent, toAddress, fromAddress, subject, "msgqueued", ackdata, time.time()) self.addMessageListItemSent(sent, toAddress, fromAddress, subject, "msgqueued", ackdata, time.time())
self.getAccountTextedit(acct).setPlainText(unicode(message, 'utf-8', 'replace')) self.getAccountTextedit(acct).setPlainText(unicode(message, 'utf-8', 'replace'))
sent.setCurrentCell(0, 0) sent.setCurrentCell(0, 0)
def displayNewInboxMessage(self, inventoryHash, toAddress, fromAddress, subject, message): def displayNewInboxMessage(self, inventoryHash, toAddress, fromAddress, subject, message):
"""TBC"""
if toAddress == str_broadcast_subscribers: if toAddress == str_broadcast_subscribers:
acct = accountClass(fromAddress) acct = accountClass(fromAddress)
else: else:
@ -2547,58 +2260,17 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
inbox = self.getAccountMessagelist(acct) inbox = self.getAccountMessagelist(acct)
ret = None ret = None
tab = -1 tab = -1
for treeWidget in [ for treeWidget in [self.ui.treeWidgetYourIdentities, self.ui.treeWidgetSubscriptions, self.ui.treeWidgetChans]:
self.ui.treeWidgetYourIdentities,
self.ui.treeWidgetSubscriptions,
self.ui.treeWidgetChans,
]:
tab += 1 tab += 1
if tab == 1: if tab == 1:
tab = 2 tab = 2
tableWidget = self.widgetConvert(treeWidget) tableWidget = self.widgetConvert(treeWidget)
if not helper_search.check_match( if not helper_search.check_match(toAddress, fromAddress, subject, message, self.getCurrentSearchOption(tab), self.getCurrentSearchLine(tab)):
toAddress,
fromAddress,
subject,
message,
self.getCurrentSearchOption(tab),
self.getCurrentSearchLine(tab),
):
continue continue
if all( if tableWidget == inbox and self.getCurrentAccount(treeWidget) == acct.address and self.getCurrentFolder(treeWidget) in ["inbox", None]:
[ ret = self.addMessageListItemInbox(inbox, "inbox", inventoryHash, toAddress, fromAddress, subject, time.time(), 0)
tableWidget == inbox, elif treeWidget == self.ui.treeWidgetYourIdentities and self.getCurrentAccount(treeWidget) is None and self.getCurrentFolder(treeWidget) in ["inbox", "new", None]:
self.getCurrentAccount(treeWidget) == acct.address, ret = self.addMessageListItemInbox(tableWidget, "inbox", inventoryHash, toAddress, fromAddress, subject, time.time(), 0)
self.getCurrentFolder(treeWidget) in ["inbox", None],
]
):
ret = self.addMessageListItemInbox(
inbox,
"inbox",
inventoryHash,
toAddress,
fromAddress,
subject,
time.time(),
0,
)
elif treeWidget == all(
[
self.ui.treeWidgetYourIdentities,
self.getCurrentAccount(treeWidget) is None,
self.getCurrentFolder(treeWidget) in ["inbox", "new", None]
]
):
ret = self.addMessageListItemInbox(
tableWidget,
"inbox",
inventoryHash,
toAddress,
fromAddress,
subject,
time.time(),
0,
)
if ret is None: if ret is None:
acct.parseMessage(toAddress, fromAddress, subject, "") acct.parseMessage(toAddress, fromAddress, subject, "")
else: else:
@ -2612,30 +2284,18 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
unicode(acct.fromLabel, 'utf-8')), unicode(acct.fromLabel, 'utf-8')),
sound.SOUND_UNKNOWN sound.SOUND_UNKNOWN
) )
if any( if self.getCurrentAccount() is not None and ((self.getCurrentFolder(treeWidget) != "inbox" and self.getCurrentFolder(treeWidget) is not None) or self.getCurrentAccount(treeWidget) != acct.address):
[
all(
[
self.getCurrentAccount() is not None,
self.getCurrentFolder(treeWidget) != "inbox", # pylint: disable=undefined-loop-variable
self.getCurrentFolder(treeWidget) is not None, # pylint: disable=undefined-loop-variable
]
),
self.getCurrentAccount(treeWidget) != acct.address # pylint: disable=undefined-loop-variable
]
):
# Ubuntu should notify of new message irespective of # Ubuntu should notify of new message irespective of
# whether it's in current message list or not # whether it's in current message list or not
self.indicatorUpdate(True, to_label=acct.toLabel) self.indicatorUpdate(True, to_label=acct.toLabel)
# cannot find item to pass here ): # cannot find item to pass here ):
if hasattr(acct, "feedback") and acct.feedback != GatewayAccount.ALL_OK: if hasattr(acct, "feedback") \
and acct.feedback != GatewayAccount.ALL_OK:
if acct.feedback == GatewayAccount.REGISTRATION_DENIED: if acct.feedback == GatewayAccount.REGISTRATION_DENIED:
dialogs.EmailGatewayDialog( dialogs.EmailGatewayDialog(
self, BMConfigParser(), acct).exec_() self, BMConfigParser(), acct).exec_()
def click_pushButtonAddAddressBook(self, dialog=None): def click_pushButtonAddAddressBook(self, dialog=None):
"""TBC"""
if not dialog: if not dialog:
dialog = dialogs.AddAddressDialog(self) dialog = dialogs.AddAddressDialog(self)
dialog.exec_() dialog.exec_()
@ -2659,8 +2319,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.addEntryToAddressBook(address, label) self.addEntryToAddressBook(address, label)
def addEntryToAddressBook(self, address, label): def addEntryToAddressBook(self, address, label):
"""TBC"""
if shared.isAddressInMyAddressBook(address): if shared.isAddressInMyAddressBook(address):
return return
sqlExecute('''INSERT INTO addressbook VALUES (?,?)''', label, address) sqlExecute('''INSERT INTO addressbook VALUES (?,?)''', label, address)
@ -2669,8 +2327,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.rerenderAddressBook() self.rerenderAddressBook()
def addSubscription(self, address, label): def addSubscription(self, address, label):
"""TBC"""
# This should be handled outside of this function, for error displaying # This should be handled outside of this function, for error displaying
# and such, but it must also be checked here. # and such, but it must also be checked here.
if shared.isAddressInMySubscriptionsList(address): if shared.isAddressInMySubscriptionsList(address):
@ -2686,8 +2342,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.rerenderTabTreeSubscriptions() self.rerenderTabTreeSubscriptions()
def click_pushButtonAddSubscription(self): def click_pushButtonAddSubscription(self):
"""TBC"""
dialog = dialogs.NewSubscriptionDialog(self) dialog = dialogs.NewSubscriptionDialog(self)
dialog.exec_() dialog.exec_()
try: try:
@ -2718,28 +2372,18 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
)) ))
def click_pushButtonStatusIcon(self): def click_pushButtonStatusIcon(self):
"""TBC"""
dialogs.IconGlossaryDialog(self, config=BMConfigParser()).exec_() dialogs.IconGlossaryDialog(self, config=BMConfigParser()).exec_()
def click_actionHelp(self): def click_actionHelp(self):
"""TBC"""
dialogs.HelpDialog(self).exec_() dialogs.HelpDialog(self).exec_()
def click_actionSupport(self): def click_actionSupport(self):
"""TBC"""
support.createSupportMessage(self) support.createSupportMessage(self)
def click_actionAbout(self): def click_actionAbout(self):
"""TBC"""
dialogs.AboutDialog(self).exec_() dialogs.AboutDialog(self).exec_()
def click_actionSettings(self): def click_actionSettings(self):
"""TBC"""
self.settingsDialogInstance = settingsDialog(self) self.settingsDialogInstance = settingsDialog(self)
if self._firstrun: if self._firstrun:
self.settingsDialogInstance.ui.tabWidgetSettings.setCurrentIndex(1) self.settingsDialogInstance.ui.tabWidgetSettings.setCurrentIndex(1)
@ -2765,57 +2409,32 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.settingsDialogInstance.ui.checkBoxUseIdenticons.isChecked())) self.settingsDialogInstance.ui.checkBoxUseIdenticons.isChecked()))
BMConfigParser().set('bitmessagesettings', 'replybelow', str( BMConfigParser().set('bitmessagesettings', 'replybelow', str(
self.settingsDialogInstance.ui.checkBoxReplyBelow.isChecked())) self.settingsDialogInstance.ui.checkBoxReplyBelow.isChecked()))
lang = str(self.settingsDialogInstance.ui.languageComboBox.itemData( lang = str(self.settingsDialogInstance.ui.languageComboBox.itemData(self.settingsDialogInstance.ui.languageComboBox.currentIndex()).toString())
self.settingsDialogInstance.ui.languageComboBox.currentIndex()).toString())
BMConfigParser().set('bitmessagesettings', 'userlocale', lang) BMConfigParser().set('bitmessagesettings', 'userlocale', lang)
change_translation(l10n.getTranslationLanguage()) change_translation(l10n.getTranslationLanguage())
if int(BMConfigParser().get('bitmessagesettings', 'port')) != int( if int(BMConfigParser().get('bitmessagesettings', 'port')) != int(self.settingsDialogInstance.ui.lineEditTCPPort.text()):
self.settingsDialogInstance.ui.lineEditTCPPort.text()):
if not BMConfigParser().safeGetBoolean('bitmessagesettings', 'dontconnect'): if not BMConfigParser().safeGetBoolean('bitmessagesettings', 'dontconnect'):
QtGui.QMessageBox.about(self, _translate("MainWindow", "Restart"), _translate( QtGui.QMessageBox.about(self, _translate("MainWindow", "Restart"), _translate(
"MainWindow", "You must restart Bitmessage for the port number change to take effect.")) "MainWindow", "You must restart Bitmessage for the port number change to take effect."))
BMConfigParser().set('bitmessagesettings', 'port', str( BMConfigParser().set('bitmessagesettings', 'port', str(
self.settingsDialogInstance.ui.lineEditTCPPort.text())) self.settingsDialogInstance.ui.lineEditTCPPort.text()))
if self.settingsDialogInstance.ui.checkBoxUPnP.isChecked() != BMConfigParser().safeGetBoolean( if self.settingsDialogInstance.ui.checkBoxUPnP.isChecked() != BMConfigParser().safeGetBoolean('bitmessagesettings', 'upnp'):
'bitmessagesettings', 'upnp' BMConfigParser().set('bitmessagesettings', 'upnp', str(self.settingsDialogInstance.ui.checkBoxUPnP.isChecked()))
):
BMConfigParser().set(
'bitmessagesettings', 'upnp',
str(self.settingsDialogInstance.ui.checkBoxUPnP.isChecked()))
if self.settingsDialogInstance.ui.checkBoxUPnP.isChecked(): if self.settingsDialogInstance.ui.checkBoxUPnP.isChecked():
import upnp
upnpThread = upnp.uPnPThread() upnpThread = upnp.uPnPThread()
upnpThread.start() upnpThread.start()
#print 'self.settingsDialogInstance.ui.comboBoxProxyType.currentText()', self.settingsDialogInstance.ui.comboBoxProxyType.currentText()
if all( #print 'self.settingsDialogInstance.ui.comboBoxProxyType.currentText())[0:5]', self.settingsDialogInstance.ui.comboBoxProxyType.currentText()[0:5]
[ if BMConfigParser().get('bitmessagesettings', 'socksproxytype') == 'none' and self.settingsDialogInstance.ui.comboBoxProxyType.currentText()[0:5] == 'SOCKS':
BMConfigParser().get(
'bitmessagesettings',
'socksproxytype') == 'none',
self.settingsDialogInstance.ui.comboBoxProxyType.currentText()[0:5] == 'SOCKS',
]
):
if shared.statusIconColor != 'red': if shared.statusIconColor != 'red':
QtGui.QMessageBox.about( QtGui.QMessageBox.about(self, _translate("MainWindow", "Restart"), _translate(
self, "MainWindow", "Bitmessage will use your proxy from now on but you may want to manually restart Bitmessage now to close existing connections (if any)."))
_translate( if BMConfigParser().get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS' and self.settingsDialogInstance.ui.comboBoxProxyType.currentText()[0:5] != 'SOCKS':
"MainWindow",
"Restart"),
_translate(
"MainWindow",
("Bitmessage will use your proxy from now on but you may want to manually restart "
"Bitmessage now to close existing connections (if any).")))
if all(
[
BMConfigParser().get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS',
self.settingsDialogInstance.ui.comboBoxProxyType.currentText()[0:5] != 'SOCKS',
]
):
self.statusbar.clearMessage() self.statusbar.clearMessage()
state.resetNetworkProtocolAvailability() # just in case we changed something in the network connectivity state.resetNetworkProtocolAvailability() # just in case we changed something in the network connectivity
if self.settingsDialogInstance.ui.comboBoxProxyType.currentText()[0:5] == 'SOCKS': if self.settingsDialogInstance.ui.comboBoxProxyType.currentText()[0:5] == 'SOCKS':
BMConfigParser().set('bitmessagesettings', 'socksproxytype', str( BMConfigParser().set('bitmessagesettings', 'socksproxytype', str(
self.settingsDialogInstance.ui.comboBoxProxyType.currentText())) self.settingsDialogInstance.ui.comboBoxProxyType.currentText()))
@ -2844,13 +2463,13 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
"MainWindow", "Your maximum download and upload rate must be numbers. Ignoring what you typed.")) "MainWindow", "Your maximum download and upload rate must be numbers. Ignoring what you typed."))
else: else:
set_rates(BMConfigParser().safeGetInt("bitmessagesettings", "maxdownloadrate"), set_rates(BMConfigParser().safeGetInt("bitmessagesettings", "maxdownloadrate"),
BMConfigParser().safeGetInt("bitmessagesettings", "maxuploadrate")) BMConfigParser().safeGetInt("bitmessagesettings", "maxuploadrate"))
BMConfigParser().set('bitmessagesettings', 'maxoutboundconnections', str( BMConfigParser().set('bitmessagesettings', 'maxoutboundconnections', str(
int(float(self.settingsDialogInstance.ui.lineEditMaxOutboundConnections.text())))) int(float(self.settingsDialogInstance.ui.lineEditMaxOutboundConnections.text()))))
BMConfigParser().set('bitmessagesettings', 'namecoinrpctype', BMConfigParser().set('bitmessagesettings', 'namecoinrpctype',
self.settingsDialogInstance.getNamecoinType()) self.settingsDialogInstance.getNamecoinType())
BMConfigParser().set('bitmessagesettings', 'namecoinrpchost', str( BMConfigParser().set('bitmessagesettings', 'namecoinrpchost', str(
self.settingsDialogInstance.ui.lineEditNamecoinHost.text())) self.settingsDialogInstance.ui.lineEditNamecoinHost.text()))
BMConfigParser().set('bitmessagesettings', 'namecoinrpcport', str( BMConfigParser().set('bitmessagesettings', 'namecoinrpcport', str(
@ -2859,85 +2478,46 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.settingsDialogInstance.ui.lineEditNamecoinUser.text())) self.settingsDialogInstance.ui.lineEditNamecoinUser.text()))
BMConfigParser().set('bitmessagesettings', 'namecoinrpcpassword', str( BMConfigParser().set('bitmessagesettings', 'namecoinrpcpassword', str(
self.settingsDialogInstance.ui.lineEditNamecoinPassword.text())) self.settingsDialogInstance.ui.lineEditNamecoinPassword.text()))
# Demanded difficulty tab # Demanded difficulty tab
if float(self.settingsDialogInstance.ui.lineEditTotalDifficulty.text()) >= 1: if float(self.settingsDialogInstance.ui.lineEditTotalDifficulty.text()) >= 1:
BMConfigParser().set('bitmessagesettings', 'defaultnoncetrialsperbyte', str(int(float( BMConfigParser().set('bitmessagesettings', 'defaultnoncetrialsperbyte', str(int(float(
self.settingsDialogInstance.ui.lineEditTotalDifficulty.text() self.settingsDialogInstance.ui.lineEditTotalDifficulty.text()) * defaults.networkDefaultProofOfWorkNonceTrialsPerByte)))
) * defaults.networkDefaultProofOfWorkNonceTrialsPerByte)))
if float(self.settingsDialogInstance.ui.lineEditSmallMessageDifficulty.text()) >= 1: if float(self.settingsDialogInstance.ui.lineEditSmallMessageDifficulty.text()) >= 1:
BMConfigParser().set('bitmessagesettings', 'defaultpayloadlengthextrabytes', str(int(float( BMConfigParser().set('bitmessagesettings', 'defaultpayloadlengthextrabytes', str(int(float(
self.settingsDialogInstance.ui.lineEditSmallMessageDifficulty.text() self.settingsDialogInstance.ui.lineEditSmallMessageDifficulty.text()) * defaults.networkDefaultPayloadLengthExtraBytes)))
) * defaults.networkDefaultPayloadLengthExtraBytes)))
if self.settingsDialogInstance.ui.comboBoxOpenCL.currentText().toUtf8( if self.settingsDialogInstance.ui.comboBoxOpenCL.currentText().toUtf8() != BMConfigParser().safeGet("bitmessagesettings", "opencl"):
) != BMConfigParser().safeGet("bitmessagesettings", "opencl"): BMConfigParser().set('bitmessagesettings', 'opencl', str(self.settingsDialogInstance.ui.comboBoxOpenCL.currentText()))
BMConfigParser().set(
'bitmessagesettings', 'opencl',
str(self.settingsDialogInstance.ui.comboBoxOpenCL.currentText()))
queues.workerQueue.put(('resetPoW', '')) queues.workerQueue.put(('resetPoW', ''))
acceptableDifficultyChanged = False acceptableDifficultyChanged = False
if any( if float(self.settingsDialogInstance.ui.lineEditMaxAcceptableTotalDifficulty.text()) >= 1 or float(self.settingsDialogInstance.ui.lineEditMaxAcceptableTotalDifficulty.text()) == 0:
[ if BMConfigParser().get('bitmessagesettings','maxacceptablenoncetrialsperbyte') != str(int(float(
float(self.settingsDialogInstance.ui.lineEditMaxAcceptableTotalDifficulty.text()) >= 1, self.settingsDialogInstance.ui.lineEditMaxAcceptableTotalDifficulty.text()) * defaults.networkDefaultProofOfWorkNonceTrialsPerByte)):
float(self.settingsDialogInstance.ui.lineEditMaxAcceptableTotalDifficulty.text()) == 0,
]
):
if BMConfigParser().get(
'bitmessagesettings',
'maxacceptablenoncetrialsperbyte',
) != str(
int(
float(
self.settingsDialogInstance.ui.lineEditMaxAcceptableTotalDifficulty.text()
) * defaults.networkDefaultProofOfWorkNonceTrialsPerByte
)
):
# the user changed the max acceptable total difficulty # the user changed the max acceptable total difficulty
acceptableDifficultyChanged = True acceptableDifficultyChanged = True
BMConfigParser().set('bitmessagesettings', 'maxacceptablenoncetrialsperbyte', str(int(float( BMConfigParser().set('bitmessagesettings', 'maxacceptablenoncetrialsperbyte', str(int(float(
self.settingsDialogInstance.ui.lineEditMaxAcceptableTotalDifficulty.text() self.settingsDialogInstance.ui.lineEditMaxAcceptableTotalDifficulty.text()) * defaults.networkDefaultProofOfWorkNonceTrialsPerByte)))
) * defaults.networkDefaultProofOfWorkNonceTrialsPerByte))) if float(self.settingsDialogInstance.ui.lineEditMaxAcceptableSmallMessageDifficulty.text()) >= 1 or float(self.settingsDialogInstance.ui.lineEditMaxAcceptableSmallMessageDifficulty.text()) == 0:
if BMConfigParser().get('bitmessagesettings','maxacceptablepayloadlengthextrabytes') != str(int(float(
if any( self.settingsDialogInstance.ui.lineEditMaxAcceptableSmallMessageDifficulty.text()) * defaults.networkDefaultPayloadLengthExtraBytes)):
[
float(self.settingsDialogInstance.ui.lineEditMaxAcceptableSmallMessageDifficulty.text()) >= 1,
float(self.settingsDialogInstance.ui.lineEditMaxAcceptableSmallMessageDifficulty.text()) == 0,
]
):
if BMConfigParser().get(
'bitmessagesettings',
'maxacceptablepayloadlengthextrabytes',
) != str(
int(
float(
self.settingsDialogInstance.ui.lineEditMaxAcceptableSmallMessageDifficulty.text()
) * defaults.networkDefaultPayloadLengthExtraBytes
)
):
# the user changed the max acceptable small message difficulty # the user changed the max acceptable small message difficulty
acceptableDifficultyChanged = True acceptableDifficultyChanged = True
BMConfigParser().set('bitmessagesettings', 'maxacceptablepayloadlengthextrabytes', str(int(float( BMConfigParser().set('bitmessagesettings', 'maxacceptablepayloadlengthextrabytes', str(int(float(
self.settingsDialogInstance.ui.lineEditMaxAcceptableSmallMessageDifficulty.text() self.settingsDialogInstance.ui.lineEditMaxAcceptableSmallMessageDifficulty.text()) * defaults.networkDefaultPayloadLengthExtraBytes)))
) * defaults.networkDefaultPayloadLengthExtraBytes)))
if acceptableDifficultyChanged: if acceptableDifficultyChanged:
# It might now be possible to send msgs which were previously marked as toodifficult. # It might now be possible to send msgs which were previously marked as toodifficult.
# Let us change them to 'msgqueued'. The singleWorker will try to send them and will again # Let us change them to 'msgqueued'. The singleWorker will try to send them and will again
# mark them as toodifficult if the receiver's required difficulty is still higher than # mark them as toodifficult if the receiver's required difficulty is still higher than
# we are willing to do. # we are willing to do.
sqlExecute('''UPDATE sent SET status='msgqueued' WHERE status='toodifficult' ''') sqlExecute('''UPDATE sent SET status='msgqueued' WHERE status='toodifficult' ''')
queues.workerQueue.put(('sendmessage', '')) queues.workerQueue.put(('sendmessage', ''))
# start:UI setting to stop trying to send messages after X days/months #start:UI setting to stop trying to send messages after X days/months
# I'm open to changing this UI to something else if someone has a better idea. # I'm open to changing this UI to something else if someone has a better idea.
if all( if ((self.settingsDialogInstance.ui.lineEditDays.text()=='') and (self.settingsDialogInstance.ui.lineEditMonths.text()=='')):#We need to handle this special case. Bitmessage has its default behavior. The input is blank/blank
[
self.settingsDialogInstance.ui.lineEditDays.text() == '',
self.settingsDialogInstance.ui.lineEditMonths.text() == '',
]
): # We need to handle this special case. Bitmessage has its default behavior. The input is blank/blank
BMConfigParser().set('bitmessagesettings', 'stopresendingafterxdays', '') BMConfigParser().set('bitmessagesettings', 'stopresendingafterxdays', '')
BMConfigParser().set('bitmessagesettings', 'stopresendingafterxmonths', '') BMConfigParser().set('bitmessagesettings', 'stopresendingafterxmonths', '')
shared.maximumLengthOfTimeToBotherResendingMessages = float('inf') shared.maximumLengthOfTimeToBotherResendingMessages = float('inf')
@ -2956,41 +2536,24 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
if lineEditMonthsIsValidFloat and not lineEditDaysIsValidFloat: if lineEditMonthsIsValidFloat and not lineEditDaysIsValidFloat:
self.settingsDialogInstance.ui.lineEditDays.setText("0") self.settingsDialogInstance.ui.lineEditDays.setText("0")
if lineEditDaysIsValidFloat or lineEditMonthsIsValidFloat: if lineEditDaysIsValidFloat or lineEditMonthsIsValidFloat:
if all( if (float(self.settingsDialogInstance.ui.lineEditDays.text()) >=0 and float(self.settingsDialogInstance.ui.lineEditMonths.text()) >=0):
[ shared.maximumLengthOfTimeToBotherResendingMessages = (float(str(self.settingsDialogInstance.ui.lineEditDays.text())) * 24 * 60 * 60) + (float(str(self.settingsDialogInstance.ui.lineEditMonths.text())) * (60 * 60 * 24 *365)/12)
float(self.settingsDialogInstance.ui.lineEditDays.text()) >= 0, if shared.maximumLengthOfTimeToBotherResendingMessages < 432000: # If the time period is less than 5 hours, we give zero values to all fields. No message will be sent again.
float(self.settingsDialogInstance.ui.lineEditMonths.text()) >= 0, QtGui.QMessageBox.about(self, _translate("MainWindow", "Will not resend ever"), _translate(
] "MainWindow", "Note that the time limit you entered is less than the amount of time Bitmessage waits for the first resend attempt therefore your messages will never be resent."))
):
shared.maximumLengthOfTimeToBotherResendingMessages = sum(
float(str(self.settingsDialogInstance.ui.lineEditDays.text())) * 24 * 60 * 60,
float(str(self.settingsDialogInstance.ui.lineEditMonths.text())) * (60 * 60 * 24 * 365) / 12,
)
# If the time period is less than 5 hours, we give zero values to all
# fields. No message will be sent again.
if shared.maximumLengthOfTimeToBotherResendingMessages < 432000:
QtGui.QMessageBox.about(
self,
_translate(
"MainWindow",
"Will not resend ever"),
_translate(
"MainWindow",
("Note that the time limit you entered is less than the amount of time Bitmessage "
"waits for the first resend attempt therefore your messages will never be resent.")))
BMConfigParser().set('bitmessagesettings', 'stopresendingafterxdays', '0') BMConfigParser().set('bitmessagesettings', 'stopresendingafterxdays', '0')
BMConfigParser().set('bitmessagesettings', 'stopresendingafterxmonths', '0') BMConfigParser().set('bitmessagesettings', 'stopresendingafterxmonths', '0')
shared.maximumLengthOfTimeToBotherResendingMessages = 0 shared.maximumLengthOfTimeToBotherResendingMessages = 0
else: else:
BMConfigParser().set('bitmessagesettings', 'stopresendingafterxdays', str(float( BMConfigParser().set('bitmessagesettings', 'stopresendingafterxdays', str(float(
self.settingsDialogInstance.ui.lineEditDays.text()))) self.settingsDialogInstance.ui.lineEditDays.text())))
BMConfigParser().set('bitmessagesettings', 'stopresendingafterxmonths', str(float( BMConfigParser().set('bitmessagesettings', 'stopresendingafterxmonths', str(float(
self.settingsDialogInstance.ui.lineEditMonths.text()))) self.settingsDialogInstance.ui.lineEditMonths.text())))
BMConfigParser().save() BMConfigParser().save()
if 'win32' in sys.platform or 'win64' in sys.platform: if 'win32' in sys.platform or 'win64' in sys.platform:
# Auto-startup for Windows # Auto-startup for Windows
RUN_PATH = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run" RUN_PATH = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run"
self.settings = QtCore.QSettings(RUN_PATH, QtCore.QSettings.NativeFormat) self.settings = QtCore.QSettings(RUN_PATH, QtCore.QSettings.NativeFormat)
if BMConfigParser().getboolean('bitmessagesettings', 'startonlogon'): if BMConfigParser().getboolean('bitmessagesettings', 'startonlogon'):
@ -3004,56 +2567,46 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
# startup for linux # startup for linux
pass pass
# If we are NOT using portable mode now but the user selected that we should... if state.appdata != paths.lookupExeFolder() and self.settingsDialogInstance.ui.checkBoxPortableMode.isChecked(): # If we are NOT using portable mode now but the user selected that we should...
if state.appdata != paths.lookupExeFolder(): # Write the keys.dat file to disk in the new location
if self.settingsDialogInstance.ui.checkBoxPortableMode.isChecked(): sqlStoredProcedure('movemessagstoprog')
with open(paths.lookupExeFolder() + 'keys.dat', 'wb') as configfile:
BMConfigParser().write(configfile)
# Write the knownnodes.dat file to disk in the new location
knownnodes.saveKnownNodes(paths.lookupExeFolder())
os.remove(state.appdata + 'keys.dat')
os.remove(state.appdata + 'knownnodes.dat')
previousAppdataLocation = state.appdata
state.appdata = paths.lookupExeFolder()
debug.restartLoggingInUpdatedAppdataLocation()
try:
os.remove(previousAppdataLocation + 'debug.log')
os.remove(previousAppdataLocation + 'debug.log.1')
except:
pass
# Write the keys.dat file to disk in the new location if state.appdata == paths.lookupExeFolder() and not self.settingsDialogInstance.ui.checkBoxPortableMode.isChecked(): # If we ARE using portable mode now but the user selected that we shouldn't...
sqlStoredProcedure('movemessagstoprog') state.appdata = paths.lookupAppdataFolder()
with open(paths.lookupExeFolder() + 'keys.dat', 'wb') as configfile: if not os.path.exists(state.appdata):
BMConfigParser().write(configfile) os.makedirs(state.appdata)
# Write the knownnodes.dat file to disk in the new location sqlStoredProcedure('movemessagstoappdata')
knownnodes.saveKnownNodes(paths.lookupExeFolder()) # Write the keys.dat file to disk in the new location
os.remove(state.appdata + 'keys.dat') BMConfigParser().save()
os.remove(state.appdata + 'knownnodes.dat') # Write the knownnodes.dat file to disk in the new location
previousAppdataLocation = state.appdata knownnodes.saveKnownNodes(state.appdata)
state.appdata = paths.lookupExeFolder() os.remove(paths.lookupExeFolder() + 'keys.dat')
debug.restartLoggingInUpdatedAppdataLocation() os.remove(paths.lookupExeFolder() + 'knownnodes.dat')
try: debug.restartLoggingInUpdatedAppdataLocation()
os.remove(previousAppdataLocation + 'debug.log') try:
os.remove(previousAppdataLocation + 'debug.log.1') os.remove(paths.lookupExeFolder() + 'debug.log')
except: os.remove(paths.lookupExeFolder() + 'debug.log.1')
pass except:
pass
# If we ARE using portable mode now but the user selected that we shouldn't...
if state.appdata == paths.lookupExeFolder():
if not self.settingsDialogInstance.ui.checkBoxPortableMode.isChecked():
state.appdata = paths.lookupAppdataFolder()
if not os.path.exists(state.appdata):
os.makedirs(state.appdata)
sqlStoredProcedure('movemessagstoappdata')
# Write the keys.dat file to disk in the new location
BMConfigParser().save()
# Write the knownnodes.dat file to disk in the new location
knownnodes.saveKnownNodes(state.appdata)
os.remove(paths.lookupExeFolder() + 'keys.dat')
os.remove(paths.lookupExeFolder() + 'knownnodes.dat')
debug.restartLoggingInUpdatedAppdataLocation()
try:
os.remove(paths.lookupExeFolder() + 'debug.log')
os.remove(paths.lookupExeFolder() + 'debug.log.1')
except:
pass
def on_action_SpecialAddressBehaviorDialog(self): def on_action_SpecialAddressBehaviorDialog(self):
"""TBC"""
dialogs.SpecialAddressBehaviorDialog(self, BMConfigParser()) dialogs.SpecialAddressBehaviorDialog(self, BMConfigParser())
def on_action_EmailGatewayDialog(self): def on_action_EmailGatewayDialog(self):
"""TBC"""
dialog = dialogs.EmailGatewayDialog(self, config=BMConfigParser()) dialog = dialogs.EmailGatewayDialog(self, config=BMConfigParser())
# For Modal dialogs # For Modal dialogs
dialog.exec_() dialog.exec_()
@ -3084,8 +2637,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.ui.textEditMessage.setFocus() self.ui.textEditMessage.setFocus()
def on_action_MarkAllRead(self): def on_action_MarkAllRead(self):
"""TBC"""
if QtGui.QMessageBox.question( if QtGui.QMessageBox.question(
self, "Marking all messages as read?", self, "Marking all messages as read?",
_translate( _translate(
@ -3122,16 +2673,12 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
if markread > 0: if markread > 0:
self.propagateUnreadCount() self.propagateUnreadCount()
# addressAtCurrentRow, self.getCurrentFolder(), None, 0) # addressAtCurrentRow, self.getCurrentFolder(), None, 0)
def click_NewAddressDialog(self): def click_NewAddressDialog(self):
"""TBC"""
dialogs.NewAddressDialog(self) dialogs.NewAddressDialog(self)
def network_switch(self): def network_switch(self):
"""TBC"""
dontconnect_option = not BMConfigParser().safeGetBoolean( dontconnect_option = not BMConfigParser().safeGetBoolean(
'bitmessagesettings', 'dontconnect') 'bitmessagesettings', 'dontconnect')
BMConfigParser().set( BMConfigParser().set(
@ -3143,8 +2690,15 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
dontconnect_option or self.namecoin.test()[0] == 'failed' dontconnect_option or self.namecoin.test()[0] == 'failed'
) )
# Quit selected from menu or application indicator
def quit(self): def quit(self):
"""Quit selected from menu or application indicator""" '''quit_msg = "Are you sure you want to exit Bitmessage?"
reply = QtGui.QMessageBox.question(self, 'Message',
quit_msg, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
if reply is QtGui.QMessageBox.No:
return
'''
if self.quitAccepted: if self.quitAccepted:
return return
@ -3159,50 +2713,20 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
# C PoW currently doesn't support interrupting and OpenCL is untested # C PoW currently doesn't support interrupting and OpenCL is untested
if getPowType() == "python" and (powQueueSize() > 0 or pendingUpload() > 0): if getPowType() == "python" and (powQueueSize() > 0 or pendingUpload() > 0):
reply = QtGui.QMessageBox.question( reply = QtGui.QMessageBox.question(self, _translate("MainWindow", "Proof of work pending"),
self, _translate("MainWindow", "%n object(s) pending proof of work", None, QtCore.QCoreApplication.CodecForTr, powQueueSize()) + ", " +
_translate( _translate("MainWindow", "%n object(s) waiting to be distributed", None, QtCore.QCoreApplication.CodecForTr, pendingUpload()) + "\n\n" +
"MainWindow", _translate("MainWindow", "Wait until these tasks finish?"),
"Proof of work pending"), QtGui.QMessageBox.Yes|QtGui.QMessageBox.No|QtGui.QMessageBox.Cancel, QtGui.QMessageBox.Cancel)
_translate(
"MainWindow",
"%n object(s) pending proof of work",
None,
QtCore.QCoreApplication.CodecForTr,
powQueueSize()) +
", " +
_translate(
"MainWindow",
"%n object(s) waiting to be distributed",
None,
QtCore.QCoreApplication.CodecForTr,
pendingUpload()) +
"\n\n" +
_translate(
"MainWindow",
"Wait until these tasks finish?"),
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No | QtGui.QMessageBox.Cancel,
QtGui.QMessageBox.Cancel)
if reply == QtGui.QMessageBox.No: if reply == QtGui.QMessageBox.No:
waitForPow = False waitForPow = False
elif reply == QtGui.QMessageBox.Cancel: elif reply == QtGui.QMessageBox.Cancel:
return return
if pendingDownload() > 0: if pendingDownload() > 0:
reply = QtGui.QMessageBox.question( reply = QtGui.QMessageBox.question(self, _translate("MainWindow", "Synchronisation pending"),
self, _translate("MainWindow", "Bitmessage hasn't synchronised with the network, %n object(s) to be downloaded. If you quit now, it may cause delivery delays. Wait until the synchronisation finishes?", None, QtCore.QCoreApplication.CodecForTr, pendingDownload()),
_translate( QtGui.QMessageBox.Yes|QtGui.QMessageBox.No|QtGui.QMessageBox.Cancel, QtGui.QMessageBox.Cancel)
"MainWindow",
"Synchronisation pending"),
_translate(
"MainWindow",
("Bitmessage hasn't synchronised with the network, %n object(s) to be downloaded. If you quit "
"now, it may cause delivery delays. Wait until the synchronisation finishes?"),
None,
QtCore.QCoreApplication.CodecForTr,
pendingDownload()),
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No | QtGui.QMessageBox.Cancel,
QtGui.QMessageBox.Cancel)
if reply == QtGui.QMessageBox.Yes: if reply == QtGui.QMessageBox.Yes:
waitForSync = True waitForSync = True
elif reply == QtGui.QMessageBox.Cancel: elif reply == QtGui.QMessageBox.Cancel:
@ -3210,17 +2734,9 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
if shared.statusIconColor == 'red' and not BMConfigParser().safeGetBoolean( if shared.statusIconColor == 'red' and not BMConfigParser().safeGetBoolean(
'bitmessagesettings', 'dontconnect'): 'bitmessagesettings', 'dontconnect'):
reply = QtGui.QMessageBox.question( reply = QtGui.QMessageBox.question(self, _translate("MainWindow", "Not connected"),
self, _translate("MainWindow", "Bitmessage isn't connected to the network. If you quit now, it may cause delivery delays. Wait until connected and the synchronisation finishes?"),
_translate( QtGui.QMessageBox.Yes|QtGui.QMessageBox.No|QtGui.QMessageBox.Cancel, QtGui.QMessageBox.Cancel)
"MainWindow",
"Not connected"),
_translate(
"MainWindow",
("Bitmessage isn't connected to the network. If you quit now, it may cause delivery delays. "
"Wait until connected and the synchronisation finishes?")),
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No | QtGui.QMessageBox.Cancel,
QtGui.QMessageBox.Cancel)
if reply == QtGui.QMessageBox.Yes: if reply == QtGui.QMessageBox.Yes:
waitForConnection = True waitForConnection = True
waitForSync = True waitForSync = True
@ -3241,9 +2757,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
QtCore.QEventLoop.AllEvents, 1000 QtCore.QEventLoop.AllEvents, 1000
) )
# this probably will not work correctly, because there is a delay between # this probably will not work correctly, because there is a delay between the status icon turning red and inventory exchange, but it's better than nothing.
# the status icon turning red and inventory exchange, but it's better than
# nothing.
if waitForSync: if waitForSync:
self.updateStatusBar(_translate( self.updateStatusBar(_translate(
"MainWindow", "Waiting for finishing synchronisation...")) "MainWindow", "Waiting for finishing synchronisation..."))
@ -3263,11 +2777,10 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
if curWorkerQueue > maxWorkerQueue: if curWorkerQueue > maxWorkerQueue:
maxWorkerQueue = curWorkerQueue maxWorkerQueue = curWorkerQueue
if curWorkerQueue > 0: if curWorkerQueue > 0:
self.updateStatusBar( self.updateStatusBar(_translate(
_translate( "MainWindow", "Waiting for PoW to finish... %1%"
"MainWindow", ).arg(50 * (maxWorkerQueue - curWorkerQueue)
"Waiting for PoW to finish... %1%", / maxWorkerQueue)
).arg(50 * (maxWorkerQueue - curWorkerQueue) / maxWorkerQueue)
) )
time.sleep(0.5) time.sleep(0.5)
QtCore.QCoreApplication.processEvents( QtCore.QCoreApplication.processEvents(
@ -3291,13 +2804,12 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.updateStatusBar(_translate( self.updateStatusBar(_translate(
"MainWindow", "Waiting for objects to be sent... %1%").arg(50)) "MainWindow", "Waiting for objects to be sent... %1%").arg(50))
maxPendingUpload = max(1, pendingUpload()) maxPendingUpload = max(1, pendingUpload())
while pendingUpload() > 1: while pendingUpload() > 1:
self.updateStatusBar( self.updateStatusBar(_translate(
_translate( "MainWindow",
"MainWindow", "Waiting for objects to be sent... %1%"
"Waiting for objects to be sent... %1%" ).arg(int(50 + 20 * (pendingUpload()/maxPendingUpload)))
).arg(int(50 + 20 * (pendingUpload() / maxPendingUpload)))
) )
time.sleep(0.5) time.sleep(0.5)
QtCore.QCoreApplication.processEvents( QtCore.QCoreApplication.processEvents(
@ -3340,11 +2852,11 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
shared.thisapp.cleanup() shared.thisapp.cleanup()
logger.info("Shutdown complete") logger.info("Shutdown complete")
super(MyForm, myapp).close() super(MyForm, myapp).close()
sys.exit(0) # return
os._exit(0)
# window close event
def closeEvent(self, event): def closeEvent(self, event):
"""window close event"""
self.appIndicatorHide() self.appIndicatorHide()
trayonclose = False trayonclose = False
@ -3365,8 +2877,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.quit() self.quit()
def on_action_InboxMessageForceHtml(self): def on_action_InboxMessageForceHtml(self):
"""TBC"""
msgid = self.getCurrentMessageId() msgid = self.getCurrentMessageId()
textEdit = self.getCurrentMessageTextedit() textEdit = self.getCurrentMessageTextedit()
if not msgid: if not msgid:
@ -3385,54 +2895,60 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
lines[i]) lines[i])
elif lines[i] == '------------------------------------------------------': elif lines[i] == '------------------------------------------------------':
lines[i] = '<hr>' lines[i] = '<hr>'
elif lines[i] == '' and (i + 1) < totalLines and \ elif lines[i] == '' and (i+1) < totalLines and \
lines[i + 1] != '------------------------------------------------------': lines[i+1] != '------------------------------------------------------':
lines[i] = '<br><br>' lines[i] = '<br><br>'
content = ' '.join(lines) # To keep the whitespace between lines content = ' '.join(lines) # To keep the whitespace between lines
content = shared.fixPotentiallyInvalidUTF8Data(content) content = shared.fixPotentiallyInvalidUTF8Data(content)
content = unicode(content, 'utf-8)') content = unicode(content, 'utf-8)')
textEdit.setHtml(QtCore.QString(content)) textEdit.setHtml(QtCore.QString(content))
def on_action_InboxMarkUnread(self): def on_action_InboxMarkUnread(self):
"""TBC"""
tableWidget = self.getCurrentMessagelist() tableWidget = self.getCurrentMessagelist()
if not tableWidget: if not tableWidget:
return return
msgids = set() msgids = set()
# modified = 0
for row in tableWidget.selectedIndexes(): for row in tableWidget.selectedIndexes():
currentRow = row.row() currentRow = row.row()
msgid = str(tableWidget.item( msgid = str(tableWidget.item(
currentRow, 3).data(QtCore.Qt.UserRole).toPyObject()) currentRow, 3).data(QtCore.Qt.UserRole).toPyObject())
msgids.add(msgid) msgids.add(msgid)
# if not tableWidget.item(currentRow, 0).unread:
# modified += 1
self.updateUnreadStatus(tableWidget, currentRow, msgid, False) self.updateUnreadStatus(tableWidget, currentRow, msgid, False)
# for 1081
idCount = len(msgids) idCount = len(msgids)
# rowcount =
sqlExecuteChunked( sqlExecuteChunked(
'''UPDATE inbox SET read=0 WHERE msgid IN ({0}) AND read=1''', '''UPDATE inbox SET read=0 WHERE msgid IN ({0}) AND read=1''',
idCount, *msgids idCount, *msgids
) )
self.propagateUnreadCount() self.propagateUnreadCount()
# if rowcount == 1:
# # performance optimisation
# self.propagateUnreadCount(tableWidget.item(currentRow, 1 if tableWidget.item(currentRow, 1).type == AccountMixin.SUBSCRIPTION else 0).data(QtCore.Qt.UserRole), self.getCurrentFolder())
# else:
# self.propagateUnreadCount(tableWidget.item(currentRow, 1 if tableWidget.item(currentRow, 1).type == AccountMixin.SUBSCRIPTION else 0).data(QtCore.Qt.UserRole), self.getCurrentFolder(), self.getCurrentTreeWidget(), 0)
# tableWidget.selectRow(currentRow + 1)
# This doesn't de-select the last message if you try to mark it unread, but that doesn't interfere. Might not be necessary.
# We could also select upwards, but then our problem would be with the topmost message.
# tableWidget.clearSelection() manages to mark the message as read again.
# Format predefined text on message reply.
def quoted_text(self, message): def quoted_text(self, message):
"""Format predefined text on message reply."""
if not BMConfigParser().safeGetBoolean('bitmessagesettings', 'replybelow'): if not BMConfigParser().safeGetBoolean('bitmessagesettings', 'replybelow'):
return '\n\n------------------------------------------------------\n' + message return '\n\n------------------------------------------------------\n' + message
quoteWrapper = textwrap.TextWrapper(
replace_whitespace=False,
initial_indent='> ',
subsequent_indent='> ',
break_long_words=False,
break_on_hyphens=False,
)
quoteWrapper = textwrap.TextWrapper(replace_whitespace = False,
initial_indent = '> ',
subsequent_indent = '> ',
break_long_words = False,
break_on_hyphens = False)
def quote_line(line): def quote_line(line):
"""TBC"""
# Do quote empty lines. # Do quote empty lines.
if line == '' or line.isspace(): if line == '' or line.isspace():
return '> ' return '> '
@ -3440,13 +2956,11 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
elif line[0:2] == '> ': elif line[0:2] == '> ':
return '> ' + line return '> ' + line
# Wrap and quote lines/paragraphs new to this message. # Wrap and quote lines/paragraphs new to this message.
return quoteWrapper.fill(line) else:
return quoteWrapper.fill(line)
return '\n'.join([quote_line(l) for l in message.splitlines()]) + '\n\n' return '\n'.join([quote_line(l) for l in message.splitlines()]) + '\n\n'
def setSendFromComboBox(self, address=None): def setSendFromComboBox(self, address = None):
"""TBC"""
if address is None: if address is None:
messagelist = self.getCurrentMessagelist() messagelist = self.getCurrentMessagelist()
if messagelist: if messagelist:
@ -3462,23 +2976,19 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
box.setCurrentIndex(0) box.setCurrentIndex(0)
def on_action_InboxReplyChan(self): def on_action_InboxReplyChan(self):
"""TBC"""
self.on_action_InboxReply(self.REPLY_TYPE_CHAN) self.on_action_InboxReply(self.REPLY_TYPE_CHAN)
def on_action_InboxReply(self, replyType=None): def on_action_InboxReply(self, replyType = None):
"""TBC"""
tableWidget = self.getCurrentMessagelist() tableWidget = self.getCurrentMessagelist()
if not tableWidget: if not tableWidget:
return return
if replyType is None: if replyType is None:
replyType = self.REPLY_TYPE_SENDER replyType = self.REPLY_TYPE_SENDER
# save this to return back after reply is done # save this to return back after reply is done
self.replyFromTab = self.ui.tabWidget.currentIndex() self.replyFromTab = self.ui.tabWidget.currentIndex()
currentInboxRow = tableWidget.currentRow() currentInboxRow = tableWidget.currentRow()
toAddressAtCurrentInboxRow = tableWidget.item( toAddressAtCurrentInboxRow = tableWidget.item(
currentInboxRow, 0).address currentInboxRow, 0).address
@ -3492,13 +3002,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
if queryreturn != []: if queryreturn != []:
for row in queryreturn: for row in queryreturn:
messageAtCurrentInboxRow, = row messageAtCurrentInboxRow, = row
acct.parseMessage( acct.parseMessage(toAddressAtCurrentInboxRow, fromAddressAtCurrentInboxRow, tableWidget.item(currentInboxRow, 2).subject, messageAtCurrentInboxRow)
toAddressAtCurrentInboxRow,
fromAddressAtCurrentInboxRow,
tableWidget.item(
currentInboxRow,
2).subject,
messageAtCurrentInboxRow)
widget = { widget = {
'subject': self.ui.lineEditSubject, 'subject': self.ui.lineEditSubject,
'from': self.ui.comboBoxSendFrom, 'from': self.ui.comboBoxSendFrom,
@ -3508,23 +3012,13 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.ui.tabWidgetSend.setCurrentIndex( self.ui.tabWidgetSend.setCurrentIndex(
self.ui.tabWidgetSend.indexOf(self.ui.sendDirect) self.ui.tabWidgetSend.indexOf(self.ui.sendDirect)
) )
# toAddressAtCurrentInboxRow = fromAddressAtCurrentInboxRow
elif not BMConfigParser().has_section(toAddressAtCurrentInboxRow): elif not BMConfigParser().has_section(toAddressAtCurrentInboxRow):
QtGui.QMessageBox.information( QtGui.QMessageBox.information(self, _translate("MainWindow", "Address is gone"), _translate(
self, _translate("MainWindow", "Address is gone"), "MainWindow", "Bitmessage cannot find your address %1. Perhaps you removed it?").arg(toAddressAtCurrentInboxRow), QtGui.QMessageBox.Ok)
_translate("MainWindow", "Bitmessage cannot find your address %1. Perhaps you removed it?").arg(
toAddressAtCurrentInboxRow),
QtGui.QMessageBox.Ok)
elif not BMConfigParser().getboolean(toAddressAtCurrentInboxRow, 'enabled'): elif not BMConfigParser().getboolean(toAddressAtCurrentInboxRow, 'enabled'):
QtGui.QMessageBox.information( QtGui.QMessageBox.information(self, _translate("MainWindow", "Address disabled"), _translate(
self, "MainWindow", "Error: The address from which you are trying to send is disabled. You\'ll have to enable it on the \'Your Identities\' tab before using it."), QtGui.QMessageBox.Ok)
_translate(
"MainWindow",
"Address disabled"),
_translate(
"MainWindow",
("Error: The address from which you are trying to send is disabled. You\'ll have to enable it on "
"the \'Your Identities\' tab before using it.")),
QtGui.QMessageBox.Ok)
else: else:
self.setBroadcastEnablementDependingOnWhetherThisIsAMailingListAddress(toAddressAtCurrentInboxRow) self.setBroadcastEnablementDependingOnWhetherThisIsAMailingListAddress(toAddressAtCurrentInboxRow)
broadcast_tab_index = self.ui.tabWidgetSend.indexOf( broadcast_tab_index = self.ui.tabWidgetSend.indexOf(
@ -3539,31 +3033,21 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.ui.tabWidgetSend.setCurrentIndex(broadcast_tab_index) self.ui.tabWidgetSend.setCurrentIndex(broadcast_tab_index)
toAddressAtCurrentInboxRow = fromAddressAtCurrentInboxRow toAddressAtCurrentInboxRow = fromAddressAtCurrentInboxRow
if fromAddressAtCurrentInboxRow == tableWidget.item(currentInboxRow, 1).label or ( if fromAddressAtCurrentInboxRow == tableWidget.item(currentInboxRow, 1).label or (
isinstance(acct, GatewayAccount) and fromAddressAtCurrentInboxRow == acct.relayAddress): isinstance(acct, GatewayAccount) and fromAddressAtCurrentInboxRow == acct.relayAddress):
self.ui.lineEditTo.setText(str(acct.fromAddress)) self.ui.lineEditTo.setText(str(acct.fromAddress))
else: else:
self.ui.lineEditTo.setText( self.ui.lineEditTo.setText(tableWidget.item(currentInboxRow, 1).label + " <" + str(acct.fromAddress) + ">")
''.join(
[ # If the previous message was to a chan then we should send our reply to the chan rather than to the particular person who sent the message.
tableWidget.item(currentInboxRow, 1).label,
" <",
str(acct.fromAddress) + ">",
]
)
)
# If the previous message was to a chan then we should send our reply to
# the chan rather than to the particular person who sent the message.
if acct.type == AccountMixin.CHAN and replyType == self.REPLY_TYPE_CHAN: if acct.type == AccountMixin.CHAN and replyType == self.REPLY_TYPE_CHAN:
logger.debug('original sent to a chan. Setting the to address in the reply to the chan address.') logger.debug('original sent to a chan. Setting the to address in the reply to the chan address.')
if toAddressAtCurrentInboxRow == tableWidget.item(currentInboxRow, 0).label: if toAddressAtCurrentInboxRow == tableWidget.item(currentInboxRow, 0).label:
self.ui.lineEditTo.setText(str(toAddressAtCurrentInboxRow)) self.ui.lineEditTo.setText(str(toAddressAtCurrentInboxRow))
else: else:
self.ui.lineEditTo.setText(tableWidget.item( self.ui.lineEditTo.setText(tableWidget.item(currentInboxRow, 0).label + " <" + str(acct.toAddress) + ">")
currentInboxRow, 0).label + " <" + str(acct.toAddress) + ">")
self.setSendFromComboBox(toAddressAtCurrentInboxRow) self.setSendFromComboBox(toAddressAtCurrentInboxRow)
quotedText = self.quoted_text(unicode(messageAtCurrentInboxRow, 'utf-8', 'replace')) quotedText = self.quoted_text(unicode(messageAtCurrentInboxRow, 'utf-8', 'replace'))
widget['message'].setPlainText(quotedText) widget['message'].setPlainText(quotedText)
if acct.subject[0:3] in ['Re:', 'RE:']: if acct.subject[0:3] in ['Re:', 'RE:']:
@ -3576,8 +3060,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
widget['message'].setFocus() widget['message'].setFocus()
def on_action_InboxAddSenderToAddressBook(self): def on_action_InboxAddSenderToAddressBook(self):
"""TBC"""
tableWidget = self.getCurrentMessagelist() tableWidget = self.getCurrentMessagelist()
if not tableWidget: if not tableWidget:
return return
@ -3592,8 +3074,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
dialogs.AddAddressDialog(self, addressAtCurrentInboxRow)) dialogs.AddAddressDialog(self, addressAtCurrentInboxRow))
def on_action_InboxAddSenderToBlackList(self): def on_action_InboxAddSenderToBlackList(self):
"""TBC"""
tableWidget = self.getCurrentMessagelist() tableWidget = self.getCurrentMessagelist()
if not tableWidget: if not tableWidget:
return return
@ -3607,37 +3087,25 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
queryreturn = sqlQuery('''select * from blacklist where address=?''', queryreturn = sqlQuery('''select * from blacklist where address=?''',
addressAtCurrentInboxRow) addressAtCurrentInboxRow)
if queryreturn == []: if queryreturn == []:
label = "\"" + tableWidget.item(currentInboxRow, label = "\"" + tableWidget.item(currentInboxRow, 2).subject + "\" in " + BMConfigParser().get(recipientAddress, "label")
2).subject + "\" in " + BMConfigParser().get(recipientAddress,
"label")
sqlExecute('''INSERT INTO blacklist VALUES (?,?, ?)''', sqlExecute('''INSERT INTO blacklist VALUES (?,?, ?)''',
label, label,
addressAtCurrentInboxRow, True) addressAtCurrentInboxRow, True)
self.ui.blackwhitelist.rerenderBlackWhiteList() self.ui.blackwhitelist.rerenderBlackWhiteList()
self.updateStatusBar( self.updateStatusBar(_translate(
_translate( "MainWindow",
"MainWindow", "Entry added to the blacklist. Edit the label to your liking.")
"Entry added to the blacklist. Edit the label to your liking."
)
) )
else: else:
self.updateStatusBar( self.updateStatusBar(_translate(
_translate( "MainWindow",
"MainWindow", "Error: You cannot add the same address to your blacklist"
("Error: You cannot add the same address to your blacklist" " twice. Try renaming the existing one if you want."))
" twice. Try renaming the existing one if you want.")
)
)
def deleteRowFromMessagelist(self, row=None, inventoryHash=None, ackData=None, messageLists=None):
"""TBC"""
def deleteRowFromMessagelist(self, row = None, inventoryHash = None, ackData = None, messageLists = None):
if messageLists is None: if messageLists is None:
messageLists = ( messageLists = (self.ui.tableWidgetInbox, self.ui.tableWidgetInboxChans, self.ui.tableWidgetInboxSubscriptions)
self.ui.tableWidgetInbox, elif type(messageLists) not in (list, tuple):
self.ui.tableWidgetInboxChans,
self.ui.tableWidgetInboxSubscriptions)
elif not isinstance(messageLists, (list, tuple)):
messageLists = (messageLists) messageLists = (messageLists)
for messageList in messageLists: for messageList in messageLists:
if row is not None: if row is not None:
@ -3653,35 +3121,34 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
if messageList.item(i, 3).data(QtCore.Qt.UserRole).toPyObject() == ackData: if messageList.item(i, 3).data(QtCore.Qt.UserRole).toPyObject() == ackData:
messageList.removeRow(i) messageList.removeRow(i)
# Send item on the Inbox tab to trash
def on_action_InboxTrash(self): def on_action_InboxTrash(self):
"""Send item on the Inbox tab to trash"""
tableWidget = self.getCurrentMessagelist() tableWidget = self.getCurrentMessagelist()
if not tableWidget: if not tableWidget:
return return
currentRow = 0 currentRow = 0
folder = self.getCurrentFolder() folder = self.getCurrentFolder()
shifted = QtGui.QApplication.queryKeyboardModifiers() & QtCore.Qt.ShiftModifier shifted = QtGui.QApplication.queryKeyboardModifiers() & QtCore.Qt.ShiftModifier
tableWidget.setUpdatesEnabled(False) tableWidget.setUpdatesEnabled(False);
inventoryHashesToTrash = [] inventoryHashesToTrash = []
# ranges in reversed order # ranges in reversed order
for r in sorted(tableWidget.selectedRanges(), key=lambda r: r.topRow())[::-1]: for r in sorted(tableWidget.selectedRanges(), key=lambda r: r.topRow())[::-1]:
for i in range(r.bottomRow() - r.topRow() + 1): for i in range(r.bottomRow()-r.topRow()+1):
inventoryHashToTrash = str(tableWidget.item( inventoryHashToTrash = str(tableWidget.item(
r.topRow() + i, 3).data(QtCore.Qt.UserRole).toPyObject()) r.topRow()+i, 3).data(QtCore.Qt.UserRole).toPyObject())
if inventoryHashToTrash in inventoryHashesToTrash: if inventoryHashToTrash in inventoryHashesToTrash:
continue continue
inventoryHashesToTrash.append(inventoryHashToTrash) inventoryHashesToTrash.append(inventoryHashToTrash)
currentRow = r.topRow() currentRow = r.topRow()
self.getCurrentMessageTextedit().setText("") self.getCurrentMessageTextedit().setText("")
tableWidget.model().removeRows(r.topRow(), r.bottomRow() - r.topRow() + 1) tableWidget.model().removeRows(r.topRow(), r.bottomRow()-r.topRow()+1)
idCount = len(inventoryHashesToTrash) idCount = len(inventoryHashesToTrash)
if folder == "trash" or shifted: if folder == "trash" or shifted:
sqlExecuteChunked('''DELETE FROM inbox WHERE msgid IN ({0})''', sqlExecuteChunked('''DELETE FROM inbox WHERE msgid IN ({0})''',
idCount, *inventoryHashesToTrash) idCount, *inventoryHashesToTrash)
else: else:
sqlExecuteChunked('''UPDATE inbox SET folder='trash' WHERE msgid IN ({0})''', sqlExecuteChunked('''UPDATE inbox SET folder='trash' WHERE msgid IN ({0})''',
idCount, *inventoryHashesToTrash) idCount, *inventoryHashesToTrash)
tableWidget.selectRow(0 if currentRow == 0 else currentRow - 1) tableWidget.selectRow(0 if currentRow == 0 else currentRow - 1)
tableWidget.setUpdatesEnabled(True) tableWidget.setUpdatesEnabled(True)
self.propagateUnreadCount(self.getCurrentAccount, folder) self.propagateUnreadCount(self.getCurrentAccount, folder)
@ -3689,8 +3156,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
"MainWindow", "Moved items to trash.")) "MainWindow", "Moved items to trash."))
def on_action_TrashUndelete(self): def on_action_TrashUndelete(self):
"""TBC"""
tableWidget = self.getCurrentMessagelist() tableWidget = self.getCurrentMessagelist()
if not tableWidget: if not tableWidget:
return return
@ -3699,30 +3164,28 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
inventoryHashesToTrash = [] inventoryHashesToTrash = []
# ranges in reversed order # ranges in reversed order
for r in sorted(tableWidget.selectedRanges(), key=lambda r: r.topRow())[::-1]: for r in sorted(tableWidget.selectedRanges(), key=lambda r: r.topRow())[::-1]:
for i in range(r.bottomRow() - r.topRow() + 1): for i in range(r.bottomRow()-r.topRow()+1):
inventoryHashToTrash = str(tableWidget.item( inventoryHashToTrash = str(tableWidget.item(
r.topRow() + i, 3).data(QtCore.Qt.UserRole).toPyObject()) r.topRow()+i, 3).data(QtCore.Qt.UserRole).toPyObject())
if inventoryHashToTrash in inventoryHashesToTrash: if inventoryHashToTrash in inventoryHashesToTrash:
continue continue
inventoryHashesToTrash.append(inventoryHashToTrash) inventoryHashesToTrash.append(inventoryHashToTrash)
currentRow = r.topRow() currentRow = r.topRow()
self.getCurrentMessageTextedit().setText("") self.getCurrentMessageTextedit().setText("")
tableWidget.model().removeRows(r.topRow(), r.bottomRow() - r.topRow() + 1) tableWidget.model().removeRows(r.topRow(), r.bottomRow()-r.topRow()+1)
if currentRow == 0: if currentRow == 0:
tableWidget.selectRow(currentRow) tableWidget.selectRow(currentRow)
else: else:
tableWidget.selectRow(currentRow - 1) tableWidget.selectRow(currentRow - 1)
idCount = len(inventoryHashesToTrash) idCount = len(inventoryHashesToTrash)
sqlExecuteChunked('''UPDATE inbox SET folder='inbox' WHERE msgid IN({0})''', sqlExecuteChunked('''UPDATE inbox SET folder='inbox' WHERE msgid IN({0})''',
idCount, *inventoryHashesToTrash) idCount, *inventoryHashesToTrash)
tableWidget.selectRow(0 if currentRow == 0 else currentRow - 1) tableWidget.selectRow(0 if currentRow == 0 else currentRow - 1)
tableWidget.setUpdatesEnabled(True) tableWidget.setUpdatesEnabled(True)
self.propagateUnreadCount(self.getCurrentAccount) self.propagateUnreadCount(self.getCurrentAccount)
self.updateStatusBar(_translate("MainWindow", "Undeleted item.")) self.updateStatusBar(_translate("MainWindow", "Undeleted item."))
def on_action_InboxSaveMessageAs(self): def on_action_InboxSaveMessageAs(self):
"""TBC"""
tableWidget = self.getCurrentMessagelist() tableWidget = self.getCurrentMessagelist()
if not tableWidget: if not tableWidget:
return return
@ -3743,9 +3206,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
message, = row message, = row
defaultFilename = "".join(x for x in subjectAtCurrentInboxRow if x.isalnum()) + '.txt' defaultFilename = "".join(x for x in subjectAtCurrentInboxRow if x.isalnum()) + '.txt'
filename = QtGui.QFileDialog.getSaveFileName( filename = QtGui.QFileDialog.getSaveFileName(self, _translate("MainWindow","Save As..."), defaultFilename, "Text files (*.txt);;All files (*.*)")
self, _translate("MainWindow", "Save As..."),
defaultFilename, "Text files (*.txt);;All files (*.*)")
if filename == '': if filename == '':
return return
try: try:
@ -3756,10 +3217,10 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
logger.exception('Message not saved', exc_info=True) logger.exception('Message not saved', exc_info=True)
self.updateStatusBar(_translate("MainWindow", "Write error.")) self.updateStatusBar(_translate("MainWindow", "Write error."))
# Send item on the Sent tab to trash
def on_action_SentTrash(self): def on_action_SentTrash(self):
"""Send item on the Sent tab to trash"""
currentRow = 0 currentRow = 0
unread = False
tableWidget = self.getCurrentMessagelist() tableWidget = self.getCurrentMessagelist()
if not tableWidget: if not tableWidget:
return return
@ -3774,15 +3235,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
else: else:
sqlExecute('''UPDATE sent SET folder='trash' WHERE ackdata=?''', ackdataToTrash) sqlExecute('''UPDATE sent SET folder='trash' WHERE ackdata=?''', ackdataToTrash)
if tableWidget.item(currentRow, 0).unread: if tableWidget.item(currentRow, 0).unread:
self.propagateUnreadCount( self.propagateUnreadCount(tableWidget.item(currentRow, 1 if tableWidget.item(currentRow, 1).type == AccountMixin.SUBSCRIPTION else 0).data(QtCore.Qt.UserRole), folder, self.getCurrentTreeWidget(), -1)
tableWidget.item(
currentRow,
1 if tableWidget.item(currentRow, 1).type == AccountMixin.SUBSCRIPTION else 0
).data(QtCore.Qt.UserRole),
folder,
self.getCurrentTreeWidget(),
-1,
)
self.getCurrentMessageTextedit().setPlainText("") self.getCurrentMessageTextedit().setPlainText("")
tableWidget.removeRow(currentRow) tableWidget.removeRow(currentRow)
self.updateStatusBar(_translate( self.updateStatusBar(_translate(
@ -3792,8 +3245,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
currentRow if currentRow == 0 else currentRow - 1) currentRow if currentRow == 0 else currentRow - 1)
def on_action_ForceSend(self): def on_action_ForceSend(self):
"""TBC"""
currentRow = self.ui.tableWidgetInbox.currentRow() currentRow = self.ui.tableWidgetInbox.currentRow()
addressAtCurrentRow = self.ui.tableWidgetInbox.item( addressAtCurrentRow = self.ui.tableWidgetInbox.item(
currentRow, 0).data(QtCore.Qt.UserRole) currentRow, 0).data(QtCore.Qt.UserRole)
@ -3809,22 +3260,17 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
queues.workerQueue.put(('sendmessage', '')) queues.workerQueue.put(('sendmessage', ''))
def on_action_SentClipboard(self): def on_action_SentClipboard(self):
"""TBC"""
currentRow = self.ui.tableWidgetInbox.currentRow() currentRow = self.ui.tableWidgetInbox.currentRow()
addressAtCurrentRow = self.ui.tableWidgetInbox.item( addressAtCurrentRow = self.ui.tableWidgetInbox.item(
currentRow, 0).data(QtCore.Qt.UserRole) currentRow, 0).data(QtCore.Qt.UserRole)
clipboard = QtGui.QApplication.clipboard() clipboard = QtGui.QApplication.clipboard()
clipboard.setText(str(addressAtCurrentRow)) clipboard.setText(str(addressAtCurrentRow))
# Group of functions for the Address Book dialog box
def on_action_AddressBookNew(self): def on_action_AddressBookNew(self):
"""Group of functions for the Address Book dialog box"""
self.click_pushButtonAddAddressBook() self.click_pushButtonAddAddressBook()
def on_action_AddressBookDelete(self): def on_action_AddressBookDelete(self):
"""TBC"""
while self.ui.tableWidgetAddressBook.selectedIndexes() != []: while self.ui.tableWidgetAddressBook.selectedIndexes() != []:
currentRow = self.ui.tableWidgetAddressBook.selectedIndexes()[ currentRow = self.ui.tableWidgetAddressBook.selectedIndexes()[
0].row() 0].row()
@ -3839,8 +3285,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.rerenderMessagelistToLabels() self.rerenderMessagelistToLabels()
def on_action_AddressBookClipboard(self): def on_action_AddressBookClipboard(self):
"""TBC"""
fullStringOfAddresses = '' fullStringOfAddresses = ''
listOfSelectedRows = {} listOfSelectedRows = {}
for i in range(len(self.ui.tableWidgetAddressBook.selectedIndexes())): for i in range(len(self.ui.tableWidgetAddressBook.selectedIndexes())):
@ -3857,8 +3301,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
clipboard.setText(fullStringOfAddresses) clipboard.setText(fullStringOfAddresses)
def on_action_AddressBookSend(self): def on_action_AddressBookSend(self):
"""TBC"""
listOfSelectedRows = {} listOfSelectedRows = {}
for i in range(len(self.ui.tableWidgetAddressBook.selectedIndexes())): for i in range(len(self.ui.tableWidgetAddressBook.selectedIndexes())):
listOfSelectedRows[ listOfSelectedRows[
@ -3884,13 +3326,11 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
) )
def on_action_AddressBookSubscribe(self): def on_action_AddressBookSubscribe(self):
"""TBC"""
listOfSelectedRows = {} listOfSelectedRows = {}
for i in range(len(self.ui.tableWidgetAddressBook.selectedIndexes())): for i in range(len(self.ui.tableWidgetAddressBook.selectedIndexes())):
listOfSelectedRows[self.ui.tableWidgetAddressBook.selectedIndexes()[i].row()] = 0 listOfSelectedRows[self.ui.tableWidgetAddressBook.selectedIndexes()[i].row()] = 0
for currentRow in listOfSelectedRows: for currentRow in listOfSelectedRows:
addressAtCurrentRow = str(self.ui.tableWidgetAddressBook.item(currentRow, 1).text()) addressAtCurrentRow = str(self.ui.tableWidgetAddressBook.item(currentRow,1).text())
# Then subscribe to it... provided it's not already in the address book # Then subscribe to it... provided it's not already in the address book
if shared.isAddressInMySubscriptionsList(addressAtCurrentRow): if shared.isAddressInMySubscriptionsList(addressAtCurrentRow):
self.updateStatusBar(_translate( self.updateStatusBar(_translate(
@ -3899,15 +3339,13 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
" subscriptions twice. Perhaps rename the existing" " subscriptions twice. Perhaps rename the existing"
" one if you want.")) " one if you want."))
continue continue
labelAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow, 0).text().toUtf8() labelAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,0).text().toUtf8()
self.addSubscription(addressAtCurrentRow, labelAtCurrentRow) self.addSubscription(addressAtCurrentRow, labelAtCurrentRow)
self.ui.tabWidget.setCurrentIndex( self.ui.tabWidget.setCurrentIndex(
self.ui.tabWidget.indexOf(self.ui.subscriptions) self.ui.tabWidget.indexOf(self.ui.subscriptions)
) )
def on_context_menuAddressBook(self, point): def on_context_menuAddressBook(self, point):
"""TBC"""
self.popMenuAddressBook = QtGui.QMenu(self) self.popMenuAddressBook = QtGui.QMenu(self)
self.popMenuAddressBook.addAction(self.actionAddressBookSend) self.popMenuAddressBook.addAction(self.actionAddressBookSend)
self.popMenuAddressBook.addAction(self.actionAddressBookClipboard) self.popMenuAddressBook.addAction(self.actionAddressBookClipboard)
@ -3919,9 +3357,9 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
normal = True normal = True
for row in self.ui.tableWidgetAddressBook.selectedIndexes(): for row in self.ui.tableWidgetAddressBook.selectedIndexes():
currentRow = row.row() currentRow = row.row()
row_type = self.ui.tableWidgetAddressBook.item( type = self.ui.tableWidgetAddressBook.item(
currentRow, 0).type currentRow, 0).type
if row_type != AccountMixin.NORMAL: if type != AccountMixin.NORMAL:
normal = False normal = False
if normal: if normal:
# only if all selected addressbook items are normal, allow delete # only if all selected addressbook items are normal, allow delete
@ -3929,14 +3367,11 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.popMenuAddressBook.exec_( self.popMenuAddressBook.exec_(
self.ui.tableWidgetAddressBook.mapToGlobal(point)) self.ui.tableWidgetAddressBook.mapToGlobal(point))
# Group of functions for the Subscriptions dialog box
def on_action_SubscriptionsNew(self): def on_action_SubscriptionsNew(self):
"""Group of functions for the Subscriptions dialog box"""
self.click_pushButtonAddSubscription() self.click_pushButtonAddSubscription()
def on_action_SubscriptionsDelete(self): def on_action_SubscriptionsDelete(self):
"""TBC"""
if QtGui.QMessageBox.question( if QtGui.QMessageBox.question(
self, "Delete subscription?", self, "Delete subscription?",
_translate( _translate(
@ -3960,15 +3395,11 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
shared.reloadBroadcastSendersForWhichImWatching() shared.reloadBroadcastSendersForWhichImWatching()
def on_action_SubscriptionsClipboard(self): def on_action_SubscriptionsClipboard(self):
"""TBC"""
address = self.getCurrentAccount() address = self.getCurrentAccount()
clipboard = QtGui.QApplication.clipboard() clipboard = QtGui.QApplication.clipboard()
clipboard.setText(str(address)) clipboard.setText(str(address))
def on_action_SubscriptionsEnable(self): def on_action_SubscriptionsEnable(self):
"""TBC"""
address = self.getCurrentAccount() address = self.getCurrentAccount()
sqlExecute( sqlExecute(
'''update subscriptions set enabled=1 WHERE address=?''', '''update subscriptions set enabled=1 WHERE address=?''',
@ -3979,8 +3410,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
shared.reloadBroadcastSendersForWhichImWatching() shared.reloadBroadcastSendersForWhichImWatching()
def on_action_SubscriptionsDisable(self): def on_action_SubscriptionsDisable(self):
"""TBC"""
address = self.getCurrentAccount() address = self.getCurrentAccount()
sqlExecute( sqlExecute(
'''update subscriptions set enabled=0 WHERE address=?''', '''update subscriptions set enabled=0 WHERE address=?''',
@ -3991,8 +3420,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
shared.reloadBroadcastSendersForWhichImWatching() shared.reloadBroadcastSendersForWhichImWatching()
def on_context_menuSubscriptions(self, point): def on_context_menuSubscriptions(self, point):
"""TBC"""
currentItem = self.getCurrentItem() currentItem = self.getCurrentItem()
self.popMenuSubscriptions = QtGui.QMenu(self) self.popMenuSubscriptions = QtGui.QMenu(self)
if isinstance(currentItem, Ui_AddressWidget): if isinstance(currentItem, Ui_AddressWidget):
@ -4015,9 +3442,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.popMenuSubscriptions.exec_( self.popMenuSubscriptions.exec_(
self.ui.treeWidgetSubscriptions.mapToGlobal(point)) self.ui.treeWidgetSubscriptions.mapToGlobal(point))
def widgetConvert(self, widget): # pylint: disable=inconsistent-return-statements def widgetConvert (self, widget):
"""TBC"""
if widget == self.ui.tableWidgetInbox: if widget == self.ui.tableWidgetInbox:
return self.ui.treeWidgetYourIdentities return self.ui.treeWidgetYourIdentities
elif widget == self.ui.tableWidgetInboxSubscriptions: elif widget == self.ui.tableWidgetInboxSubscriptions:
@ -4030,35 +3455,35 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
return self.ui.tableWidgetInboxSubscriptions return self.ui.tableWidgetInboxSubscriptions
elif widget == self.ui.treeWidgetChans: elif widget == self.ui.treeWidgetChans:
return self.ui.tableWidgetInboxChans return self.ui.tableWidgetInboxChans
else:
return None
def getCurrentTreeWidget(self): def getCurrentTreeWidget(self):
"""TBC""" currentIndex = self.ui.tabWidget.currentIndex();
currentIndex = self.ui.tabWidget.currentIndex()
treeWidgetList = [ treeWidgetList = [
self.ui.treeWidgetYourIdentities, self.ui.treeWidgetYourIdentities,
False, False,
self.ui.treeWidgetSubscriptions, self.ui.treeWidgetSubscriptions,
self.ui.treeWidgetChans self.ui.treeWidgetChans
] ]
return treeWidgetList[currentIndex] if currentIndex >= 0 and currentIndex < len(treeWidgetList) else False if currentIndex >= 0 and currentIndex < len(treeWidgetList):
return treeWidgetList[currentIndex]
else:
return False
def getAccountTreeWidget(self, account): def getAccountTreeWidget(self, account):
"""TBC"""
try: try:
if account.type == AccountMixin.CHAN: if account.type == AccountMixin.CHAN:
return self.ui.treeWidgetChans return self.ui.treeWidgetChans
elif account.type == AccountMixin.SUBSCRIPTION: elif account.type == AccountMixin.SUBSCRIPTION:
return self.ui.treeWidgetSubscriptions return self.ui.treeWidgetSubscriptions
return self.ui.treeWidgetYourIdentities else:
return self.ui.treeWidgetYourIdentities
except: except:
return self.ui.treeWidgetYourIdentities return self.ui.treeWidgetYourIdentities
def getCurrentMessagelist(self): def getCurrentMessagelist(self):
"""TBC""" currentIndex = self.ui.tabWidget.currentIndex();
currentIndex = self.ui.tabWidget.currentIndex()
messagelistList = [ messagelistList = [
self.ui.tableWidgetInbox, self.ui.tableWidgetInbox,
False, False,
@ -4067,23 +3492,21 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
] ]
if currentIndex >= 0 and currentIndex < len(messagelistList): if currentIndex >= 0 and currentIndex < len(messagelistList):
return messagelistList[currentIndex] return messagelistList[currentIndex]
return False else:
return False
def getAccountMessagelist(self, account): def getAccountMessagelist(self, account):
"""TBC"""
try: try:
if account.type == AccountMixin.CHAN: if account.type == AccountMixin.CHAN:
return self.ui.tableWidgetInboxChans return self.ui.tableWidgetInboxChans
elif account.type == AccountMixin.SUBSCRIPTION: elif account.type == AccountMixin.SUBSCRIPTION:
return self.ui.tableWidgetInboxSubscriptions return self.ui.tableWidgetInboxSubscriptions
return self.ui.tableWidgetInbox else:
return self.ui.tableWidgetInbox
except: except:
return self.ui.tableWidgetInbox return self.ui.tableWidgetInbox
def getCurrentMessageId(self): def getCurrentMessageId(self):
"""TBC"""
messagelist = self.getCurrentMessagelist() messagelist = self.getCurrentMessagelist()
if messagelist: if messagelist:
currentRow = messagelist.currentRow() currentRow = messagelist.currentRow()
@ -4095,8 +3518,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
return False return False
def getCurrentMessageTextedit(self): def getCurrentMessageTextedit(self):
"""TBC"""
currentIndex = self.ui.tabWidget.currentIndex() currentIndex = self.ui.tabWidget.currentIndex()
messagelistList = [ messagelistList = [
self.ui.textEditInboxMessage, self.ui.textEditInboxMessage,
@ -4106,41 +3527,38 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
] ]
if currentIndex >= 0 and currentIndex < len(messagelistList): if currentIndex >= 0 and currentIndex < len(messagelistList):
return messagelistList[currentIndex] return messagelistList[currentIndex]
return False else:
return False
def getAccountTextedit(self, account): def getAccountTextedit(self, account):
"""TBC"""
try: try:
if account.type == AccountMixin.CHAN: if account.type == AccountMixin.CHAN:
return self.ui.textEditInboxMessageChans return self.ui.textEditInboxMessageChans
elif account.type == AccountMixin.SUBSCRIPTION: elif account.type == AccountMixin.SUBSCRIPTION:
return self.ui.textEditInboxSubscriptions return self.ui.textEditInboxSubscriptions
return self.ui.textEditInboxMessage else:
return self.ui.textEditInboxMessage
except: except:
return self.ui.textEditInboxMessage return self.ui.textEditInboxMessage
def getCurrentSearchLine(self, currentIndex=None, retObj=False): # pylint: disable=inconsistent-return-statements def getCurrentSearchLine(self, currentIndex=None, retObj=False):
"""TBC"""
if currentIndex is None: if currentIndex is None:
currentIndex = self.ui.tabWidget.currentIndex() currentIndex = self.ui.tabWidget.currentIndex()
messagelistList = [ messagelistList = [
self.ui.inboxSearchLineEdit, self.ui.inboxSearchLineEdit,
False, False,
self.ui.inboxSearchLineEditSubscriptions, self.ui.inboxSearchLineEditSubscriptions,
self.ui.inboxSearchLineEditChans, self.ui.inboxSearchLineEditChans,
] ]
if currentIndex >= 0 and currentIndex < len(messagelistList): if currentIndex >= 0 and currentIndex < len(messagelistList):
if retObj: if retObj:
return messagelistList[currentIndex] return messagelistList[currentIndex]
return messagelistList[currentIndex].text().toUtf8().data() else:
return messagelistList[currentIndex].text().toUtf8().data()
def getCurrentSearchOption(self, currentIndex=None): # pylint: disable=inconsistent-return-statements else:
"""TBC""" return None
def getCurrentSearchOption(self, currentIndex=None):
if currentIndex is None: if currentIndex is None:
currentIndex = self.ui.tabWidget.currentIndex() currentIndex = self.ui.tabWidget.currentIndex()
messagelistList = [ messagelistList = [
@ -4151,10 +3569,11 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
] ]
if currentIndex >= 0 and currentIndex < len(messagelistList): if currentIndex >= 0 and currentIndex < len(messagelistList):
return messagelistList[currentIndex].currentText().toUtf8().data() return messagelistList[currentIndex].currentText().toUtf8().data()
else:
return None
# Group of functions for the Your Identities dialog box
def getCurrentItem(self, treeWidget=None): def getCurrentItem(self, treeWidget=None):
"""Group of functions for the Your Identities dialog box"""
if treeWidget is None: if treeWidget is None:
treeWidget = self.getCurrentTreeWidget() treeWidget = self.getCurrentTreeWidget()
if treeWidget: if treeWidget:
@ -4162,29 +3581,28 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
if currentItem: if currentItem:
return currentItem return currentItem
return False return False
def getCurrentAccount(self, treeWidget=None): def getCurrentAccount(self, treeWidget=None):
"""TODO: debug msg in else?"""
currentItem = self.getCurrentItem(treeWidget) currentItem = self.getCurrentItem(treeWidget)
if currentItem: if currentItem:
account = currentItem.address account = currentItem.address
return account return account
return False else:
# TODO need debug msg?
def getCurrentFolder(self, treeWidget=None): # pylint: disable=inconsistent-return-statements return False
"""TBC"""
def getCurrentFolder(self, treeWidget=None):
if treeWidget is None: if treeWidget is None:
treeWidget = self.getCurrentTreeWidget() treeWidget = self.getCurrentTreeWidget()
#treeWidget = self.ui.treeWidgetYourIdentities
if treeWidget: if treeWidget:
currentItem = treeWidget.currentItem() currentItem = treeWidget.currentItem()
if currentItem and hasattr(currentItem, 'folderName'): if currentItem and hasattr(currentItem, 'folderName'):
return currentItem.folderName return currentItem.folderName
else:
return None
def setCurrentItemColor(self, color): def setCurrentItemColor(self, color):
"""TBC"""
treeWidget = self.getCurrentTreeWidget() treeWidget = self.getCurrentTreeWidget()
if treeWidget: if treeWidget:
brush = QtGui.QBrush() brush = QtGui.QBrush()
@ -4194,13 +3612,9 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
currentItem.setForeground(0, brush) currentItem.setForeground(0, brush)
def on_action_YourIdentitiesNew(self): def on_action_YourIdentitiesNew(self):
"""TBC"""
self.click_NewAddressDialog() self.click_NewAddressDialog()
def on_action_YourIdentitiesDelete(self): def on_action_YourIdentitiesDelete(self):
"""TBC"""
account = self.getCurrentItem() account = self.getCurrentItem()
if account.type == AccountMixin.NORMAL: if account.type == AccountMixin.NORMAL:
return # maybe in the future return # maybe in the future
@ -4233,51 +3647,39 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.rerenderTabTreeChans() self.rerenderTabTreeChans()
def on_action_Enable(self): def on_action_Enable(self):
"""TBC"""
addressAtCurrentRow = self.getCurrentAccount() addressAtCurrentRow = self.getCurrentAccount()
self.enableIdentity(addressAtCurrentRow) self.enableIdentity(addressAtCurrentRow)
account = self.getCurrentItem() account = self.getCurrentItem()
account.setEnabled(True) account.setEnabled(True)
def enableIdentity(self, address): def enableIdentity(self, address):
"""TBC"""
BMConfigParser().set(address, 'enabled', 'true') BMConfigParser().set(address, 'enabled', 'true')
BMConfigParser().save() BMConfigParser().save()
shared.reloadMyAddressHashes() shared.reloadMyAddressHashes()
self.rerenderAddressBook() self.rerenderAddressBook()
def on_action_Disable(self): def on_action_Disable(self):
"""TBC"""
address = self.getCurrentAccount() address = self.getCurrentAccount()
self.disableIdentity(address) self.disableIdentity(address)
account = self.getCurrentItem() account = self.getCurrentItem()
account.setEnabled(False) account.setEnabled(False)
def disableIdentity(self, address): def disableIdentity(self, address):
"""TBC"""
BMConfigParser().set(str(address), 'enabled', 'false') BMConfigParser().set(str(address), 'enabled', 'false')
BMConfigParser().save() BMConfigParser().save()
shared.reloadMyAddressHashes() shared.reloadMyAddressHashes()
self.rerenderAddressBook() self.rerenderAddressBook()
def on_action_Clipboard(self): def on_action_Clipboard(self):
"""TBC"""
address = self.getCurrentAccount() address = self.getCurrentAccount()
clipboard = QtGui.QApplication.clipboard() clipboard = QtGui.QApplication.clipboard()
clipboard.setText(str(address)) clipboard.setText(str(address))
def on_action_ClipboardMessagelist(self): def on_action_ClipboardMessagelist(self):
"""TBC"""
tableWidget = self.getCurrentMessagelist() tableWidget = self.getCurrentMessagelist()
currentColumn = tableWidget.currentColumn() currentColumn = tableWidget.currentColumn()
currentRow = tableWidget.currentRow() currentRow = tableWidget.currentRow()
if currentColumn not in [0, 1, 2]: # to, from, subject if currentColumn not in [0, 1, 2]: # to, from, subject
if self.getCurrentFolder() == "sent": if self.getCurrentFolder() == "sent":
currentColumn = 0 currentColumn = 0
else: else:
@ -4289,19 +3691,9 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
myAddress = tableWidget.item(currentRow, 0).data(QtCore.Qt.UserRole) myAddress = tableWidget.item(currentRow, 0).data(QtCore.Qt.UserRole)
otherAddress = tableWidget.item(currentRow, 1).data(QtCore.Qt.UserRole) otherAddress = tableWidget.item(currentRow, 1).data(QtCore.Qt.UserRole)
account = accountClass(myAddress) account = accountClass(myAddress)
if all( if isinstance(account, GatewayAccount) and otherAddress == account.relayAddress and (
[ (currentColumn in [0, 2] and self.getCurrentFolder() == "sent") or
isinstance(account, GatewayAccount), (currentColumn in [1, 2] and self.getCurrentFolder() != "sent")):
otherAddress == account.relayAddress,
any(
[
currentColumn in [0, 2] and self.getCurrentFolder() == "sent",
currentColumn in [1, 2] and self.getCurrentFolder() != "sent",
]
),
]
):
text = str(tableWidget.item(currentRow, currentColumn).label) text = str(tableWidget.item(currentRow, currentColumn).label)
else: else:
text = tableWidget.item(currentRow, currentColumn).data(QtCore.Qt.UserRole) text = tableWidget.item(currentRow, currentColumn).data(QtCore.Qt.UserRole)
@ -4309,20 +3701,15 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
clipboard = QtGui.QApplication.clipboard() clipboard = QtGui.QApplication.clipboard()
clipboard.setText(text) clipboard.setText(text)
#set avatar functions
def on_action_TreeWidgetSetAvatar(self): def on_action_TreeWidgetSetAvatar(self):
"""set avatar functions"""
address = self.getCurrentAccount() address = self.getCurrentAccount()
self.setAvatar(address) self.setAvatar(address)
def on_action_AddressBookSetAvatar(self): def on_action_AddressBookSetAvatar(self):
"""TBC"""
self.on_action_SetAvatar(self.ui.tableWidgetAddressBook) self.on_action_SetAvatar(self.ui.tableWidgetAddressBook)
def on_action_SetAvatar(self, thisTableWidget): def on_action_SetAvatar(self, thisTableWidget):
"""TBC"""
currentRow = thisTableWidget.currentRow() currentRow = thisTableWidget.currentRow()
addressAtCurrentRow = thisTableWidget.item( addressAtCurrentRow = thisTableWidget.item(
currentRow, 1).text() currentRow, 1).text()
@ -4332,50 +3719,20 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
currentRow, 0).setIcon(avatarize(addressAtCurrentRow)) currentRow, 0).setIcon(avatarize(addressAtCurrentRow))
def setAvatar(self, addressAtCurrentRow): def setAvatar(self, addressAtCurrentRow):
"""TBC"""
if not os.path.exists(state.appdata + 'avatars/'): if not os.path.exists(state.appdata + 'avatars/'):
os.makedirs(state.appdata + 'avatars/') os.makedirs(state.appdata + 'avatars/')
addressHash = hashlib.md5(addBMIfNotPresent(addressAtCurrentRow)).hexdigest() hash = hashlib.md5(addBMIfNotPresent(addressAtCurrentRow)).hexdigest()
extensions = [ extensions = ['PNG', 'GIF', 'JPG', 'JPEG', 'SVG', 'BMP', 'MNG', 'PBM', 'PGM', 'PPM', 'TIFF', 'XBM', 'XPM', 'TGA']
'PNG',
'GIF',
'JPG',
'JPEG',
'SVG',
'BMP',
'MNG',
'PBM',
'PGM',
'PPM',
'TIFF',
'XBM',
'XPM',
'TGA']
# http://pyqt.sourceforge.net/Docs/PyQt4/qimagereader.html#supportedImageFormats # http://pyqt.sourceforge.net/Docs/PyQt4/qimagereader.html#supportedImageFormats
names = { names = {'BMP':'Windows Bitmap', 'GIF':'Graphic Interchange Format', 'JPG':'Joint Photographic Experts Group', 'JPEG':'Joint Photographic Experts Group', 'MNG':'Multiple-image Network Graphics', 'PNG':'Portable Network Graphics', 'PBM':'Portable Bitmap', 'PGM':'Portable Graymap', 'PPM':'Portable Pixmap', 'TIFF':'Tagged Image File Format', 'XBM':'X11 Bitmap', 'XPM':'X11 Pixmap', 'SVG':'Scalable Vector Graphics', 'TGA':'Targa Image Format'}
'BMP': 'Windows Bitmap',
'GIF': 'Graphic Interchange Format',
'JPG': 'Joint Photographic Experts Group',
'JPEG': 'Joint Photographic Experts Group',
'MNG': 'Multiple-image Network Graphics',
'PNG': 'Portable Network Graphics',
'PBM': 'Portable Bitmap',
'PGM': 'Portable Graymap',
'PPM': 'Portable Pixmap',
'TIFF': 'Tagged Image File Format',
'XBM': 'X11 Bitmap',
'XPM': 'X11 Pixmap',
'SVG': 'Scalable Vector Graphics',
'TGA': 'Targa Image Format'}
filters = [] filters = []
all_images_filter = [] all_images_filter = []
current_files = [] current_files = []
for ext in extensions: for ext in extensions:
filters += [names[ext] + ' (*.' + ext.lower() + ')'] filters += [ names[ext] + ' (*.' + ext.lower() + ')' ]
all_images_filter += ['*.' + ext.lower()] all_images_filter += [ '*.' + ext.lower() ]
upper = state.appdata + 'avatars/' + addressHash + '.' + ext.upper() upper = state.appdata + 'avatars/' + hash + '.' + ext.upper()
lower = state.appdata + 'avatars/' + addressHash + '.' + ext.lower() lower = state.appdata + 'avatars/' + hash + '.' + ext.lower()
if os.path.isfile(lower): if os.path.isfile(lower):
current_files += [lower] current_files += [lower]
elif os.path.isfile(upper): elif os.path.isfile(upper):
@ -4384,35 +3741,33 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
filters[1:1] = ['All files (*.*)'] filters[1:1] = ['All files (*.*)']
sourcefile = QtGui.QFileDialog.getOpenFileName( sourcefile = QtGui.QFileDialog.getOpenFileName(
self, _translate("MainWindow", "Set avatar..."), self, _translate("MainWindow", "Set avatar..."),
filter=';;'.join(filters) filter = ';;'.join(filters)
) )
# determine the correct filename (note that avatars don't use the suffix) # determine the correct filename (note that avatars don't use the suffix)
destination = state.appdata + 'avatars/' + addressHash + '.' + sourcefile.split('.')[-1] destination = state.appdata + 'avatars/' + hash + '.' + sourcefile.split('.')[-1]
exists = QtCore.QFile.exists(destination) exists = QtCore.QFile.exists(destination)
if sourcefile == '': if sourcefile == '':
# ask for removal of avatar # ask for removal of avatar
if exists | current_files: if exists | (len(current_files)>0):
displayMsg = _translate("MainWindow", "Do you really want to remove this avatar?") displayMsg = _translate("MainWindow", "Do you really want to remove this avatar?")
overwrite = QtGui.QMessageBox.question( overwrite = QtGui.QMessageBox.question(
self, 'Message', displayMsg, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No) self, 'Message', displayMsg, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
else: else:
overwrite = QtGui.QMessageBox.No overwrite = QtGui.QMessageBox.No
else: else:
# ask whether to overwrite old avatar # ask whether to overwrite old avatar
if exists | current_files: if exists | (len(current_files)>0):
displayMsg = _translate( displayMsg = _translate("MainWindow", "You have already set an avatar for this address. Do you really want to overwrite it?")
"MainWindow",
"You have already set an avatar for this address. Do you really want to overwrite it?")
overwrite = QtGui.QMessageBox.question( overwrite = QtGui.QMessageBox.question(
self, 'Message', displayMsg, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No) self, 'Message', displayMsg, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
else: else:
overwrite = QtGui.QMessageBox.No overwrite = QtGui.QMessageBox.No
# copy the image file to the appdata folder # copy the image file to the appdata folder
if not exists | overwrite == QtGui.QMessageBox.Yes: if (not exists) | (overwrite == QtGui.QMessageBox.Yes):
if overwrite == QtGui.QMessageBox.Yes: if overwrite == QtGui.QMessageBox.Yes:
for file_name in current_files: for file in current_files:
QtCore.QFile.remove(file_name) QtCore.QFile.remove(file)
QtCore.QFile.remove(destination) QtCore.QFile.remove(destination)
# copy it # copy it
if sourcefile != '': if sourcefile != '':
@ -4434,14 +3789,10 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
return True return True
def on_action_AddressBookSetSound(self): def on_action_AddressBookSetSound(self):
"""TBC"""
widget = self.ui.tableWidgetAddressBook widget = self.ui.tableWidgetAddressBook
self.setAddressSound(widget.item(widget.currentRow(), 0).text()) self.setAddressSound(widget.item(widget.currentRow(), 0).text())
def setAddressSound(self, addr): def setAddressSound(self, addr):
"""TBC"""
filters = [unicode(_translate( filters = [unicode(_translate(
"MainWindow", "Sound files (%s)" % "MainWindow", "Sound files (%s)" %
' '.join(['*%s%s' % (os.extsep, ext) for ext in sound.extensions]) ' '.join(['*%s%s' % (os.extsep, ext) for ext in sound.extensions])
@ -4482,8 +3833,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
'couldn\'t copy %s to %s', sourcefile, destination) 'couldn\'t copy %s to %s', sourcefile, destination)
def on_context_menuYourIdentities(self, point): def on_context_menuYourIdentities(self, point):
"""TBC"""
currentItem = self.getCurrentItem() currentItem = self.getCurrentItem()
self.popMenuYourIdentities = QtGui.QMenu(self) self.popMenuYourIdentities = QtGui.QMenu(self)
if isinstance(currentItem, Ui_AddressWidget): if isinstance(currentItem, Ui_AddressWidget):
@ -4509,9 +3858,8 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.popMenuYourIdentities.exec_( self.popMenuYourIdentities.exec_(
self.ui.treeWidgetYourIdentities.mapToGlobal(point)) self.ui.treeWidgetYourIdentities.mapToGlobal(point))
# TODO make one popMenu
def on_context_menuChan(self, point): def on_context_menuChan(self, point):
"""TODO: make one popMenu"""
currentItem = self.getCurrentItem() currentItem = self.getCurrentItem()
self.popMenu = QtGui.QMenu(self) self.popMenu = QtGui.QMenu(self)
if isinstance(currentItem, Ui_AddressWidget): if isinstance(currentItem, Ui_AddressWidget):
@ -4535,8 +3883,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.ui.treeWidgetChans.mapToGlobal(point)) self.ui.treeWidgetChans.mapToGlobal(point))
def on_context_menuInbox(self, point): def on_context_menuInbox(self, point):
"""TBC"""
tableWidget = self.getCurrentMessagelist() tableWidget = self.getCurrentMessagelist()
if tableWidget: if tableWidget:
currentFolder = self.getCurrentFolder() currentFolder = self.getCurrentFolder()
@ -4557,9 +3903,9 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.popMenuInbox.addAction(self.actionReply) self.popMenuInbox.addAction(self.actionReply)
self.popMenuInbox.addAction(self.actionAddSenderToAddressBook) self.popMenuInbox.addAction(self.actionAddSenderToAddressBook)
self.actionClipboardMessagelist = self.ui.inboxContextMenuToolbar.addAction( self.actionClipboardMessagelist = self.ui.inboxContextMenuToolbar.addAction(
_translate( _translate("MainWindow",
"MainWindow", "Copy subject to clipboard" "Copy subject to clipboard" if tableWidget.currentColumn() == 2 else "Copy address to clipboard"
if tableWidget.currentColumn() == 2 else "Copy address to clipboard"), ),
self.on_action_ClipboardMessagelist) self.on_action_ClipboardMessagelist)
self.popMenuInbox.addAction(self.actionClipboardMessagelist) self.popMenuInbox.addAction(self.actionClipboardMessagelist)
self.popMenuInbox.addSeparator() self.popMenuInbox.addSeparator()
@ -4573,8 +3919,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.popMenuInbox.exec_(tableWidget.mapToGlobal(point)) self.popMenuInbox.exec_(tableWidget.mapToGlobal(point))
def on_context_menuSent(self, point): def on_context_menuSent(self, point):
"""TBC"""
self.popMenuSent = QtGui.QMenu(self) self.popMenuSent = QtGui.QMenu(self)
self.popMenuSent.addAction(self.actionSentClipboard) self.popMenuSent.addAction(self.actionSentClipboard)
self.popMenuSent.addAction(self.actionTrashSentMessage) self.popMenuSent.addAction(self.actionTrashSentMessage)
@ -4594,8 +3938,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.popMenuSent.exec_(self.ui.tableWidgetInbox.mapToGlobal(point)) self.popMenuSent.exec_(self.ui.tableWidgetInbox.mapToGlobal(point))
def inboxSearchLineEditUpdated(self, text): def inboxSearchLineEditUpdated(self, text):
"""TBC"""
# dynamic search for too short text is slow # dynamic search for too short text is slow
if len(str(text)) < 3: if len(str(text)) < 3:
return return
@ -4607,8 +3949,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.loadMessagelist(messagelist, account, folder, searchOption, str(text)) self.loadMessagelist(messagelist, account, folder, searchOption, str(text))
def inboxSearchLineEditReturnPressed(self): def inboxSearchLineEditReturnPressed(self):
"""TBC"""
logger.debug("Search return pressed") logger.debug("Search return pressed")
searchLine = self.getCurrentSearchLine() searchLine = self.getCurrentSearchLine()
messagelist = self.getCurrentMessagelist() messagelist = self.getCurrentMessagelist()
@ -4621,8 +3961,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
messagelist.setFocus() messagelist.setFocus()
def treeWidgetItemClicked(self): def treeWidgetItemClicked(self):
"""TBC"""
searchLine = self.getCurrentSearchLine() searchLine = self.getCurrentSearchLine()
searchOption = self.getCurrentSearchOption() searchOption = self.getCurrentSearchOption()
messageTextedit = self.getCurrentMessageTextedit() messageTextedit = self.getCurrentMessageTextedit()
@ -4638,23 +3976,14 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.loadMessagelist(messagelist, account, folder, searchOption, searchLine) self.loadMessagelist(messagelist, account, folder, searchOption, searchLine)
def treeWidgetItemChanged(self, item, column): def treeWidgetItemChanged(self, item, column):
"""TBC"""
# only for manual edits. automatic edits (setText) are ignored # only for manual edits. automatic edits (setText) are ignored
if column != 0: if column != 0:
return return
# only account names of normal addresses (no chans/mailinglists) # only account names of normal addresses (no chans/mailinglists)
if any( if (not isinstance(item, Ui_AddressWidget)) or (not self.getCurrentTreeWidget()) or self.getCurrentTreeWidget().currentItem() is None:
[
not isinstance(item, Ui_AddressWidget),
not self.getCurrentTreeWidget(),
self.getCurrentTreeWidget().currentItem() is None,
]
):
return return
# not visible # not visible
if (not self.getCurrentItem()) or (not isinstance(self.getCurrentItem(), Ui_AddressWidget)): if (not self.getCurrentItem()) or (not isinstance (self.getCurrentItem(), Ui_AddressWidget)):
return return
# only currently selected item # only currently selected item
if item.address != self.getCurrentAccount(): if item.address != self.getCurrentAccount():
@ -4662,7 +3991,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
# "All accounts" can't be renamed # "All accounts" can't be renamed
if item.type == AccountMixin.ALL: if item.type == AccountMixin.ALL:
return return
newLabel = unicode(item.text(0), 'utf-8', 'ignore') newLabel = unicode(item.text(0), 'utf-8', 'ignore')
oldLabel = item.defaultLabel() oldLabel = item.defaultLabel()
@ -4687,8 +4016,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.recurDepth -= 1 self.recurDepth -= 1
def tableWidgetInboxItemClicked(self): def tableWidgetInboxItemClicked(self):
"""TBC"""
folder = self.getCurrentFolder() folder = self.getCurrentFolder()
messageTextedit = self.getCurrentMessageTextedit() messageTextedit = self.getCurrentMessageTextedit()
if not messageTextedit: if not messageTextedit:
@ -4719,12 +4046,10 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
if tableWidget.item(currentRow, 0).unread is True: if tableWidget.item(currentRow, 0).unread is True:
self.updateUnreadStatus(tableWidget, currentRow, msgid) self.updateUnreadStatus(tableWidget, currentRow, msgid)
# propagate # propagate
if all( if folder != 'sent' and sqlExecute(
[ '''UPDATE inbox SET read=1 WHERE msgid=? AND read=0''',
folder != 'sent', msgid
sqlExecute('''UPDATE inbox SET read=1 WHERE msgid=? AND read=0''', msgid) > 0, ) > 0:
]
):
self.propagateUnreadCount() self.propagateUnreadCount()
messageTextedit.setCurrentFont(QtGui.QFont()) messageTextedit.setCurrentFont(QtGui.QFont())
@ -4732,29 +4057,23 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
messageTextedit.setContent(message) messageTextedit.setContent(message)
def tableWidgetAddressBookItemChanged(self, item): def tableWidgetAddressBookItemChanged(self, item):
"""TBC"""
if item.type == AccountMixin.CHAN: if item.type == AccountMixin.CHAN:
self.rerenderComboBoxSendFrom() self.rerenderComboBoxSendFrom()
self.rerenderMessagelistFromLabels() self.rerenderMessagelistFromLabels()
self.rerenderMessagelistToLabels() self.rerenderMessagelistToLabels()
completerList = self.ui.lineEditTo.completer().model().stringList() completerList = self.ui.lineEditTo.completer().model().stringList()
for i, this_item in enumerate(completerList): for i in range(len(completerList)):
if unicode(this_item).endswith(" <" + item.address + ">"): if unicode(completerList[i]).endswith(" <" + item.address + ">"):
this_item = item.label + " <" + item.address + ">" completerList[i] = item.label + " <" + item.address + ">"
self.ui.lineEditTo.completer().model().setStringList(completerList) self.ui.lineEditTo.completer().model().setStringList(completerList)
def tabWidgetCurrentChanged(self, n): def tabWidgetCurrentChanged(self, n):
"""TBC"""
if n == self.ui.tabWidget.indexOf(self.ui.networkstatus): if n == self.ui.tabWidget.indexOf(self.ui.networkstatus):
self.ui.networkstatus.startUpdate() self.ui.networkstatus.startUpdate()
else: else:
self.ui.networkstatus.stopUpdate() self.ui.networkstatus.stopUpdate()
def writeNewAddressToTable(self, label, address, streamNumber): def writeNewAddressToTable(self, label, address, streamNumber):
"""TBC"""
self.rerenderTabTreeMessages() self.rerenderTabTreeMessages()
self.rerenderTabTreeSubscriptions() self.rerenderTabTreeSubscriptions()
self.rerenderTabTreeChans() self.rerenderTabTreeChans()
@ -4763,16 +4082,14 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.rerenderAddressBook() self.rerenderAddressBook()
def updateStatusBar(self, data): def updateStatusBar(self, data):
"""TBC""" if type(data) is tuple or type(data) is list:
if isinstance(data, (tuple, list)):
option = data[1] option = data[1]
message = data[0] message = data[0]
else: else:
option = 0 option = 0
message = data message = data
if message != "": if message != "":
logger.info('Status bar: %s', message) logger.info('Status bar: ' + message)
if option == 1: if option == 1:
self.statusbar.addImportant(message) self.statusbar.addImportant(message)
@ -4780,8 +4097,6 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
self.statusbar.showMessage(message, 10000) self.statusbar.showMessage(message, 10000)
def initSettings(self): def initSettings(self):
"""TBC"""
QtCore.QCoreApplication.setOrganizationName("PyBitmessage") QtCore.QCoreApplication.setOrganizationName("PyBitmessage")
QtCore.QCoreApplication.setOrganizationDomain("bitmessage.org") QtCore.QCoreApplication.setOrganizationDomain("bitmessage.org")
QtCore.QCoreApplication.setApplicationName("pybitmessageqt") QtCore.QCoreApplication.setApplicationName("pybitmessageqt")
@ -4795,11 +4110,8 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth
class settingsDialog(QtGui.QDialog): class settingsDialog(QtGui.QDialog):
"""TBC"""
def __init__(self, parent): def __init__(self, parent):
"""TBC"""
QtGui.QWidget.__init__(self, parent) QtGui.QWidget.__init__(self, parent)
self.ui = Ui_settingsDialog() self.ui = Ui_settingsDialog()
self.ui.setupUi(self) self.ui.setupUi(self)
@ -4822,7 +4134,7 @@ class settingsDialog(QtGui.QDialog):
BMConfigParser().safeGetBoolean('bitmessagesettings', 'useidenticons')) BMConfigParser().safeGetBoolean('bitmessagesettings', 'useidenticons'))
self.ui.checkBoxReplyBelow.setChecked( self.ui.checkBoxReplyBelow.setChecked(
BMConfigParser().safeGetBoolean('bitmessagesettings', 'replybelow')) BMConfigParser().safeGetBoolean('bitmessagesettings', 'replybelow'))
if state.appdata == paths.lookupExeFolder(): if state.appdata == paths.lookupExeFolder():
self.ui.checkBoxPortableMode.setChecked(True) self.ui.checkBoxPortableMode.setChecked(True)
else: else:
@ -4888,36 +4200,16 @@ class settingsDialog(QtGui.QDialog):
BMConfigParser().get('bitmessagesettings', 'maxoutboundconnections'))) BMConfigParser().get('bitmessagesettings', 'maxoutboundconnections')))
# Demanded difficulty tab # Demanded difficulty tab
self.ui.lineEditTotalDifficulty.setText( self.ui.lineEditTotalDifficulty.setText(str((float(BMConfigParser().getint(
str( 'bitmessagesettings', 'defaultnoncetrialsperbyte')) / defaults.networkDefaultProofOfWorkNonceTrialsPerByte)))
float( self.ui.lineEditSmallMessageDifficulty.setText(str((float(BMConfigParser().getint(
BMConfigParser().getint('bitmessagesettings', 'defaultnoncetrialsperbyte') 'bitmessagesettings', 'defaultpayloadlengthextrabytes')) / defaults.networkDefaultPayloadLengthExtraBytes)))
) / defaults.networkDefaultProofOfWorkNonceTrialsPerByte
)
)
self.ui.lineEditSmallMessageDifficulty.setText(
str(
float(
BMConfigParser().getint('bitmessagesettings', 'defaultpayloadlengthextrabytes')
) / defaults.networkDefaultPayloadLengthExtraBytes
)
)
# Max acceptable difficulty tab # Max acceptable difficulty tab
self.ui.lineEditMaxAcceptableTotalDifficulty.setText( self.ui.lineEditMaxAcceptableTotalDifficulty.setText(str((float(BMConfigParser().getint(
str( 'bitmessagesettings', 'maxacceptablenoncetrialsperbyte')) / defaults.networkDefaultProofOfWorkNonceTrialsPerByte)))
float( self.ui.lineEditMaxAcceptableSmallMessageDifficulty.setText(str((float(BMConfigParser().getint(
BMConfigParser().getint('bitmessagesettings', 'maxacceptablenoncetrialsperbyte') 'bitmessagesettings', 'maxacceptablepayloadlengthextrabytes')) / defaults.networkDefaultPayloadLengthExtraBytes)))
) / defaults.networkDefaultProofOfWorkNonceTrialsPerByte
)
)
self.ui.lineEditMaxAcceptableSmallMessageDifficulty.setText(
str(
float(
BMConfigParser().getint('bitmessagesettings', 'maxacceptablepayloadlengthextrabytes')
) / defaults.networkDefaultPayloadLengthExtraBytes
)
)
# OpenCL # OpenCL
if openclpow.openclAvailable(): if openclpow.openclAvailable():
@ -4962,17 +4254,34 @@ class settingsDialog(QtGui.QDialog):
QtCore.QObject.connect(self.ui.pushButtonNamecoinTest, QtCore.SIGNAL( QtCore.QObject.connect(self.ui.pushButtonNamecoinTest, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonNamecoinTest) "clicked()"), self.click_pushButtonNamecoinTest)
# Message Resend tab #Message Resend tab
self.ui.lineEditDays.setText(str( self.ui.lineEditDays.setText(str(
BMConfigParser().get('bitmessagesettings', 'stopresendingafterxdays'))) BMConfigParser().get('bitmessagesettings', 'stopresendingafterxdays')))
self.ui.lineEditMonths.setText(str( self.ui.lineEditMonths.setText(str(
BMConfigParser().get('bitmessagesettings', 'stopresendingafterxmonths'))) BMConfigParser().get('bitmessagesettings', 'stopresendingafterxmonths')))
#'System' tab removed for now.
"""try:
maxCores = BMConfigParser().getint('bitmessagesettings', 'maxcores')
except:
maxCores = 99999
if maxCores <= 1:
self.ui.comboBoxMaxCores.setCurrentIndex(0)
elif maxCores == 2:
self.ui.comboBoxMaxCores.setCurrentIndex(1)
elif maxCores <= 4:
self.ui.comboBoxMaxCores.setCurrentIndex(2)
elif maxCores <= 8:
self.ui.comboBoxMaxCores.setCurrentIndex(3)
elif maxCores <= 16:
self.ui.comboBoxMaxCores.setCurrentIndex(4)
else:
self.ui.comboBoxMaxCores.setCurrentIndex(5)"""
QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self)) QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self))
def comboBoxProxyTypeChanged(self, comboBoxIndex): def comboBoxProxyTypeChanged(self, comboBoxIndex):
"""TBC"""
if comboBoxIndex == 0: if comboBoxIndex == 0:
self.ui.lineEditSocksHostname.setEnabled(False) self.ui.lineEditSocksHostname.setEnabled(False)
self.ui.lineEditSocksPort.setEnabled(False) self.ui.lineEditSocksPort.setEnabled(False)
@ -4989,22 +4298,20 @@ class settingsDialog(QtGui.QDialog):
self.ui.lineEditSocksUsername.setEnabled(True) self.ui.lineEditSocksUsername.setEnabled(True)
self.ui.lineEditSocksPassword.setEnabled(True) self.ui.lineEditSocksPassword.setEnabled(True)
# Check status of namecoin integration radio buttons and translate
# it to a string as in the options.
def getNamecoinType(self): def getNamecoinType(self):
"""Check status of namecoin integration radio buttons and translate it to a string as in the options."""
if self.ui.radioButtonNamecoinNamecoind.isChecked(): if self.ui.radioButtonNamecoinNamecoind.isChecked():
return "namecoind" return "namecoind"
elif self.ui.radioButtonNamecoinNmcontrol.isChecked(): if self.ui.radioButtonNamecoinNmcontrol.isChecked():
return "nmcontrol" return "nmcontrol"
logger.info("Neither namecoind nor nmcontrol were checked. This is a fatal error") assert False
sys.exit(1)
# Namecoin connection type was changed.
def namecoinTypeChanged(self, checked): def namecoinTypeChanged(self, checked):
"""Namecoin connection type was changed."""
nmctype = self.getNamecoinType() nmctype = self.getNamecoinType()
assert nmctype == "namecoind" or nmctype == "nmcontrol" assert nmctype == "namecoind" or nmctype == "nmcontrol"
isNamecoind = (nmctype == "namecoind") isNamecoind = (nmctype == "namecoind")
self.ui.lineEditNamecoinUser.setEnabled(isNamecoind) self.ui.lineEditNamecoinUser.setEnabled(isNamecoind)
self.ui.labelNamecoinUser.setEnabled(isNamecoind) self.ui.labelNamecoinUser.setEnabled(isNamecoind)
@ -5016,11 +4323,10 @@ class settingsDialog(QtGui.QDialog):
else: else:
self.ui.lineEditNamecoinPort.setText("9000") self.ui.lineEditNamecoinPort.setText("9000")
# Test the namecoin settings specified in the settings dialog.
def click_pushButtonNamecoinTest(self): def click_pushButtonNamecoinTest(self):
"""Test the namecoin settings specified in the settings dialog."""
self.ui.labelNamecoinTestResult.setText(_translate( self.ui.labelNamecoinTestResult.setText(_translate(
"MainWindow", "Testing...")) "MainWindow", "Testing..."))
options = {} options = {}
options["type"] = self.getNamecoinType() options["type"] = self.getNamecoinType()
options["host"] = str(self.ui.lineEditNamecoinHost.text().toUtf8()) options["host"] = str(self.ui.lineEditNamecoinHost.text().toUtf8())
@ -5032,15 +4338,14 @@ class settingsDialog(QtGui.QDialog):
responseStatus = response[0] responseStatus = response[0]
responseText = response[1] responseText = response[1]
self.ui.labelNamecoinTestResult.setText(responseText) self.ui.labelNamecoinTestResult.setText(responseText)
if responseStatus == 'success': if responseStatus== 'success':
self.parent.ui.pushButtonFetchNamecoinID.show() self.parent.ui.pushButtonFetchNamecoinID.show()
# In order for the time columns on the Inbox and Sent tabs to be sorted
# correctly (rather than alphabetically), we need to overload the <
# operator and use this class instead of QTableWidgetItem.
class myTableWidgetItem(QtGui.QTableWidgetItem): class myTableWidgetItem(QtGui.QTableWidgetItem):
"""
In order for the time columns on the Inbox and Sent tabs to be sorted correctly (rather than alphabetically),
we need to overload the < operator and use this class instead of QTableWidgetItem.
"""
def __lt__(self, other): def __lt__(self, other):
return int(self.data(33).toPyObject()) < int(other.data(33).toPyObject()) return int(self.data(33).toPyObject()) < int(other.data(33).toPyObject())
@ -5063,23 +4368,21 @@ class MySingleApplication(QtGui.QApplication):
uuid = '6ec0149b-96e1-4be1-93ab-1465fb3ebf7c' uuid = '6ec0149b-96e1-4be1-93ab-1465fb3ebf7c'
def __init__(self, *argv): def __init__(self, *argv):
"""TBC"""
super(MySingleApplication, self).__init__(*argv) super(MySingleApplication, self).__init__(*argv)
_id = MySingleApplication.uuid id = MySingleApplication.uuid
self.server = None self.server = None
self.is_running = False self.is_running = False
socket = QLocalSocket() socket = QLocalSocket()
socket.connectToServer(_id) socket.connectToServer(id)
self.is_running = socket.waitForConnected() self.is_running = socket.waitForConnected()
# Cleanup past crashed servers # Cleanup past crashed servers
if not self.is_running: if not self.is_running:
if socket.error() == QLocalSocket.ConnectionRefusedError: if socket.error() == QLocalSocket.ConnectionRefusedError:
socket.disconnectFromServer() socket.disconnectFromServer()
QLocalServer.removeServer(_id) QLocalServer.removeServer(id)
socket.abort() socket.abort()
@ -5091,44 +4394,34 @@ class MySingleApplication(QtGui.QApplication):
# Nope, create a local server with this id and assign on_new_connection # Nope, create a local server with this id and assign on_new_connection
# for whenever a second instance tries to run focus the application. # for whenever a second instance tries to run focus the application.
self.server = QLocalServer() self.server = QLocalServer()
self.server.listen(_id) self.server.listen(id)
self.server.newConnection.connect(self.on_new_connection) self.server.newConnection.connect(self.on_new_connection)
def __del__(self): def __del__(self):
"""TBC"""
if self.server: if self.server:
self.server.close() self.server.close()
def on_new_connection(self): def on_new_connection(self):
"""TBC"""
if myapp: if myapp:
myapp.appIndicatorShow() myapp.appIndicatorShow()
def init(): def init():
"""TBC"""
global app global app
if not app: if not app:
app = MySingleApplication(sys.argv) app = MySingleApplication(sys.argv)
return app return app
def run(): def run():
"""Run the gui"""
global myapp global myapp
app = init()
running_app = init()
change_translation(l10n.getTranslationLanguage()) change_translation(l10n.getTranslationLanguage())
app.setStyleSheet("QStatusBar::item { border: 0px solid black }") app.setStyleSheet("QStatusBar::item { border: 0px solid black }")
myapp = MyForm() myapp = MyForm()
myapp.sqlInit() myapp.sqlInit()
myapp.appIndicatorInit(running_app) myapp.appIndicatorInit(app)
myapp.indicatorInit() myapp.indicatorInit()
myapp.notifierInit() myapp.notifierInit()
myapp._firstrun = BMConfigParser().safeGetBoolean( myapp._firstrun = BMConfigParser().safeGetBoolean(
@ -5137,6 +4430,12 @@ def run():
myapp.showConnectDialog() # ask the user if we may connect myapp.showConnectDialog() # ask the user if we may connect
myapp.ui.updateNetworkSwitchMenuLabel() myapp.ui.updateNetworkSwitchMenuLabel()
# try:
# if BMConfigParser().get('bitmessagesettings', 'mailchuck') < 1:
# myapp.showMigrationWizard(BMConfigParser().get('bitmessagesettings', 'mailchuck'))
# except:
# myapp.showMigrationWizard(0)
# only show after wizards and connect dialogs have completed # only show after wizards and connect dialogs have completed
if not BMConfigParser().getboolean('bitmessagesettings', 'startintray'): if not BMConfigParser().getboolean('bitmessagesettings', 'startintray'):
myapp.show() myapp.show()

View File

@ -1,26 +1,58 @@
from PyQt4 import QtCore, QtGui # pylint: disable=too-many-instance-attributes,attribute-defined-outside-init
"""
account.py
==========
import queues Account related functions.
"""
from __future__ import absolute_import
import inspect
import re import re
import sys import sys
import inspect
from helper_sql import *
from helper_ackPayload import genAckPayload
from addresses import decodeAddress
from bmconfigparser import BMConfigParser
from foldertree import AccountMixin
from pyelliptic.openssl import OpenSSL
from utils import str_broadcast_subscribers
import time import time
from PyQt4 import QtGui
import queues
from addresses import decodeAddress
from bmconfigparser import BMConfigParser
from helper_ackPayload import genAckPayload
from helper_sql import sqlQuery, sqlExecute
from .foldertree import AccountMixin
from .utils import str_broadcast_subscribers
def getSortedAccounts(): def getSortedAccounts():
"""Get a sorted list of configSections"""
configSections = BMConfigParser().addresses() configSections = BMConfigParser().addresses()
configSections.sort(cmp = configSections.sort(
lambda x,y: cmp(unicode(BMConfigParser().get(x, 'label'), 'utf-8').lower(), unicode(BMConfigParser().get(y, 'label'), 'utf-8').lower()) cmp=lambda x, y: cmp(
) unicode(
BMConfigParser().get(
x,
'label'),
'utf-8').lower(),
unicode(
BMConfigParser().get(
y,
'label'),
'utf-8').lower()))
return configSections return configSections
def getSortedSubscriptions(count = False):
def getSortedSubscriptions(count=False):
"""
Actually return a grouped dictionary rather than a sorted list
:param count: Whether to count messages for each fromaddress in the inbox
:type count: bool, default False
:retuns: dict keys are addresses, values are dicts containing settings
:rtype: dict, default {}
"""
queryreturn = sqlQuery('SELECT label, address, enabled FROM subscriptions ORDER BY label COLLATE NOCASE ASC') queryreturn = sqlQuery('SELECT label, address, enabled FROM subscriptions ORDER BY label COLLATE NOCASE ASC')
ret = {} ret = {}
for row in queryreturn: for row in queryreturn:
@ -37,7 +69,7 @@ def getSortedSubscriptions(count = False):
GROUP BY inbox.fromaddress, folder''', str_broadcast_subscribers) GROUP BY inbox.fromaddress, folder''', str_broadcast_subscribers)
for row in queryreturn: for row in queryreturn:
address, folder, cnt = row address, folder, cnt = row
if not folder in ret[address]: if folder not in ret[address]:
ret[address][folder] = { ret[address][folder] = {
'label': ret[address]['inbox']['label'], 'label': ret[address]['inbox']['label'],
'enabled': ret[address]['inbox']['enabled'] 'enabled': ret[address]['inbox']['enabled']
@ -45,9 +77,11 @@ def getSortedSubscriptions(count = False):
ret[address][folder]['count'] = cnt ret[address][folder]['count'] = cnt
return ret return ret
def accountClass(address): def accountClass(address):
"""Return a BMAccount for the address"""
if not BMConfigParser().has_section(address): if not BMConfigParser().has_section(address):
# FIXME: This BROADCAST section makes no sense # .. todo:: This BROADCAST section makes no sense
if address == str_broadcast_subscribers: if address == str_broadcast_subscribers:
subscription = BroadcastAccount(address) subscription = BroadcastAccount(address)
if subscription.type != AccountMixin.BROADCAST: if subscription.type != AccountMixin.BROADCAST:
@ -60,8 +94,7 @@ def accountClass(address):
return subscription return subscription
try: try:
gateway = BMConfigParser().get(address, "gateway") gateway = BMConfigParser().get(address, "gateway")
for name, cls in inspect.getmembers(sys.modules[__name__], inspect.isclass): for _, cls in inspect.getmembers(sys.modules[__name__], inspect.isclass):
# obj = g(address)
if issubclass(cls, GatewayAccount) and cls.gatewayName == gateway: if issubclass(cls, GatewayAccount) and cls.gatewayName == gateway:
return cls(address) return cls(address)
# general gateway # general gateway
@ -70,12 +103,15 @@ def accountClass(address):
pass pass
# no gateway # no gateway
return BMAccount(address) return BMAccount(address)
class AccountColor(AccountMixin):
def __init__(self, address, type = None): class AccountColor(AccountMixin): # pylint: disable=too-few-public-methods
"""Set the type of account"""
def __init__(self, address, address_type=None):
self.isEnabled = True self.isEnabled = True
self.address = address self.address = address
if type is None: if address_type is None:
if address is None: if address is None:
self.type = AccountMixin.ALL self.type = AccountMixin.ALL
elif BMConfigParser().safeGetBoolean(self.address, 'mailinglist'): elif BMConfigParser().safeGetBoolean(self.address, 'mailinglist'):
@ -83,16 +119,18 @@ class AccountColor(AccountMixin):
elif BMConfigParser().safeGetBoolean(self.address, 'chan'): elif BMConfigParser().safeGetBoolean(self.address, 'chan'):
self.type = AccountMixin.CHAN self.type = AccountMixin.CHAN
elif sqlQuery( elif sqlQuery(
'''select label from subscriptions where address=?''', self.address): '''select label from subscriptions where address=?''', self.address):
self.type = AccountMixin.SUBSCRIPTION self.type = AccountMixin.SUBSCRIPTION
else: else:
self.type = AccountMixin.NORMAL self.type = AccountMixin.NORMAL
else: else:
self.type = type self.type = address_type
class BMAccount(object): class BMAccount(object):
def __init__(self, address = None): """Encapsulate a Bitmessage account"""
def __init__(self, address=None):
self.address = address self.address = address
self.type = AccountMixin.NORMAL self.type = AccountMixin.NORMAL
if BMConfigParser().has_section(address): if BMConfigParser().has_section(address):
@ -108,7 +146,8 @@ class BMAccount(object):
if queryreturn: if queryreturn:
self.type = AccountMixin.SUBSCRIPTION self.type = AccountMixin.SUBSCRIPTION
def getLabel(self, address = None): def getLabel(self, address=None):
"""Get a label for this bitmessage account"""
if address is None: if address is None:
address = self.address address = self.address
label = address label = address
@ -126,8 +165,10 @@ class BMAccount(object):
for row in queryreturn: for row in queryreturn:
label, = row label, = row
return label return label
def parseMessage(self, toAddress, fromAddress, subject, message): def parseMessage(self, toAddress, fromAddress, subject, message):
"""Set metadata and address labels on self"""
self.toAddress = toAddress self.toAddress = toAddress
self.fromAddress = fromAddress self.fromAddress = fromAddress
if isinstance(subject, unicode): if isinstance(subject, unicode):
@ -140,36 +181,45 @@ class BMAccount(object):
class NoAccount(BMAccount): class NoAccount(BMAccount):
def __init__(self, address = None): """Override the __init__ method on a BMAccount"""
def __init__(self, address=None): # pylint: disable=super-init-not-called
self.address = address self.address = address
self.type = AccountMixin.NORMAL self.type = AccountMixin.NORMAL
def getLabel(self, address = None): def getLabel(self, address=None):
if address is None: if address is None:
address = self.address address = self.address
return address return address
class SubscriptionAccount(BMAccount): class SubscriptionAccount(BMAccount):
"""Encapsulate a subscription account"""
pass pass
class BroadcastAccount(BMAccount): class BroadcastAccount(BMAccount):
"""Encapsulate a broadcast account"""
pass pass
class GatewayAccount(BMAccount): class GatewayAccount(BMAccount):
"""Encapsulate a gateway account"""
gatewayName = None gatewayName = None
ALL_OK = 0 ALL_OK = 0
REGISTRATION_DENIED = 1 REGISTRATION_DENIED = 1
def __init__(self, address): def __init__(self, address):
super(GatewayAccount, self).__init__(address) super(GatewayAccount, self).__init__(address)
def send(self): def send(self):
"""Override the send method for gateway accounts"""
# pylint: disable=unused-variable
status, addressVersionNumber, streamNumber, ripe = decodeAddress(self.toAddress) status, addressVersionNumber, streamNumber, ripe = decodeAddress(self.toAddress)
stealthLevel = BMConfigParser().safeGetInt('bitmessagesettings', 'ackstealthlevel') stealthLevel = BMConfigParser().safeGetInt('bitmessagesettings', 'ackstealthlevel')
ackdata = genAckPayload(streamNumber, stealthLevel) ackdata = genAckPayload(streamNumber, stealthLevel)
t = ()
sqlExecute( sqlExecute(
'''INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)''', '''INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)''',
'', '',
@ -179,47 +229,52 @@ class GatewayAccount(BMAccount):
self.subject, self.subject,
self.message, self.message,
ackdata, ackdata,
int(time.time()), # sentTime (this will never change) int(time.time()), # sentTime (this will never change)
int(time.time()), # lastActionTime int(time.time()), # lastActionTime
0, # sleepTill time. This will get set when the POW gets done. 0, # sleepTill time. This will get set when the POW gets done.
'msgqueued', 'msgqueued',
0, # retryNumber 0, # retryNumber
'sent', # folder 'sent', # folder
2, # encodingtype 2, # encodingtype
min(BMConfigParser().getint('bitmessagesettings', 'ttl'), 86400 * 2) # not necessary to have a TTL higher than 2 days # not necessary to have a TTL higher than 2 days
min(BMConfigParser().getint('bitmessagesettings', 'ttl'), 86400 * 2)
) )
queues.workerQueue.put(('sendmessage', self.toAddress)) queues.workerQueue.put(('sendmessage', self.toAddress))
def parseMessage(self, toAddress, fromAddress, subject, message):
super(GatewayAccount, self).parseMessage(toAddress, fromAddress, subject, message)
class MailchuckAccount(GatewayAccount): class MailchuckAccount(GatewayAccount):
"""Encapsulate a particular kind of gateway account"""
# set "gateway" in keys.dat to this # set "gateway" in keys.dat to this
gatewayName = "mailchuck" gatewayName = "mailchuck"
registrationAddress = "BM-2cVYYrhaY5Gbi3KqrX9Eae2NRNrkfrhCSA" registrationAddress = "BM-2cVYYrhaY5Gbi3KqrX9Eae2NRNrkfrhCSA"
unregistrationAddress = "BM-2cVMAHTRjZHCTPMue75XBK5Tco175DtJ9J" unregistrationAddress = "BM-2cVMAHTRjZHCTPMue75XBK5Tco175DtJ9J"
relayAddress = "BM-2cWim8aZwUNqxzjMxstnUMtVEUQJeezstf" relayAddress = "BM-2cWim8aZwUNqxzjMxstnUMtVEUQJeezstf"
regExpIncoming = re.compile("(.*)MAILCHUCK-FROM::(\S+) \| (.*)") regExpIncoming = re.compile(r"(.*)MAILCHUCK-FROM::(\S+) \| (.*)")
regExpOutgoing = re.compile("(\S+) (.*)") regExpOutgoing = re.compile(r"(\S+) (.*)")
def __init__(self, address): def __init__(self, address):
super(MailchuckAccount, self).__init__(address) super(MailchuckAccount, self).__init__(address)
self.feedback = self.ALL_OK self.feedback = self.ALL_OK
def createMessage(self, toAddress, fromAddress, subject, message): def createMessage(self, toAddress, fromAddress, subject, message):
"""createMessage specific to a MailchuckAccount"""
self.subject = toAddress + " " + subject self.subject = toAddress + " " + subject
self.toAddress = self.relayAddress self.toAddress = self.relayAddress
self.fromAddress = fromAddress self.fromAddress = fromAddress
self.message = message self.message = message
def register(self, email): def register(self, email):
"""register specific to a MailchuckAccount"""
self.toAddress = self.registrationAddress self.toAddress = self.registrationAddress
self.subject = email self.subject = email
self.message = "" self.message = ""
self.fromAddress = self.address self.fromAddress = self.address
self.send() self.send()
def unregister(self): def unregister(self):
"""unregister specific to a MailchuckAccount"""
self.toAddress = self.unregistrationAddress self.toAddress = self.unregistrationAddress
self.subject = "" self.subject = ""
self.message = "" self.message = ""
@ -227,6 +282,7 @@ class MailchuckAccount(GatewayAccount):
self.send() self.send()
def status(self): def status(self):
"""status specific to a MailchuckAccount"""
self.toAddress = self.registrationAddress self.toAddress = self.registrationAddress
self.subject = "status" self.subject = "status"
self.message = "" self.message = ""
@ -234,12 +290,16 @@ class MailchuckAccount(GatewayAccount):
self.send() self.send()
def settings(self): def settings(self):
"""settings specific to a MailchuckAccount"""
self.toAddress = self.registrationAddress self.toAddress = self.registrationAddress
self.subject = "config" self.subject = "config"
self.message = QtGui.QApplication.translate("Mailchuck", """# You can use this to configure your email gateway account self.message = QtGui.QApplication.translate(
"Mailchuck",
"""# You can use this to configure your email gateway account
# Uncomment the setting you want to use # Uncomment the setting you want to use
# Here are the options: # Here are the options:
# #
# pgp: server # pgp: server
# The email gateway will create and maintain PGP keys for you and sign, verify, # The email gateway will create and maintain PGP keys for you and sign, verify,
# encrypt and decrypt on your behalf. When you want to use PGP but are lazy, # encrypt and decrypt on your behalf. When you want to use PGP but are lazy,
@ -255,7 +315,7 @@ class MailchuckAccount(GatewayAccount):
# #
# attachments: no # attachments: no
# Attachments will be ignored. # Attachments will be ignored.
# #
# archive: yes # archive: yes
# Your incoming emails will be archived on the server. Use this if you need # Your incoming emails will be archived on the server. Use this if you need
# help with debugging problems or you need a third party proof of emails. This # help with debugging problems or you need a third party proof of emails. This
@ -279,10 +339,12 @@ class MailchuckAccount(GatewayAccount):
self.fromAddress = self.address self.fromAddress = self.address
def parseMessage(self, toAddress, fromAddress, subject, message): def parseMessage(self, toAddress, fromAddress, subject, message):
"""parseMessage specific to a MailchuckAccount"""
super(MailchuckAccount, self).parseMessage(toAddress, fromAddress, subject, message) super(MailchuckAccount, self).parseMessage(toAddress, fromAddress, subject, message)
if fromAddress == self.relayAddress: if fromAddress == self.relayAddress:
matches = self.regExpIncoming.search(subject) matches = self.regExpIncoming.search(subject)
if not matches is None: if matches is not None:
self.subject = "" self.subject = ""
if not matches.group(1) is None: if not matches.group(1) is None:
self.subject += matches.group(1) self.subject += matches.group(1)
@ -293,7 +355,7 @@ class MailchuckAccount(GatewayAccount):
self.fromAddress = matches.group(2) self.fromAddress = matches.group(2)
if toAddress == self.relayAddress: if toAddress == self.relayAddress:
matches = self.regExpOutgoing.search(subject) matches = self.regExpOutgoing.search(subject)
if not matches is None: if matches is not None:
if not matches.group(2) is None: if not matches.group(2) is None:
self.subject = matches.group(2) self.subject = matches.group(2)
if not matches.group(1) is None: if not matches.group(1) is None:

View File

@ -1,15 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# pylint: disable=too-many-instance-attributes,too-many-locals,too-many-statements,attribute-defined-outside-init
"""
Form implementation generated from reading ui file 'settings.ui'
# Form implementation generated from reading ui file 'settings.ui' Created: Thu Dec 25 23:21:20 2014
# by: PyQt4 UI code generator 4.10.3
# Created: Thu Dec 25 23:21:20 2014
# by: PyQt4 UI code generator 4.10.3 WARNING! All changes made in this file will be lost!
# """
# WARNING! All changes made in this file will be lost!
from __future__ import absolute_import
from sys import platform
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from languagebox import LanguageBox
from sys import platform from . import bitmessage_icons_rc # pylint: disable=unused-import
from .languagebox import LanguageBox
try: try:
_fromUtf8 = QtCore.QString.fromUtf8 _fromUtf8 = QtCore.QString.fromUtf8
@ -19,21 +27,27 @@ except AttributeError:
try: try:
_encoding = QtGui.QApplication.UnicodeUTF8 _encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig): def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding) return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError: except AttributeError:
def _translate(context, text, disambig): def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig) return QtGui.QApplication.translate(context, text, disambig)
class Ui_settingsDialog(object): class Ui_settingsDialog(object):
"""Encapsulate a UI settings dialog object"""
def setupUi(self, settingsDialog): def setupUi(self, settingsDialog):
"""Set up the UI"""
settingsDialog.setObjectName(_fromUtf8("settingsDialog")) settingsDialog.setObjectName(_fromUtf8("settingsDialog"))
settingsDialog.resize(521, 413) settingsDialog.resize(521, 413)
self.gridLayout = QtGui.QGridLayout(settingsDialog) self.gridLayout = QtGui.QGridLayout(settingsDialog)
self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.buttonBox = QtGui.QDialogButtonBox(settingsDialog) self.buttonBox = QtGui.QDialogButtonBox(settingsDialog)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok) self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName(_fromUtf8("buttonBox")) self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
self.gridLayout.addWidget(self.buttonBox, 1, 0, 1, 1) self.gridLayout.addWidget(self.buttonBox, 1, 0, 1, 1)
self.tabWidgetSettings = QtGui.QTabWidget(settingsDialog) self.tabWidgetSettings = QtGui.QTabWidget(settingsDialog)
@ -64,7 +78,8 @@ class Ui_settingsDialog(object):
self.formLayout.setWidget(1, QtGui.QFormLayout.SpanningRole, self.groupBoxTray) self.formLayout.setWidget(1, QtGui.QFormLayout.SpanningRole, self.groupBoxTray)
self.checkBoxHideTrayConnectionNotifications = QtGui.QCheckBox(self.tabUserInterface) self.checkBoxHideTrayConnectionNotifications = QtGui.QCheckBox(self.tabUserInterface)
self.checkBoxHideTrayConnectionNotifications.setChecked(False) self.checkBoxHideTrayConnectionNotifications.setChecked(False)
self.checkBoxHideTrayConnectionNotifications.setObjectName(_fromUtf8("checkBoxHideTrayConnectionNotifications")) self.checkBoxHideTrayConnectionNotifications.setObjectName(
_fromUtf8("checkBoxHideTrayConnectionNotifications"))
self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.checkBoxHideTrayConnectionNotifications) self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.checkBoxHideTrayConnectionNotifications)
self.checkBoxShowTrayNotifications = QtGui.QCheckBox(self.tabUserInterface) self.checkBoxShowTrayNotifications = QtGui.QCheckBox(self.tabUserInterface)
self.checkBoxShowTrayNotifications.setObjectName(_fromUtf8("checkBoxShowTrayNotifications")) self.checkBoxShowTrayNotifications.setObjectName(_fromUtf8("checkBoxShowTrayNotifications"))
@ -96,7 +111,7 @@ class Ui_settingsDialog(object):
self.formLayout_2.setObjectName(_fromUtf8("formLayout_2")) self.formLayout_2.setObjectName(_fromUtf8("formLayout_2"))
self.languageComboBox = LanguageBox(self.groupBox) self.languageComboBox = LanguageBox(self.groupBox)
self.languageComboBox.setMinimumSize(QtCore.QSize(100, 0)) self.languageComboBox.setMinimumSize(QtCore.QSize(100, 0))
self.languageComboBox.setObjectName(_fromUtf8("languageComboBox")) self.languageComboBox.setObjectName(_fromUtf8("languageComboBox")) # pylint: disable=not-callable
self.formLayout_2.setWidget(0, QtGui.QFormLayout.LabelRole, self.languageComboBox) self.formLayout_2.setWidget(0, QtGui.QFormLayout.LabelRole, self.languageComboBox)
self.formLayout.setWidget(9, QtGui.QFormLayout.FieldRole, self.groupBox) self.formLayout.setWidget(9, QtGui.QFormLayout.FieldRole, self.groupBox)
self.tabWidgetSettings.addTab(self.tabUserInterface, _fromUtf8("")) self.tabWidgetSettings.addTab(self.tabUserInterface, _fromUtf8(""))
@ -108,8 +123,6 @@ class Ui_settingsDialog(object):
self.groupBox1.setObjectName(_fromUtf8("groupBox1")) self.groupBox1.setObjectName(_fromUtf8("groupBox1"))
self.gridLayout_3 = QtGui.QGridLayout(self.groupBox1) self.gridLayout_3 = QtGui.QGridLayout(self.groupBox1)
self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3")) self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
#spacerItem = QtGui.QSpacerItem(125, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
#self.gridLayout_3.addItem(spacerItem, 0, 0, 1, 1)
self.label = QtGui.QLabel(self.groupBox1) self.label = QtGui.QLabel(self.groupBox1)
self.label.setObjectName(_fromUtf8("label")) self.label.setObjectName(_fromUtf8("label"))
self.gridLayout_3.addWidget(self.label, 0, 0, 1, 1, QtCore.Qt.AlignRight) self.gridLayout_3.addWidget(self.label, 0, 0, 1, 1, QtCore.Qt.AlignRight)
@ -165,7 +178,8 @@ class Ui_settingsDialog(object):
self.lineEditMaxOutboundConnections.setSizePolicy(sizePolicy) self.lineEditMaxOutboundConnections.setSizePolicy(sizePolicy)
self.lineEditMaxOutboundConnections.setMaximumSize(QtCore.QSize(60, 16777215)) self.lineEditMaxOutboundConnections.setMaximumSize(QtCore.QSize(60, 16777215))
self.lineEditMaxOutboundConnections.setObjectName(_fromUtf8("lineEditMaxOutboundConnections")) self.lineEditMaxOutboundConnections.setObjectName(_fromUtf8("lineEditMaxOutboundConnections"))
self.lineEditMaxOutboundConnections.setValidator(QtGui.QIntValidator(0, 8, self.lineEditMaxOutboundConnections)) self.lineEditMaxOutboundConnections.setValidator(
QtGui.QIntValidator(0, 8, self.lineEditMaxOutboundConnections))
self.gridLayout_9.addWidget(self.lineEditMaxOutboundConnections, 2, 2, 1, 1) self.gridLayout_9.addWidget(self.lineEditMaxOutboundConnections, 2, 2, 1, 1)
self.gridLayout_4.addWidget(self.groupBox_3, 2, 0, 1, 1) self.gridLayout_4.addWidget(self.groupBox_3, 2, 0, 1, 1)
self.groupBox_2 = QtGui.QGroupBox(self.tabNetworkSettings) self.groupBox_2 = QtGui.QGroupBox(self.tabNetworkSettings)
@ -207,7 +221,8 @@ class Ui_settingsDialog(object):
self.gridLayout_2.addWidget(self.label_6, 2, 4, 1, 1) self.gridLayout_2.addWidget(self.label_6, 2, 4, 1, 1)
self.lineEditSocksPassword = QtGui.QLineEdit(self.groupBox_2) self.lineEditSocksPassword = QtGui.QLineEdit(self.groupBox_2)
self.lineEditSocksPassword.setEnabled(False) self.lineEditSocksPassword.setEnabled(False)
self.lineEditSocksPassword.setInputMethodHints(QtCore.Qt.ImhHiddenText|QtCore.Qt.ImhNoAutoUppercase|QtCore.Qt.ImhNoPredictiveText) self.lineEditSocksPassword.setInputMethodHints(
QtCore.Qt.ImhHiddenText | QtCore.Qt.ImhNoAutoUppercase | QtCore.Qt.ImhNoPredictiveText)
self.lineEditSocksPassword.setEchoMode(QtGui.QLineEdit.Password) self.lineEditSocksPassword.setEchoMode(QtGui.QLineEdit.Password)
self.lineEditSocksPassword.setObjectName(_fromUtf8("lineEditSocksPassword")) self.lineEditSocksPassword.setObjectName(_fromUtf8("lineEditSocksPassword"))
self.gridLayout_2.addWidget(self.lineEditSocksPassword, 2, 5, 1, 1) self.gridLayout_2.addWidget(self.lineEditSocksPassword, 2, 5, 1, 1)
@ -215,7 +230,7 @@ class Ui_settingsDialog(object):
self.checkBoxSocksListen.setObjectName(_fromUtf8("checkBoxSocksListen")) self.checkBoxSocksListen.setObjectName(_fromUtf8("checkBoxSocksListen"))
self.gridLayout_2.addWidget(self.checkBoxSocksListen, 3, 1, 1, 4) self.gridLayout_2.addWidget(self.checkBoxSocksListen, 3, 1, 1, 4)
self.comboBoxProxyType = QtGui.QComboBox(self.groupBox_2) self.comboBoxProxyType = QtGui.QComboBox(self.groupBox_2)
self.comboBoxProxyType.setObjectName(_fromUtf8("comboBoxProxyType")) self.comboBoxProxyType.setObjectName(_fromUtf8("comboBoxProxyType")) # pylint: disable=not-callable
self.comboBoxProxyType.addItem(_fromUtf8("")) self.comboBoxProxyType.addItem(_fromUtf8(""))
self.comboBoxProxyType.addItem(_fromUtf8("")) self.comboBoxProxyType.addItem(_fromUtf8(""))
self.comboBoxProxyType.addItem(_fromUtf8("")) self.comboBoxProxyType.addItem(_fromUtf8(""))
@ -229,7 +244,7 @@ class Ui_settingsDialog(object):
self.gridLayout_6 = QtGui.QGridLayout(self.tabDemandedDifficulty) self.gridLayout_6 = QtGui.QGridLayout(self.tabDemandedDifficulty)
self.gridLayout_6.setObjectName(_fromUtf8("gridLayout_6")) self.gridLayout_6.setObjectName(_fromUtf8("gridLayout_6"))
self.label_9 = QtGui.QLabel(self.tabDemandedDifficulty) self.label_9 = QtGui.QLabel(self.tabDemandedDifficulty)
self.label_9.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.label_9.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.label_9.setObjectName(_fromUtf8("label_9")) self.label_9.setObjectName(_fromUtf8("label_9"))
self.gridLayout_6.addWidget(self.label_9, 1, 1, 1, 1) self.gridLayout_6.addWidget(self.label_9, 1, 1, 1, 1)
self.label_10 = QtGui.QLabel(self.tabDemandedDifficulty) self.label_10 = QtGui.QLabel(self.tabDemandedDifficulty)
@ -237,7 +252,7 @@ class Ui_settingsDialog(object):
self.label_10.setObjectName(_fromUtf8("label_10")) self.label_10.setObjectName(_fromUtf8("label_10"))
self.gridLayout_6.addWidget(self.label_10, 2, 0, 1, 3) self.gridLayout_6.addWidget(self.label_10, 2, 0, 1, 3)
self.label_11 = QtGui.QLabel(self.tabDemandedDifficulty) self.label_11 = QtGui.QLabel(self.tabDemandedDifficulty)
self.label_11.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.label_11.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.label_11.setObjectName(_fromUtf8("label_11")) self.label_11.setObjectName(_fromUtf8("label_11"))
self.gridLayout_6.addWidget(self.label_11, 3, 1, 1, 1) self.gridLayout_6.addWidget(self.label_11, 3, 1, 1, 1)
self.label_8 = QtGui.QLabel(self.tabDemandedDifficulty) self.label_8 = QtGui.QLabel(self.tabDemandedDifficulty)
@ -285,7 +300,7 @@ class Ui_settingsDialog(object):
self.gridLayout_7.addItem(spacerItem6, 1, 0, 1, 1) self.gridLayout_7.addItem(spacerItem6, 1, 0, 1, 1)
self.label_13 = QtGui.QLabel(self.tabMaxAcceptableDifficulty) self.label_13 = QtGui.QLabel(self.tabMaxAcceptableDifficulty)
self.label_13.setLayoutDirection(QtCore.Qt.LeftToRight) self.label_13.setLayoutDirection(QtCore.Qt.LeftToRight)
self.label_13.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.label_13.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.label_13.setObjectName(_fromUtf8("label_13")) self.label_13.setObjectName(_fromUtf8("label_13"))
self.gridLayout_7.addWidget(self.label_13, 1, 1, 1, 1) self.gridLayout_7.addWidget(self.label_13, 1, 1, 1, 1)
self.lineEditMaxAcceptableTotalDifficulty = QtGui.QLineEdit(self.tabMaxAcceptableDifficulty) self.lineEditMaxAcceptableTotalDifficulty = QtGui.QLineEdit(self.tabMaxAcceptableDifficulty)
@ -300,7 +315,7 @@ class Ui_settingsDialog(object):
spacerItem7 = QtGui.QSpacerItem(102, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) spacerItem7 = QtGui.QSpacerItem(102, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.gridLayout_7.addItem(spacerItem7, 2, 0, 1, 1) self.gridLayout_7.addItem(spacerItem7, 2, 0, 1, 1)
self.label_14 = QtGui.QLabel(self.tabMaxAcceptableDifficulty) self.label_14 = QtGui.QLabel(self.tabMaxAcceptableDifficulty)
self.label_14.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.label_14.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.label_14.setObjectName(_fromUtf8("label_14")) self.label_14.setObjectName(_fromUtf8("label_14"))
self.gridLayout_7.addWidget(self.label_14, 2, 1, 1, 1) self.gridLayout_7.addWidget(self.label_14, 2, 1, 1, 1)
self.lineEditMaxAcceptableSmallMessageDifficulty = QtGui.QLineEdit(self.tabMaxAcceptableDifficulty) self.lineEditMaxAcceptableSmallMessageDifficulty = QtGui.QLineEdit(self.tabMaxAcceptableDifficulty)
@ -310,7 +325,8 @@ class Ui_settingsDialog(object):
sizePolicy.setHeightForWidth(self.lineEditMaxAcceptableSmallMessageDifficulty.sizePolicy().hasHeightForWidth()) sizePolicy.setHeightForWidth(self.lineEditMaxAcceptableSmallMessageDifficulty.sizePolicy().hasHeightForWidth())
self.lineEditMaxAcceptableSmallMessageDifficulty.setSizePolicy(sizePolicy) self.lineEditMaxAcceptableSmallMessageDifficulty.setSizePolicy(sizePolicy)
self.lineEditMaxAcceptableSmallMessageDifficulty.setMaximumSize(QtCore.QSize(70, 16777215)) self.lineEditMaxAcceptableSmallMessageDifficulty.setMaximumSize(QtCore.QSize(70, 16777215))
self.lineEditMaxAcceptableSmallMessageDifficulty.setObjectName(_fromUtf8("lineEditMaxAcceptableSmallMessageDifficulty")) self.lineEditMaxAcceptableSmallMessageDifficulty.setObjectName(
_fromUtf8("lineEditMaxAcceptableSmallMessageDifficulty"))
self.gridLayout_7.addWidget(self.lineEditMaxAcceptableSmallMessageDifficulty, 2, 2, 1, 1) self.gridLayout_7.addWidget(self.lineEditMaxAcceptableSmallMessageDifficulty, 2, 2, 1, 1)
spacerItem8 = QtGui.QSpacerItem(20, 147, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) spacerItem8 = QtGui.QSpacerItem(20, 147, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.gridLayout_7.addItem(spacerItem8, 3, 1, 1, 1) self.gridLayout_7.addItem(spacerItem8, 3, 1, 1, 1)
@ -332,7 +348,7 @@ class Ui_settingsDialog(object):
self.label_16.setObjectName(_fromUtf8("label_16")) self.label_16.setObjectName(_fromUtf8("label_16"))
self.gridLayout_8.addWidget(self.label_16, 0, 0, 1, 3) self.gridLayout_8.addWidget(self.label_16, 0, 0, 1, 3)
self.label_17 = QtGui.QLabel(self.tabNamecoin) self.label_17 = QtGui.QLabel(self.tabNamecoin)
self.label_17.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.label_17.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.label_17.setObjectName(_fromUtf8("label_17")) self.label_17.setObjectName(_fromUtf8("label_17"))
self.gridLayout_8.addWidget(self.label_17, 2, 1, 1, 1) self.gridLayout_8.addWidget(self.label_17, 2, 1, 1, 1)
self.lineEditNamecoinHost = QtGui.QLineEdit(self.tabNamecoin) self.lineEditNamecoinHost = QtGui.QLineEdit(self.tabNamecoin)
@ -344,7 +360,7 @@ class Ui_settingsDialog(object):
self.gridLayout_8.addItem(spacerItem11, 4, 0, 1, 1) self.gridLayout_8.addItem(spacerItem11, 4, 0, 1, 1)
self.label_18 = QtGui.QLabel(self.tabNamecoin) self.label_18 = QtGui.QLabel(self.tabNamecoin)
self.label_18.setEnabled(True) self.label_18.setEnabled(True)
self.label_18.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.label_18.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.label_18.setObjectName(_fromUtf8("label_18")) self.label_18.setObjectName(_fromUtf8("label_18"))
self.gridLayout_8.addWidget(self.label_18, 3, 1, 1, 1) self.gridLayout_8.addWidget(self.label_18, 3, 1, 1, 1)
self.lineEditNamecoinPort = QtGui.QLineEdit(self.tabNamecoin) self.lineEditNamecoinPort = QtGui.QLineEdit(self.tabNamecoin)
@ -353,7 +369,7 @@ class Ui_settingsDialog(object):
spacerItem12 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) spacerItem12 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.gridLayout_8.addItem(spacerItem12, 8, 1, 1, 1) self.gridLayout_8.addItem(spacerItem12, 8, 1, 1, 1)
self.labelNamecoinUser = QtGui.QLabel(self.tabNamecoin) self.labelNamecoinUser = QtGui.QLabel(self.tabNamecoin)
self.labelNamecoinUser.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.labelNamecoinUser.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.labelNamecoinUser.setObjectName(_fromUtf8("labelNamecoinUser")) self.labelNamecoinUser.setObjectName(_fromUtf8("labelNamecoinUser"))
self.gridLayout_8.addWidget(self.labelNamecoinUser, 4, 1, 1, 1) self.gridLayout_8.addWidget(self.labelNamecoinUser, 4, 1, 1, 1)
self.lineEditNamecoinUser = QtGui.QLineEdit(self.tabNamecoin) self.lineEditNamecoinUser = QtGui.QLineEdit(self.tabNamecoin)
@ -362,11 +378,13 @@ class Ui_settingsDialog(object):
spacerItem13 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) spacerItem13 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.gridLayout_8.addItem(spacerItem13, 5, 0, 1, 1) self.gridLayout_8.addItem(spacerItem13, 5, 0, 1, 1)
self.labelNamecoinPassword = QtGui.QLabel(self.tabNamecoin) self.labelNamecoinPassword = QtGui.QLabel(self.tabNamecoin)
self.labelNamecoinPassword.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.labelNamecoinPassword.setAlignment(
QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.labelNamecoinPassword.setObjectName(_fromUtf8("labelNamecoinPassword")) self.labelNamecoinPassword.setObjectName(_fromUtf8("labelNamecoinPassword"))
self.gridLayout_8.addWidget(self.labelNamecoinPassword, 5, 1, 1, 1) self.gridLayout_8.addWidget(self.labelNamecoinPassword, 5, 1, 1, 1)
self.lineEditNamecoinPassword = QtGui.QLineEdit(self.tabNamecoin) self.lineEditNamecoinPassword = QtGui.QLineEdit(self.tabNamecoin)
self.lineEditNamecoinPassword.setInputMethodHints(QtCore.Qt.ImhHiddenText|QtCore.Qt.ImhNoAutoUppercase|QtCore.Qt.ImhNoPredictiveText) self.lineEditNamecoinPassword.setInputMethodHints(
QtCore.Qt.ImhHiddenText | QtCore.Qt.ImhNoAutoUppercase | QtCore.Qt.ImhNoPredictiveText)
self.lineEditNamecoinPassword.setEchoMode(QtGui.QLineEdit.Password) self.lineEditNamecoinPassword.setEchoMode(QtGui.QLineEdit.Password)
self.lineEditNamecoinPassword.setObjectName(_fromUtf8("lineEditNamecoinPassword")) self.lineEditNamecoinPassword.setObjectName(_fromUtf8("lineEditNamecoinPassword"))
self.gridLayout_8.addWidget(self.lineEditNamecoinPassword, 5, 2, 1, 1) self.gridLayout_8.addWidget(self.lineEditNamecoinPassword, 5, 2, 1, 1)
@ -405,11 +423,11 @@ class Ui_settingsDialog(object):
self.widget.setObjectName(_fromUtf8("widget")) self.widget.setObjectName(_fromUtf8("widget"))
self.label_19 = QtGui.QLabel(self.widget) self.label_19 = QtGui.QLabel(self.widget)
self.label_19.setGeometry(QtCore.QRect(10, 20, 101, 20)) self.label_19.setGeometry(QtCore.QRect(10, 20, 101, 20))
self.label_19.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.label_19.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.label_19.setObjectName(_fromUtf8("label_19")) self.label_19.setObjectName(_fromUtf8("label_19"))
self.label_20 = QtGui.QLabel(self.widget) self.label_20 = QtGui.QLabel(self.widget)
self.label_20.setGeometry(QtCore.QRect(30, 40, 80, 16)) self.label_20.setGeometry(QtCore.QRect(30, 40, 80, 16))
self.label_20.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.label_20.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.label_20.setObjectName(_fromUtf8("label_20")) self.label_20.setObjectName(_fromUtf8("label_20"))
self.lineEditDays = QtGui.QLineEdit(self.widget) self.lineEditDays = QtGui.QLineEdit(self.widget)
self.lineEditDays.setGeometry(QtCore.QRect(113, 20, 51, 20)) self.lineEditDays.setGeometry(QtCore.QRect(113, 20, 51, 20))
@ -431,10 +449,20 @@ class Ui_settingsDialog(object):
self.retranslateUi(settingsDialog) self.retranslateUi(settingsDialog)
self.tabWidgetSettings.setCurrentIndex(0) self.tabWidgetSettings.setCurrentIndex(0)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), settingsDialog.accept) QtCore.QObject.connect( # pylint: disable=no-member
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), settingsDialog.reject) self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), settingsDialog.accept)
QtCore.QObject.connect(self.checkBoxAuthentication, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.lineEditSocksUsername.setEnabled) QtCore.QObject.connect( # pylint: disable=no-member
QtCore.QObject.connect(self.checkBoxAuthentication, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.lineEditSocksPassword.setEnabled) self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), settingsDialog.reject)
QtCore.QObject.connect( # pylint: disable=no-member
self.checkBoxAuthentication,
QtCore.SIGNAL(
_fromUtf8("toggled(bool)")),
self.lineEditSocksUsername.setEnabled)
QtCore.QObject.connect( # pylint: disable=no-member
self.checkBoxAuthentication,
QtCore.SIGNAL(
_fromUtf8("toggled(bool)")),
self.lineEditSocksPassword.setEnabled)
QtCore.QMetaObject.connectSlotsByName(settingsDialog) QtCore.QMetaObject.connectSlotsByName(settingsDialog)
settingsDialog.setTabOrder(self.tabWidgetSettings, self.checkBoxStartOnLogon) settingsDialog.setTabOrder(self.tabWidgetSettings, self.checkBoxStartOnLogon)
settingsDialog.setTabOrder(self.checkBoxStartOnLogon, self.checkBoxStartInTray) settingsDialog.setTabOrder(self.checkBoxStartOnLogon, self.checkBoxStartInTray)
@ -450,22 +478,47 @@ class Ui_settingsDialog(object):
settingsDialog.setTabOrder(self.checkBoxSocksListen, self.buttonBox) settingsDialog.setTabOrder(self.checkBoxSocksListen, self.buttonBox)
def retranslateUi(self, settingsDialog): def retranslateUi(self, settingsDialog):
"""Re-translate the UI into the supported languages"""
settingsDialog.setWindowTitle(_translate("settingsDialog", "Settings", None)) settingsDialog.setWindowTitle(_translate("settingsDialog", "Settings", None))
self.checkBoxStartOnLogon.setText(_translate("settingsDialog", "Start Bitmessage on user login", None)) self.checkBoxStartOnLogon.setText(_translate("settingsDialog", "Start Bitmessage on user login", None))
self.groupBoxTray.setTitle(_translate("settingsDialog", "Tray", None)) self.groupBoxTray.setTitle(_translate("settingsDialog", "Tray", None))
self.checkBoxStartInTray.setText(_translate("settingsDialog", "Start Bitmessage in the tray (don\'t show main window)", None)) self.checkBoxStartInTray.setText(
_translate(
"settingsDialog",
"Start Bitmessage in the tray (don\'t show main window)",
None))
self.checkBoxMinimizeToTray.setText(_translate("settingsDialog", "Minimize to tray", None)) self.checkBoxMinimizeToTray.setText(_translate("settingsDialog", "Minimize to tray", None))
self.checkBoxTrayOnClose.setText(_translate("settingsDialog", "Close to tray", None)) self.checkBoxTrayOnClose.setText(_translate("settingsDialog", "Close to tray", None))
self.checkBoxHideTrayConnectionNotifications.setText(_translate("settingsDialog", "Hide connection notifications", None)) self.checkBoxHideTrayConnectionNotifications.setText(
self.checkBoxShowTrayNotifications.setText(_translate("settingsDialog", "Show notification when message received", None)) _translate("settingsDialog", "Hide connection notifications", None))
self.checkBoxShowTrayNotifications.setText(
_translate(
"settingsDialog",
"Show notification when message received",
None))
self.checkBoxPortableMode.setText(_translate("settingsDialog", "Run in Portable Mode", None)) self.checkBoxPortableMode.setText(_translate("settingsDialog", "Run in Portable Mode", None))
self.PortableModeDescription.setText(_translate("settingsDialog", "In Portable Mode, messages and config files are stored in the same directory as the program rather than the normal application-data folder. This makes it convenient to run Bitmessage from a USB thumb drive.", None)) self.PortableModeDescription.setText(
self.checkBoxWillinglySendToMobile.setText(_translate("settingsDialog", "Willingly include unencrypted destination address when sending to a mobile device", None)) _translate(
"settingsDialog",
"In Portable Mode, messages and config files are stored in the same directory as the"
" program rather than the normal application-data folder. This makes it convenient to"
" run Bitmessage from a USB thumb drive.",
None))
self.checkBoxWillinglySendToMobile.setText(
_translate(
"settingsDialog",
"Willingly include unencrypted destination address when sending to a mobile device",
None))
self.checkBoxUseIdenticons.setText(_translate("settingsDialog", "Use Identicons", None)) self.checkBoxUseIdenticons.setText(_translate("settingsDialog", "Use Identicons", None))
self.checkBoxReplyBelow.setText(_translate("settingsDialog", "Reply below Quote", None)) self.checkBoxReplyBelow.setText(_translate("settingsDialog", "Reply below Quote", None))
self.groupBox.setTitle(_translate("settingsDialog", "Interface Language", None)) self.groupBox.setTitle(_translate("settingsDialog", "Interface Language", None))
self.languageComboBox.setItemText(0, _translate("settingsDialog", "System Settings", "system")) self.languageComboBox.setItemText(0, _translate("settingsDialog", "System Settings", "system"))
self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tabUserInterface), _translate("settingsDialog", "User Interface", None)) self.tabWidgetSettings.setTabText(
self.tabWidgetSettings.indexOf(
self.tabUserInterface),
_translate(
"settingsDialog", "User Interface", None))
self.groupBox1.setTitle(_translate("settingsDialog", "Listening port", None)) self.groupBox1.setTitle(_translate("settingsDialog", "Listening port", None))
self.label.setText(_translate("settingsDialog", "Listen for connections on port:", None)) self.label.setText(_translate("settingsDialog", "Listen for connections on port:", None))
self.labelUPnP.setText(_translate("settingsDialog", "UPnP:", None)) self.labelUPnP.setText(_translate("settingsDialog", "UPnP:", None))
@ -480,23 +533,70 @@ class Ui_settingsDialog(object):
self.checkBoxAuthentication.setText(_translate("settingsDialog", "Authentication", None)) self.checkBoxAuthentication.setText(_translate("settingsDialog", "Authentication", None))
self.label_5.setText(_translate("settingsDialog", "Username:", None)) self.label_5.setText(_translate("settingsDialog", "Username:", None))
self.label_6.setText(_translate("settingsDialog", "Pass:", None)) self.label_6.setText(_translate("settingsDialog", "Pass:", None))
self.checkBoxSocksListen.setText(_translate("settingsDialog", "Listen for incoming connections when using proxy", None)) self.checkBoxSocksListen.setText(
_translate(
"settingsDialog",
"Listen for incoming connections when using proxy",
None))
self.comboBoxProxyType.setItemText(0, _translate("settingsDialog", "none", None)) self.comboBoxProxyType.setItemText(0, _translate("settingsDialog", "none", None))
self.comboBoxProxyType.setItemText(1, _translate("settingsDialog", "SOCKS4a", None)) self.comboBoxProxyType.setItemText(1, _translate("settingsDialog", "SOCKS4a", None))
self.comboBoxProxyType.setItemText(2, _translate("settingsDialog", "SOCKS5", None)) self.comboBoxProxyType.setItemText(2, _translate("settingsDialog", "SOCKS5", None))
self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tabNetworkSettings), _translate("settingsDialog", "Network Settings", None)) self.tabWidgetSettings.setTabText(
self.tabWidgetSettings.indexOf(
self.tabNetworkSettings),
_translate(
"settingsDialog", "Network Settings", None))
self.label_9.setText(_translate("settingsDialog", "Total difficulty:", None)) self.label_9.setText(_translate("settingsDialog", "Total difficulty:", None))
self.label_10.setText(_translate("settingsDialog", "The \'Total difficulty\' affects the absolute amount of work the sender must complete. Doubling this value doubles the amount of work.", None)) self.label_10.setText(
_translate(
"settingsDialog",
"The \'Total difficulty\' affects the absolute amount of work the sender must complete."
" Doubling this value doubles the amount of work.",
None))
self.label_11.setText(_translate("settingsDialog", "Small message difficulty:", None)) self.label_11.setText(_translate("settingsDialog", "Small message difficulty:", None))
self.label_8.setText(_translate("settingsDialog", "When someone sends you a message, their computer must first complete some work. The difficulty of this work, by default, is 1. You may raise this default for new addresses you create by changing the values here. Any new addresses you create will require senders to meet the higher difficulty. There is one exception: if you add a friend or acquaintance to your address book, Bitmessage will automatically notify them when you next send a message that they need only complete the minimum amount of work: difficulty 1. ", None)) self.label_8.setText(_translate(
self.label_12.setText(_translate("settingsDialog", "The \'Small message difficulty\' mostly only affects the difficulty of sending small messages. Doubling this value makes it almost twice as difficult to send a small message but doesn\'t really affect large messages.", None)) "settingsDialog",
self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tabDemandedDifficulty), _translate("settingsDialog", "Demanded difficulty", None)) "When someone sends you a message, their computer must first complete some work. The difficulty of this"
self.label_15.setText(_translate("settingsDialog", "Here you may set the maximum amount of work you are willing to do to send a message to another person. Setting these values to 0 means that any value is acceptable.", None)) " work, by default, is 1. You may raise this default for new addresses you create by changing the values"
" here. Any new addresses you create will require senders to meet the higher difficulty. There is one"
" exception: if you add a friend or acquaintance to your address book, Bitmessage will automatically"
" notify them when you next send a message that they need only complete the minimum amount of"
" work: difficulty 1. ",
None))
self.label_12.setText(
_translate(
"settingsDialog",
"The \'Small message difficulty\' mostly only affects the difficulty of sending small messages."
" Doubling this value makes it almost twice as difficult to send a small message but doesn\'t really"
" affect large messages.",
None))
self.tabWidgetSettings.setTabText(
self.tabWidgetSettings.indexOf(
self.tabDemandedDifficulty),
_translate(
"settingsDialog", "Demanded difficulty", None))
self.label_15.setText(
_translate(
"settingsDialog",
"Here you may set the maximum amount of work you are willing to do to send a message to another"
" person. Setting these values to 0 means that any value is acceptable.",
None))
self.label_13.setText(_translate("settingsDialog", "Maximum acceptable total difficulty:", None)) self.label_13.setText(_translate("settingsDialog", "Maximum acceptable total difficulty:", None))
self.label_14.setText(_translate("settingsDialog", "Maximum acceptable small message difficulty:", None)) self.label_14.setText(_translate("settingsDialog", "Maximum acceptable small message difficulty:", None))
self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tabMaxAcceptableDifficulty), _translate("settingsDialog", "Max acceptable difficulty", None)) self.tabWidgetSettings.setTabText(
self.tabWidgetSettings.indexOf(
self.tabMaxAcceptableDifficulty),
_translate(
"settingsDialog", "Max acceptable difficulty", None))
self.labelOpenCL.setText(_translate("settingsDialog", "Hardware GPU acceleration (OpenCL):", None)) self.labelOpenCL.setText(_translate("settingsDialog", "Hardware GPU acceleration (OpenCL):", None))
self.label_16.setText(_translate("settingsDialog", "<html><head/><body><p>Bitmessage can utilize a different Bitcoin-based program called Namecoin to make addresses human-friendly. For example, instead of having to tell your friend your long Bitmessage address, you can simply tell him to send a message to <span style=\" font-style:italic;\">test. </span></p><p>(Getting your own Bitmessage address into Namecoin is still rather difficult).</p><p>Bitmessage can use either namecoind directly or a running nmcontrol instance.</p></body></html>", None)) self.label_16.setText(_translate(
"settingsDialog",
"<html><head/><body><p>Bitmessage can utilize a different Bitcoin-based program called Namecoin to make"
" addresses human-friendly. For example, instead of having to tell your friend your long Bitmessage"
" address, you can simply tell him to send a message to <span style=\" font-style:italic;\">test."
" </span></p><p>(Getting your own Bitmessage address into Namecoin is still rather difficult).</p>"
"<p>Bitmessage can use either namecoind directly or a running nmcontrol instance.</p></body></html>",
None))
self.label_17.setText(_translate("settingsDialog", "Host:", None)) self.label_17.setText(_translate("settingsDialog", "Host:", None))
self.label_18.setText(_translate("settingsDialog", "Port:", None)) self.label_18.setText(_translate("settingsDialog", "Port:", None))
self.labelNamecoinUser.setText(_translate("settingsDialog", "Username:", None)) self.labelNamecoinUser.setText(_translate("settingsDialog", "Username:", None))
@ -505,12 +605,26 @@ class Ui_settingsDialog(object):
self.label_21.setText(_translate("settingsDialog", "Connect to:", None)) self.label_21.setText(_translate("settingsDialog", "Connect to:", None))
self.radioButtonNamecoinNamecoind.setText(_translate("settingsDialog", "Namecoind", None)) self.radioButtonNamecoinNamecoind.setText(_translate("settingsDialog", "Namecoind", None))
self.radioButtonNamecoinNmcontrol.setText(_translate("settingsDialog", "NMControl", None)) self.radioButtonNamecoinNmcontrol.setText(_translate("settingsDialog", "NMControl", None))
self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tabNamecoin), _translate("settingsDialog", "Namecoin integration", None)) self.tabWidgetSettings.setTabText(
self.label_7.setText(_translate("settingsDialog", "<html><head/><body><p>By default, if you send a message to someone and he is offline for more than two days, Bitmessage will send the message again after an additional two days. This will be continued with exponential backoff forever; messages will be resent after 5, 10, 20 days ect. until the receiver acknowledges them. Here you may change that behavior by having Bitmessage give up after a certain number of days or months.</p><p>Leave these input fields blank for the default behavior. </p></body></html>", None)) self.tabWidgetSettings.indexOf(
self.tabNamecoin),
_translate(
"settingsDialog", "Namecoin integration", None))
self.label_7.setText(_translate(
"settingsDialog",
"<html><head/><body><p>By default, if you send a message to someone and he is offline for more than two"
" days, Bitmessage will send the message again after an additional two days. This will be continued with"
" exponential backoff forever; messages will be resent after 5, 10, 20 days ect. until the receiver"
" acknowledges them. Here you may change that behavior by having Bitmessage give up after a certain"
" number of days or months.</p><p>Leave these input fields blank for the default behavior."
" </p></body></html>",
None))
self.label_19.setText(_translate("settingsDialog", "Give up after", None)) self.label_19.setText(_translate("settingsDialog", "Give up after", None))
self.label_20.setText(_translate("settingsDialog", "and", None)) self.label_20.setText(_translate("settingsDialog", "and", None))
self.label_22.setText(_translate("settingsDialog", "days", None)) self.label_22.setText(_translate("settingsDialog", "days", None))
self.label_23.setText(_translate("settingsDialog", "months.", None)) self.label_23.setText(_translate("settingsDialog", "months.", None))
self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tabResendsExpire), _translate("settingsDialog", "Resends Expire", None)) self.tabWidgetSettings.setTabText(
self.tabWidgetSettings.indexOf(
import bitmessage_icons_rc self.tabResendsExpire),
_translate(
"settingsDialog", "Resends Expire", None))

View File

@ -4,23 +4,26 @@ Logging and debuging facility
============================= =============================
Levels: Levels:
DEBUG Detailed information, typically of interest only when
diagnosing problems. DEBUG
INFO Confirmation that things are working as expected. Detailed information, typically of interest only when diagnosing problems.
WARNING An indication that something unexpected happened, or indicative INFO
of some problem in the near future (e.g. disk space low). Confirmation that things are working as expected.
The software is still working as expected. WARNING
ERROR Due to a more serious problem, the software has not been able An indication that something unexpected happened, or indicative of some problem in the
to perform some function. near future (e.g. disk space low). The software is still working as expected.
CRITICAL A serious error, indicating that the program itself may be ERROR
unable to continue running. Due to a more serious problem, the software has not been able to perform some function.
CRITICAL
A serious error, indicating that the program itself may be unable to continue running.
There are three loggers: `console_only`, `file_only` and `both`. There are three loggers: `console_only`, `file_only` and `both`.
Use: `from debug import logger` to import this facility into whatever module Use: `from debug import logger` to import this facility into whatever module you wish to log messages from.
you wish to log messages from. Logging is thread-safe so you don't have Logging is thread-safe so you don't have to worry about locks, just import and log.
to worry about locks, just import and log.
""" """
import logging import logging
import logging.config import logging.config
import os import os
@ -56,9 +59,8 @@ def configureLogging():
' logging config\n%s' % ' logging config\n%s' %
(os.path.join(state.appdata, 'logging.dat'), sys.exc_info())) (os.path.join(state.appdata, 'logging.dat'), sys.exc_info()))
else: else:
# no need to confuse the user if the logger config # no need to confuse the user if the logger config is missing entirely
# is missing entirely print "Using default logger configuration"
print('Using default logger configuration')
sys.excepthook = log_uncaught_exceptions sys.excepthook = log_uncaught_exceptions
@ -111,17 +113,20 @@ def configureLogging():
return True return True
# TODO (xj9): Get from a config file. if __name__ == "__main__":
# logger = logging.getLogger('console_only')
if configureLogging(): # TODO (xj9): Get from a config file.
if '-c' in sys.argv: #logger = logging.getLogger('console_only')
logger = logging.getLogger('file_only') if configureLogging():
if '-c' in sys.argv:
logger = logging.getLogger('file_only')
else:
logger = logging.getLogger('both')
else: else:
logger = logging.getLogger('both') logger = logging.getLogger('default')
else: else:
logger = logging.getLogger('default') logger = logging.getLogger('default')
def restartLoggingInUpdatedAppdataLocation(): def restartLoggingInUpdatedAppdataLocation():
global logger global logger
for i in list(logger.handlers): for i in list(logger.handlers):
@ -135,3 +140,4 @@ def restartLoggingInUpdatedAppdataLocation():
logger = logging.getLogger('both') logger = logging.getLogger('both')
else: else:
logger = logging.getLogger('default') logger = logging.getLogger('default')

View File

@ -1,52 +1,196 @@
#! python """
Utility functions to check the availability of dependencies
and suggest how it may be installed
"""
import sys import sys
import os
import pyelliptic.openssl
# Only really old versions of Python don't have sys.hexversion. We don't # Only really old versions of Python don't have sys.hexversion. We don't
# support them. The logging module was introduced in Python 2.3 # support them. The logging module was introduced in Python 2.3
if not hasattr(sys, 'hexversion') or sys.hexversion < 0x20300F0: if not hasattr(sys, 'hexversion') or sys.hexversion < 0x20300F0:
sys.stdout.write('Python version: ' + sys.version) sys.exit(
sys.stdout.write('PyBitmessage requires Python 2.7.3 or greater (but not Python 3)') 'Python version: %s\n'
sys.exit() 'PyBitmessage requires Python 2.7.4 or greater (but not Python 3)'
% sys.version
)
import logging
import os
from importlib import import_module
# We can now use logging so set up a simple configuration # We can now use logging so set up a simple configuration
import logging
formatter = logging.Formatter( formatter = logging.Formatter(
'%(levelname)s: %(message)s' '%(levelname)s: %(message)s'
) )
handler = logging.StreamHandler(sys.stdout) handler = logging.StreamHandler(sys.stdout)
handler.setFormatter(formatter) handler.setFormatter(formatter)
logger = logging.getLogger(__name__) logger = logging.getLogger('both')
logger.addHandler(handler) logger.addHandler(handler)
logger.setLevel(logging.ERROR) logger.setLevel(logging.ERROR)
OS_RELEASE = {
"fedora": "Fedora",
"opensuse": "openSUSE",
"ubuntu": "Ubuntu",
"gentoo": "Gentoo",
"calculate": "Gentoo"
}
PACKAGE_MANAGER = {
"OpenBSD": "pkg_add",
"FreeBSD": "pkg install",
"Debian": "apt-get install",
"Ubuntu": "apt-get install",
"Ubuntu 12": "apt-get install",
"openSUSE": "zypper install",
"Fedora": "dnf install",
"Guix": "guix package -i",
"Gentoo": "emerge"
}
PACKAGES = {
"PyQt4": {
"OpenBSD": "py-qt4",
"FreeBSD": "py27-qt4",
"Debian": "python-qt4",
"Ubuntu": "python-qt4",
"Ubuntu 12": "python-qt4",
"openSUSE": "python-qt",
"Fedora": "PyQt4",
"Guix": "python2-pyqt@4.11.4",
"Gentoo": "dev-python/PyQt4",
"optional": True,
"description":
"You only need PyQt if you want to use the GUI."
" When only running as a daemon, this can be skipped.\n"
"However, you would have to install it manually"
" because setuptools does not support PyQt."
},
"msgpack": {
"OpenBSD": "py-msgpack",
"FreeBSD": "py27-msgpack-python",
"Debian": "python-msgpack",
"Ubuntu": "python-msgpack",
"Ubuntu 12": "msgpack-python",
"openSUSE": "python-msgpack-python",
"Fedora": "python2-msgpack",
"Guix": "python2-msgpack",
"Gentoo": "dev-python/msgpack",
"optional": True,
"description":
"python-msgpack is recommended for improved performance of"
" message encoding/decoding"
},
"pyopencl": {
"FreeBSD": "py27-pyopencl",
"Debian": "python-pyopencl",
"Ubuntu": "python-pyopencl",
"Ubuntu 12": "python-pyopencl",
"Fedora": "python2-pyopencl",
"openSUSE": "",
"OpenBSD": "",
"Guix": "",
"Gentoo": "dev-python/pyopencl",
"optional": True,
"description":
"If you install pyopencl, you will be able to use"
" GPU acceleration for proof of work.\n"
"You also need a compatible GPU and drivers."
},
"setuptools": {
"OpenBSD": "py-setuptools",
"FreeBSD": "py27-setuptools",
"Debian": "python-setuptools",
"Ubuntu": "python-setuptools",
"Ubuntu 12": "python-setuptools",
"Fedora": "python2-setuptools",
"openSUSE": "python-setuptools",
"Guix": "python2-setuptools",
"Gentoo": "dev-python/setuptools",
"optional": False,
}
}
def detectOS():
if detectOS.result is not None:
return detectOS.result
if sys.platform.startswith('openbsd'):
detectOS.result = "OpenBSD"
elif sys.platform.startswith('freebsd'):
detectOS.result = "FreeBSD"
elif sys.platform.startswith('win'):
detectOS.result = "Windows"
elif os.path.isfile("/etc/os-release"):
detectOSRelease()
elif os.path.isfile("/etc/config.scm"):
detectOS.result = "Guix"
return detectOS.result
detectOS.result = None
def detectOSRelease():
with open("/etc/os-release", 'r') as osRelease:
version = None
for line in osRelease:
if line.startswith("NAME="):
detectOS.result = OS_RELEASE.get(
line.split("=")[-1].strip().lower())
elif line.startswith("VERSION_ID="):
try:
version = float(line.split("=")[1].replace("\"", ""))
except ValueError:
pass
if detectOS.result == "Ubuntu" and version < 14:
detectOS.result = "Ubuntu 12"
def try_import(module, log_extra=False):
try:
return import_module(module)
except ImportError:
module = module.split('.')[0]
logger.error('The %s module is not available.', module)
if log_extra:
logger.error(log_extra)
dist = detectOS()
logger.error(
'On %s, try running "%s %s" as root.',
dist, PACKAGE_MANAGER[dist], PACKAGES[module][dist])
return False
# We need to check hashlib for RIPEMD-160, as it won't be available # We need to check hashlib for RIPEMD-160, as it won't be available
# if OpenSSL is not linked against or the linked OpenSSL has RIPEMD # if OpenSSL is not linked against or the linked OpenSSL has RIPEMD
# disabled. # disabled.
def check_hashlib(): def check_hashlib():
"""Do hashlib check. """Do hashlib check.
The hashlib module check with version as if it included or not The hashlib module check with version as if it included or not
in The Python Standard library , its a module containing an in The Python Standard library, it's a module containing an
interface to the most popular hashing algorithms. hashlib interface to the most popular hashing algorithms. hashlib
implements some of the algorithms, however if OpenSSL implements some of the algorithms, however if OpenSSL
installed, hashlib is able to use this algorithms as well. installed, hashlib is able to use this algorithms as well.
""" """
if sys.hexversion < 0x020500F0: if sys.hexversion < 0x020500F0:
logger.error('The hashlib module is not included in this version of Python.') logger.error(
'The hashlib module is not included in this version of Python.')
return False return False
import hashlib import hashlib
if '_hashlib' not in hashlib.__dict__: if '_hashlib' not in hashlib.__dict__:
logger.error('The RIPEMD-160 hash algorithm is not available. The hashlib module is not linked against OpenSSL.') logger.error(
'The RIPEMD-160 hash algorithm is not available.'
' The hashlib module is not linked against OpenSSL.')
return False return False
try: try:
hashlib.new('ripemd160') hashlib.new('ripemd160')
except ValueError: except ValueError:
logger.error('The RIPEMD-160 hash algorithm is not available. The hashlib module utilizes an OpenSSL library with RIPEMD disabled.') logger.error(
'The RIPEMD-160 hash algorithm is not available.'
' The hashlib module utilizes an OpenSSL library with'
' RIPEMD disabled.')
return False return False
return True return True
@ -58,35 +202,48 @@ def check_sqlite():
support in python version for specifieed platform. support in python version for specifieed platform.
""" """
if sys.hexversion < 0x020500F0: if sys.hexversion < 0x020500F0:
logger.error('The sqlite3 module is not included in this version of Python.') logger.error(
'The sqlite3 module is not included in this version of Python.')
if sys.platform.startswith('freebsd'): if sys.platform.startswith('freebsd'):
logger.error('On FreeBSD, try running "pkg install py27-sqlite3" as root.') logger.error(
return False 'On FreeBSD, try running "pkg install py27-sqlite3" as root.')
try:
import sqlite3
except ImportError:
logger.error('The sqlite3 module is not available')
return False return False
logger.info('sqlite3 Module Version: ' + sqlite3.version) sqlite3 = try_import('sqlite3')
logger.info('SQLite Library Version: ' + sqlite3.sqlite_version) if not sqlite3:
#sqlite_version_number formula: https://sqlite.org/c3ref/c_source_id.html return False
sqlite_version_number = sqlite3.sqlite_version_info[0] * 1000000 + sqlite3.sqlite_version_info[1] * 1000 + sqlite3.sqlite_version_info[2]
logger.info('sqlite3 Module Version: %s', sqlite3.version)
logger.info('SQLite Library Version: %s', sqlite3.sqlite_version)
# sqlite_version_number formula: https://sqlite.org/c3ref/c_source_id.html
sqlite_version_number = (
sqlite3.sqlite_version_info[0] * 1000000 +
sqlite3.sqlite_version_info[1] * 1000 +
sqlite3.sqlite_version_info[2]
)
conn = None conn = None
try: try:
try: try:
conn = sqlite3.connect(':memory:') conn = sqlite3.connect(':memory:')
if sqlite_version_number >= 3006018: if sqlite_version_number >= 3006018:
sqlite_source_id = conn.execute('SELECT sqlite_source_id();').fetchone()[0] sqlite_source_id = conn.execute(
logger.info('SQLite Library Source ID: ' + sqlite_source_id) 'SELECT sqlite_source_id();'
).fetchone()[0]
logger.info('SQLite Library Source ID: %s', sqlite_source_id)
if sqlite_version_number >= 3006023: if sqlite_version_number >= 3006023:
compile_options = ', '.join(map(lambda row: row[0], conn.execute('PRAGMA compile_options;'))) compile_options = ', '.join(map(
logger.info('SQLite Library Compile Options: ' + compile_options) lambda row: row[0],
#There is no specific version requirement as yet, so we just use the conn.execute('PRAGMA compile_options;')
#first version that was included with Python. ))
logger.info(
'SQLite Library Compile Options: %s', compile_options)
# There is no specific version requirement as yet, so we just
# use the first version that was included with Python.
if sqlite_version_number < 3000008: if sqlite_version_number < 3000008:
logger.error('This version of SQLite is too old. PyBitmessage requires SQLite 3.0.8 or later') logger.error(
'This version of SQLite is too old.'
' PyBitmessage requires SQLite 3.0.8 or later')
return False return False
return True return True
except sqlite3.Error: except sqlite3.Error:
@ -96,19 +253,20 @@ def check_sqlite():
if conn: if conn:
conn.close() conn.close()
def check_openssl(): def check_openssl():
"""Do openssl dependency check. """Do openssl dependency check.
Here we are checking for openssl with its all dependent libraries Here we are checking for openssl with its all dependent libraries
and version checking. and version checking.
""" """
try:
import ctypes ctypes = try_import('ctypes')
except ImportError: if not ctypes:
logger.error('Unable to check OpenSSL. The ctypes module is not available.') logger.error('Unable to check OpenSSL.')
return False return False
#We need to emulate the way PyElliptic searches for OpenSSL. # We need to emulate the way PyElliptic searches for OpenSSL.
if sys.platform == 'win32': if sys.platform == 'win32':
paths = ['libeay32.dll'] paths = ['libeay32.dll']
if getattr(sys, 'frozen', False): if getattr(sys, 'frozen', False):
@ -138,135 +296,128 @@ def check_openssl():
cflags_regex = re.compile(r'(?:OPENSSL_NO_)(AES|EC|ECDH|ECDSA)(?!\w)') cflags_regex = re.compile(r'(?:OPENSSL_NO_)(AES|EC|ECDH|ECDSA)(?!\w)')
import pyelliptic.openssl
for path in paths: for path in paths:
logger.info('Checking OpenSSL at ' + path) logger.info('Checking OpenSSL at %s', path)
try: try:
library = ctypes.CDLL(path) library = ctypes.CDLL(path)
except OSError: except OSError:
continue continue
logger.info('OpenSSL Name: ' + library._name) logger.info('OpenSSL Name: %s', library._name)
openssl_version, openssl_hexversion, openssl_cflags = pyelliptic.openssl.get_version(library) try:
openssl_version, openssl_hexversion, openssl_cflags = \
pyelliptic.openssl.get_version(library)
except AttributeError: # sphinx chokes
return True
if not openssl_version: if not openssl_version:
logger.error('Cannot determine version of this OpenSSL library.') logger.error('Cannot determine version of this OpenSSL library.')
return False return False
logger.info('OpenSSL Version: ' + openssl_version) logger.info('OpenSSL Version: %s', openssl_version)
logger.info('OpenSSL Compile Options: ' + openssl_cflags) logger.info('OpenSSL Compile Options: %s', openssl_cflags)
#PyElliptic uses EVP_CIPHER_CTX_new and EVP_CIPHER_CTX_free which were # PyElliptic uses EVP_CIPHER_CTX_new and EVP_CIPHER_CTX_free which were
#introduced in 0.9.8b. # introduced in 0.9.8b.
if openssl_hexversion < 0x90802F: if openssl_hexversion < 0x90802F:
logger.error('This OpenSSL library is too old. PyBitmessage requires OpenSSL 0.9.8b or later with AES, Elliptic Curves (EC), ECDH, and ECDSA enabled.') logger.error(
'This OpenSSL library is too old. PyBitmessage requires'
' OpenSSL 0.9.8b or later with AES, Elliptic Curves (EC),'
' ECDH, and ECDSA enabled.')
return False return False
matches = cflags_regex.findall(openssl_cflags) matches = cflags_regex.findall(openssl_cflags)
if len(matches) > 0: if len(matches) > 0:
logger.error('This OpenSSL library is missing the following required features: ' + ', '.join(matches) + '. PyBitmessage requires OpenSSL 0.9.8b or later with AES, Elliptic Curves (EC), ECDH, and ECDSA enabled.') logger.error(
'This OpenSSL library is missing the following required'
' features: %s. PyBitmessage requires OpenSSL 0.9.8b'
' or later with AES, Elliptic Curves (EC), ECDH,'
' and ECDSA enabled.', ', '.join(matches))
return False return False
return True return True
return False return False
#TODO: The minimum versions of pythondialog and dialog need to be determined
# TODO: The minimum versions of pythondialog and dialog need to be determined
def check_curses(): def check_curses():
"""Do curses dependency check. """Do curses dependency check.
Here we are checking for curses if available or not with check Here we are checking for curses if available or not with check
as interface requires the pythondialog\ package and the dialog as interface requires the pythondialog\ package and the dialog
utility. utility.
""" """
if sys.hexversion < 0x20600F0: if sys.hexversion < 0x20600F0:
logger.error('The curses interface requires the pythondialog package and the dialog utility.') logger.error(
'The curses interface requires the pythondialog package and'
' the dialog utility.')
return False return False
curses = try_import('curses')
if not curses:
logger.error('The curses interface can not be used.')
return False
logger.info('curses Module Version: %s', curses.version)
dialog = try_import('dialog')
if not dialog:
logger.error('The curses interface can not be used.')
return False
import subprocess
try: try:
import curses subprocess.check_call('which dialog')
except ImportError: except subprocess.CalledProcessError:
logger.error('The curses interface can not be used. The curses module is not available.') logger.error(
'Curses requires the `dialog` command to be installed as well as'
' the python library.')
return False return False
logger.info('curses Module Version: ' + curses.version)
try: logger.info('pythondialog Package Version: %s', dialog.__version__)
import dialog
except ImportError:
logger.error('The curses interface can not be used. The pythondialog package is not available.')
return False
logger.info('pythondialog Package Version: ' + dialog.__version__)
dialog_util_version = dialog.Dialog().cached_backend_version dialog_util_version = dialog.Dialog().cached_backend_version
#The pythondialog author does not like Python2 str, so we have to use # The pythondialog author does not like Python2 str, so we have to use
#unicode for just the version otherwise we get the repr form which includes # unicode for just the version otherwise we get the repr form which
#the module and class names along with the actual version. # includes the module and class names along with the actual version.
logger.info('dialog Utility Version' + unicode(dialog_util_version)) logger.info('dialog Utility Version %s', unicode(dialog_util_version))
return True return True
def check_pyqt(): def check_pyqt():
"""Do pyqt dependency check. """Do pyqt dependency check.
Here we are checking for PyQt4 with its version, as for it require Here we are checking for PyQt4 with its version, as for it require
PyQt 4.7 or later. PyQt 4.8 or later.
""" """
try: QtCore = try_import(
import PyQt4.QtCore 'PyQt4.QtCore', 'PyBitmessage requires PyQt 4.8 or later and Qt 4.7 or later.')
except ImportError:
logger.error('The PyQt4 package is not available. PyBitmessage requires PyQt 4.8 or later and Qt 4.7 or later.') if not QtCore:
if sys.platform.startswith('openbsd'):
logger.error('On OpenBSD, try running "pkg_add py-qt4" as root.')
elif sys.platform.startswith('freebsd'):
logger.error('On FreeBSD, try running "pkg install py27-qt4" as root.')
elif os.path.isfile("/etc/os-release"):
with open("/etc/os-release", 'rt') as osRelease:
for line in osRelease:
if line.startswith("NAME="):
if "fedora" in line.lower():
logger.error('On Fedora, try running "dnf install PyQt4" as root.')
elif "opensuse" in line.lower():
logger.error('On openSUSE, try running "zypper install python-qt" as root.')
elif "ubuntu" in line.lower():
logger.error('On Ubuntu, try running "apt-get install python-qt4" as root.')
elif "debian" in line.lower():
logger.error('On Debian, try running "apt-get install python-qt4" as root.')
else:
logger.error('If your package manager does not have this package, try running "pip install PyQt4".')
return False return False
logger.info('PyQt Version: ' + PyQt4.QtCore.PYQT_VERSION_STR)
logger.info('Qt Version: ' + PyQt4.QtCore.QT_VERSION_STR) logger.info('PyQt Version: %s', QtCore.PYQT_VERSION_STR)
logger.info('Qt Version: %s', QtCore.QT_VERSION_STR)
passed = True passed = True
if PyQt4.QtCore.PYQT_VERSION < 0x40800: if QtCore.PYQT_VERSION < 0x40800:
logger.error('This version of PyQt is too old. PyBitmessage requries PyQt 4.8 or later.') logger.error(
'This version of PyQt is too old. PyBitmessage requries'
' PyQt 4.8 or later.')
passed = False passed = False
if PyQt4.QtCore.QT_VERSION < 0x40700: if QtCore.QT_VERSION < 0x40700:
logger.error('This version of Qt is too old. PyBitmessage requries Qt 4.7 or later.') logger.error(
'This version of Qt is too old. PyBitmessage requries'
' Qt 4.7 or later.')
passed = False passed = False
return passed return passed
def check_msgpack(): def check_msgpack():
"""Do sgpack module check. """Do sgpack module check.
simply checking if msgpack package with all its dependency simply checking if msgpack package with all its dependency
is available or not as recommended for messages coding. is available or not as recommended for messages coding.
""" """
try: return try_import(
import msgpack 'msgpack', 'It is highly recommended for messages coding.') is not False
except ImportError:
logger.error(
'The msgpack package is not available.'
'It is highly recommended for messages coding.')
if sys.platform.startswith('openbsd'):
logger.error('On OpenBSD, try running "pkg_add py-msgpack" as root.')
elif sys.platform.startswith('freebsd'):
logger.error('On FreeBSD, try running "pkg install py27-msgpack-python" as root.')
elif os.path.isfile("/etc/os-release"):
with open("/etc/os-release", 'rt') as osRelease:
for line in osRelease:
if line.startswith("NAME="):
if "fedora" in line.lower():
logger.error('On Fedora, try running "dnf install python2-msgpack" as root.')
elif "opensuse" in line.lower():
logger.error('On openSUSE, try running "zypper install python-msgpack-python" as root.')
elif "ubuntu" in line.lower():
logger.error('On Ubuntu, try running "apt-get install python-msgpack" as root.')
elif "debian" in line.lower():
logger.error('On Debian, try running "apt-get install python-msgpack" as root.')
else:
logger.error('If your package manager does not have this package, try running "pip install msgpack-python".')
return True
def check_dependencies(verbose = False, optional = False): def check_dependencies(verbose=False, optional=False):
"""Do dependency check. """Do dependency check.
It identifies project dependencies and checks if there are It identifies project dependencies and checks if there are
@ -279,33 +430,36 @@ def check_dependencies(verbose = False, optional = False):
has_all_dependencies = True has_all_dependencies = True
#Python 2.7.3 is the required minimum. Python 3+ is not supported, but it is # Python 2.7.4 is the required minimum.
#still useful to provide information about our other requirements. # (https://bitmessage.org/forum/index.php?topic=4081.0)
# Python 3+ is not supported, but it is still useful to provide
# information about our other requirements.
logger.info('Python version: %s', sys.version) logger.info('Python version: %s', sys.version)
if sys.hexversion < 0x20703F0: if sys.hexversion < 0x20704F0:
logger.error('PyBitmessage requires Python 2.7.3 or greater (but not Python 3+)') logger.error(
'PyBitmessage requires Python 2.7.4 or greater'
' (but not Python 3+)')
has_all_dependencies = False has_all_dependencies = False
if sys.hexversion >= 0x3000000: if sys.hexversion >= 0x3000000:
logger.error('PyBitmessage does not support Python 3+. Python 2.7.3 or greater is required.') logger.error(
'PyBitmessage does not support Python 3+. Python 2.7.4'
' or greater is required.')
has_all_dependencies = False has_all_dependencies = False
check_functions = [check_hashlib, check_sqlite, check_openssl, check_msgpack] check_functions = [check_hashlib, check_sqlite, check_openssl]
if optional: if optional:
check_functions.extend([check_pyqt, check_curses]) check_functions.extend([check_msgpack, check_pyqt, check_curses])
#Unexpected exceptions are handled here # Unexpected exceptions are handled here
for check in check_functions: for check in check_functions:
try: try:
has_all_dependencies &= check() has_all_dependencies &= check()
except: except:
logger.exception(check.__name__ + ' failed unexpectedly.') logger.exception('%s failed unexpectedly.', check.__name__)
has_all_dependencies = False has_all_dependencies = False
if not has_all_dependencies: if not has_all_dependencies:
logger.critical('PyBitmessage cannot start. One or more dependencies are unavailable.') sys.exit(
sys.exit() 'PyBitmessage cannot start. One or more dependencies are'
' unavailable.'
if __name__ == '__main__': )
"""Check Dependencies"""
check_dependencies(True, True)

View File

@ -0,0 +1,3 @@
"""
.. todo:: hello world
"""

View File

@ -205,7 +205,7 @@ load = None
loads = None loads = None
compatibility = False compatibility = False
""" u"""
Compatibility mode boolean. Compatibility mode boolean.
When compatibility mode is enabled, u-msgpack-python will serialize both When compatibility mode is enabled, u-msgpack-python will serialize both

View File

@ -1,22 +1,32 @@
#This program can be used to print out everything in your Inbox or Sent folders and also take things out of the trash. # pylint: disable=too-many-locals
#Scroll down to the bottom to see the functions that you can uncomment. Save then run this file. """
#The functions which only read the database file seem to function just fine even if you have Bitmessage running but you should definitly close it before running the functions that make changes (like taking items out of the trash). This program can be used to print out everything in your Inbox or Sent folders and also take things out of the trash.
Scroll down to the bottom to see the functions that you can uncomment. Save then run this file.
The functions which only read the database file seem to function just
fine even if you have Bitmessage running but you should definitly close
it before running the functions that make changes (like taking items out
of the trash).
"""
from __future__ import absolute_import
import sqlite3 import sqlite3
from binascii import hexlify
from time import strftime, localtime from time import strftime, localtime
import sys
import paths import paths
import queues import queues
import state
from binascii import hexlify
appdata = paths.lookupAppdataFolder() appdata = paths.lookupAppdataFolder()
conn = sqlite3.connect( appdata + 'messages.dat' ) conn = sqlite3.connect(appdata + 'messages.dat')
conn.text_factory = str conn.text_factory = str
cur = conn.cursor() cur = conn.cursor()
def readInbox(): def readInbox():
"""Print each row from inbox table"""
print 'Printing everything in inbox table:' print 'Printing everything in inbox table:'
item = '''select * from inbox''' item = '''select * from inbox'''
parameters = '' parameters = ''
@ -25,17 +35,24 @@ def readInbox():
for row in output: for row in output:
print row print row
def readSent(): def readSent():
"""Print each row from sent table"""
print 'Printing everything in Sent table:' print 'Printing everything in Sent table:'
item = '''select * from sent where folder !='trash' ''' item = '''select * from sent where folder !='trash' '''
parameters = '' parameters = ''
cur.execute(item, parameters) cur.execute(item, parameters)
output = cur.fetchall() output = cur.fetchall()
for row in output: for row in output:
msgid, toaddress, toripe, fromaddress, subject, message, ackdata, lastactiontime, sleeptill, status, retrynumber, folder, encodingtype, ttl = row (msgid, toaddress, toripe, fromaddress, subject, message, ackdata, lastactiontime,
print hexlify(msgid), toaddress, 'toripe:', hexlify(toripe), 'fromaddress:', fromaddress, 'ENCODING TYPE:', encodingtype, 'SUBJECT:', repr(subject), 'MESSAGE:', repr(message), 'ACKDATA:', hexlify(ackdata), lastactiontime, status, retrynumber, folder sleeptill, status, retrynumber, folder, encodingtype, ttl) = row # pylint: disable=unused-variable
print(hexlify(msgid), toaddress, 'toripe:', hexlify(toripe), 'fromaddress:', fromaddress, 'ENCODING TYPE:',
encodingtype, 'SUBJECT:', repr(subject), 'MESSAGE:', repr(message), 'ACKDATA:', hexlify(ackdata),
lastactiontime, status, retrynumber, folder)
def readSubscriptions(): def readSubscriptions():
"""Print each row from subscriptions table"""
print 'Printing everything in subscriptions table:' print 'Printing everything in subscriptions table:'
item = '''select * from subscriptions''' item = '''select * from subscriptions'''
parameters = '' parameters = ''
@ -44,7 +61,9 @@ def readSubscriptions():
for row in output: for row in output:
print row print row
def readPubkeys(): def readPubkeys():
"""Print each row from pubkeys table"""
print 'Printing everything in pubkeys table:' print 'Printing everything in pubkeys table:'
item = '''select address, transmitdata, time, usedpersonally from pubkeys''' item = '''select address, transmitdata, time, usedpersonally from pubkeys'''
parameters = '' parameters = ''
@ -52,61 +71,66 @@ def readPubkeys():
output = cur.fetchall() output = cur.fetchall()
for row in output: for row in output:
address, transmitdata, time, usedpersonally = row address, transmitdata, time, usedpersonally = row
print 'Address:', address, '\tTime first broadcast:', unicode(strftime('%a, %d %b %Y %I:%M %p',localtime(time)),'utf-8'), '\tUsed by me personally:', usedpersonally, '\tFull pubkey message:', hexlify(transmitdata) print(
'Address:', address, '\tTime first broadcast:', unicode(
strftime('%a, %d %b %Y %I:%M %p', localtime(time)), 'utf-8'),
'\tUsed by me personally:', usedpersonally, '\tFull pubkey message:', hexlify(transmitdata),
)
def readInventory(): def readInventory():
"""Print each row from inventory table"""
print 'Printing everything in inventory table:' print 'Printing everything in inventory table:'
item = '''select hash, objecttype, streamnumber, payload, expirestime from inventory''' item = '''select hash, objecttype, streamnumber, payload, expirestime from inventory'''
parameters = '' parameters = ''
cur.execute(item, parameters) cur.execute(item, parameters)
output = cur.fetchall() output = cur.fetchall()
for row in output: for row in output:
hash, objecttype, streamnumber, payload, expirestime = row obj_hash, objecttype, streamnumber, payload, expirestime = row
print 'Hash:', hexlify(hash), objecttype, streamnumber, '\t', hexlify(payload), '\t', unicode(strftime('%a, %d %b %Y %I:%M %p',localtime(expirestime)),'utf-8') print 'Hash:', hexlify(obj_hash), objecttype, streamnumber, '\t', hexlify(payload), '\t', unicode(
strftime('%a, %d %b %Y %I:%M %p', localtime(expirestime)), 'utf-8')
def takeInboxMessagesOutOfTrash(): def takeInboxMessagesOutOfTrash():
"""Update all inbox messages with folder=trash to have folder=inbox"""
item = '''update inbox set folder='inbox' where folder='trash' ''' item = '''update inbox set folder='inbox' where folder='trash' '''
parameters = '' parameters = ''
cur.execute(item, parameters) cur.execute(item, parameters)
output = cur.fetchall() _ = cur.fetchall()
conn.commit() conn.commit()
print 'done' print 'done'
def takeSentMessagesOutOfTrash(): def takeSentMessagesOutOfTrash():
"""Update all sent messages with folder=trash to have folder=sent"""
item = '''update sent set folder='sent' where folder='trash' ''' item = '''update sent set folder='sent' where folder='trash' '''
parameters = '' parameters = ''
cur.execute(item, parameters) cur.execute(item, parameters)
output = cur.fetchall() _ = cur.fetchall()
conn.commit() conn.commit()
print 'done' print 'done'
def markAllInboxMessagesAsUnread(): def markAllInboxMessagesAsUnread():
"""Update all messages in inbox to have read=0"""
item = '''update inbox set read='0' ''' item = '''update inbox set read='0' '''
parameters = '' parameters = ''
cur.execute(item, parameters) cur.execute(item, parameters)
output = cur.fetchall() _ = cur.fetchall()
conn.commit() conn.commit()
queues.UISignalQueue.put(('changedInboxUnread', None)) queues.UISignalQueue.put(('changedInboxUnread', None))
print 'done' print 'done'
def vacuum(): def vacuum():
"""Perform a vacuum on the database"""
item = '''VACUUM''' item = '''VACUUM'''
parameters = '' parameters = ''
cur.execute(item, parameters) cur.execute(item, parameters)
output = cur.fetchall() _ = cur.fetchall()
conn.commit() conn.commit()
print 'done' print 'done'
#takeInboxMessagesOutOfTrash()
#takeSentMessagesOutOfTrash()
#markAllInboxMessagesAsUnread()
readInbox()
#readSent()
#readPubkeys()
#readSubscriptions()
#readInventory()
#vacuum() #will defragment and clean empty space from the messages.dat file.
if __name__ == '__main__':
readInbox()

View File

@ -1,54 +1,64 @@
# Copyright (C) 2013 by Daniel Kraft <d@domob.eu> # pylint: disable=too-many-branches,protected-access
# This file is part of the Bitmessage project. """
# Copyright (C) 2013 by Daniel Kraft <d@domob.eu>
# Permission is hereby granted, free of charge, to any person obtaining a copy This file is part of the Bitmessage project.
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights Permission is hereby granted, free of charge, to any person obtaining a copy
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell of this software and associated documentation files (the "Software"), to deal
# copies of the Software, and to permit persons to whom the Software is in the Software without restriction, including without limitation the rights
# furnished to do so, subject to the following conditions: to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# The above copyright notice and this permission notice shall be included in all furnished to do so, subject to the following conditions:
# copies or substantial portions of the Software.
# The above copyright notice and this permission notice shall be included in all
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR copies or substantial portions of the Software.
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# SOFTWARE. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
.. todo:: from debug import logger crashes PyBitmessage due to a circular dependency. The debug module will also
override/disable logging.getLogger() # loggers so module level logging functions are used instead
"""
from __future__ import absolute_import
import base64 import base64
import httplib import httplib
import json import json
import os
import socket import socket
import sys import sys
import os
from bmconfigparser import BMConfigParser
import defaults
import tr # translate
# FIXME: from debug import logger crashes PyBitmessage due to a circular
# dependency. The debug module will also override/disable logging.getLogger()
# loggers so module level logging functions are used instead
import logging as logger import logging as logger
import defaults
import tr # translate
from bmconfigparser import BMConfigParser
configSection = "bitmessagesettings" configSection = "bitmessagesettings"
# Error thrown when the RPC call returns an error.
class RPCError (Exception): class RPCError(Exception):
"""Error thrown when the RPC call returns an error."""
error = None error = None
def __init__ (self, data): def __init__(self, data):
super(RPCError, self).__init__()
self.error = data self.error = data
def __str__(self): def __str__(self):
return '{0}: {1}'.format(type(self).__name__, self.error) return '{0}: {1}'.format(type(self).__name__, self.error)
# This class handles the Namecoin identity integration.
class namecoinConnection (object): class namecoinConnection(object):
"""This class handles the Namecoin identity integration."""
user = None user = None
password = None password = None
host = None host = None
@ -58,47 +68,51 @@ class namecoinConnection (object):
queryid = 1 queryid = 1
con = None con = None
# Initialise. If options are given, take the connection settings from def __init__(self, options=None):
# them instead of loading from the configs. This can be used to test """
# currently entered connection settings in the config dialog without Initialise. If options are given, take the connection settings from
# actually changing the values (yet). them instead of loading from the configs. This can be used to test
def __init__ (self, options = None): currently entered connection settings in the config dialog without
actually changing the values (yet).
"""
if options is None: if options is None:
self.nmctype = BMConfigParser().get (configSection, "namecoinrpctype") self.nmctype = BMConfigParser().get(configSection, "namecoinrpctype")
self.host = BMConfigParser().get (configSection, "namecoinrpchost") self.host = BMConfigParser().get(configSection, "namecoinrpchost")
self.port = int(BMConfigParser().get (configSection, "namecoinrpcport")) self.port = int(BMConfigParser().get(configSection, "namecoinrpcport"))
self.user = BMConfigParser().get (configSection, "namecoinrpcuser") self.user = BMConfigParser().get(configSection, "namecoinrpcuser")
self.password = BMConfigParser().get (configSection, self.password = BMConfigParser().get(configSection,
"namecoinrpcpassword") "namecoinrpcpassword")
else: else:
self.nmctype = options["type"] self.nmctype = options["type"]
self.host = options["host"] self.host = options["host"]
self.port = int(options["port"]) self.port = int(options["port"])
self.user = options["user"] self.user = options["user"]
self.password = options["password"] self.password = options["password"]
assert self.nmctype == "namecoind" or self.nmctype == "nmcontrol" assert self.nmctype == "namecoind" or self.nmctype == "nmcontrol"
if self.nmctype == "namecoind": if self.nmctype == "namecoind":
self.con = httplib.HTTPConnection(self.host, self.port, timeout = 3) self.con = httplib.HTTPConnection(self.host, self.port, timeout=3)
# Query for the bitmessage address corresponding to the given identity def query(self, string):
# string. If it doesn't contain a slash, id/ is prepended. We return """
# the result as (Error, Address) pair, where the Error is an error Query for the bitmessage address corresponding to the given identity
# message to display or None in case of success. string. If it doesn't contain a slash, id/ is prepended. We return
def query (self, string): the result as (Error, Address) pair, where the Error is an error
slashPos = string.find ("/") message to display or None in case of success.
"""
slashPos = string.find("/")
if slashPos < 0: if slashPos < 0:
string = "id/" + string string = "id/" + string
try: try:
if self.nmctype == "namecoind": if self.nmctype == "namecoind":
res = self.callRPC ("name_show", [string]) res = self.callRPC("name_show", [string])
res = res["value"] res = res["value"]
elif self.nmctype == "nmcontrol": elif self.nmctype == "nmcontrol":
res = self.callRPC ("data", ["getValue", string]) res = self.callRPC("data", ["getValue", string])
res = res["reply"] res = res["reply"]
if res == False: if not res:
return (tr._translate("MainWindow",'The name %1 was not found.').arg(unicode(string)), None) return (tr._translate("MainWindow", 'The name %1 was not found.').arg(unicode(string)), None)
else: else:
assert False assert False
except RPCError as exc: except RPCError as exc:
@ -107,16 +121,16 @@ class namecoinConnection (object):
errmsg = exc.error["message"] errmsg = exc.error["message"]
else: else:
errmsg = exc.error errmsg = exc.error
return (tr._translate("MainWindow",'The namecoin query failed (%1)').arg(unicode(errmsg)), None) return (tr._translate("MainWindow", 'The namecoin query failed (%1)').arg(unicode(errmsg)), None)
except Exception as exc: except Exception:
logger.exception("Namecoin query exception") logger.exception("Namecoin query exception")
return (tr._translate("MainWindow",'The namecoin query failed.'), None) return (tr._translate("MainWindow", 'The namecoin query failed.'), None)
try: try:
val = json.loads (res) val = json.loads(res)
except: except:
logger.exception("Namecoin query json exception") logger.exception("Namecoin query json exception")
return (tr._translate("MainWindow",'The name %1 has no valid JSON data.').arg(unicode(string)), None) return (tr._translate("MainWindow", 'The name %1 has no valid JSON data.').arg(unicode(string)), None)
if "bitmessage" in val: if "bitmessage" in val:
if "name" in val: if "name" in val:
@ -124,12 +138,19 @@ class namecoinConnection (object):
else: else:
ret = val["bitmessage"] ret = val["bitmessage"]
return (None, ret) return (None, ret)
return (tr._translate("MainWindow",'The name %1 has no associated Bitmessage address.').arg(unicode(string)), None) return (
tr._translate(
"MainWindow",
'The name %1 has no associated Bitmessage address.').arg(
unicode(string)),
None)
# Test the connection settings. This routine tries to query a "getinfo"
# command, and builds either an error message or a success message with
# some info from it.
def test(self): def test(self):
"""
Test the connection settings. This routine tries to query a "getinfo"
command, and builds either an error message or a success message with
some info from it.
"""
try: try:
if self.nmctype == "namecoind": if self.nmctype == "namecoind":
try: try:
@ -143,22 +164,30 @@ class namecoinConnection (object):
vers = vers / 100 vers = vers / 100
v1 = vers v1 = vers
if v3 == 0: if v3 == 0:
versStr = "0.%d.%d" % (v1, v2) versStr = "0.%d.%d" % (v1, v2)
else: else:
versStr = "0.%d.%d.%d" % (v1, v2, v3) versStr = "0.%d.%d.%d" % (v1, v2, v3)
return ('success', tr._translate("MainWindow",'Success! Namecoind version %1 running.').arg(unicode(versStr)) ) message = (
'success',
tr._translate(
"MainWindow",
'Success! Namecoind version %1 running.').arg(
unicode(versStr)))
elif self.nmctype == "nmcontrol": elif self.nmctype == "nmcontrol":
res = self.callRPC ("data", ["status"]) res = self.callRPC("data", ["status"])
prefix = "Plugin data running" prefix = "Plugin data running"
if ("reply" in res) and res["reply"][:len(prefix)] == prefix: if ("reply" in res) and res["reply"][:len(prefix)] == prefix:
return ('success', tr._translate("MainWindow",'Success! NMControll is up and running.')) return ('success', tr._translate("MainWindow", 'Success! NMControll is up and running.'))
logger.error("Unexpected nmcontrol reply: %s", res) logger.error("Unexpected nmcontrol reply: %s", res)
return ('failed', tr._translate("MainWindow",'Couldn\'t understand NMControl.')) message = ('failed', tr._translate("MainWindow", 'Couldn\'t understand NMControl.'))
else: else:
assert False print "Unsupported Namecoin type"
sys.exit(1)
return message
except Exception: except Exception:
logger.info("Namecoin connection test failure") logger.info("Namecoin connection test failure")
@ -168,20 +197,21 @@ class namecoinConnection (object):
"MainWindow", "The connection to namecoin failed.") "MainWindow", "The connection to namecoin failed.")
) )
# Helper routine that actually performs an JSON RPC call. def callRPC(self, method, params):
def callRPC (self, method, params): """Helper routine that actually performs an JSON RPC call."""
data = {"method": method, "params": params, "id": self.queryid} data = {"method": method, "params": params, "id": self.queryid}
if self.nmctype == "namecoind": if self.nmctype == "namecoind":
resp = self.queryHTTP (json.dumps (data)) resp = self.queryHTTP(json.dumps(data))
elif self.nmctype == "nmcontrol": elif self.nmctype == "nmcontrol":
resp = self.queryServer (json.dumps (data)) resp = self.queryServer(json.dumps(data))
else: else:
assert False assert False
val = json.loads (resp) val = json.loads(resp)
if val["id"] != self.queryid: if val["id"] != self.queryid:
raise Exception ("ID mismatch in JSON RPC answer.") raise Exception("ID mismatch in JSON RPC answer.")
if self.nmctype == "namecoind": if self.nmctype == "namecoind":
self.queryid = self.queryid + 1 self.queryid = self.queryid + 1
@ -190,11 +220,12 @@ class namecoinConnection (object):
return val["result"] return val["result"]
if isinstance(error, bool): if isinstance(error, bool):
raise RPCError (val["result"]) raise RPCError(val["result"])
raise RPCError (error) raise RPCError(error)
def queryHTTP(self, data):
"""Query the server via HTTP."""
# Query the server via HTTP.
def queryHTTP (self, data):
result = None result = None
try: try:
@ -206,14 +237,14 @@ class namecoinConnection (object):
self.con.putheader("Content-Length", str(len(data))) self.con.putheader("Content-Length", str(len(data)))
self.con.putheader("Accept", "application/json") self.con.putheader("Accept", "application/json")
authstr = "%s:%s" % (self.user, self.password) authstr = "%s:%s" % (self.user, self.password)
self.con.putheader("Authorization", "Basic %s" % base64.b64encode (authstr)) self.con.putheader("Authorization", "Basic %s" % base64.b64encode(authstr))
self.con.endheaders() self.con.endheaders()
self.con.send(data) self.con.send(data)
try: try:
resp = self.con.getresponse() resp = self.con.getresponse()
result = resp.read() result = resp.read()
if resp.status != 200: if resp.status != 200:
raise Exception ("Namecoin returned status %i: %s", resp.status, resp.reason) raise Exception("Namecoin returned status %i: %s" % resp.status, resp.reason)
except: except:
logger.info("HTTP receive error") logger.info("HTTP receive error")
except: except:
@ -221,41 +252,49 @@ class namecoinConnection (object):
return result return result
# Helper routine sending data to the RPC server and returning the result. def queryServer(self, data):
def queryServer (self, data): """Helper routine sending data to the RPC server and returning the result."""
try: try:
s = socket.socket (socket.AF_INET, socket.SOCK_STREAM) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.setsockopt (socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.settimeout(3) s.settimeout(3)
s.connect ((self.host, self.port)) s.connect((self.host, self.port))
s.sendall (data) s.sendall(data)
result = "" result = ""
while True: while True:
tmp = s.recv (self.bufsize) tmp = s.recv(self.bufsize)
if not tmp: if not tmp:
break break
result += tmp result += tmp
s.close () s.close()
return result return result
except socket.error as exc: except socket.error as exc:
raise Exception ("Socket error in RPC connection: %s" % str (exc)) raise Exception("Socket error in RPC connection: %s" % str(exc))
def lookupNamecoinFolder():
"""
Look up the namecoin data folder.
.. todo:: Check whether this works on other platforms as well!
"""
# Look up the namecoin data folder.
# FIXME: Check whether this works on other platforms as well!
def lookupNamecoinFolder ():
app = "namecoin" app = "namecoin"
from os import path, environ from os import path, environ
if sys.platform == "darwin": if sys.platform == "darwin":
if "HOME" in environ: if "HOME" in environ:
dataFolder = path.join (os.environ["HOME"], dataFolder = path.join(os.environ["HOME"],
"Library/Application Support/", app) + '/' "Library/Application Support/", app) + '/'
else: else:
print ("Could not find home folder, please report this message" print(
+ " and your OS X version to the BitMessage Github.") "Could not find home folder, please report this message"
" and your OS X version to the BitMessage Github."
)
sys.exit() sys.exit()
elif "win32" in sys.platform or "win64" in sys.platform: elif "win32" in sys.platform or "win64" in sys.platform:
@ -265,34 +304,38 @@ def lookupNamecoinFolder ():
return dataFolder return dataFolder
# Ensure all namecoin options are set, by setting those to default values
# that aren't there.
def ensureNamecoinOptions ():
if not BMConfigParser().has_option (configSection, "namecoinrpctype"):
BMConfigParser().set (configSection, "namecoinrpctype", "namecoind")
if not BMConfigParser().has_option (configSection, "namecoinrpchost"):
BMConfigParser().set (configSection, "namecoinrpchost", "localhost")
hasUser = BMConfigParser().has_option (configSection, "namecoinrpcuser") def ensureNamecoinOptions():
hasPass = BMConfigParser().has_option (configSection, "namecoinrpcpassword") """
hasPort = BMConfigParser().has_option (configSection, "namecoinrpcport") Ensure all namecoin options are set, by setting those to default values
that aren't there.
"""
if not BMConfigParser().has_option(configSection, "namecoinrpctype"):
BMConfigParser().set(configSection, "namecoinrpctype", "namecoind")
if not BMConfigParser().has_option(configSection, "namecoinrpchost"):
BMConfigParser().set(configSection, "namecoinrpchost", "localhost")
hasUser = BMConfigParser().has_option(configSection, "namecoinrpcuser")
hasPass = BMConfigParser().has_option(configSection, "namecoinrpcpassword")
hasPort = BMConfigParser().has_option(configSection, "namecoinrpcport")
# Try to read user/password from .namecoin configuration file. # Try to read user/password from .namecoin configuration file.
defaultUser = "" defaultUser = ""
defaultPass = "" defaultPass = ""
nmcFolder = lookupNamecoinFolder () nmcFolder = lookupNamecoinFolder()
nmcConfig = nmcFolder + "namecoin.conf" nmcConfig = nmcFolder + "namecoin.conf"
try: try:
nmc = open (nmcConfig, "r") nmc = open(nmcConfig, "r")
while True: while True:
line = nmc.readline () line = nmc.readline()
if line == "": if line == "":
break break
parts = line.split ("=") parts = line.split("=")
if len (parts) == 2: if len(parts) == 2:
key = parts[0] key = parts[0]
val = parts[1].rstrip () val = parts[1].rstrip()
if key == "rpcuser" and not hasUser: if key == "rpcuser" and not hasUser:
defaultUser = val defaultUser = val
@ -300,20 +343,20 @@ def ensureNamecoinOptions ():
defaultPass = val defaultPass = val
if key == "rpcport": if key == "rpcport":
defaults.namecoinDefaultRpcPort = val defaults.namecoinDefaultRpcPort = val
nmc.close () nmc.close()
except IOError: except IOError:
logger.error("%s unreadable or missing, Namecoin support deactivated", nmcConfig) logger.error("%s unreadable or missing, Namecoin support deactivated", nmcConfig)
except Exception as exc: except Exception:
logger.warning("Error processing namecoin.conf", exc_info=True) logger.warning("Error processing namecoin.conf", exc_info=True)
# If still nothing found, set empty at least. # If still nothing found, set empty at least.
if (not hasUser): if not hasUser:
BMConfigParser().set (configSection, "namecoinrpcuser", defaultUser) BMConfigParser().set(configSection, "namecoinrpcuser", defaultUser)
if (not hasPass): if not hasPass:
BMConfigParser().set (configSection, "namecoinrpcpassword", defaultPass) BMConfigParser().set(configSection, "namecoinrpcpassword", defaultPass)
# Set default port now, possibly to found value. # Set default port now, possibly to found value.
if (not hasPort): if not hasPort:
BMConfigParser().set (configSection, "namecoinrpcport", BMConfigParser().set(configSection, "namecoinrpcport",
defaults.namecoinDefaultRpcPort) defaults.namecoinDefaultRpcPort)

View File

@ -300,7 +300,7 @@ class BMProto(AdvancedDispatcher, ObjectTracker):
def _command_inv(self, dandelion=False): def _command_inv(self, dandelion=False):
items = self.decode_payload_content("l32s") items = self.decode_payload_content("l32s")
if len(items) >= BMProto.maxObjectCount: if len(items) > BMProto.maxObjectCount:
logger.error("Too many items in %sinv message!", "d" if dandelion else "") logger.error("Too many items in %sinv message!", "d" if dandelion else "")
raise BMProtoExcessiveDataError() raise BMProtoExcessiveDataError()
else: else:

View File

@ -180,7 +180,11 @@ class TCPConnection(BMProto, TLSDispatcher):
for hash, storedValue in bigInvList.items(): for hash, storedValue in bigInvList.items():
payload += hash payload += hash
objectCount += 1 objectCount += 1
if objectCount >= BMProto.maxObjectCount:
# Remove -1 below when sufficient time has passed for users to
# upgrade to versions of PyBitmessage that accept inv with 50,000
# items
if objectCount >= BMProto.maxObjectCount - 1:
sendChunk() sendChunk()
payload = b'' payload = b''
objectCount = 0 objectCount = 0

View File

@ -20,11 +20,12 @@ vendors = []
hash_dt = None hash_dt = None
try: try:
import numpy
import pyopencl as cl import pyopencl as cl
except: import numpy
except ImportError:
libAvailable = False libAvailable = False
def initCL(): def initCL():
global ctx, queue, program, hash_dt, libAvailable global ctx, queue, program, hash_dt, libAvailable
if libAvailable is False: if libAvailable is False:

View File

@ -16,28 +16,28 @@ class ECC:
Asymmetric encryption with Elliptic Curve Cryptography (ECC) Asymmetric encryption with Elliptic Curve Cryptography (ECC)
ECDH, ECDSA and ECIES ECDH, ECDSA and ECIES
import pyelliptic >>> import pyelliptic
alice = pyelliptic.ECC() # default curve: sect283r1 >>> alice = pyelliptic.ECC() # default curve: sect283r1
bob = pyelliptic.ECC(curve='sect571r1') >>> bob = pyelliptic.ECC(curve='sect571r1')
ciphertext = alice.encrypt("Hello Bob", bob.get_pubkey()) >>> ciphertext = alice.encrypt("Hello Bob", bob.get_pubkey())
print bob.decrypt(ciphertext) >>> print bob.decrypt(ciphertext)
signature = bob.sign("Hello Alice") >>> signature = bob.sign("Hello Alice")
# alice's job : >>> # alice's job :
print pyelliptic.ECC( >>> print pyelliptic.ECC(
pubkey=bob.get_pubkey()).verify(signature, "Hello Alice") >>> pubkey=bob.get_pubkey()).verify(signature, "Hello Alice")
# ERROR !!! >>> # ERROR !!!
try: >>> try:
key = alice.get_ecdh_key(bob.get_pubkey()) >>> key = alice.get_ecdh_key(bob.get_pubkey())
except: print("For ECDH key agreement,\ >>> except:
the keys must be defined on the same curve !") >>> print("For ECDH key agreement, the keys must be defined on the same curve !")
alice = pyelliptic.ECC(curve='sect571r1') >>> alice = pyelliptic.ECC(curve='sect571r1')
print alice.get_ecdh_key(bob.get_pubkey()).encode('hex') >>> print alice.get_ecdh_key(bob.get_pubkey()).encode('hex')
print bob.get_ecdh_key(alice.get_pubkey()).encode('hex') >>> print bob.get_ecdh_key(alice.get_pubkey()).encode('hex')
""" """
def __init__(self, pubkey=None, privkey=None, pubkey_x=None, def __init__(self, pubkey=None, privkey=None, pubkey_x=None,

View File

@ -5,14 +5,15 @@ Copyright 2006 Dan-Haim. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met: are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer. 1. Redistributions of source code must retain the above copyright notice, this
2. Redistributions in binary form must reproduce the above copyright notice, list of conditions and the following disclaimer.
this list of conditions and the following disclaimer in the documentation 2. Redistributions in binary form must reproduce the above copyright notice,
and/or other materials provided with the distribution. this list of conditions and the following disclaimer in the documentation
3. Neither the name of Dan Haim nor the names of his contributors may be used and/or other materials provided with the distribution.
to endorse or promote products derived from this software without specific 3. Neither the name of Dan Haim nor the names of his contributors may be used
prior written permission. to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY DAN HAIM "AS IS" AND ANY EXPRESS OR IMPLIED THIS SOFTWARE IS PROVIDED BY DAN HAIM "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
@ -146,19 +147,32 @@ class socksocket(socket.socket):
def setproxy(self, proxytype=None, addr=None, port=None, rdns=True, username=None, password=None): def setproxy(self, proxytype=None, addr=None, port=None, rdns=True, username=None, password=None):
"""setproxy(proxytype, addr[, port[, rdns[, username[, password]]]]) """setproxy(proxytype, addr[, port[, rdns[, username[, password]]]])
Sets the proxy to be used. Sets the proxy to be used.
proxytype - The type of the proxy to be used. Three types
are supported: PROXY_TYPE_SOCKS4 (including socks4a), proxytype
PROXY_TYPE_SOCKS5 and PROXY_TYPE_HTTP The type of the proxy to be used. Three types
addr - The address of the server (IP or DNS). are supported: PROXY_TYPE_SOCKS4 (including socks4a),
port - The port of the server. Defaults to 1080 for SOCKS PROXY_TYPE_SOCKS5 and PROXY_TYPE_HTTP
servers and 8080 for HTTP proxy servers.
rdns - Should DNS queries be preformed on the remote side addr
(rather than the local side). The default is True. The address of the server (IP or DNS).
Note: This has no effect with SOCKS4 servers.
username - Username to authenticate with to the server. port
The default is no authentication. The port of the server. Defaults to 1080 for SOCKS
password - Password to authenticate with to the server. servers and 8080 for HTTP proxy servers.
Only relevant when username is also provided.
rdns
Should DNS queries be preformed on the remote side
(rather than the local side). The default is True.
Note: This has no effect with SOCKS4 servers.
username
Username to authenticate with to the server.
The default is no authentication.
password
Password to authenticate with to the server.
Only relevant when username is also provided.
""" """
self.__proxy = (proxytype, addr, port, rdns, username, password) self.__proxy = (proxytype, addr, port, rdns, username, password)
@ -207,7 +221,7 @@ class socksocket(socket.socket):
raise Socks5AuthError((2, _socks5autherrors[2])) raise Socks5AuthError((2, _socks5autherrors[2]))
else: else:
raise GeneralProxyError((1, _generalerrors[1])) raise GeneralProxyError((1, _generalerrors[1]))
def __connectsocks5(self, destaddr, destport): def __connectsocks5(self, destaddr, destport):
# Now we can request the actual connection # Now we can request the actual connection
req = struct.pack('BBB', 0x05, 0x01, 0x00) req = struct.pack('BBB', 0x05, 0x01, 0x00)
@ -286,7 +300,7 @@ class socksocket(socket.socket):
raise GeneralProxyError((1,_generalerrors[1])) raise GeneralProxyError((1,_generalerrors[1]))
boundport = struct.unpack(">H", self.__recvall(2))[0] boundport = struct.unpack(">H", self.__recvall(2))[0]
return ip return ip
def getproxysockname(self): def getproxysockname(self):
"""getsockname() -> address info """getsockname() -> address info
Returns the bound IP address and port number at the proxy. Returns the bound IP address and port number at the proxy.

View File

@ -2,7 +2,7 @@ import collections
neededPubkeys = {} neededPubkeys = {}
streamsInWhichIAmParticipating = [] streamsInWhichIAmParticipating = []
sendDataQueues = [] #each sendData thread puts its queue in this list. sendDataQueues = [] # each sendData thread puts its queue in this list.
# For UPnP # For UPnP
extPort = None extPort = None
@ -13,21 +13,22 @@ socksIP = None
# Network protocols availability, initialised below # Network protocols availability, initialised below
networkProtocolAvailability = None networkProtocolAvailability = None
appdata = '' #holds the location of the application data storage directory appdata = '' # holds the location of the application data storage directory
shutdown = 0 #Set to 1 by the doCleanShutdown function. Used to tell the proof of work worker threads to exit.
# Set to 1 by the doCleanShutdown function.
# Used to tell the proof of work worker threads to exit.
shutdown = 0
# Component control flags - set on startup, do not change during runtime # Component control flags - set on startup, do not change during runtime
# The defaults are for standalone GUI (default operating mode) # The defaults are for standalone GUI (default operating mode)
enableNetwork = True # enable network threads enableNetwork = True # enable network threads
enableObjProc = True # enable object processing threads enableObjProc = True # enable object processing threads
enableAPI = True # enable API (if configured) enableAPI = True # enable API (if configured)
enableGUI = True # enable GUI (QT or ncurses) enableGUI = True # enable GUI (QT or ncurses)
enableSTDIO = False # enable STDIO threads enableSTDIO = False # enable STDIO threads
curses = False curses = False
sqlReady = False # set to true by sqlTread when ready for processing sqlReady = False # set to true by sqlTread when ready for processing
maximumNumberOfHalfOpenConnections = 0 maximumNumberOfHalfOpenConnections = 0
@ -56,10 +57,12 @@ missingObjects = {}
Peer = collections.namedtuple('Peer', ['host', 'port']) Peer = collections.namedtuple('Peer', ['host', 'port'])
def resetNetworkProtocolAvailability(): def resetNetworkProtocolAvailability():
global networkProtocolAvailability global networkProtocolAvailability
networkProtocolAvailability = {'IPv4': None, 'IPv6': None, 'onion': None} networkProtocolAvailability = {'IPv4': None, 'IPv6': None, 'onion': None}
resetNetworkProtocolAvailability() resetNetworkProtocolAvailability()
dandelion = 0 dandelion = 0

Binary file not shown.

View File

@ -112,7 +112,7 @@ Please type the desired email address (including @mailchuck.com) below:</source>
<context> <context>
<name>Mailchuck</name> <name>Mailchuck</name>
<message> <message>
<location filename="../bitmessageqt/account.py" line="243"/> <location filename="../bitmessageqt/account.py" line="225"/>
<source># You can use this to configure your email gateway account <source># You can use this to configure your email gateway account
# Uncomment the setting you want to use # Uncomment the setting you want to use
# Here are the options: # Here are the options:
@ -152,10 +152,54 @@ Please type the desired email address (including @mailchuck.com) below:</source>
# specified. As this scheme uses deterministic public keys, you will receive # specified. As this scheme uses deterministic public keys, you will receive
# the money directly. To turn it off again, set &quot;feeamount&quot; to 0. Requires # the money directly. To turn it off again, set &quot;feeamount&quot; to 0. Requires
# subscription. # subscription.
</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../bitmessageqt/account.py" line="301"/>
<source># You can use this to configure your email gateway account
# Uncomment the setting you want to use
# Here are the options:
#
# pgp: server
# The email gateway will create and maintain PGP keys for you and sign, verify,
# encrypt and decrypt on your behalf. When you want to use PGP but are lazy,
# use this. Requires subscription.
#
# pgp: local
# The email gateway will not conduct PGP operations on your behalf. You can
# either not use PGP at all, or use it locally.
#
# attachments: yes
# Incoming attachments in the email will be uploaded to MEGA.nz, and you can
# download them from there by following the link. Requires a subscription.
#
# attachments: no
# Attachments will be ignored.
#
# archive: yes
# Your incoming emails will be archived on the server. Use this if you need
# help with debugging problems or you need a third party proof of emails. This
# however means that the operator of the service will be able to read your
# emails even after they have been delivered to you.
#
# archive: no
# Incoming emails will be deleted from the server as soon as they are relayed
# to you.
#
# masterpubkey_btc: BIP44 xpub key or electrum v1 public seed
# offset_btc: integer (defaults to 0)
# feeamount: number with up to 8 decimal places
# feecurrency: BTC, XBT, USD, EUR or GBP
# Use these if you want to charge people who send you emails. If this is on and
# an unknown person sends you an email, they will be requested to pay the fee
# specified. As this scheme uses deterministic public keys, you will receive
# the money directly. To turn it off again, set &quot;feeamount&quot; to 0. Requires
# subscription.
</source> </source>
<translation># Tie ĉi vi povas agordi vian konton ĉe retpoŝta kluzo <translation># Tie ĉi vi povas agordi vian konton ĉe retpoŝta kluzo
# Malkomenti agordojn kiujn vi volas uzi # Malkomenti agordojn kiujn vi volas uzi
# Jenaj agordoj: # Jen agordoj:
# #
# pgp: server # pgp: server
# La retpoŝta kluzo kreos kaj prizorgos PGP-ŝlosilojn por vi por subskribi, # La retpoŝta kluzo kreos kaj prizorgos PGP-ŝlosilojn por vi por subskribi,
@ -195,122 +239,122 @@ Please type the desired email address (including @mailchuck.com) below:</source>
<context> <context>
<name>MainWindow</name> <name>MainWindow</name>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="170"/> <location filename="../bitmessageqt/__init__.py" line="166"/>
<source>Reply to sender</source> <source>Reply to sender</source>
<translation>Respondi al sendinto</translation> <translation>Respondi al sendinto</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="172"/> <location filename="../bitmessageqt/__init__.py" line="168"/>
<source>Reply to channel</source> <source>Reply to channel</source>
<translation>Respondi al kanalo</translation> <translation>Respondi al kanalo</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="174"/> <location filename="../bitmessageqt/__init__.py" line="170"/>
<source>Add sender to your Address Book</source> <source>Add sender to your Address Book</source>
<translation>Aldoni sendinton al via adresaro</translation> <translation>Aldoni sendinton al via adresaro</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="178"/> <location filename="../bitmessageqt/__init__.py" line="174"/>
<source>Add sender to your Blacklist</source> <source>Add sender to your Blacklist</source>
<translation>Aldoni sendinton al via nigra listo</translation> <translation>Aldoni sendinton al via nigra listo</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="364"/> <location filename="../bitmessageqt/__init__.py" line="372"/>
<source>Move to Trash</source> <source>Move to Trash</source>
<translation>Movi al rubujo</translation> <translation>Movi al rubujo</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="185"/> <location filename="../bitmessageqt/__init__.py" line="181"/>
<source>Undelete</source> <source>Undelete</source>
<translation>Malforigi</translation> <translation>Malforigi</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="188"/> <location filename="../bitmessageqt/__init__.py" line="184"/>
<source>View HTML code as formatted text</source> <source>View HTML code as formatted text</source>
<translation>Montri HTML-n kiel aranĝitan tekston</translation> <translation>Montri HTML-n kiel aranĝitan tekston</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="192"/> <location filename="../bitmessageqt/__init__.py" line="188"/>
<source>Save message as...</source> <source>Save message as...</source>
<translation>Konservi mesaĝon kiel</translation> <translation>Konservi mesaĝon kiel</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="196"/> <location filename="../bitmessageqt/__init__.py" line="192"/>
<source>Mark Unread</source> <source>Mark Unread</source>
<translation>Marki kiel nelegitan</translation> <translation>Marki kiel nelegitan</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="336"/> <location filename="../bitmessageqt/__init__.py" line="344"/>
<source>New</source> <source>New</source>
<translation>Nova</translation> <translation>Nova</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="121"/> <location filename="../bitmessageqt/blacklist.py" line="122"/>
<source>Enable</source> <source>Enable</source>
<translation>Ŝalti</translation> <translation>Ŝalti</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="124"/> <location filename="../bitmessageqt/blacklist.py" line="125"/>
<source>Disable</source> <source>Disable</source>
<translation>Malŝalti</translation> <translation>Malŝalti</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="127"/> <location filename="../bitmessageqt/blacklist.py" line="128"/>
<source>Set avatar...</source> <source>Set avatar...</source>
<translation>Agordi avataron</translation> <translation>Agordi avataron</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="117"/> <location filename="../bitmessageqt/blacklist.py" line="118"/>
<source>Copy address to clipboard</source> <source>Copy address to clipboard</source>
<translation>Kopii adreson al tondejo</translation> <translation>Kopii adreson al tondejo</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="283"/> <location filename="../bitmessageqt/__init__.py" line="291"/>
<source>Special address behavior...</source> <source>Special address behavior...</source>
<translation>Speciala sinteno de adreso</translation> <translation>Speciala sinteno de adreso</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="244"/> <location filename="../bitmessageqt/__init__.py" line="240"/>
<source>Email gateway</source> <source>Email gateway</source>
<translation>Retpoŝta kluzo</translation> <translation>Retpoŝta kluzo</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="114"/> <location filename="../bitmessageqt/blacklist.py" line="115"/>
<source>Delete</source> <source>Delete</source>
<translation>Forigi</translation> <translation>Forigi</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="299"/> <location filename="../bitmessageqt/__init__.py" line="307"/>
<source>Send message to this address</source> <source>Send message to this address</source>
<translation>Sendi mesaĝon al tiu adreso</translation> <translation>Sendi mesaĝon al tiu adreso</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="307"/> <location filename="../bitmessageqt/__init__.py" line="315"/>
<source>Subscribe to this address</source> <source>Subscribe to this address</source>
<translation>Aboni tiun adreson</translation> <translation>Aboni tiun adreson</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="319"/> <location filename="../bitmessageqt/__init__.py" line="327"/>
<source>Add New Address</source> <source>Add New Address</source>
<translation>Aldoni novan adreson</translation> <translation>Aldoni novan adreson</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="367"/> <location filename="../bitmessageqt/__init__.py" line="375"/>
<source>Copy destination address to clipboard</source> <source>Copy destination address to clipboard</source>
<translation>Kopii cel-adreson al tondejo</translation> <translation>Kopii cel-adreson al tondejo</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="371"/> <location filename="../bitmessageqt/__init__.py" line="379"/>
<source>Force send</source> <source>Force send</source>
<translation>Devigi sendadon</translation> <translation>Devigi sendadon</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="587"/> <location filename="../bitmessageqt/__init__.py" line="595"/>
<source>One of your addresses, %1, is an old version 1 address. Version 1 addresses are no longer supported. May we delete it now?</source> <source>One of your addresses, %1, is an old version 1 address. Version 1 addresses are no longer supported. May we delete it now?</source>
<translation>Iu de viaj adresoj, %1, estas malnova versio 1 adreso. Versioj 1 adresoj ne estas jam subtenataj. Ĉu ni povas forigi ĝin?</translation> <translation>Iu de viaj adresoj, %1, estas malnova versio 1 adreso. Versioj 1 adresoj ne estas jam subtenataj. Ĉu ni povas forigi ĝin?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1034"/> <location filename="../bitmessageqt/__init__.py" line="1039"/>
<source>Waiting for their encryption key. Will request it again soon.</source> <source>Waiting for their encryption key. Will request it again soon.</source>
<translation>Atendado je ilia ĉifroŝlosilo. Baldaŭ petos ĝin denove.</translation> <translation>Atendado je ilia ĉifroŝlosilo. Baldaŭ petos ĝin denove.</translation>
</message> </message>
@ -320,17 +364,17 @@ Please type the desired email address (including @mailchuck.com) below:</source>
<translation type="unfinished"/> <translation type="unfinished"/>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1040"/> <location filename="../bitmessageqt/__init__.py" line="1045"/>
<source>Queued.</source> <source>Queued.</source>
<translation>En atendovico.</translation> <translation>En atendovico.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1043"/> <location filename="../bitmessageqt/__init__.py" line="1048"/>
<source>Message sent. Waiting for acknowledgement. Sent at %1</source> <source>Message sent. Waiting for acknowledgement. Sent at %1</source>
<translation>Mesaĝo sendita. Atendado je konfirmo. Sendita je %1</translation> <translation>Mesaĝo sendita. Atendado je konfirmo. Sendita je %1</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1046"/> <location filename="../bitmessageqt/__init__.py" line="1051"/>
<source>Message sent. Sent at %1</source> <source>Message sent. Sent at %1</source>
<translation>Mesaĝo sendita. Sendita je %1</translation> <translation>Mesaĝo sendita. Sendita je %1</translation>
</message> </message>
@ -340,47 +384,47 @@ Please type the desired email address (including @mailchuck.com) below:</source>
<translation type="unfinished"/> <translation type="unfinished"/>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1052"/> <location filename="../bitmessageqt/__init__.py" line="1057"/>
<source>Acknowledgement of the message received %1</source> <source>Acknowledgement of the message received %1</source>
<translation>Ricevis konfirmon de la mesaĝo je %1</translation> <translation>Ricevis konfirmon de la mesaĝo je %1</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2140"/> <location filename="../bitmessageqt/__init__.py" line="2149"/>
<source>Broadcast queued.</source> <source>Broadcast queued.</source>
<translation>Elsendo en atendovico.</translation> <translation>Elsendo en atendovico.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1061"/> <location filename="../bitmessageqt/__init__.py" line="1066"/>
<source>Broadcast on %1</source> <source>Broadcast on %1</source>
<translation>Elsendo je %1</translation> <translation>Elsendo je %1</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1064"/> <location filename="../bitmessageqt/__init__.py" line="1069"/>
<source>Problem: The work demanded by the recipient is more difficult than you are willing to do. %1</source> <source>Problem: The work demanded by the recipient is more difficult than you are willing to do. %1</source>
<translation>Problemo: la demandita laboro de la ricevonto estas pli malfacila ol vi pretas fari. %1</translation> <translation>Problemo: la demandita laboro de la ricevonto estas pli malfacila ol vi pretas fari. %1</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1067"/> <location filename="../bitmessageqt/__init__.py" line="1072"/>
<source>Problem: The recipient&apos;s encryption key is no good. Could not encrypt message. %1</source> <source>Problem: The recipient&apos;s encryption key is no good. Could not encrypt message. %1</source>
<translation>Problemo: la ĉifroŝlosilo de la ricevonto estas rompita. Ne povis ĉifri la mesaĝon. %1</translation> <translation>Problemo: la ĉifroŝlosilo de la ricevonto estas rompita. Ne povis ĉifri la mesaĝon. %1</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1070"/> <location filename="../bitmessageqt/__init__.py" line="1075"/>
<source>Forced difficulty override. Send should start soon.</source> <source>Forced difficulty override. Send should start soon.</source>
<translation>Devigita superado de limito de malfacilaĵo. Sendado devus baldaŭ komenci.</translation> <translation>Devigita superado de limito de malfacilaĵo. Sendado devus baldaŭ komenci.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1073"/> <location filename="../bitmessageqt/__init__.py" line="1078"/>
<source>Unknown status: %1 %2</source> <source>Unknown status: %1 %2</source>
<translation>Nekonata stato: %1 %2</translation> <translation>Nekonata stato: %1 %2</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1612"/> <location filename="../bitmessageqt/__init__.py" line="1619"/>
<source>Not Connected</source> <source>Not Connected</source>
<translation>Ne konektita</translation> <translation>Ne konektita</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1204"/> <location filename="../bitmessageqt/__init__.py" line="1209"/>
<source>Show Bitmessage</source> <source>Show Bitmessage</source>
<translation>Montri Bitmesaĝon</translation> <translation>Montri Bitmesaĝon</translation>
</message> </message>
@ -390,12 +434,12 @@ Please type the desired email address (including @mailchuck.com) below:</source>
<translation>Sendi</translation> <translation>Sendi</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1227"/> <location filename="../bitmessageqt/__init__.py" line="1232"/>
<source>Subscribe</source> <source>Subscribe</source>
<translation>Aboni</translation> <translation>Aboni</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1233"/> <location filename="../bitmessageqt/__init__.py" line="1238"/>
<source>Channel</source> <source>Channel</source>
<translation>Kanalo</translation> <translation>Kanalo</translation>
</message> </message>
@ -405,70 +449,70 @@ Please type the desired email address (including @mailchuck.com) below:</source>
<translation>Eliri</translation> <translation>Eliri</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1459"/> <location filename="../bitmessageqt/__init__.py" line="1464"/>
<source>You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file.</source> <source>You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file.</source>
<translation>Vi povas administri viajn ŝlosilojn per redakti la dosieron keys.dat en la sama dosierujo kiel tiu programo. Estas grava, ke vi faru sekurkopion de tiu dosiero.</translation> <translation>Vi povas administri viajn ŝlosilojn per redakti la dosieron keys.dat en la sama dosierujo kiel tiu programo. Estas grava, ke vi faru sekurkopion de tiu dosiero.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1463"/> <location filename="../bitmessageqt/__init__.py" line="1468"/>
<source>You may manage your keys by editing the keys.dat file stored in <source>You may manage your keys by editing the keys.dat file stored in
%1 %1
It is important that you back up this file.</source> It is important that you back up this file.</source>
<translation>Vi povas administri viajn ŝlosilojn per redakti la dosieron keys.dat en la dosierujo <translation>Vi povas administri viajn ŝlosilojn per redakti la dosieron keys.dat en la dosierujo
%1. %1.
Estas grava, ke vi faru sekurkopion de tiu dosiero.</translation> Estas grava, ke vi faru sekurkopion de tiu dosiero.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1470"/> <location filename="../bitmessageqt/__init__.py" line="1475"/>
<source>Open keys.dat?</source> <source>Open keys.dat?</source>
<translation>Ĉu malfermi keys.dat?</translation> <translation>Ĉu malfermi keys.dat?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1467"/> <location filename="../bitmessageqt/__init__.py" line="1472"/>
<source>You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.)</source> <source>You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.)</source>
<translation>Vi povas administri viajn ŝlosilojn per redakti la dosieron keys.dat en la sama dosierujo kiel tiu programo. Estas grava ke vi faru sekurkopion de tiu dosiero. Ĉu vi volas malfermi la dosieron nun? (Bonvolu certigi ke Bitmesaĝo estas fermita antaŭ fari ŝanĝojn.)</translation> <translation>Vi povas administri viajn ŝlosilojn per redakti la dosieron keys.dat en la sama dosierujo kiel tiu programo. Estas grava ke vi faru sekurkopion de tiu dosiero. Ĉu vi volas malfermi la dosieron nun? (Bonvolu certigi ke Bitmesaĝo estas fermita antaŭ fari ŝanĝojn.)</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1470"/> <location filename="../bitmessageqt/__init__.py" line="1475"/>
<source>You may manage your keys by editing the keys.dat file stored in <source>You may manage your keys by editing the keys.dat file stored in
%1 %1
It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.)</source> It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.)</source>
<translation>Vi povas administri viajn ŝlosilojn per redakti la dosieron keys.dat en la dosierujo <translation>Vi povas administri viajn ŝlosilojn per redakti la dosieron keys.dat en la dosierujo
%1. %1.
Estas grava, ke vi faru sekurkopion de tiu dosiero. Ĉu vi volas malfermi la dosieron nun? (Bonvolu certigi ke Bitmesaĝo estas fermita antaŭ fari ŝanĝojn.)</translation> Estas grava, ke vi faru sekurkopion de tiu dosiero. Ĉu vi volas malfermi la dosieron nun? (Bonvolu certigi ke Bitmesaĝo estas fermita antaŭ fari ŝanĝojn.)</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1477"/> <location filename="../bitmessageqt/__init__.py" line="1482"/>
<source>Delete trash?</source> <source>Delete trash?</source>
<translation>Ĉu malplenigi rubujon?</translation> <translation>Ĉu malplenigi rubujon?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1477"/> <location filename="../bitmessageqt/__init__.py" line="1482"/>
<source>Are you sure you want to delete all trashed messages?</source> <source>Are you sure you want to delete all trashed messages?</source>
<translation>Ĉu vi certe volas forviŝi ĉiujn mesaĝojn el la rubujo?</translation> <translation>Ĉu vi certe volas forviŝi ĉiujn mesaĝojn el la rubujo?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1495"/> <location filename="../bitmessageqt/__init__.py" line="1500"/>
<source>bad passphrase</source> <source>bad passphrase</source>
<translation>malprava pasvorto</translation> <translation>malprava pasvorto</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1495"/> <location filename="../bitmessageqt/__init__.py" line="1500"/>
<source>You must type your passphrase. If you don&apos;t have one then this is not the form for you.</source> <source>You must type your passphrase. If you don&apos;t have one then this is not the form for you.</source>
<translation>Vi devas tajpi vian pasvorton. Se vi ne havas pasvorton, tiu ĉi ne estas la prava formularo por vi.</translation> <translation>Vi devas tajpi vian pasvorton. Se vi ne havas pasvorton, tiu ĉi ne estas la prava formularo por vi.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1518"/> <location filename="../bitmessageqt/__init__.py" line="1523"/>
<source>Bad address version number</source> <source>Bad address version number</source>
<translation>Erara numero de adresversio</translation> <translation>Erara numero de adresversio</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1508"/> <location filename="../bitmessageqt/__init__.py" line="1513"/>
<source>Your address version number must be a number: either 3 or 4.</source> <source>Your address version number must be a number: either 3 or 4.</source>
<translation>Via numero de adresversio devas esti: 3 4.</translation> <translation>Via numero de adresversio devas esti: 3 4.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1518"/> <location filename="../bitmessageqt/__init__.py" line="1523"/>
<source>Your address version number must be either 3 or 4.</source> <source>Your address version number must be either 3 or 4.</source>
<translation>Via numero de adresversio devas esti: 3 4.</translation> <translation>Via numero de adresversio devas esti: 3 4.</translation>
</message> </message>
@ -538,22 +582,22 @@ Estas grava, ke vi faru sekurkopion de tiu dosiero. Ĉu vi volas malfermi la dos
<translation type="unfinished"/> <translation type="unfinished"/>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1597"/> <location filename="../bitmessageqt/__init__.py" line="1604"/>
<source>Connection lost</source> <source>Connection lost</source>
<translation>Perdis konekton</translation> <translation>Perdis konekton</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1647"/> <location filename="../bitmessageqt/__init__.py" line="1654"/>
<source>Connected</source> <source>Connected</source>
<translation>Konektita</translation> <translation>Konektita</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1765"/> <location filename="../bitmessageqt/__init__.py" line="1774"/>
<source>Message trashed</source> <source>Message trashed</source>
<translation>Movis mesaĝon al rubujo</translation> <translation>Movis mesaĝon al rubujo</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1854"/> <location filename="../bitmessageqt/__init__.py" line="1863"/>
<source>The TTL, or Time-To-Live is the length of time that the network will hold the message. <source>The TTL, or Time-To-Live is the length of time that the network will hold the message.
The recipient must get it during this time. If your Bitmessage client does not hear an acknowledgement, it The recipient must get it during this time. If your Bitmessage client does not hear an acknowledgement, it
will resend the message automatically. The longer the Time-To-Live, the will resend the message automatically. The longer the Time-To-Live, the
@ -561,19 +605,19 @@ Estas grava, ke vi faru sekurkopion de tiu dosiero. Ĉu vi volas malfermi la dos
<translation>La vivdaŭro signifas ĝis kiam la reto tenos la mesaĝon. La ricevonto devos elŝuti ĝin dum tiu tempo. Se via bitmesaĝa kliento ne ricevos konfirmon, ĝi resendos mesaĝon aŭtomate. Ju pli longa vivdaŭro, des pli laboron via komputilo bezonos fari por sendi mesaĝon. Vivdaŭro proksimume kvin kvar horoj estas ofte konvena.</translation> <translation>La vivdaŭro signifas ĝis kiam la reto tenos la mesaĝon. La ricevonto devos elŝuti ĝin dum tiu tempo. Se via bitmesaĝa kliento ne ricevos konfirmon, ĝi resendos mesaĝon aŭtomate. Ju pli longa vivdaŭro, des pli laboron via komputilo bezonos fari por sendi mesaĝon. Vivdaŭro proksimume kvin kvar horoj estas ofte konvena.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1899"/> <location filename="../bitmessageqt/__init__.py" line="1908"/>
<source>Message too long</source> <source>Message too long</source>
<translation>Mesaĝo tro longa</translation> <translation>Mesaĝo tro longa</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1899"/> <location filename="../bitmessageqt/__init__.py" line="1908"/>
<source>The message that you are trying to send is too long by %1 bytes. (The maximum is 261644 bytes). Please cut it down before sending.</source> <source>The message that you are trying to send is too long by %1 bytes. (The maximum is 261644 bytes). Please cut it down before sending.</source>
<translation>La mesaĝon kiun vi provis sendi estas tro longa je %1 bitokoj. (La maksimumo estas 261644 bitokoj.) Bonvolu mallongigi ĝin antaŭ sendado.</translation> <translation>La mesaĝon kiun vi provis sendi estas tro longa je %1 bitokoj. (La maksimumo estas 261644 bitokoj.) Bonvolu mallongigi ĝin antaŭ sendado.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1941"/> <location filename="../bitmessageqt/__init__.py" line="1950"/>
<source>Error: Your account wasn&apos;t registered at an email gateway. Sending registration now as %1, please wait for the registration to be processed before retrying sending.</source> <source>Error: Your account wasn&apos;t registered at an email gateway. Sending registration now as %1, please wait for the registration to be processed before retrying sending.</source>
<translation>Eraro: Via konto ne estas registrita je retpoŝta kluzo. Registranta nun kiel %1, bonvolu atendi ĝis la registrado finos antaŭ vi reprovos sendi iun ajn.</translation> <translation>Eraro: via konto ne estas registrita je retpoŝta kluzo. Registranta nun kiel %1, bonvolu atendi ĝis la registrado finos antaŭ vi reprovos sendi iun ajn.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2008"/> <location filename="../bitmessageqt/__init__.py" line="2008"/>
@ -616,57 +660,57 @@ Estas grava, ke vi faru sekurkopion de tiu dosiero. Ĉu vi volas malfermi la dos
<translation type="unfinished"/> <translation type="unfinished"/>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2092"/> <location filename="../bitmessageqt/__init__.py" line="2101"/>
<source>Error: You must specify a From address. If you don&apos;t have one, go to the &apos;Your Identities&apos; tab.</source> <source>Error: You must specify a From address. If you don&apos;t have one, go to the &apos;Your Identities&apos; tab.</source>
<translation>Eraro: Vi devas elekti sendontan adreson. Se vi ne havas iun, iru al langeto &apos;Viaj identigoj&apos;.</translation> <translation>Eraro: Vi devas elekti sendontan adreson. Se vi ne havas iun, iru al langeto &apos;Viaj identigoj&apos;.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2026"/> <location filename="../bitmessageqt/__init__.py" line="2035"/>
<source>Address version number</source> <source>Address version number</source>
<translation>Numero de adresversio</translation> <translation>Numero de adresversio</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2026"/> <location filename="../bitmessageqt/__init__.py" line="2035"/>
<source>Concerning the address %1, Bitmessage cannot understand address version numbers of %2. Perhaps upgrade Bitmessage to the latest version.</source> <source>Concerning the address %1, Bitmessage cannot understand address version numbers of %2. Perhaps upgrade Bitmessage to the latest version.</source>
<translation>Dum prilaborado de adreso adreso %1, Bitmesaĝo ne povas kompreni numerojn %2 de adresversioj. Eble ĝisdatigu Bitmesaĝon al la plej nova versio.</translation> <translation>Dum prilaborado de adreso adreso %1, Bitmesaĝo ne povas kompreni numerojn %2 de adresversioj. Eble ĝisdatigu Bitmesaĝon al la plej nova versio.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2030"/> <location filename="../bitmessageqt/__init__.py" line="2039"/>
<source>Stream number</source> <source>Stream number</source>
<translation>Fluo numero</translation> <translation>Fluo numero</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2030"/> <location filename="../bitmessageqt/__init__.py" line="2039"/>
<source>Concerning the address %1, Bitmessage cannot handle stream numbers of %2. Perhaps upgrade Bitmessage to the latest version.</source> <source>Concerning the address %1, Bitmessage cannot handle stream numbers of %2. Perhaps upgrade Bitmessage to the latest version.</source>
<translation>Dum prilaborado de adreso %1, Bitmesaĝo ne povas priservi %2 fluojn numerojn. Eble ĝisdatigu Bitmesaĝon al la plej nova versio.</translation> <translation>Dum prilaborado de adreso %1, Bitmesaĝo ne povas priservi %2 fluojn numerojn. Eble ĝisdatigu Bitmesaĝon al la plej nova versio.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2035"/> <location filename="../bitmessageqt/__init__.py" line="2044"/>
<source>Warning: You are currently not connected. Bitmessage will do the work necessary to send the message but it won&apos;t send until you connect.</source> <source>Warning: You are currently not connected. Bitmessage will do the work necessary to send the message but it won&apos;t send until you connect.</source>
<translation>Atentu: Vi ne estas nun konektita. Bitmesaĝo faros necesan laboron por sendi mesaĝon, tamen ĝi ne sendos ĝin antaŭ vi konektos.</translation> <translation>Atentu: vi ne estas nun konektita. Bitmesaĝo faros necesan laboron por sendi mesaĝon, tamen ĝi ne sendos ĝin antaŭ vi konektos.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2084"/> <location filename="../bitmessageqt/__init__.py" line="2093"/>
<source>Message queued.</source> <source>Message queued.</source>
<translation>Mesaĝo envicigita.</translation> <translation>Mesaĝo envicigita.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2088"/> <location filename="../bitmessageqt/__init__.py" line="2097"/>
<source>Your &apos;To&apos; field is empty.</source> <source>Your &apos;To&apos; field is empty.</source>
<translation>Via &quot;Ricevonto&quot;-kampo malplenas.</translation> <translation>Via &quot;Ricevonto&quot;-kampo malplenas.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2149"/> <location filename="../bitmessageqt/__init__.py" line="2158"/>
<source>Right click one or more entries in your address book and select &apos;Send message to this address&apos;.</source> <source>Right click one or more entries in your address book and select &apos;Send message to this address&apos;.</source>
<translation>Dekstre alklaku kelka(j)n elemento(j)n en via adresaro kaj elektu &apos;Sendi mesaĝon al tiu adreso&apos;.</translation> <translation>Dekstre alklaku kelka(j)n elemento(j)n en via adresaro kaj elektu &apos;Sendi mesaĝon al tiu adreso&apos;.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2165"/> <location filename="../bitmessageqt/__init__.py" line="2174"/>
<source>Fetched address from namecoin identity.</source> <source>Fetched address from namecoin identity.</source>
<translation>Venigis adreson de namecoin-a identigo.</translation> <translation>Venigis adreson de namecoin-a identigo.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2277"/> <location filename="../bitmessageqt/__init__.py" line="2286"/>
<source>New Message</source> <source>New Message</source>
<translation>Nova mesaĝo</translation> <translation>Nova mesaĝo</translation>
</message> </message>
@ -681,59 +725,59 @@ Estas grava, ke vi faru sekurkopion de tiu dosiero. Ĉu vi volas malfermi la dos
<translation type="unfinished"/> <translation type="unfinished"/>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="59"/> <location filename="../bitmessageqt/blacklist.py" line="60"/>
<source>Address is valid.</source> <source>Address is valid.</source>
<translation>Adreso estas ĝusta.</translation> <translation>Adreso estas ĝusta.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="93"/> <location filename="../bitmessageqt/blacklist.py" line="94"/>
<source>The address you entered was invalid. Ignoring it.</source> <source>The address you entered was invalid. Ignoring it.</source>
<translation>La adreso kiun vi enmetis estas malĝusta. Ignoras ĝin.</translation> <translation>La adreso kiun vi enmetis estas malĝusta. Ignoras ĝin.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2307"/> <location filename="../bitmessageqt/__init__.py" line="2316"/>
<source>Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want.</source> <source>Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want.</source>
<translation>Eraro: Vi ne povas duoble aldoni la saman adreson al via adresaro. Provu renomi la ekzistan se vi volas.</translation> <translation>Eraro: Vi ne povas duoble aldoni la saman adreson al via adresaro. Provu renomi la ekzistan se vi volas.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3333"/> <location filename="../bitmessageqt/__init__.py" line="3343"/>
<source>Error: You cannot add the same address to your subscriptions twice. Perhaps rename the existing one if you want.</source> <source>Error: You cannot add the same address to your subscriptions twice. Perhaps rename the existing one if you want.</source>
<translation>Eraro: Vi ne povas aldoni duoble la saman adreson al viaj abonoj. Eble renomi la ekzistan se vi volas.</translation> <translation>Eraro: Vi ne povas aldoni duoble la saman adreson al viaj abonoj. Eble renomi la ekzistan se vi volas.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2429"/> <location filename="../bitmessageqt/__init__.py" line="2438"/>
<source>Restart</source> <source>Restart</source>
<translation>Restartigi</translation> <translation>Restartigi</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2415"/> <location filename="../bitmessageqt/__init__.py" line="2424"/>
<source>You must restart Bitmessage for the port number change to take effect.</source> <source>You must restart Bitmessage for the port number change to take effect.</source>
<translation>Vi devas restartigi Bitmesaĝon por ke la ŝanĝo de la numero de pordo (Port Number) efektivigu.</translation> <translation>Vi devas restartigi Bitmesaĝon por ke ŝanĝo de numero de pordo efektivigu.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2429"/> <location filename="../bitmessageqt/__init__.py" line="2438"/>
<source>Bitmessage will use your proxy from now on but you may want to manually restart Bitmessage now to close existing connections (if any).</source> <source>Bitmessage will use your proxy from now on but you may want to manually restart Bitmessage now to close existing connections (if any).</source>
<translation>Bitmesaĝo uzos retperanton (proxy) ekde nun, sed eble vi volas permane restartigi Bitmesaĝon nun, por ke ĝi fermu eblajn ekzistajn konektojn.</translation> <translation>Bitmesaĝo uzos retperanton (proxy) ekde nun, sed eble vi volas permane restartigi Bitmesaĝon nun, por ke ĝi fermu eblajn ekzistajn konektojn.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2458"/> <location filename="../bitmessageqt/__init__.py" line="2467"/>
<source>Number needed</source> <source>Number needed</source>
<translation>Numero bezonata</translation> <translation>Numero bezonata</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2458"/> <location filename="../bitmessageqt/__init__.py" line="2467"/>
<source>Your maximum download and upload rate must be numbers. Ignoring what you typed.</source> <source>Your maximum download and upload rate must be numbers. Ignoring what you typed.</source>
<translation>Maksimumaj elŝutrapido kaj alŝutrapido devas esti numeroj. Ignoras kion vi enmetis.</translation> <translation>Maksimumaj elŝutrapido kaj alŝutrapido devas esti numeroj. Ignoras kion vi enmetis.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2538"/> <location filename="../bitmessageqt/__init__.py" line="2547"/>
<source>Will not resend ever</source> <source>Will not resend ever</source>
<translation>Resendos neniam</translation> <translation>Resendos neniam</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2538"/> <location filename="../bitmessageqt/__init__.py" line="2547"/>
<source>Note that the time limit you entered is less than the amount of time Bitmessage waits for the first resend attempt therefore your messages will never be resent.</source> <source>Note that the time limit you entered is less than the amount of time Bitmessage waits for the first resend attempt therefore your messages will never be resent.</source>
<translation>Rigardu, ke la templimon vi enmetis estas pli malgrandan ol tempo dum kiu Bitmesaĝo atendas por resendi unuafoje, do viaj mesaĝoj estos senditaj neniam.</translation> <translation>Rimarku, ke la templimon vi enmetis estas pli malgranda ol tempo dum kiu Bitmesaĝo atendas por resendi unuafoje, do viaj mesaĝoj estos senditaj neniam.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2611"/> <location filename="../bitmessageqt/__init__.py" line="2611"/>
@ -766,24 +810,24 @@ Estas grava, ke vi faru sekurkopion de tiu dosiero. Ĉu vi volas malfermi la dos
<translation>Vi ja vere bezonas pasfrazon.</translation> <translation>Vi ja vere bezonas pasfrazon.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3012"/> <location filename="../bitmessageqt/__init__.py" line="3022"/>
<source>Address is gone</source> <source>Address is gone</source>
<translation>Adreso foriris</translation> <translation>Adreso foriris</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3012"/> <location filename="../bitmessageqt/__init__.py" line="3022"/>
<source>Bitmessage cannot find your address %1. Perhaps you removed it?</source> <source>Bitmessage cannot find your address %1. Perhaps you removed it?</source>
<translation>Bitmesaĝo ne povas trovi vian adreson %1. Ĉu eble vi forviŝis ĝin?</translation> <translation>Bitmesaĝo ne povas trovi vian adreson %1. Ĉu eble vi forviŝis ĝin?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3015"/> <location filename="../bitmessageqt/__init__.py" line="3025"/>
<source>Address disabled</source> <source>Address disabled</source>
<translation>Adreso malŝaltita</translation> <translation>Adreso malŝaltita</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3015"/> <location filename="../bitmessageqt/__init__.py" line="3025"/>
<source>Error: The address from which you are trying to send is disabled. You&apos;ll have to enable it on the &apos;Your Identities&apos; tab before using it.</source> <source>Error: The address from which you are trying to send is disabled. You&apos;ll have to enable it on the &apos;Your Identities&apos; tab before using it.</source>
<translation>Eraro: La adreso kun kiu vi provas sendi estas malŝaltita. Vi devos ĝin ŝalti en la langeto &apos;Viaj identigoj&apos; antaŭ uzi ĝin.</translation> <translation>Eraro: la adreso kun kiu vi provas sendi estas malŝaltita. Vi devos ĝin ŝalti en la langeto &apos;Viaj identigoj&apos; antaŭ uzi ĝin.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3020"/> <location filename="../bitmessageqt/__init__.py" line="3020"/>
@ -791,42 +835,42 @@ Estas grava, ke vi faru sekurkopion de tiu dosiero. Ĉu vi volas malfermi la dos
<translation type="unfinished"/> <translation type="unfinished"/>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3090"/> <location filename="../bitmessageqt/__init__.py" line="3100"/>
<source>Entry added to the blacklist. Edit the label to your liking.</source> <source>Entry added to the blacklist. Edit the label to your liking.</source>
<translation>Aldonis elementon al la nigra listo. Redaktu la etikedon laŭvole.</translation> <translation>Aldonis elementon al la nigra listo. Redaktu la etikedon laŭvole.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3095"/> <location filename="../bitmessageqt/__init__.py" line="3105"/>
<source>Error: You cannot add the same address to your blacklist twice. Try renaming the existing one if you want.</source> <source>Error: You cannot add the same address to your blacklist twice. Try renaming the existing one if you want.</source>
<translation>Eraro: Vi ne povas duoble aldoni la saman adreson al via nigra listo. Provu renomi la jaman se vi volas.</translation> <translation>Eraro: vi ne povas duoble aldoni la saman adreson al via nigra listo. Provu renomi la jaman se vi volas.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3237"/> <location filename="../bitmessageqt/__init__.py" line="3247"/>
<source>Moved items to trash.</source> <source>Moved items to trash.</source>
<translation>Movis elementojn al rubujo.</translation> <translation>Movis elementojn al rubujo.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3181"/> <location filename="../bitmessageqt/__init__.py" line="3191"/>
<source>Undeleted item.</source> <source>Undeleted item.</source>
<translation>Malforigis elementon.</translation> <translation>Malforigis elementon.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3205"/> <location filename="../bitmessageqt/__init__.py" line="3215"/>
<source>Save As...</source> <source>Save As...</source>
<translation>Konservi kiel</translation> <translation>Konservi kiel</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3214"/> <location filename="../bitmessageqt/__init__.py" line="3224"/>
<source>Write error.</source> <source>Write error.</source>
<translation>Skriberaro.</translation> <translation>Skriberaro.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3317"/> <location filename="../bitmessageqt/__init__.py" line="3327"/>
<source>No addresses selected.</source> <source>No addresses selected.</source>
<translation>Neniu adreso elektita.</translation> <translation>Neniu adreso elektita.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3372"/> <location filename="../bitmessageqt/__init__.py" line="3382"/>
<source>If you delete the subscription, messages that you already received will become inaccessible. Maybe you can consider disabling the subscription instead. Disabled subscriptions will not receive new messages, but you can still view messages you already received. <source>If you delete the subscription, messages that you already received will become inaccessible. Maybe you can consider disabling the subscription instead. Disabled subscriptions will not receive new messages, but you can still view messages you already received.
Are you sure you want to delete the subscription?</source> Are you sure you want to delete the subscription?</source>
@ -835,7 +879,7 @@ Are you sure you want to delete the subscription?</source>
Ĉu vi certe volas forigi la abonon?</translation> Ĉu vi certe volas forigi la abonon?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3615"/> <location filename="../bitmessageqt/__init__.py" line="3629"/>
<source>If you delete the channel, messages that you already received will become inaccessible. Maybe you can consider disabling the channel instead. Disabled channels will not receive new messages, but you can still view messages you already received. <source>If you delete the channel, messages that you already received will become inaccessible. Maybe you can consider disabling the channel instead. Disabled channels will not receive new messages, but you can still view messages you already received.
Are you sure you want to delete the channel?</source> Are you sure you want to delete the channel?</source>
@ -844,32 +888,32 @@ Are you sure you want to delete the channel?</source>
Ĉu vi certe volas forigi la kanalon?</translation> Ĉu vi certe volas forigi la kanalon?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3745"/> <location filename="../bitmessageqt/__init__.py" line="3759"/>
<source>Do you really want to remove this avatar?</source> <source>Do you really want to remove this avatar?</source>
<translation>Ĉu vi certe volas forviŝi tiun ĉi avataron?</translation> <translation>Ĉu vi certe volas forviŝi tiun ĉi avataron?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3753"/> <location filename="../bitmessageqt/__init__.py" line="3767"/>
<source>You have already set an avatar for this address. Do you really want to overwrite it?</source> <source>You have already set an avatar for this address. Do you really want to overwrite it?</source>
<translation>Vi jam agordis avataron por tiu ĉi adreso. Ĉu vi vere volas superskribi ĝin?</translation> <translation>Vi jam agordis avataron por tiu ĉi adreso. Ĉu vi vere volas superskribi ĝin?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="4151"/> <location filename="../bitmessageqt/__init__.py" line="4169"/>
<source>Start-on-login not yet supported on your OS.</source> <source>Start-on-login not yet supported on your OS.</source>
<translation>Starto-dum-ensaluto ne estas ankoraŭ ebla en via operaciumo.</translation> <translation>Starto-dum-ensaluto ne estas ankoraŭ ebla en via operaciumo.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="4144"/> <location filename="../bitmessageqt/__init__.py" line="4162"/>
<source>Minimize-to-tray not yet supported on your OS.</source> <source>Minimize-to-tray not yet supported on your OS.</source>
<translation>Plejetigo al taskopleto ne estas ankoraŭ ebla en via operaciumo.</translation> <translation>Plejetigo al taskopleto ne estas ankoraŭ ebla en via operaciumo.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="4147"/> <location filename="../bitmessageqt/__init__.py" line="4165"/>
<source>Tray notifications not yet supported on your OS.</source> <source>Tray notifications not yet supported on your OS.</source>
<translation>Taskopletaj sciigoj ne estas ankoraŭ eblaj en via operaciumo.</translation> <translation>Taskopletaj sciigoj ne estas ankoraŭ eblaj en via operaciumo.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="4318"/> <location filename="../bitmessageqt/__init__.py" line="4336"/>
<source>Testing...</source> <source>Testing...</source>
<translation>Testado</translation> <translation>Testado</translation>
</message> </message>
@ -1119,7 +1163,7 @@ Are you sure you want to delete the channel?</source>
<translation>Anigi / krei kanalon</translation> <translation>Anigi / krei kanalon</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/foldertree.py" line="181"/> <location filename="../bitmessageqt/foldertree.py" line="206"/>
<source>All accounts</source> <source>All accounts</source>
<translation>Ĉiuj kontoj</translation> <translation>Ĉiuj kontoj</translation>
</message> </message>
@ -1129,12 +1173,12 @@ Are you sure you want to delete the channel?</source>
<translation>Pligrandigo: %1</translation> <translation>Pligrandigo: %1</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="90"/> <location filename="../bitmessageqt/blacklist.py" line="91"/>
<source>Error: You cannot add the same address to your list twice. Perhaps rename the existing one if you want.</source> <source>Error: You cannot add the same address to your list twice. Perhaps rename the existing one if you want.</source>
<translation>Eraro: Vi ne povas aldoni duoble la saman adreson al via listo. Eble renomi la jaman se vi volas.</translation> <translation>Eraro: Vi ne povas aldoni duoble la saman adreson al via listo. Eble renomi la jaman se vi volas.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="111"/> <location filename="../bitmessageqt/blacklist.py" line="112"/>
<source>Add new entry</source> <source>Add new entry</source>
<translation>Aldoni novan elementon</translation> <translation>Aldoni novan elementon</translation>
</message> </message>
@ -1144,42 +1188,42 @@ Are you sure you want to delete the channel?</source>
<translation type="unfinished"/> <translation type="unfinished"/>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1774"/> <location filename="../bitmessageqt/__init__.py" line="1783"/>
<source>New version of PyBitmessage is available: %1. Download it from https://github.com/Bitmessage/PyBitmessage/releases/latest</source> <source>New version of PyBitmessage is available: %1. Download it from https://github.com/Bitmessage/PyBitmessage/releases/latest</source>
<translation>La nova versio de PyBitmessage estas disponebla: %1. Elŝutu ĝin de https://github.com/Bitmessage/PyBitmessage/releases/latest</translation> <translation>La nova versio de PyBitmessage estas disponebla: %1. Elŝutu ĝin de https://github.com/Bitmessage/PyBitmessage/releases/latest</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2774"/> <location filename="../bitmessageqt/__init__.py" line="2785"/>
<source>Waiting for PoW to finish... %1%</source> <source>Waiting for PoW to finish... %1%</source>
<translation>Atendado ĝis laborpruvo finiĝos %1%</translation> <translation>Atendado ĝis laborpruvo finiĝos %1%</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2784"/> <location filename="../bitmessageqt/__init__.py" line="2795"/>
<source>Shutting down Pybitmessage... %1%</source> <source>Shutting down Pybitmessage... %1%</source>
<translation>Fermado de PyBitmessage %1%</translation> <translation>Fermado de PyBitmessage %1%</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2802"/> <location filename="../bitmessageqt/__init__.py" line="2814"/>
<source>Waiting for objects to be sent... %1%</source> <source>Waiting for objects to be sent... %1%</source>
<translation>Atendado ĝis objektoj estos senditaj %1%</translation> <translation>Atendado ĝis objektoj estos senditaj %1%</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2822"/> <location filename="../bitmessageqt/__init__.py" line="2832"/>
<source>Saving settings... %1%</source> <source>Saving settings... %1%</source>
<translation>Konservado de agordoj %1%</translation> <translation>Konservado de agordoj %1%</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2835"/> <location filename="../bitmessageqt/__init__.py" line="2845"/>
<source>Shutting down core... %1%</source> <source>Shutting down core... %1%</source>
<translation>Fermado de kerno %1%</translation> <translation>Fermado de kerno %1%</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2841"/> <location filename="../bitmessageqt/__init__.py" line="2851"/>
<source>Stopping notifications... %1%</source> <source>Stopping notifications... %1%</source>
<translation>Haltigado de sciigoj %1%</translation> <translation>Haltigado de sciigoj %1%</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2845"/> <location filename="../bitmessageqt/__init__.py" line="2855"/>
<source>Shutdown imminent... %1%</source> <source>Shutdown imminent... %1%</source>
<translation>Fermado tuj %1%</translation> <translation>Fermado tuj %1%</translation>
</message> </message>
@ -1189,42 +1233,42 @@ Are you sure you want to delete the channel?</source>
<translation><numerusform>%n horo</numerusform><numerusform>%n horoj</numerusform></translation> <translation><numerusform>%n horo</numerusform><numerusform>%n horoj</numerusform></translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="../bitmessageqt/__init__.py" line="829"/> <location filename="../bitmessageqt/__init__.py" line="834"/>
<source>%n day(s)</source> <source>%n day(s)</source>
<translation><numerusform>%n tago</numerusform><numerusform>%n tagoj</numerusform></translation> <translation><numerusform>%n tago</numerusform><numerusform>%n tagoj</numerusform></translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2742"/> <location filename="../bitmessageqt/__init__.py" line="2753"/>
<source>Shutting down PyBitmessage... %1%</source> <source>Shutting down PyBitmessage... %1%</source>
<translation>Fermado de PyBitmessage %1%</translation> <translation>Fermado de PyBitmessage %1%</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1148"/> <location filename="../bitmessageqt/__init__.py" line="1153"/>
<source>Sent</source> <source>Sent</source>
<translation>Senditaj</translation> <translation>Senditaj</translation>
</message> </message>
<message> <message>
<location filename="../class_addressGenerator.py" line="91"/> <location filename="../class_addressGenerator.py" line="115"/>
<source>Generating one new address</source> <source>Generating one new address</source>
<translation>Kreado de unu nova adreso</translation> <translation>Kreado de unu nova adreso</translation>
</message> </message>
<message> <message>
<location filename="../class_addressGenerator.py" line="153"/> <location filename="../class_addressGenerator.py" line="193"/>
<source>Done generating address. Doing work necessary to broadcast it...</source> <source>Done generating address. Doing work necessary to broadcast it...</source>
<translation>Adreso kreita. Kalkulado de laborpruvo, kiu endas por elsendi ĝin</translation> <translation>Adreso kreita. Kalkulado de laborpruvo, kiu endas por elsendi ĝin</translation>
</message> </message>
<message> <message>
<location filename="../class_addressGenerator.py" line="170"/> <location filename="../class_addressGenerator.py" line="219"/>
<source>Generating %1 new addresses.</source> <source>Generating %1 new addresses.</source>
<translation>Kreado de %1 novaj adresoj.</translation> <translation>Kreado de %1 novaj adresoj.</translation>
</message> </message>
<message> <message>
<location filename="../class_addressGenerator.py" line="247"/> <location filename="../class_addressGenerator.py" line="323"/>
<source>%1 is already in &apos;Your Identities&apos;. Not adding it again.</source> <source>%1 is already in &apos;Your Identities&apos;. Not adding it again.</source>
<translation>%1 jam estas en Viaj Identigoj. Ĝi ne estos aldonita ree.</translation> <translation>%1 jam estas en Viaj Identigoj. Ĝi ne estos aldonita ree.</translation>
</message> </message>
<message> <message>
<location filename="../class_addressGenerator.py" line="283"/> <location filename="../class_addressGenerator.py" line="377"/>
<source>Done generating address</source> <source>Done generating address</source>
<translation>Ĉiuj adresoj estas kreitaj</translation> <translation>Ĉiuj adresoj estas kreitaj</translation>
</message> </message>
@ -1234,96 +1278,96 @@ Are you sure you want to delete the channel?</source>
<translation type="unfinished"/> <translation type="unfinished"/>
</message> </message>
<message> <message>
<location filename="../class_sqlThread.py" line="584"/> <location filename="../class_sqlThread.py" line="566"/>
<source>Disk full</source> <source>Disk full</source>
<translation>Disko plenplena</translation> <translation>Disko plenplena</translation>
</message> </message>
<message> <message>
<location filename="../class_sqlThread.py" line="584"/> <location filename="../class_sqlThread.py" line="566"/>
<source>Alert: Your disk or data storage volume is full. Bitmessage will now exit.</source> <source>Alert: Your disk or data storage volume is full. Bitmessage will now exit.</source>
<translation>Atentu: Via disko subdisko estas plenplena. Bitmesaĝo fermiĝos.</translation> <translation>Atentu: Via disko subdisko estas plenplena. Bitmesaĝo fermiĝos.</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="747"/> <location filename="../class_singleWorker.py" line="1060"/>
<source>Error! Could not find sender address (your address) in the keys.dat file.</source> <source>Error! Could not find sender address (your address) in the keys.dat file.</source>
<translation>Eraro! Ne povas trovi adreson de sendanto (vian adreson) en la dosiero keys.dat.</translation> <translation>Eraro! Ne povas trovi adreson de sendanto (vian adreson) en la dosiero keys.dat.</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="495"/> <location filename="../class_singleWorker.py" line="580"/>
<source>Doing work necessary to send broadcast...</source> <source>Doing work necessary to send broadcast...</source>
<translation>Kalkulado de laborpruvo, kiu endas por sendi elsendon</translation> <translation>Kalkulado de laborpruvo, kiu endas por sendi elsendon</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="518"/> <location filename="../class_singleWorker.py" line="613"/>
<source>Broadcast sent on %1</source> <source>Broadcast sent on %1</source>
<translation>Elsendo sendita je %1</translation> <translation>Elsendo sendita je %1</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="587"/> <location filename="../class_singleWorker.py" line="721"/>
<source>Encryption key was requested earlier.</source> <source>Encryption key was requested earlier.</source>
<translation>Peto pri ĉifroŝlosilo jam sendita.</translation> <translation>Peto pri ĉifroŝlosilo jam sendita.</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="624"/> <location filename="../class_singleWorker.py" line="795"/>
<source>Sending a request for the recipient&apos;s encryption key.</source> <source>Sending a request for the recipient&apos;s encryption key.</source>
<translation>Sendado de peto pri ĉifroŝlosilo de ricevonto.</translation> <translation>Sendado de peto pri ĉifroŝlosilo de ricevonto.</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="639"/> <location filename="../class_singleWorker.py" line="820"/>
<source>Looking up the receiver&apos;s public key</source> <source>Looking up the receiver&apos;s public key</source>
<translation>Serĉado de publika ĉifroŝlosilo de ricevonto</translation> <translation>Serĉado de publika ĉifroŝlosilo de ricevonto</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="673"/> <location filename="../class_singleWorker.py" line="878"/>
<source>Problem: Destination is a mobile device who requests that the destination be included in the message but this is disallowed in your settings. %1</source> <source>Problem: Destination is a mobile device who requests that the destination be included in the message but this is disallowed in your settings. %1</source>
<translation>Eraro: celadreso estas portebla aparato kiu necesas, ke la celadreso estu enhavita en la mesaĝo, sed tio estas malpermesita ne viaj agordoj. %1</translation> <translation>Eraro: celadreso estas portebla aparato kiu necesas, ke la celadreso estu enhavita en la mesaĝo, sed tio estas malpermesita ne viaj agordoj. %1</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="687"/> <location filename="../class_singleWorker.py" line="909"/>
<source>Doing work necessary to send message. <source>Doing work necessary to send message.
There is no required difficulty for version 2 addresses like this.</source> There is no required difficulty for version 2 addresses like this.</source>
<translation>Kalkulado de laborpruvo, kiu endas por sendi mesaĝon. <translation>Kalkulado de laborpruvo, kiu endas por sendi mesaĝon.
Malfacilaĵo ne estas bezonata por adresoj versioj 2, kiel tiu ĉi adreso.</translation> Malfacilaĵo ne estas bezonata por adresoj versioj 2, kiel tiu ĉi adreso.</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="701"/> <location filename="../class_singleWorker.py" line="944"/>
<source>Doing work necessary to send message. <source>Doing work necessary to send message.
Receiver&apos;s required difficulty: %1 and %2</source> Receiver&apos;s required difficulty: %1 and %2</source>
<translation>Kalkulado de laborpruvo, kiu endas por sendi mesaĝon. <translation>Kalkulado de laborpruvo, kiu endas por sendi mesaĝon.
Ricevonto postulas malfacilaĵon: %1 kaj %2</translation> Ricevonto postulas malfacilaĵon: %1 kaj %2</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="710"/> <location filename="../class_singleWorker.py" line="984"/>
<source>Problem: The work demanded by the recipient (%1 and %2) is more difficult than you are willing to do. %3</source> <source>Problem: The work demanded by the recipient (%1 and %2) is more difficult than you are willing to do. %3</source>
<translation>Eraro: la demandita laboro de la ricevonto (%1 kaj %2) estas pli malfacila ol vi pretas fari. %3</translation> <translation>Eraro: la demandita laboro de la ricevonto (%1 kaj %2) estas pli malfacila ol vi pretas fari. %3</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="722"/> <location filename="../class_singleWorker.py" line="1012"/>
<source>Problem: You are trying to send a message to yourself or a chan but your encryption key could not be found in the keys.dat file. Could not encrypt message. %1</source> <source>Problem: You are trying to send a message to yourself or a chan but your encryption key could not be found in the keys.dat file. Could not encrypt message. %1</source>
<translation>Eraro: Vi provis sendi mesaĝon al vi mem al kanalo, tamen via ĉifroŝlosilo ne estas trovebla en la dosiero keys.dat. Mesaĝo ne povis esti ĉifrita. %1</translation> <translation>Eraro: Vi provis sendi mesaĝon al vi mem al kanalo, tamen via ĉifroŝlosilo ne estas trovebla en la dosiero keys.dat. Mesaĝo ne povis esti ĉifrita. %1</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1049"/> <location filename="../bitmessageqt/__init__.py" line="1054"/>
<source>Doing work necessary to send message.</source> <source>Doing work necessary to send message.</source>
<translation>Kalkulado de laborpruvo, kiu endas por sendi mesaĝon.</translation> <translation>Kalkulado de laborpruvo, kiu endas por sendi mesaĝon.</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="845"/> <location filename="../class_singleWorker.py" line="1218"/>
<source>Message sent. Waiting for acknowledgement. Sent on %1</source> <source>Message sent. Waiting for acknowledgement. Sent on %1</source>
<translation>Mesaĝo sendita. Atendado je konfirmo. Sendita je %1</translation> <translation>Mesaĝo sendita. Atendado je konfirmo. Sendita je %1</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1037"/> <location filename="../bitmessageqt/__init__.py" line="1042"/>
<source>Doing work necessary to request encryption key.</source> <source>Doing work necessary to request encryption key.</source>
<translation>Kalkulado de laborpruvo, kiu endas por peti pri ĉifroŝlosilo.</translation> <translation>Kalkulado de laborpruvo, kiu endas por peti pri ĉifroŝlosilo.</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="961"/> <location filename="../class_singleWorker.py" line="1380"/>
<source>Broadcasting the public key request. This program will auto-retry if they are offline.</source> <source>Broadcasting the public key request. This program will auto-retry if they are offline.</source>
<translation>Elsendado de peto pri publika ĉifroŝlosilo. La programo reprovos se ili estas eksterrete.</translation> <translation>Elsendado de peto pri publika ĉifroŝlosilo. La programo reprovos se ili estas eksterrete.</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="963"/> <location filename="../class_singleWorker.py" line="1387"/>
<source>Sending public key request. Waiting for reply. Requested at %1</source> <source>Sending public key request. Waiting for reply. Requested at %1</source>
<translation>Sendado de peto pri publika ĉifroŝlosilo. Atendado je respondo. Petis je %1</translation> <translation>Sendado de peto pri publika ĉifroŝlosilo. Atendado je respondo. Petis je %1</translation>
</message> </message>
@ -1338,97 +1382,82 @@ Ricevonto postulas malfacilaĵon: %1 kaj %2</translation>
<translation>UPnP pord-mapigo forigita</translation> <translation>UPnP pord-mapigo forigita</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="248"/> <location filename="../bitmessageqt/__init__.py" line="244"/>
<source>Mark all messages as read</source> <source>Mark all messages as read</source>
<translation>Marki ĉiujn mesaĝojn kiel legitajn</translation> <translation>Marki ĉiujn mesaĝojn kiel legitajn</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2636"/> <location filename="../bitmessageqt/__init__.py" line="2645"/>
<source>Are you sure you would like to mark all messages read?</source> <source>Are you sure you would like to mark all messages read?</source>
<translation>Ĉu vi certe volas marki ĉiujn mesaĝojn kiel legitajn?</translation> <translation>Ĉu vi certe volas marki ĉiujn mesaĝojn kiel legitajn?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1058"/> <location filename="../bitmessageqt/__init__.py" line="1063"/>
<source>Doing work necessary to send broadcast.</source> <source>Doing work necessary to send broadcast.</source>
<translation>Kalkulado de laborpruvo, kiu endas por sendi elsendon.</translation> <translation>Kalkulado de laborpruvo, kiu endas por sendi elsendon.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2708"/> <location filename="../bitmessageqt/__init__.py" line="2721"/>
<source>Proof of work pending</source> <source>Proof of work pending</source>
<translation>Laborpruvo haltigita</translation> <translation>Laborpruvo haltigita</translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="../bitmessageqt/__init__.py" line="2708"/> <location filename="../bitmessageqt/__init__.py" line="2721"/>
<source>%n object(s) pending proof of work</source> <source>%n object(s) pending proof of work</source>
<translation><numerusform>Haltigis laborpruvon por %n objekto</numerusform><numerusform>Haltigis laborpruvon por %n objektoj</numerusform></translation> <translation><numerusform>Haltigis laborpruvon por %n objekto</numerusform><numerusform>Haltigis laborpruvon por %n objektoj</numerusform></translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="../bitmessageqt/__init__.py" line="2708"/> <location filename="../bitmessageqt/__init__.py" line="2721"/>
<source>%n object(s) waiting to be distributed</source> <source>%n object(s) waiting to be distributed</source>
<translation><numerusform>%n objekto atendas je sendato</numerusform><numerusform>%n objektoj atendas je sendato</numerusform></translation> <translation><numerusform>%n objekto atendas je sendato</numerusform><numerusform>%n objektoj atendas je sendato</numerusform></translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2708"/> <location filename="../bitmessageqt/__init__.py" line="2721"/>
<source>Wait until these tasks finish?</source> <source>Wait until these tasks finish?</source>
<translation>Ĉu atendi ĝis tiujn taskojn finos?</translation> <translation>Ĉu atendi ĝis tiujn taskojn finos?</translation>
</message> </message>
<message> <message>
<location filename="../class_outgoingSynSender.py" line="211"/> <location filename="../namecoin.py" line="115"/>
<source>Problem communicating with proxy: %1. Please check your network settings.</source>
<translation>Eraro dum komunikado kun retperanto: %1. Bonvolu kontroli viajn retajn agordojn.</translation>
</message>
<message>
<location filename="../class_outgoingSynSender.py" line="240"/>
<source>SOCKS5 Authentication problem: %1. Please check your SOCKS5 settings.</source>
<translation>Eraro dum SOCKS5 aŭtentigado: %1. Bonvolu kontroli viajn SOCKS5-agordojn.</translation>
</message>
<message>
<location filename="../class_receiveDataThread.py" line="171"/>
<source>The time on your computer, %1, may be wrong. Please verify your settings.</source>
<translation>La horloĝo de via komputilo, %1, eble eraras. Bonvolu kontroli viajn agordojn.</translation>
</message>
<message>
<location filename="../namecoin.py" line="101"/>
<source>The name %1 was not found.</source> <source>The name %1 was not found.</source>
<translation>La nomo %1 ne trovita.</translation> <translation>La nomo %1 ne trovita.</translation>
</message> </message>
<message> <message>
<location filename="../namecoin.py" line="110"/> <location filename="../namecoin.py" line="124"/>
<source>The namecoin query failed (%1)</source> <source>The namecoin query failed (%1)</source>
<translation>La namecoin-peto fiaskis (%1)</translation> <translation>La namecoin-peto fiaskis (%1)</translation>
</message> </message>
<message> <message>
<location filename="../namecoin.py" line="113"/> <location filename="../namecoin.py" line="127"/>
<source>The namecoin query failed.</source> <source>The namecoin query failed.</source>
<translation>La namecoin-peto fiaskis.</translation> <translation>La namecoin-peto fiaskis.</translation>
</message> </message>
<message> <message>
<location filename="../namecoin.py" line="119"/> <location filename="../namecoin.py" line="133"/>
<source>The name %1 has no valid JSON data.</source> <source>The name %1 has no valid JSON data.</source>
<translation>La nomo %1 ne havas ĝustajn JSON-datumojn.</translation> <translation>La nomo %1 ne havas ĝustajn JSON-datumojn.</translation>
</message> </message>
<message> <message>
<location filename="../namecoin.py" line="127"/> <location filename="../namecoin.py" line="141"/>
<source>The name %1 has no associated Bitmessage address.</source> <source>The name %1 has no associated Bitmessage address.</source>
<translation>La nomo %1 ne estas atribuita kun bitmesaĝa adreso.</translation> <translation>La nomo %1 ne estas atribuita kun bitmesaĝa adreso.</translation>
</message> </message>
<message> <message>
<location filename="../namecoin.py" line="149"/> <location filename="../namecoin.py" line="171"/>
<source>Success! Namecoind version %1 running.</source> <source>Success! Namecoind version %1 running.</source>
<translation>Sukceso! Namecoind versio %1 funkcias.</translation> <translation>Sukceso! Namecoind versio %1 funkcias.</translation>
</message> </message>
<message> <message>
<location filename="../namecoin.py" line="155"/> <location filename="../namecoin.py" line="182"/>
<source>Success! NMControll is up and running.</source> <source>Success! NMControll is up and running.</source>
<translation>Sukceso! NMControl funkcias ĝuste.</translation> <translation>Sukceso! NMControl funkcias ĝuste.</translation>
</message> </message>
<message> <message>
<location filename="../namecoin.py" line="158"/> <location filename="../namecoin.py" line="185"/>
<source>Couldn&apos;t understand NMControl.</source> <source>Couldn&apos;t understand NMControl.</source>
<translation>Ne povis kompreni NMControl.</translation> <translation>Ne povis kompreni NMControl.</translation>
</message> </message>
<message> <message>
<location filename="../namecoin.py" line="165"/> <location filename="../namecoin.py" line="195"/>
<source>The connection to namecoin failed.</source> <source>The connection to namecoin failed.</source>
<translation>Malsukcesis konekti al namecoin.</translation> <translation>Malsukcesis konekti al namecoin.</translation>
</message> </message>
@ -1438,12 +1467,12 @@ Ricevonto postulas malfacilaĵon: %1 kaj %2</translation>
<translation>Via(j) vidprocesoro(j) ne kalkulis senerare, malaktiviganta OpenCL. Bonvolu raporti tion al programistoj.</translation> <translation>Via(j) vidprocesoro(j) ne kalkulis senerare, malaktiviganta OpenCL. Bonvolu raporti tion al programistoj.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3793"/> <location filename="../bitmessageqt/__init__.py" line="3807"/>
<source>Set notification sound...</source> <source>Set notification sound...</source>
<translation>Agordi sciigan sonon</translation> <translation>Agordi sciigan sonon</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="637"/> <location filename="../bitmessageqt/__init__.py" line="645"/>
<source> <source>
Welcome to easy and secure Bitmessage Welcome to easy and secure Bitmessage
* send messages to other people * send messages to other people
@ -1457,112 +1486,112 @@ Bonvenon al facila kaj sekura Bitmesaĝo
* babili kun aliaj uloj en mesaĝ-kanaloj</translation> * babili kun aliaj uloj en mesaĝ-kanaloj</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="820"/> <location filename="../bitmessageqt/__init__.py" line="825"/>
<source>not recommended for chans</source> <source>not recommended for chans</source>
<translation>malkonsilinda por kanaloj</translation> <translation>malkonsilinda por kanaloj</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1213"/> <location filename="../bitmessageqt/__init__.py" line="1218"/>
<source>Quiet Mode</source> <source>Quiet Mode</source>
<translation>Silenta reĝimo</translation> <translation>Silenta reĝimo</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1603"/> <location filename="../bitmessageqt/__init__.py" line="1610"/>
<source>Problems connecting? Try enabling UPnP in the Network Settings</source> <source>Problems connecting? Try enabling UPnP in the Network Settings</source>
<translation>Ĉu problemo kun konektado? Provu aktivigi UPnP en retaj agordoj.</translation> <translation>Ĉu problemo kun konektado? Provu aktivigi UPnP en retaj agordoj.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1928"/> <location filename="../bitmessageqt/__init__.py" line="1937"/>
<source>You are trying to send an email instead of a bitmessage. This requires registering with a gateway. Attempt to register?</source> <source>You are trying to send an email instead of a bitmessage. This requires registering with a gateway. Attempt to register?</source>
<translation>Vi provas sendi retmesaĝon anstataŭ bitmesaĝ-mesaĝon. Tio ĉi postulas registri ĉe retpoŝta kluzo. Ĉu provi registri?</translation> <translation>Vi provas sendi retmesaĝon anstataŭ bitmesaĝ-mesaĝon. Tio ĉi postulas registriĝi ĉe retpoŝta kluzo. Ĉu provi registri?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1960"/> <location filename="../bitmessageqt/__init__.py" line="1969"/>
<source>Error: Bitmessage addresses start with BM- Please check the recipient address %1</source> <source>Error: Bitmessage addresses start with BM- Please check the recipient address %1</source>
<translation>Eraro: bitmesaĝaj adresoj komenciĝas kun BM-. Bonvolu kontroli la adreson de ricevonto %1</translation> <translation>Eraro: bitmesaĝaj adresoj komenciĝas kun BM-. Bonvolu kontroli la adreson de ricevonto %1</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1966"/> <location filename="../bitmessageqt/__init__.py" line="1975"/>
<source>Error: The recipient address %1 is not typed or copied correctly. Please check it.</source> <source>Error: The recipient address %1 is not typed or copied correctly. Please check it.</source>
<translation>Eraro: la adreso de ricevonto %1 estas malprave tajpita kopiita. Bonvolu kontroli ĝin.</translation> <translation>Eraro: la adreso de ricevonto %1 estas malprave tajpita kopiita. Bonvolu kontroli ĝin.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1972"/> <location filename="../bitmessageqt/__init__.py" line="1981"/>
<source>Error: The recipient address %1 contains invalid characters. Please check it.</source> <source>Error: The recipient address %1 contains invalid characters. Please check it.</source>
<translation>Eraro: la adreso de ricevonto %1 enhavas malpermesatajn simbolojn. Bonvolu kontroli ĝin.</translation> <translation>Eraro: la adreso de ricevonto %1 enhavas malpermesatajn simbolojn. Bonvolu kontroli ĝin.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1978"/> <location filename="../bitmessageqt/__init__.py" line="1987"/>
<source>Error: The version of the recipient address %1 is too high. Either you need to upgrade your Bitmessage software or your acquaintance is being clever.</source> <source>Error: The version of the recipient address %1 is too high. Either you need to upgrade your Bitmessage software or your acquaintance is being clever.</source>
<translation>Eraro: la versio de adreso de ricevonto %1 estas tro alta. Eble vi devas ĝisdatigi vian bitmesaĝan programon via sagaca konato uzas alian programon.</translation> <translation>Eraro: la versio de adreso de ricevonto %1 estas tro alta. Eble vi devas ĝisdatigi vian bitmesaĝan programon via sagaca konato uzas alian programon.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1986"/> <location filename="../bitmessageqt/__init__.py" line="1995"/>
<source>Error: Some data encoded in the recipient address %1 is too short. There might be something wrong with the software of your acquaintance.</source> <source>Error: Some data encoded in the recipient address %1 is too short. There might be something wrong with the software of your acquaintance.</source>
<translation>Eraro: kelkaj datumoj koditaj en la adreso de ricevonto %1 estas tro mallongaj. Povus esti ke io en la programo de via konato malfunkcias.</translation> <translation>Eraro: kelkaj datumoj koditaj en la adreso de ricevonto %1 estas tro mallongaj. Povus esti ke io en la programo de via konato malfunkcias.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1994"/> <location filename="../bitmessageqt/__init__.py" line="2003"/>
<source>Error: Some data encoded in the recipient address %1 is too long. There might be something wrong with the software of your acquaintance.</source> <source>Error: Some data encoded in the recipient address %1 is too long. There might be something wrong with the software of your acquaintance.</source>
<translation>Eraro: kelkaj datumoj koditaj en la adreso de ricevonto %1 estas tro longaj. Povus esti ke io en la programo de via konato malfunkcias.</translation> <translation>Eraro: kelkaj datumoj koditaj en la adreso de ricevonto %1 estas tro longaj. Povus esti ke io en la programo de via konato malfunkcias.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2002"/> <location filename="../bitmessageqt/__init__.py" line="2011"/>
<source>Error: Some data encoded in the recipient address %1 is malformed. There might be something wrong with the software of your acquaintance.</source> <source>Error: Some data encoded in the recipient address %1 is malformed. There might be something wrong with the software of your acquaintance.</source>
<translation>Eraro: kelkaj datumoj koditaj en la adreso de ricevonto %1 estas misformitaj. Povus esti ke io en la programo de via konato malfunkcias.</translation> <translation>Eraro: kelkaj datumoj koditaj en la adreso de ricevonto %1 estas misformitaj. Povus esti ke io en la programo de via konato malfunkcias.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2010"/> <location filename="../bitmessageqt/__init__.py" line="2019"/>
<source>Error: Something is wrong with the recipient address %1.</source> <source>Error: Something is wrong with the recipient address %1.</source>
<translation>Eraro: io malĝustas kun la adreso de ricevonto %1.</translation> <translation>Eraro: io malĝustas kun la adreso de ricevonto %1.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2160"/> <location filename="../bitmessageqt/__init__.py" line="2169"/>
<source>Error: %1</source> <source>Error: %1</source>
<translation>Eraro: %1</translation> <translation>Eraro: %1</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2277"/> <location filename="../bitmessageqt/__init__.py" line="2286"/>
<source>From %1</source> <source>From %1</source>
<translation>De %1</translation> <translation>De %1</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2719"/> <location filename="../bitmessageqt/__init__.py" line="2732"/>
<source>Synchronisation pending</source> <source>Synchronisation pending</source>
<translation>Samtempigado haltigita</translation> <translation>Samtempigado haltigita</translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="../bitmessageqt/__init__.py" line="2719"/> <location filename="../bitmessageqt/__init__.py" line="2732"/>
<source>Bitmessage hasn&apos;t synchronised with the network, %n object(s) to be downloaded. If you quit now, it may cause delivery delays. Wait until the synchronisation finishes?</source> <source>Bitmessage hasn&apos;t synchronised with the network, %n object(s) to be downloaded. If you quit now, it may cause delivery delays. Wait until the synchronisation finishes?</source>
<translation><numerusform>Bitmesaĝo ne estas samtempigita kun la reto, %n objekto elŝutendas. Se vi eliros nun, tio povas igi malfruiĝojn de liveradoj. Ĉu atendi ĝis la samtempigado finiĝos?</numerusform><numerusform>Bitmesaĝo ne estas samtempigita kun la reto, %n objektoj elŝutendas. Se vi eliros nun, tio povas igi malfruiĝojn de liveradoj. Ĉu atendi ĝis la samtempigado finiĝos?</numerusform></translation> <translation><numerusform>Bitmesaĝo ne estas samtempigita kun la reto, %n objekto elŝutendas. Se vi eliros nun, tio povas igi malfruiĝojn de liveradoj. Ĉu atendi ĝis la samtempigado finiĝos?</numerusform><numerusform>Bitmesaĝo ne estas samtempigita kun la reto, %n objektoj elŝutendas. Se vi eliros nun, tio povas igi malfruiĝojn de liveradoj. Ĉu atendi ĝis la samtempigado finiĝos?</numerusform></translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2731"/> <location filename="../bitmessageqt/__init__.py" line="2742"/>
<source>Not connected</source> <source>Not connected</source>
<translation>Nekonektita</translation> <translation>Nekonektita</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2731"/> <location filename="../bitmessageqt/__init__.py" line="2742"/>
<source>Bitmessage isn&apos;t connected to the network. If you quit now, it may cause delivery delays. Wait until connected and the synchronisation finishes?</source> <source>Bitmessage isn&apos;t connected to the network. If you quit now, it may cause delivery delays. Wait until connected and the synchronisation finishes?</source>
<translation>Bitmesaĝo ne estas konektita al la reto. Se vi eliros nun, tio povas igi malfruiĝojn de liveradoj. Ĉu atendi ĝis ĝi konektos kaj la samtempigado finiĝos?</translation> <translation type="unfinished"/>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2746"/> <location filename="../bitmessageqt/__init__.py" line="2757"/>
<source>Waiting for network connection...</source> <source>Waiting for network connection...</source>
<translation>Atendado je retkonekto</translation> <translation>Atendado je retkonekto</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2756"/> <location filename="../bitmessageqt/__init__.py" line="2767"/>
<source>Waiting for finishing synchronisation...</source> <source>Waiting for finishing synchronisation...</source>
<translation>Atendado ĝis samtempigado finiĝos</translation> <translation>Atendado ĝis samtempigado finiĝos</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3811"/> <location filename="../bitmessageqt/__init__.py" line="3825"/>
<source>You have already set a notification sound for this address book entry. Do you really want to overwrite it?</source> <source>You have already set a notification sound for this address book entry. Do you really want to overwrite it?</source>
<translation>Vi jam agordis sciigan sonon por tiu ĉi adreso. Ĉu vi volas anstataŭigi ĝin?</translation> <translation>Vi jam agordis sciigan sonon por tiu ĉi adreso. Ĉu vi volas anstataŭigi ĝin?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="4028"/> <location filename="../bitmessageqt/__init__.py" line="4046"/>
<source>Error occurred: could not load message from disk.</source> <source>Error occurred: could not load message from disk.</source>
<translation>Eraro okazis: ne povis legi mesaĝon el la disko.</translation> <translation>Eraro okazis: ne povis legi mesaĝon el la disko.</translation>
</message> </message>
@ -1587,22 +1616,22 @@ Bonvenon al facila kaj sekura Bitmesaĝo
<translation>Forviŝi</translation> <translation>Forviŝi</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/foldertree.py" line="11"/> <location filename="../bitmessageqt/foldertree.py" line="10"/>
<source>inbox</source> <source>inbox</source>
<translation>Ricevujo</translation> <translation>ricevujo</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/foldertree.py" line="12"/> <location filename="../bitmessageqt/foldertree.py" line="11"/>
<source>new</source> <source>new</source>
<translation>novaj</translation> <translation>novaj</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/foldertree.py" line="13"/> <location filename="../bitmessageqt/foldertree.py" line="12"/>
<source>sent</source> <source>sent</source>
<translation>senditaj</translation> <translation>senditaj</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/foldertree.py" line="14"/> <location filename="../bitmessageqt/foldertree.py" line="13"/>
<source>trash</source> <source>trash</source>
<translation>rubujo</translation> <translation>rubujo</translation>
</message> </message>
@ -1633,14 +1662,14 @@ Bonvenon al facila kaj sekura Bitmesaĝo
<context> <context>
<name>MsgDecode</name> <name>MsgDecode</name>
<message> <message>
<location filename="../helper_msgcoding.py" line="80"/> <location filename="../helper_msgcoding.py" line="81"/>
<source>The message has an unknown encoding. <source>The message has an unknown encoding.
Perhaps you should upgrade Bitmessage.</source> Perhaps you should upgrade Bitmessage.</source>
<translation>La mesaĝo enhavas nekonatan kodoprezenton. <translation>La mesaĝo enhavas nekonatan kodoprezenton.
Eble vi devas ĝisdatigi Bitmesaĝon.</translation> Eble vi devas ĝisdatigi Bitmesaĝon.</translation>
</message> </message>
<message> <message>
<location filename="../helper_msgcoding.py" line="81"/> <location filename="../helper_msgcoding.py" line="82"/>
<source>Unknown encoding</source> <source>Unknown encoding</source>
<translation>Nekonata kodoprezento</translation> <translation>Nekonata kodoprezento</translation>
</message> </message>
@ -1867,12 +1896,12 @@ La “hazardnombra” adreso estas antaŭagordita, sed antaŭkalkuleblaj adresoj
<translation>Adreso</translation> <translation>Adreso</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="150"/> <location filename="../bitmessageqt/blacklist.py" line="151"/>
<source>Blacklist</source> <source>Blacklist</source>
<translation>Nigra listo</translation> <translation>Nigra listo</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="152"/> <location filename="../bitmessageqt/blacklist.py" line="153"/>
<source>Whitelist</source> <source>Whitelist</source>
<translation>Blanka listo</translation> <translation>Blanka listo</translation>
</message> </message>
@ -2223,14 +2252,6 @@ La “hazardnombra” adreso estas antaŭagordita, sed antaŭkalkuleblaj adresoj
<translation>C PoW modulo nedisponebla. Bonvolu konstrui ĝin.</translation> <translation>C PoW modulo nedisponebla. Bonvolu konstrui ĝin.</translation>
</message> </message>
</context> </context>
<context>
<name>qrcodeDialog</name>
<message>
<location filename="../plugins/qrcodeui.py" line="67"/>
<source>QR-code</source>
<translation>QR-kodo</translation>
</message>
</context>
<context> <context>
<name>regenerateAddressesDialog</name> <name>regenerateAddressesDialog</name>
<message> <message>
@ -2287,218 +2308,218 @@ La “hazardnombra” adreso estas antaŭagordita, sed antaŭkalkuleblaj adresoj
<context> <context>
<name>settingsDialog</name> <name>settingsDialog</name>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="453"/> <location filename="../bitmessageqt/settings.py" line="483"/>
<source>Settings</source> <source>Settings</source>
<translation>Agordoj</translation> <translation>Agordoj</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="454"/> <location filename="../bitmessageqt/settings.py" line="484"/>
<source>Start Bitmessage on user login</source> <source>Start Bitmessage on user login</source>
<translation>Startigi Bitmesaĝon dum ensaluto de uzanto</translation> <translation>Startigi Bitmesaĝon dum ensaluto de uzanto</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="455"/> <location filename="../bitmessageqt/settings.py" line="485"/>
<source>Tray</source> <source>Tray</source>
<translation>Taskopleto</translation> <translation>Taskopleto</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="456"/> <location filename="../bitmessageqt/settings.py" line="486"/>
<source>Start Bitmessage in the tray (don&apos;t show main window)</source> <source>Start Bitmessage in the tray (don&apos;t show main window)</source>
<translation>Startigi Bitmesaĝon en la taskopleto (tray) ne montrante tiun fenestron</translation> <translation>Startigi Bitmesaĝon en la taskopleto ne montrante tiun ĉi fenestron</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="457"/> <location filename="../bitmessageqt/settings.py" line="491"/>
<source>Minimize to tray</source> <source>Minimize to tray</source>
<translation>Plejetigi al taskopleto</translation> <translation>Plejetigi al taskopleto</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="458"/> <location filename="../bitmessageqt/settings.py" line="492"/>
<source>Close to tray</source> <source>Close to tray</source>
<translation>Fermi al taskopleto</translation> <translation>Fermi al taskopleto</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="460"/> <location filename="../bitmessageqt/settings.py" line="495"/>
<source>Show notification when message received</source> <source>Show notification when message received</source>
<translation>Montri sciigon kiam mesaĝo alvenas</translation> <translation>Montri sciigon kiam mesaĝo alvenas</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="461"/> <location filename="../bitmessageqt/settings.py" line="500"/>
<source>Run in Portable Mode</source> <source>Run in Portable Mode</source>
<translation>Ekzekucii en Portebla Reĝimo</translation> <translation>Ekzekucii en Portebla Reĝimo</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="462"/> <location filename="../bitmessageqt/settings.py" line="501"/>
<source>In Portable Mode, messages and config files are stored in the same directory as the program rather than the normal application-data folder. This makes it convenient to run Bitmessage from a USB thumb drive.</source> <source>In Portable Mode, messages and config files are stored in the same directory as the program rather than the normal application-data folder. This makes it convenient to run Bitmessage from a USB thumb drive.</source>
<translation>En Portebla Reĝimo, mesaĝoj kaj agordoj estas enmemorigitaj en la sama dosierujo kiel la programo mem anstataŭ en la dosierujo por datumoj de aplikaĵoj. Tio igas ĝin komforta ekzekucii Bitmesaĝon el USB poŝmemorilo.</translation> <translation>En la Portebla Reĝimo, mesaĝoj kaj agordoj estas enmemorigitaj en la sama dosierujo kiel la programo mem anstataŭ en la dosierujo por datumoj de aplikaĵoj. Tio igas ĝin komforta por ekzekucii Bitmesaĝon el USB poŝmemorilo.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="463"/> <location filename="../bitmessageqt/settings.py" line="508"/>
<source>Willingly include unencrypted destination address when sending to a mobile device</source> <source>Willingly include unencrypted destination address when sending to a mobile device</source>
<translation>Volonte inkluzivi malĉifritan cel-adreson dum sendado al portebla aparato.</translation> <translation>Volonte inkluzivi malĉifritan cel-adreson dum sendado al portebla aparato.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="464"/> <location filename="../bitmessageqt/settings.py" line="513"/>
<source>Use Identicons</source> <source>Use Identicons</source>
<translation>Uzi ID-avatarojn</translation> <translation>Uzi ID-avatarojn</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="465"/> <location filename="../bitmessageqt/settings.py" line="514"/>
<source>Reply below Quote</source> <source>Reply below Quote</source>
<translation>Respondi sub citaĵo</translation> <translation>Respondi sub citaĵo</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="466"/> <location filename="../bitmessageqt/settings.py" line="515"/>
<source>Interface Language</source> <source>Interface Language</source>
<translation>Fasada lingvo</translation> <translation>Fasada lingvo</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="467"/> <location filename="../bitmessageqt/settings.py" line="516"/>
<source>System Settings</source> <source>System Settings</source>
<comment>system</comment> <comment>system</comment>
<translation>Sistemaj agordoj</translation> <translation>Sistemaj agordoj</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="468"/> <location filename="../bitmessageqt/settings.py" line="517"/>
<source>User Interface</source> <source>User Interface</source>
<translation>Fasado</translation> <translation>Fasado</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="469"/> <location filename="../bitmessageqt/settings.py" line="522"/>
<source>Listening port</source> <source>Listening port</source>
<translation>Aŭskultanta pordo (port)</translation> <translation>Aŭskultanta pordo</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="470"/> <location filename="../bitmessageqt/settings.py" line="523"/>
<source>Listen for connections on port:</source> <source>Listen for connections on port:</source>
<translation>Aŭskulti pri konektoj ĉe pordo:</translation> <translation>Aŭskulti pri konektoj ĉe pordo:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="471"/> <location filename="../bitmessageqt/settings.py" line="524"/>
<source>UPnP:</source> <source>UPnP:</source>
<translation>UPnP:</translation> <translation>UPnP:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="472"/> <location filename="../bitmessageqt/settings.py" line="525"/>
<source>Bandwidth limit</source> <source>Bandwidth limit</source>
<translation>Rettrafika limo</translation> <translation>Rettrafika limo</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="473"/> <location filename="../bitmessageqt/settings.py" line="526"/>
<source>Maximum download rate (kB/s): [0: unlimited]</source> <source>Maximum download rate (kB/s): [0: unlimited]</source>
<translation>Maksimuma rapido de elŝuto (kB/s): [0: senlima]</translation> <translation>Maksimuma rapido de elŝuto (kB/s): [0: senlima]</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="474"/> <location filename="../bitmessageqt/settings.py" line="527"/>
<source>Maximum upload rate (kB/s): [0: unlimited]</source> <source>Maximum upload rate (kB/s): [0: unlimited]</source>
<translation>Maksimuma rapido de alŝuto (kB/s): [0: senlima]</translation> <translation>Maksimuma rapido de alŝuto (kB/s): [0: senlima]</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="476"/> <location filename="../bitmessageqt/settings.py" line="529"/>
<source>Proxy server / Tor</source> <source>Proxy server / Tor</source>
<translation>Retperanta (proxy) servilo / Tor</translation> <translation>Retperanta servilo / Tor</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="477"/> <location filename="../bitmessageqt/settings.py" line="530"/>
<source>Type:</source> <source>Type:</source>
<translation>Speco:</translation> <translation>Speco:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="478"/> <location filename="../bitmessageqt/settings.py" line="531"/>
<source>Server hostname:</source> <source>Server hostname:</source>
<translation>Servilo gastiga nomo (hostname):</translation> <translation>Servil-nomo:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="501"/> <location filename="../bitmessageqt/settings.py" line="601"/>
<source>Port:</source> <source>Port:</source>
<translation>Pordo (port):</translation> <translation>Pordo:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="480"/> <location filename="../bitmessageqt/settings.py" line="533"/>
<source>Authentication</source> <source>Authentication</source>
<translation>Aŭtentigo</translation> <translation>Aŭtentigo</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="502"/> <location filename="../bitmessageqt/settings.py" line="602"/>
<source>Username:</source> <source>Username:</source>
<translation>Uzantnomo:</translation> <translation>Uzantnomo:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="482"/> <location filename="../bitmessageqt/settings.py" line="535"/>
<source>Pass:</source> <source>Pass:</source>
<translation>Pasvorto:</translation> <translation>Pasvorto:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="483"/> <location filename="../bitmessageqt/settings.py" line="536"/>
<source>Listen for incoming connections when using proxy</source> <source>Listen for incoming connections when using proxy</source>
<translation>Aŭskulti pri alvenaj konektoj kiam dum uzado de retperanto</translation> <translation>Aŭskulti pri alvenaj konektoj kiam dum uzado de retperanto</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="484"/> <location filename="../bitmessageqt/settings.py" line="541"/>
<source>none</source> <source>none</source>
<translation>neniu</translation> <translation>neniu</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="485"/> <location filename="../bitmessageqt/settings.py" line="542"/>
<source>SOCKS4a</source> <source>SOCKS4a</source>
<translation>SOCKS4a</translation> <translation>SOCKS4a</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="486"/> <location filename="../bitmessageqt/settings.py" line="543"/>
<source>SOCKS5</source> <source>SOCKS5</source>
<translation>SOCKS5</translation> <translation>SOCKS5</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="487"/> <location filename="../bitmessageqt/settings.py" line="544"/>
<source>Network Settings</source> <source>Network Settings</source>
<translation>Agordoj de reto</translation> <translation>Agordoj de reto</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="488"/> <location filename="../bitmessageqt/settings.py" line="549"/>
<source>Total difficulty:</source> <source>Total difficulty:</source>
<translation>Tuta malfacilaĵo:</translation> <translation>Tuta malfacilaĵo:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="489"/> <location filename="../bitmessageqt/settings.py" line="550"/>
<source>The &apos;Total difficulty&apos; affects the absolute amount of work the sender must complete. Doubling this value doubles the amount of work.</source> <source>The &apos;Total difficulty&apos; affects the absolute amount of work the sender must complete. Doubling this value doubles the amount of work.</source>
<translation>La &apos;Tuta malfacilaĵo&apos; efikas sur la tuta kvalito da laboro, kiun la sendonto devos fari. Duobligo de tiu valoro, duobligas la kvanton de laboro.</translation> <translation>La &apos;Tuta malfacilaĵo&apos; efikas sur la tuta kvalito da laboro, kiun la sendonto devos fari. Duobligo de tiu valoro, duobligas la kvanton de laboro.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="490"/> <location filename="../bitmessageqt/settings.py" line="556"/>
<source>Small message difficulty:</source> <source>Small message difficulty:</source>
<translation>Et-mesaĝa malfacilaĵo:</translation> <translation>Et-mesaĝa malfacilaĵo:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="491"/> <location filename="../bitmessageqt/settings.py" line="557"/>
<source>When someone sends you a message, their computer must first complete some work. The difficulty of this work, by default, is 1. You may raise this default for new addresses you create by changing the values here. Any new addresses you create will require senders to meet the higher difficulty. There is one exception: if you add a friend or acquaintance to your address book, Bitmessage will automatically notify them when you next send a message that they need only complete the minimum amount of work: difficulty 1. </source> <source>When someone sends you a message, their computer must first complete some work. The difficulty of this work, by default, is 1. You may raise this default for new addresses you create by changing the values here. Any new addresses you create will require senders to meet the higher difficulty. There is one exception: if you add a friend or acquaintance to your address book, Bitmessage will automatically notify them when you next send a message that they need only complete the minimum amount of work: difficulty 1. </source>
<translation>Kiam iu ajn sendas al vi mesaĝon, lia komputilo devas unue fari iom da laboro. La malfacilaĵo de tiu laboro implicite estas 1. Vi povas pligrandigi tiun valoron por novaj adresoj, kiujn vi generos per ŝanĝo de ĉi-tiaj valoroj. Ĉiuj novaj adresoj kreotaj de vi bezonos por ke sendontoj akceptu pli altan malfacilaĵon. Estas unu escepto: se vi aldonos kolegon al vi adresaro, Bitmesaĝo aŭtomate sciigos lin kiam vi sendos mesaĝon, ke li bezonos fari nur minimuman kvaliton da laboro: malfacilaĵo 1.</translation> <translation>Kiam iu ajn sendas al vi mesaĝon, lia komputilo devas unue fari iom da laboro. La malfacilaĵo de tiu laboro implicite estas 1. Vi povas pligrandigi tiun valoron por novaj adresoj, kiujn vi generos per ŝanĝo de ĉi-tiaj valoroj. Ĉiuj novaj adresoj kreotaj de vi bezonos por ke sendontoj akceptu pli altan malfacilaĵon. Estas unu escepto: se vi aldonos amikon al via adresaro, Bitmesaĝo aŭtomate sciigos lin kiam vi sendos mesaĝon, ke li bezonos fari nur minimuman kvaliton da laboro: malfacilaĵo 1.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="492"/> <location filename="../bitmessageqt/settings.py" line="566"/>
<source>The &apos;Small message difficulty&apos; mostly only affects the difficulty of sending small messages. Doubling this value makes it almost twice as difficult to send a small message but doesn&apos;t really affect large messages.</source> <source>The &apos;Small message difficulty&apos; mostly only affects the difficulty of sending small messages. Doubling this value makes it almost twice as difficult to send a small message but doesn&apos;t really affect large messages.</source>
<translation>La &apos;Et-mesaĝa malfacilaĵo&apos; ĉefe efikas malfacilaĵon por sendi malgrandajn mesaĝojn. Duobligo de tiu valoro, preskaŭ duobligas malfacilaĵon por sendi malgrandajn mesaĝojn, sed preskaŭ ne efikas grandajn mesaĝojn.</translation> <translation>La &apos;Et-mesaĝa malfacilaĵo&apos; ĉefe efikas malfacilaĵon por sendi malgrandajn mesaĝojn. Duobligo de tiu valoro, preskaŭ duobligas malfacilaĵon por sendi malgrandajn mesaĝojn, sed preskaŭ ne efikas grandajn mesaĝojn.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="493"/> <location filename="../bitmessageqt/settings.py" line="573"/>
<source>Demanded difficulty</source> <source>Demanded difficulty</source>
<translation>Postulata malfacilaĵo</translation> <translation>Postulata malfacilaĵo</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="494"/> <location filename="../bitmessageqt/settings.py" line="578"/>
<source>Here you may set the maximum amount of work you are willing to do to send a message to another person. Setting these values to 0 means that any value is acceptable.</source> <source>Here you may set the maximum amount of work you are willing to do to send a message to another person. Setting these values to 0 means that any value is acceptable.</source>
<translation>Tie ĉi vi povas agordi maksimuman kvanton da laboro kiun vi faru por sendi mesaĝon al alian persono. Se vi agordos ilin al 0, ĉiuj valoroj estos akceptitaj.</translation> <translation>Tie ĉi vi povas agordi maksimuman kvanton da laboro kiun vi faru por sendi mesaĝon al alian persono. Se vi agordos ilin al 0, ĉiuj valoroj estos akceptitaj.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="495"/> <location filename="../bitmessageqt/settings.py" line="584"/>
<source>Maximum acceptable total difficulty:</source> <source>Maximum acceptable total difficulty:</source>
<translation>Maksimuma akceptata tuta malfacilaĵo:</translation> <translation>Maksimuma akceptata tuta malfacilaĵo:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="496"/> <location filename="../bitmessageqt/settings.py" line="585"/>
<source>Maximum acceptable small message difficulty:</source> <source>Maximum acceptable small message difficulty:</source>
<translation>Maksimuma akceptata malfacilaĵo por et-mesaĝoj:</translation> <translation>Maksimuma akceptata malfacilaĵo por et-mesaĝoj:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="497"/> <location filename="../bitmessageqt/settings.py" line="586"/>
<source>Max acceptable difficulty</source> <source>Max acceptable difficulty</source>
<translation>Maksimuma akcepta malfacilaĵo</translation> <translation>Maksimuma akcepta malfacilaĵo</translation>
</message> </message>
@ -2508,87 +2529,87 @@ La “hazardnombra” adreso estas antaŭagordita, sed antaŭkalkuleblaj adresoj
<translation type="unfinished"/> <translation type="unfinished"/>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="499"/> <location filename="../bitmessageqt/settings.py" line="592"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Bitmessage can utilize a different Bitcoin-based program called Namecoin to make addresses human-friendly. For example, instead of having to tell your friend your long Bitmessage address, you can simply tell him to send a message to &lt;span style=&quot; font-style:italic;&quot;&gt;test. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;(Getting your own Bitmessage address into Namecoin is still rather difficult).&lt;/p&gt;&lt;p&gt;Bitmessage can use either namecoind directly or a running nmcontrol instance.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Bitmessage can utilize a different Bitcoin-based program called Namecoin to make addresses human-friendly. For example, instead of having to tell your friend your long Bitmessage address, you can simply tell him to send a message to &lt;span style=&quot; font-style:italic;&quot;&gt;test. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;(Getting your own Bitmessage address into Namecoin is still rather difficult).&lt;/p&gt;&lt;p&gt;Bitmessage can use either namecoind directly or a running nmcontrol instance.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Bitmesaĝo povas apliki alian Bitmono-bazitan programon - Namecoin - por fari adresojn hom-legeblajn. Ekzemple anstataŭ diri al via amiko longan Bitmesaĝan adreson, vi povas simple peti lin pri sendi mesaĝon al &lt;span style=&quot; font-style:italic;&quot;&gt;id/kashnomo. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;(Kreado de sia propra Bitmesaĝa adreso en Namecoin-on estas ankoraŭ ete malfacila).&lt;/p&gt;&lt;p&gt;Bitmesaĝo eblas uzi aŭ na namecoind rekte aŭ jaman aktivan aperon de nmcontrol.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Bitmesaĝo povas apliki alian Bitmono-bazitan programon - Namecoin - por fari adresojn hom-legeblajn. Ekzemple anstataŭ diri al via amiko longan Bitmesaĝan adreson, vi povas simple peti lin pri sendi mesaĝon al &lt;span style=&quot; font-style:italic;&quot;&gt;id/kashnomo. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;(Kreado de sia propra Bitmesaĝa adreso en Namecoin estas ankoraŭ ete malfacila).&lt;/p&gt;&lt;p&gt;Bitmesaĝo eblas uzi aŭ na namecoind rekte aŭ jaman aktivan aperon de nmcontrol.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="500"/> <location filename="../bitmessageqt/settings.py" line="600"/>
<source>Host:</source> <source>Host:</source>
<translation>Gastiga servilo:</translation> <translation>Gastiga servilo:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="503"/> <location filename="../bitmessageqt/settings.py" line="603"/>
<source>Password:</source> <source>Password:</source>
<translation>Pasvorto:</translation> <translation>Pasvorto:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="504"/> <location filename="../bitmessageqt/settings.py" line="604"/>
<source>Test</source> <source>Test</source>
<translation>Testi</translation> <translation>Testi</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="505"/> <location filename="../bitmessageqt/settings.py" line="605"/>
<source>Connect to:</source> <source>Connect to:</source>
<translation>Konekti al:</translation> <translation>Konekti al:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="506"/> <location filename="../bitmessageqt/settings.py" line="606"/>
<source>Namecoind</source> <source>Namecoind</source>
<translation>Namecoind</translation> <translation>Namecoind</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="507"/> <location filename="../bitmessageqt/settings.py" line="607"/>
<source>NMControl</source> <source>NMControl</source>
<translation>NMControl</translation> <translation>NMControl</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="508"/> <location filename="../bitmessageqt/settings.py" line="608"/>
<source>Namecoin integration</source> <source>Namecoin integration</source>
<translation>Integrigo kun Namecoin</translation> <translation>Integrigo kun Namecoin</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="509"/> <location filename="../bitmessageqt/settings.py" line="613"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;By default, if you send a message to someone and he is offline for more than two days, Bitmessage will send the message again after an additional two days. This will be continued with exponential backoff forever; messages will be resent after 5, 10, 20 days ect. until the receiver acknowledges them. Here you may change that behavior by having Bitmessage give up after a certain number of days or months.&lt;/p&gt;&lt;p&gt;Leave these input fields blank for the default behavior. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;By default, if you send a message to someone and he is offline for more than two days, Bitmessage will send the message again after an additional two days. This will be continued with exponential backoff forever; messages will be resent after 5, 10, 20 days ect. until the receiver acknowledges them. Here you may change that behavior by having Bitmessage give up after a certain number of days or months.&lt;/p&gt;&lt;p&gt;Leave these input fields blank for the default behavior. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Implicite se vi sendas mesaĝon al iu kaj li estos eksterrete por iomete da tempo, Bitmesaĝo provos resendi mesaĝon iam poste, kaj iam pli poste. La programo pluigos resendi mesaĝon ĝis sendonto konfirmos liveron. Tie ĉi vi povas ŝanĝi kiam Bitmesaĝo devos rezigni je sendado.&lt;/p&gt;&lt;p&gt;Lasu tiujn kampojn malplenaj por antaŭagordita sinteno.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Implicite se vi sendas mesaĝon al iu kaj li estos eksterrete por iomete da tempo, Bitmesaĝo provos resendi mesaĝon iam poste, kaj iam pli poste. La programo pluigos resendi mesaĝon ĝis sendonto konfirmos liveron. Tie ĉi vi povas ŝanĝi kiam Bitmesaĝo devos rezigni je sendado.&lt;/p&gt;&lt;p&gt;Lasu tiujn kampojn malplenaj por antaŭagordita sinteno.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="510"/> <location filename="../bitmessageqt/settings.py" line="622"/>
<source>Give up after</source> <source>Give up after</source>
<translation>Rezigni post</translation> <translation>Rezigni post</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="511"/> <location filename="../bitmessageqt/settings.py" line="623"/>
<source>and</source> <source>and</source>
<translation>kaj</translation> <translation>kaj</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="512"/> <location filename="../bitmessageqt/settings.py" line="624"/>
<source>days</source> <source>days</source>
<translation>tagoj</translation> <translation>tagoj</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="513"/> <location filename="../bitmessageqt/settings.py" line="625"/>
<source>months.</source> <source>months.</source>
<translation>monatoj.</translation> <translation>monatoj.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="514"/> <location filename="../bitmessageqt/settings.py" line="626"/>
<source>Resends Expire</source> <source>Resends Expire</source>
<translation>Resenda fortempiĝo</translation> <translation>Resenda fortempiĝo</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="459"/> <location filename="../bitmessageqt/settings.py" line="493"/>
<source>Hide connection notifications</source> <source>Hide connection notifications</source>
<translation>Ne montri sciigojn pri konekto</translation> <translation>Ne montri sciigojn pri konekto</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="475"/> <location filename="../bitmessageqt/settings.py" line="528"/>
<source>Maximum outbound connections: [0: none]</source> <source>Maximum outbound connections: [0: none]</source>
<translation>Maksimumo de eligaj konektoj: [0: senlima]</translation> <translation>Maksimume da eligaj konektoj: [0: senlima]</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="498"/> <location filename="../bitmessageqt/settings.py" line="591"/>
<source>Hardware GPU acceleration (OpenCL):</source> <source>Hardware GPU acceleration (OpenCL):</source>
<translation>Aparatara GPU-a plirapidigo (OpenCL):</translation> <translation>Aparatara GPU-a plirapidigo (OpenCL):</translation>
</message> </message>

Binary file not shown.

View File

@ -112,7 +112,7 @@ Please type the desired email address (including @mailchuck.com) below:</source>
<context> <context>
<name>Mailchuck</name> <name>Mailchuck</name>
<message> <message>
<location filename="../bitmessageqt/account.py" line="243"/> <location filename="../bitmessageqt/account.py" line="225"/>
<source># You can use this to configure your email gateway account <source># You can use this to configure your email gateway account
# Uncomment the setting you want to use # Uncomment the setting you want to use
# Here are the options: # Here are the options:
@ -152,9 +152,53 @@ Please type the desired email address (including @mailchuck.com) below:</source>
# specified. As this scheme uses deterministic public keys, you will receive # specified. As this scheme uses deterministic public keys, you will receive
# the money directly. To turn it off again, set &quot;feeamount&quot; to 0. Requires # the money directly. To turn it off again, set &quot;feeamount&quot; to 0. Requires
# subscription. # subscription.
</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../bitmessageqt/account.py" line="301"/>
<source># You can use this to configure your email gateway account
# Uncomment the setting you want to use
# Here are the options:
#
# pgp: server
# The email gateway will create and maintain PGP keys for you and sign, verify,
# encrypt and decrypt on your behalf. When you want to use PGP but are lazy,
# use this. Requires subscription.
#
# pgp: local
# The email gateway will not conduct PGP operations on your behalf. You can
# either not use PGP at all, or use it locally.
#
# attachments: yes
# Incoming attachments in the email will be uploaded to MEGA.nz, and you can
# download them from there by following the link. Requires a subscription.
#
# attachments: no
# Attachments will be ignored.
#
# archive: yes
# Your incoming emails will be archived on the server. Use this if you need
# help with debugging problems or you need a third party proof of emails. This
# however means that the operator of the service will be able to read your
# emails even after they have been delivered to you.
#
# archive: no
# Incoming emails will be deleted from the server as soon as they are relayed
# to you.
#
# masterpubkey_btc: BIP44 xpub key or electrum v1 public seed
# offset_btc: integer (defaults to 0)
# feeamount: number with up to 8 decimal places
# feecurrency: BTC, XBT, USD, EUR or GBP
# Use these if you want to charge people who send you emails. If this is on and
# an unknown person sends you an email, they will be requested to pay the fee
# specified. As this scheme uses deterministic public keys, you will receive
# the money directly. To turn it off again, set &quot;feeamount&quot; to 0. Requires
# subscription.
</source> </source>
<translation># Tutaj możesz skonfigurować ustawienia bramki poczty e-mail <translation># Tutaj możesz skonfigurować ustawienia bramki poczty e-mail
# Odkomentuj (usuń znak &apos;#&apos;) opcje których chcesz użyć # Odkomentuj (usuń znak #) opcje których chcesz użyć
# Ustawienia: # Ustawienia:
# #
# pgp: server # pgp: server
@ -175,8 +219,8 @@ Please type the desired email address (including @mailchuck.com) below:</source>
# #
# archive: yes # archive: yes
# Przychodzące wiadomości zostaną zarchiwizowane na serwerze. Użyj tej # Przychodzące wiadomości zostaną zarchiwizowane na serwerze. Użyj tej
# opcji przy diagnozowaniu problemów, lub jeżeli potrzebujesz dowodu # opcji przy diagnozowaniu problemów lub jeżeli potrzebujesz dowodu
# przesyłani wiadomości na zewnętrznym serwerze. Włączenie tej opcji # przesyłania wiadomości na zewnętrznym serwerze. Włączenie tej opcji
# spowoduje, że operator usługi będzie mógł czytać Twoje listy nawet po # spowoduje, że operator usługi będzie mógł czytać Twoje listy nawet po
# przesłaniu ich do Ciebie. # przesłaniu ich do Ciebie.
# #
@ -192,129 +236,129 @@ Please type the desired email address (including @mailchuck.com) below:</source>
# Tobie wiadomość. Jeżeli ta opcja jest włączona i nieznana osoba wyśle # Tobie wiadomość. Jeżeli ta opcja jest włączona i nieznana osoba wyśle
# Ci wiadomość, będzie poproszona o wniesienie opłaty. Ta funkcja używa # Ci wiadomość, będzie poproszona o wniesienie opłaty. Ta funkcja używa
# deterministycznych kluczy publicznych, dostaniesz pieniądze # deterministycznych kluczy publicznych, dostaniesz pieniądze
# bezpośrednio. Aby ponownie wyłączyć, ustaw &apos;feeamount&apos; na 0. # bezpośrednio. Aby ponownie wyłączyć, ustaw feeamount na 0.
# Wymaga subskrypcji.</translation> # Wymaga subskrypcji.</translation>
</message> </message>
</context> </context>
<context> <context>
<name>MainWindow</name> <name>MainWindow</name>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="170"/> <location filename="../bitmessageqt/__init__.py" line="166"/>
<source>Reply to sender</source> <source>Reply to sender</source>
<translation>Odpowiedz do nadawcy</translation> <translation>Odpowiedz do nadawcy</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="172"/> <location filename="../bitmessageqt/__init__.py" line="168"/>
<source>Reply to channel</source> <source>Reply to channel</source>
<translation>Odpowiedz do kanału</translation> <translation>Odpowiedz do kanału</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="174"/> <location filename="../bitmessageqt/__init__.py" line="170"/>
<source>Add sender to your Address Book</source> <source>Add sender to your Address Book</source>
<translation>Dodaj nadawcę do Książki Adresowej</translation> <translation>Dodaj nadawcę do Książki Adresowej</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="178"/> <location filename="../bitmessageqt/__init__.py" line="174"/>
<source>Add sender to your Blacklist</source> <source>Add sender to your Blacklist</source>
<translation>Dodaj nadawcę do Listy Blokowanych</translation> <translation>Dodaj nadawcę do Listy Blokowanych</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="364"/> <location filename="../bitmessageqt/__init__.py" line="372"/>
<source>Move to Trash</source> <source>Move to Trash</source>
<translation>Przenieś do kosza</translation> <translation>Przenieś do kosza</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="185"/> <location filename="../bitmessageqt/__init__.py" line="181"/>
<source>Undelete</source> <source>Undelete</source>
<translation>Przywróć</translation> <translation>Przywróć</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="188"/> <location filename="../bitmessageqt/__init__.py" line="184"/>
<source>View HTML code as formatted text</source> <source>View HTML code as formatted text</source>
<translation>Wyświetl kod HTML w postaci sformatowanej</translation> <translation>Wyświetl kod HTML w postaci sformatowanej</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="192"/> <location filename="../bitmessageqt/__init__.py" line="188"/>
<source>Save message as...</source> <source>Save message as...</source>
<translation>Zapisz wiadomość jako</translation> <translation>Zapisz wiadomość jako</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="196"/> <location filename="../bitmessageqt/__init__.py" line="192"/>
<source>Mark Unread</source> <source>Mark Unread</source>
<translation>Oznacz jako nieprzeczytane</translation> <translation>Oznacz jako nieprzeczytane</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="336"/> <location filename="../bitmessageqt/__init__.py" line="344"/>
<source>New</source> <source>New</source>
<translation>Nowe</translation> <translation>Nowe</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="121"/> <location filename="../bitmessageqt/blacklist.py" line="122"/>
<source>Enable</source> <source>Enable</source>
<translation>Aktywuj</translation> <translation>Aktywuj</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="124"/> <location filename="../bitmessageqt/blacklist.py" line="125"/>
<source>Disable</source> <source>Disable</source>
<translation>Deaktywuj</translation> <translation>Deaktywuj</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="127"/> <location filename="../bitmessageqt/blacklist.py" line="128"/>
<source>Set avatar...</source> <source>Set avatar...</source>
<translation>Ustaw awatar</translation> <translation>Ustaw awatar</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="117"/> <location filename="../bitmessageqt/blacklist.py" line="118"/>
<source>Copy address to clipboard</source> <source>Copy address to clipboard</source>
<translation>Kopiuj adres do schowka</translation> <translation>Kopiuj adres do schowka</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="283"/> <location filename="../bitmessageqt/__init__.py" line="291"/>
<source>Special address behavior...</source> <source>Special address behavior...</source>
<translation>Specjalne zachowanie adresu</translation> <translation>Specjalne zachowanie adresu</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="244"/> <location filename="../bitmessageqt/__init__.py" line="240"/>
<source>Email gateway</source> <source>Email gateway</source>
<translation>Przekaźnik e-mail</translation> <translation>Przekaźnik e-mail</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="114"/> <location filename="../bitmessageqt/blacklist.py" line="115"/>
<source>Delete</source> <source>Delete</source>
<translation>Usuń</translation> <translation>Usuń</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="299"/> <location filename="../bitmessageqt/__init__.py" line="307"/>
<source>Send message to this address</source> <source>Send message to this address</source>
<translation>Wyślij wiadomość pod ten adres</translation> <translation>Wyślij wiadomość pod ten adres</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="307"/> <location filename="../bitmessageqt/__init__.py" line="315"/>
<source>Subscribe to this address</source> <source>Subscribe to this address</source>
<translation>Subskrybuj ten adres</translation> <translation>Subskrybuj ten adres</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="319"/> <location filename="../bitmessageqt/__init__.py" line="327"/>
<source>Add New Address</source> <source>Add New Address</source>
<translation>Dodaj nowy adres</translation> <translation>Dodaj nowy adres</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="367"/> <location filename="../bitmessageqt/__init__.py" line="375"/>
<source>Copy destination address to clipboard</source> <source>Copy destination address to clipboard</source>
<translation>Kopiuj adres odbiorcy do schowka</translation> <translation>Kopiuj adres odbiorcy do schowka</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="371"/> <location filename="../bitmessageqt/__init__.py" line="379"/>
<source>Force send</source> <source>Force send</source>
<translation>Wymuś wysłanie</translation> <translation>Wymuś wysłanie</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="587"/> <location filename="../bitmessageqt/__init__.py" line="595"/>
<source>One of your addresses, %1, is an old version 1 address. Version 1 addresses are no longer supported. May we delete it now?</source> <source>One of your addresses, %1, is an old version 1 address. Version 1 addresses are no longer supported. May we delete it now?</source>
<translation>Jeden z adresów, %1, jest starym adresem wersji 1. Adresy tej wersji nie już wspierane. Usunąć go?</translation> <translation>Jeden z adresów, %1, jest starym adresem wersji 1. Adresy tej wersji nie już wspierane. Usunąć go?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1034"/> <location filename="../bitmessageqt/__init__.py" line="1039"/>
<source>Waiting for their encryption key. Will request it again soon.</source> <source>Waiting for their encryption key. Will request it again soon.</source>
<translation>Oczekiwanie na klucz szyfrujący odbiorcy. Niedługo nastąpi ponowne wysłanie o niego prośby.</translation> <translation>Oczekiwanie na klucz szyfrujący odbiorcy. Niedługo nastąpi ponowne wysłanie o niego prośby.</translation>
</message> </message>
@ -324,17 +368,17 @@ Please type the desired email address (including @mailchuck.com) below:</source>
<translation type="unfinished"/> <translation type="unfinished"/>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1040"/> <location filename="../bitmessageqt/__init__.py" line="1045"/>
<source>Queued.</source> <source>Queued.</source>
<translation>W kolejce do wysłania.</translation> <translation>W kolejce do wysłania.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1043"/> <location filename="../bitmessageqt/__init__.py" line="1048"/>
<source>Message sent. Waiting for acknowledgement. Sent at %1</source> <source>Message sent. Waiting for acknowledgement. Sent at %1</source>
<translation>Wiadomość wysłana. Oczekiwanie na potwierdzenie odbioru. Wysłano o %1</translation> <translation>Wiadomość wysłana. Oczekiwanie na potwierdzenie odbioru. Wysłano o %1</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1046"/> <location filename="../bitmessageqt/__init__.py" line="1051"/>
<source>Message sent. Sent at %1</source> <source>Message sent. Sent at %1</source>
<translation>Wiadomość wysłana. Wysłano o %1</translation> <translation>Wiadomość wysłana. Wysłano o %1</translation>
</message> </message>
@ -344,47 +388,47 @@ Please type the desired email address (including @mailchuck.com) below:</source>
<translation type="unfinished"/> <translation type="unfinished"/>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1052"/> <location filename="../bitmessageqt/__init__.py" line="1057"/>
<source>Acknowledgement of the message received %1</source> <source>Acknowledgement of the message received %1</source>
<translation>Otrzymano potwierdzenie odbioru wiadomości %1</translation> <translation>Otrzymano potwierdzenie odbioru wiadomości %1</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2140"/> <location filename="../bitmessageqt/__init__.py" line="2149"/>
<source>Broadcast queued.</source> <source>Broadcast queued.</source>
<translation>Przekaz w kolejce do wysłania.</translation> <translation>Przekaz w kolejce do wysłania.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1061"/> <location filename="../bitmessageqt/__init__.py" line="1066"/>
<source>Broadcast on %1</source> <source>Broadcast on %1</source>
<translation>Wysłana o %1</translation> <translation>Wysłana o %1</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1064"/> <location filename="../bitmessageqt/__init__.py" line="1069"/>
<source>Problem: The work demanded by the recipient is more difficult than you are willing to do. %1</source> <source>Problem: The work demanded by the recipient is more difficult than you are willing to do. %1</source>
<translation>Problem: dowód pracy wymagany przez odbiorcę jest trudniejszy niż zaakceptowany przez Ciebie. %1</translation> <translation>Problem: dowód pracy wymagany przez odbiorcę jest trudniejszy niż zaakceptowany przez Ciebie. %1</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1067"/> <location filename="../bitmessageqt/__init__.py" line="1072"/>
<source>Problem: The recipient&apos;s encryption key is no good. Could not encrypt message. %1</source> <source>Problem: The recipient&apos;s encryption key is no good. Could not encrypt message. %1</source>
<translation>Problem: klucz szyfrujący odbiorcy jest nieprawidłowy. Nie można zaszyfrować wiadomości. %1</translation> <translation>Problem: klucz szyfrujący odbiorcy jest nieprawidłowy. Nie można zaszyfrować wiadomości. %1</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1070"/> <location filename="../bitmessageqt/__init__.py" line="1075"/>
<source>Forced difficulty override. Send should start soon.</source> <source>Forced difficulty override. Send should start soon.</source>
<translation>Wymuszono ominięcie trudności. Wysłanie zostanie wkrótce rozpoczęte.</translation> <translation>Wymuszono ominięcie trudności. Wysłanie zostanie wkrótce rozpoczęte.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1073"/> <location filename="../bitmessageqt/__init__.py" line="1078"/>
<source>Unknown status: %1 %2</source> <source>Unknown status: %1 %2</source>
<translation>Nieznany status: %1 %2</translation> <translation>Nieznany status: %1 %2</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1612"/> <location filename="../bitmessageqt/__init__.py" line="1619"/>
<source>Not Connected</source> <source>Not Connected</source>
<translation>Brak połączenia</translation> <translation>Brak połączenia</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1204"/> <location filename="../bitmessageqt/__init__.py" line="1209"/>
<source>Show Bitmessage</source> <source>Show Bitmessage</source>
<translation>Pokaż Bitmessage</translation> <translation>Pokaż Bitmessage</translation>
</message> </message>
@ -394,12 +438,12 @@ Please type the desired email address (including @mailchuck.com) below:</source>
<translation>Wyślij</translation> <translation>Wyślij</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1227"/> <location filename="../bitmessageqt/__init__.py" line="1232"/>
<source>Subscribe</source> <source>Subscribe</source>
<translation>Subskrybuj</translation> <translation>Subskrybuj</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1233"/> <location filename="../bitmessageqt/__init__.py" line="1238"/>
<source>Channel</source> <source>Channel</source>
<translation>Kanał</translation> <translation>Kanał</translation>
</message> </message>
@ -409,12 +453,12 @@ Please type the desired email address (including @mailchuck.com) below:</source>
<translation>Zamknij</translation> <translation>Zamknij</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1459"/> <location filename="../bitmessageqt/__init__.py" line="1464"/>
<source>You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file.</source> <source>You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file.</source>
<translation>Możesz zarządzać swoimi kluczami edytując plik keys.dat znajdujący się w tym samym katalogu co program. Zaleca się zrobienie kopii zapasowej tego pliku.</translation> <translation>Możesz zarządzać swoimi kluczami edytując plik keys.dat znajdujący się w tym samym katalogu co program. Zaleca się zrobienie kopii zapasowej tego pliku.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1463"/> <location filename="../bitmessageqt/__init__.py" line="1468"/>
<source>You may manage your keys by editing the keys.dat file stored in <source>You may manage your keys by editing the keys.dat file stored in
%1 %1
It is important that you back up this file.</source> It is important that you back up this file.</source>
@ -423,17 +467,17 @@ It is important that you back up this file.</source>
Zaleca się zrobienie kopii zapasowej tego pliku.</translation> Zaleca się zrobienie kopii zapasowej tego pliku.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1470"/> <location filename="../bitmessageqt/__init__.py" line="1475"/>
<source>Open keys.dat?</source> <source>Open keys.dat?</source>
<translation>Otworzyć plik keys.dat?</translation> <translation>Otworzyć plik keys.dat?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1467"/> <location filename="../bitmessageqt/__init__.py" line="1472"/>
<source>You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.)</source> <source>You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.)</source>
<translation>Możesz zarządzać swoimi kluczami edytując plik keys.dat znajdujący się w tym samym katalogu co program. Zaleca się zrobienie kopii zapasowej tego pliku. Czy chcesz otworzyć ten plik teraz? (Zamknij Bitmessage, przed wprowadzeniem jakichkolwiek zmian.)</translation> <translation>Możesz zarządzać swoimi kluczami edytując plik keys.dat znajdujący się w tym samym katalogu co program. Zaleca się zrobienie kopii zapasowej tego pliku. Czy chcesz otworzyć ten plik teraz? (Zamknij Bitmessage, przed wprowadzeniem jakichkolwiek zmian.)</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1470"/> <location filename="../bitmessageqt/__init__.py" line="1475"/>
<source>You may manage your keys by editing the keys.dat file stored in <source>You may manage your keys by editing the keys.dat file stored in
%1 %1
It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.)</source> It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.)</source>
@ -442,37 +486,37 @@ It is important that you back up this file. Would you like to open the file now?
Zaleca się zrobienie kopii zapasowej tego pliku. Czy chcesz otworzyć ten plik teraz? (Zamknij Bitmessage przed wprowadzeniem jakichkolwiek zmian.)</translation> Zaleca się zrobienie kopii zapasowej tego pliku. Czy chcesz otworzyć ten plik teraz? (Zamknij Bitmessage przed wprowadzeniem jakichkolwiek zmian.)</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1477"/> <location filename="../bitmessageqt/__init__.py" line="1482"/>
<source>Delete trash?</source> <source>Delete trash?</source>
<translation>Opróżnić kosz?</translation> <translation>Opróżnić kosz?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1477"/> <location filename="../bitmessageqt/__init__.py" line="1482"/>
<source>Are you sure you want to delete all trashed messages?</source> <source>Are you sure you want to delete all trashed messages?</source>
<translation>Czy na pewno usunąć wszystkie wiadomości z kosza?</translation> <translation>Czy na pewno usunąć wszystkie wiadomości z kosza?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1495"/> <location filename="../bitmessageqt/__init__.py" line="1500"/>
<source>bad passphrase</source> <source>bad passphrase</source>
<translation>nieprawidłowe hasło</translation> <translation>nieprawidłowe hasło</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1495"/> <location filename="../bitmessageqt/__init__.py" line="1500"/>
<source>You must type your passphrase. If you don&apos;t have one then this is not the form for you.</source> <source>You must type your passphrase. If you don&apos;t have one then this is not the form for you.</source>
<translation>Musisz wpisać swoje hasło. Jeżeli go nie posiadasz, to ten formularz nie jest dla Ciebie.</translation> <translation>Musisz wpisać swoje hasło. Jeżeli go nie posiadasz, to ten formularz nie jest dla Ciebie.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1518"/> <location filename="../bitmessageqt/__init__.py" line="1523"/>
<source>Bad address version number</source> <source>Bad address version number</source>
<translation>Nieprawidłowy numer wersji adresu</translation> <translation>Nieprawidłowy numer wersji adresu</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1508"/> <location filename="../bitmessageqt/__init__.py" line="1513"/>
<source>Your address version number must be a number: either 3 or 4.</source> <source>Your address version number must be a number: either 3 or 4.</source>
<translation>Twój numer wersji adresu powinien wynosić: 3 lub 4.</translation> <translation>Twój numer wersji adresu powinien wynosić: 3 lub 4.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1518"/> <location filename="../bitmessageqt/__init__.py" line="1523"/>
<source>Your address version number must be either 3 or 4.</source> <source>Your address version number must be either 3 or 4.</source>
<translation>Twój numer wersji adresu powinien wynosić: 3 lub 4.</translation> <translation>Twój numer wersji adresu powinien wynosić: 3 lub 4.</translation>
</message> </message>
@ -542,22 +586,22 @@ Zaleca się zrobienie kopii zapasowej tego pliku. Czy chcesz otworzyć ten plik
<translation type="unfinished"/> <translation type="unfinished"/>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1597"/> <location filename="../bitmessageqt/__init__.py" line="1604"/>
<source>Connection lost</source> <source>Connection lost</source>
<translation>Połączenie utracone</translation> <translation>Połączenie utracone</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1647"/> <location filename="../bitmessageqt/__init__.py" line="1654"/>
<source>Connected</source> <source>Connected</source>
<translation>Połączono</translation> <translation>Połączono</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1765"/> <location filename="../bitmessageqt/__init__.py" line="1774"/>
<source>Message trashed</source> <source>Message trashed</source>
<translation>Wiadomość usunięta</translation> <translation>Wiadomość usunięta</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1854"/> <location filename="../bitmessageqt/__init__.py" line="1863"/>
<source>The TTL, or Time-To-Live is the length of time that the network will hold the message. <source>The TTL, or Time-To-Live is the length of time that the network will hold the message.
The recipient must get it during this time. If your Bitmessage client does not hear an acknowledgement, it The recipient must get it during this time. If your Bitmessage client does not hear an acknowledgement, it
will resend the message automatically. The longer the Time-To-Live, the will resend the message automatically. The longer the Time-To-Live, the
@ -568,17 +612,17 @@ Im dłuższy TTL, tym więcej pracy będzie musiał wykonac komputer wysyłając
Zwykle 4-5 dniowy TTL jest odpowiedni.</translation> Zwykle 4-5 dniowy TTL jest odpowiedni.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1899"/> <location filename="../bitmessageqt/__init__.py" line="1908"/>
<source>Message too long</source> <source>Message too long</source>
<translation>Wiadomość zbyt długa</translation> <translation>Wiadomość zbyt długa</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1899"/> <location filename="../bitmessageqt/__init__.py" line="1908"/>
<source>The message that you are trying to send is too long by %1 bytes. (The maximum is 261644 bytes). Please cut it down before sending.</source> <source>The message that you are trying to send is too long by %1 bytes. (The maximum is 261644 bytes). Please cut it down before sending.</source>
<translation>Wiadomość jest za długa o %1 bajtów (maksymalna długość wynosi 261644 bajty). Przed wysłaniem należy skrócić.</translation> <translation>Wiadomość jest za długa o %1 bajtów (maksymalna długość wynosi 261644 bajty). Przed wysłaniem należy skrócić.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1941"/> <location filename="../bitmessageqt/__init__.py" line="1950"/>
<source>Error: Your account wasn&apos;t registered at an email gateway. Sending registration now as %1, please wait for the registration to be processed before retrying sending.</source> <source>Error: Your account wasn&apos;t registered at an email gateway. Sending registration now as %1, please wait for the registration to be processed before retrying sending.</source>
<translation>Błąd: Twoje konto nie było zarejestrowane w bramce poczty. Rejestrowanie jako %1, proszę poczekać na zakończenie procesu przed ponowną próbą wysłania wiadomości.</translation> <translation>Błąd: Twoje konto nie było zarejestrowane w bramce poczty. Rejestrowanie jako %1, proszę poczekać na zakończenie procesu przed ponowną próbą wysłania wiadomości.</translation>
</message> </message>
@ -623,57 +667,57 @@ Zwykle 4-5 dniowy TTL jest odpowiedni.</translation>
<translation type="unfinished"/> <translation type="unfinished"/>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2092"/> <location filename="../bitmessageqt/__init__.py" line="2101"/>
<source>Error: You must specify a From address. If you don&apos;t have one, go to the &apos;Your Identities&apos; tab.</source> <source>Error: You must specify a From address. If you don&apos;t have one, go to the &apos;Your Identities&apos; tab.</source>
<translation>Błąd: musisz wybrać adres wysyłania. Jeżeli go nie posiadasz, przejdź do zakładki &apos;Twoje tożsamości&apos;.</translation> <translation>Błąd: musisz wybrać adres wysyłania. Jeżeli go nie posiadasz, przejdź do zakładki &apos;Twoje tożsamości&apos;.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2026"/> <location filename="../bitmessageqt/__init__.py" line="2035"/>
<source>Address version number</source> <source>Address version number</source>
<translation>Numer wersji adresu</translation> <translation>Numer wersji adresu</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2026"/> <location filename="../bitmessageqt/__init__.py" line="2035"/>
<source>Concerning the address %1, Bitmessage cannot understand address version numbers of %2. Perhaps upgrade Bitmessage to the latest version.</source> <source>Concerning the address %1, Bitmessage cannot understand address version numbers of %2. Perhaps upgrade Bitmessage to the latest version.</source>
<translation>Odnośnie adresu %1, Bitmessage nie potrafi odczytać wersji adresu %2. Może uaktualnij Bitmessage do najnowszej wersji.</translation> <translation>Odnośnie adresu %1, Bitmessage nie potrafi odczytać wersji adresu %2. Może uaktualnij Bitmessage do najnowszej wersji.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2030"/> <location filename="../bitmessageqt/__init__.py" line="2039"/>
<source>Stream number</source> <source>Stream number</source>
<translation>Numer strumienia</translation> <translation>Numer strumienia</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2030"/> <location filename="../bitmessageqt/__init__.py" line="2039"/>
<source>Concerning the address %1, Bitmessage cannot handle stream numbers of %2. Perhaps upgrade Bitmessage to the latest version.</source> <source>Concerning the address %1, Bitmessage cannot handle stream numbers of %2. Perhaps upgrade Bitmessage to the latest version.</source>
<translation>Odnośnie adresu %1, Bitmessage nie potrafi operować na strumieniu adresu %2. Może uaktualnij Bitmessage do najnowszej wersji.</translation> <translation>Odnośnie adresu %1, Bitmessage nie potrafi operować na strumieniu adresu %2. Może uaktualnij Bitmessage do najnowszej wersji.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2035"/> <location filename="../bitmessageqt/__init__.py" line="2044"/>
<source>Warning: You are currently not connected. Bitmessage will do the work necessary to send the message but it won&apos;t send until you connect.</source> <source>Warning: You are currently not connected. Bitmessage will do the work necessary to send the message but it won&apos;t send until you connect.</source>
<translation>Uwaga: nie jesteś obecnie połączony. Bitmessage wykona niezbędną pracę do wysłania wiadomości, ale nie wyśle jej póki się nie połączysz.</translation> <translation>Uwaga: nie jesteś obecnie połączony. Bitmessage wykona niezbędną pracę do wysłania wiadomości, ale nie wyśle jej póki się nie połączysz.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2084"/> <location filename="../bitmessageqt/__init__.py" line="2093"/>
<source>Message queued.</source> <source>Message queued.</source>
<translation>W kolejce do wysłania</translation> <translation>W kolejce do wysłania</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2088"/> <location filename="../bitmessageqt/__init__.py" line="2097"/>
<source>Your &apos;To&apos; field is empty.</source> <source>Your &apos;To&apos; field is empty.</source>
<translation>Pole &apos;Do&apos; jest puste</translation> <translation>Pole &apos;Do&apos; jest puste</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2149"/> <location filename="../bitmessageqt/__init__.py" line="2158"/>
<source>Right click one or more entries in your address book and select &apos;Send message to this address&apos;.</source> <source>Right click one or more entries in your address book and select &apos;Send message to this address&apos;.</source>
<translation>Użyj prawego przycisku myszy na adresie z książki adresowej i wybierz opcję &quot;Wyślij wiadomość do tego adresu&quot;.</translation> <translation>Użyj prawego przycisku myszy na adresie z książki adresowej i wybierz opcję &quot;Wyślij wiadomość do tego adresu&quot;.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2165"/> <location filename="../bitmessageqt/__init__.py" line="2174"/>
<source>Fetched address from namecoin identity.</source> <source>Fetched address from namecoin identity.</source>
<translation>Pobrano adres z identyfikatora Namecoin.</translation> <translation>Pobrano adres z identyfikatora Namecoin.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2277"/> <location filename="../bitmessageqt/__init__.py" line="2286"/>
<source>New Message</source> <source>New Message</source>
<translation>Nowa wiadomość</translation> <translation>Nowa wiadomość</translation>
</message> </message>
@ -688,57 +732,57 @@ Zwykle 4-5 dniowy TTL jest odpowiedni.</translation>
<translation type="unfinished"/> <translation type="unfinished"/>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="59"/> <location filename="../bitmessageqt/blacklist.py" line="60"/>
<source>Address is valid.</source> <source>Address is valid.</source>
<translation>Adres jest prawidłowy.</translation> <translation>Adres jest prawidłowy.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="93"/> <location filename="../bitmessageqt/blacklist.py" line="94"/>
<source>The address you entered was invalid. Ignoring it.</source> <source>The address you entered was invalid. Ignoring it.</source>
<translation>Wprowadzono niewłaściwy adres, który został zignorowany.</translation> <translation>Wprowadzono niewłaściwy adres, który został zignorowany.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2307"/> <location filename="../bitmessageqt/__init__.py" line="2316"/>
<source>Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want.</source> <source>Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want.</source>
<translation>Błąd: Adres znajduje się już w książce adresowej.</translation> <translation>Błąd: Adres znajduje się już w książce adresowej.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3333"/> <location filename="../bitmessageqt/__init__.py" line="3343"/>
<source>Error: You cannot add the same address to your subscriptions twice. Perhaps rename the existing one if you want.</source> <source>Error: You cannot add the same address to your subscriptions twice. Perhaps rename the existing one if you want.</source>
<translation>Błąd: Adres znajduje się już na liście subskrybcji.</translation> <translation>Błąd: Adres znajduje się już na liście subskrybcji.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2429"/> <location filename="../bitmessageqt/__init__.py" line="2438"/>
<source>Restart</source> <source>Restart</source>
<translation>Uruchom ponownie</translation> <translation>Uruchom ponownie</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2415"/> <location filename="../bitmessageqt/__init__.py" line="2424"/>
<source>You must restart Bitmessage for the port number change to take effect.</source> <source>You must restart Bitmessage for the port number change to take effect.</source>
<translation>Musisz zrestartować Bitmessage, aby zmiana numeru portu weszła w życie.</translation> <translation>Musisz zrestartować Bitmessage, aby zmiana numeru portu weszła w życie.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2429"/> <location filename="../bitmessageqt/__init__.py" line="2438"/>
<source>Bitmessage will use your proxy from now on but you may want to manually restart Bitmessage now to close existing connections (if any).</source> <source>Bitmessage will use your proxy from now on but you may want to manually restart Bitmessage now to close existing connections (if any).</source>
<translation>Bitmessage będzie of teraz korzystał z serwera proxy, ale możesz ręcznie zrestartować Bitmessage, aby zamknąć obecne połączenia (jeżeli występują).</translation> <translation>Bitmessage będzie of teraz korzystał z serwera proxy, ale możesz ręcznie zrestartować Bitmessage, aby zamknąć obecne połączenia (jeżeli występują).</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2458"/> <location filename="../bitmessageqt/__init__.py" line="2467"/>
<source>Number needed</source> <source>Number needed</source>
<translation>Wymagany numer</translation> <translation>Wymagany numer</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2458"/> <location filename="../bitmessageqt/__init__.py" line="2467"/>
<source>Your maximum download and upload rate must be numbers. Ignoring what you typed.</source> <source>Your maximum download and upload rate must be numbers. Ignoring what you typed.</source>
<translation>Maksymalne prędkości wysyłania i pobierania powinny być liczbami. Zignorowano zmiany.</translation> <translation>Maksymalne prędkości wysyłania i pobierania powinny być liczbami. Zignorowano zmiany.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2538"/> <location filename="../bitmessageqt/__init__.py" line="2547"/>
<source>Will not resend ever</source> <source>Will not resend ever</source>
<translation>Nigdy nie wysyłaj ponownie</translation> <translation>Nigdy nie wysyłaj ponownie</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2538"/> <location filename="../bitmessageqt/__init__.py" line="2547"/>
<source>Note that the time limit you entered is less than the amount of time Bitmessage waits for the first resend attempt therefore your messages will never be resent.</source> <source>Note that the time limit you entered is less than the amount of time Bitmessage waits for the first resend attempt therefore your messages will never be resent.</source>
<translation>Zauważ, że wpisany limit czasu wynosi mniej niż czas, który Bitmessage czeka przed pierwszą ponowną próbą wysłania wiadomości, więc Twoje wiadomości nie zostaną nigdy wysłane ponownie.</translation> <translation>Zauważ, że wpisany limit czasu wynosi mniej niż czas, który Bitmessage czeka przed pierwszą ponowną próbą wysłania wiadomości, więc Twoje wiadomości nie zostaną nigdy wysłane ponownie.</translation>
</message> </message>
@ -773,24 +817,24 @@ Zwykle 4-5 dniowy TTL jest odpowiedni.</translation>
<translation>Naprawdę musisz wpisać hasło.</translation> <translation>Naprawdę musisz wpisać hasło.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3012"/> <location filename="../bitmessageqt/__init__.py" line="3022"/>
<source>Address is gone</source> <source>Address is gone</source>
<translation>Adres zniknął</translation> <translation>Adres zniknął</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3012"/> <location filename="../bitmessageqt/__init__.py" line="3022"/>
<source>Bitmessage cannot find your address %1. Perhaps you removed it?</source> <source>Bitmessage cannot find your address %1. Perhaps you removed it?</source>
<translation>Bitmessage nie może odnaleźć Twojego adresu %1. Może go usunąłeś?</translation> <translation>Bitmessage nie może odnaleźć Twojego adresu %1. Może go usunąłeś?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3015"/> <location filename="../bitmessageqt/__init__.py" line="3025"/>
<source>Address disabled</source> <source>Address disabled</source>
<translation>Adres nieaktywny</translation> <translation>Adres nieaktywny</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3015"/> <location filename="../bitmessageqt/__init__.py" line="3025"/>
<source>Error: The address from which you are trying to send is disabled. You&apos;ll have to enable it on the &apos;Your Identities&apos; tab before using it.</source> <source>Error: The address from which you are trying to send is disabled. You&apos;ll have to enable it on the &apos;Your Identities&apos; tab before using it.</source>
<translation>Błąd: adres, z którego próbowałeś wysłać wiadomość jest nieaktywny. Włącz go w zakładce &apos;Twoje tożsamości&apos; zanim go użyjesz.</translation> <translation>Błąd: adres, z którego próbowałeś wysłać wiadomość jest nieaktywny. Włącz go w zakładce Twoje tożsamości, zanim go użyjesz.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3020"/> <location filename="../bitmessageqt/__init__.py" line="3020"/>
@ -798,42 +842,42 @@ Zwykle 4-5 dniowy TTL jest odpowiedni.</translation>
<translation type="unfinished"/> <translation type="unfinished"/>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3090"/> <location filename="../bitmessageqt/__init__.py" line="3100"/>
<source>Entry added to the blacklist. Edit the label to your liking.</source> <source>Entry added to the blacklist. Edit the label to your liking.</source>
<translation>Dodano wpis do listy blokowanych. Można teraz zmienić jego nazwę.</translation> <translation>Dodano wpis do listy blokowanych. Można teraz zmienić jego nazwę.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3095"/> <location filename="../bitmessageqt/__init__.py" line="3105"/>
<source>Error: You cannot add the same address to your blacklist twice. Try renaming the existing one if you want.</source> <source>Error: You cannot add the same address to your blacklist twice. Try renaming the existing one if you want.</source>
<translation>Błąd: Adres znajduje się już na liście blokowanych.</translation> <translation>Błąd: adres znajduje się już na liście blokowanych.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3237"/> <location filename="../bitmessageqt/__init__.py" line="3247"/>
<source>Moved items to trash.</source> <source>Moved items to trash.</source>
<translation>Przeniesiono wiadomości do kosza.</translation> <translation>Przeniesiono wiadomości do kosza.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3181"/> <location filename="../bitmessageqt/__init__.py" line="3191"/>
<source>Undeleted item.</source> <source>Undeleted item.</source>
<translation>Przywrócono wiadomość.</translation> <translation>Przywrócono wiadomość.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3205"/> <location filename="../bitmessageqt/__init__.py" line="3215"/>
<source>Save As...</source> <source>Save As...</source>
<translation>Zapisz jako</translation> <translation>Zapisz jako</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3214"/> <location filename="../bitmessageqt/__init__.py" line="3224"/>
<source>Write error.</source> <source>Write error.</source>
<translation>Błąd zapisu.</translation> <translation>Błąd zapisu.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3317"/> <location filename="../bitmessageqt/__init__.py" line="3327"/>
<source>No addresses selected.</source> <source>No addresses selected.</source>
<translation>Nie wybrano adresu.</translation> <translation>Nie wybrano adresu.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3372"/> <location filename="../bitmessageqt/__init__.py" line="3382"/>
<source>If you delete the subscription, messages that you already received will become inaccessible. Maybe you can consider disabling the subscription instead. Disabled subscriptions will not receive new messages, but you can still view messages you already received. <source>If you delete the subscription, messages that you already received will become inaccessible. Maybe you can consider disabling the subscription instead. Disabled subscriptions will not receive new messages, but you can still view messages you already received.
Are you sure you want to delete the subscription?</source> Are you sure you want to delete the subscription?</source>
@ -842,7 +886,7 @@ Are you sure you want to delete the subscription?</source>
Czy na pewno chcesz usunąć subskrypcję?</translation> Czy na pewno chcesz usunąć subskrypcję?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3615"/> <location filename="../bitmessageqt/__init__.py" line="3629"/>
<source>If you delete the channel, messages that you already received will become inaccessible. Maybe you can consider disabling the channel instead. Disabled channels will not receive new messages, but you can still view messages you already received. <source>If you delete the channel, messages that you already received will become inaccessible. Maybe you can consider disabling the channel instead. Disabled channels will not receive new messages, but you can still view messages you already received.
Are you sure you want to delete the channel?</source> Are you sure you want to delete the channel?</source>
@ -851,32 +895,32 @@ Are you sure you want to delete the channel?</source>
Czy na pewno chcesz usunąć ten kanał?</translation> Czy na pewno chcesz usunąć ten kanał?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3745"/> <location filename="../bitmessageqt/__init__.py" line="3759"/>
<source>Do you really want to remove this avatar?</source> <source>Do you really want to remove this avatar?</source>
<translation>Czy na pewno chcesz usunąć ten awatar?</translation> <translation>Czy na pewno chcesz usunąć ten awatar?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3753"/> <location filename="../bitmessageqt/__init__.py" line="3767"/>
<source>You have already set an avatar for this address. Do you really want to overwrite it?</source> <source>You have already set an avatar for this address. Do you really want to overwrite it?</source>
<translation>Już ustawiłeś awatar dla tego adresu. Czy na pewno chcesz go nadpisać?</translation> <translation>Już ustawiłeś awatar dla tego adresu. Czy na pewno chcesz go nadpisać?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="4151"/> <location filename="../bitmessageqt/__init__.py" line="4169"/>
<source>Start-on-login not yet supported on your OS.</source> <source>Start-on-login not yet supported on your OS.</source>
<translation>Start po zalogowaniu jeszcze nie jest wspierany pod Twoim systemem.</translation> <translation>Start po zalogowaniu jeszcze nie jest wspierany pod Twoim systemem.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="4144"/> <location filename="../bitmessageqt/__init__.py" line="4162"/>
<source>Minimize-to-tray not yet supported on your OS.</source> <source>Minimize-to-tray not yet supported on your OS.</source>
<translation>Minimalizacja do zasobnika nie jest jeszcze wspierana pod Twoim systemem.</translation> <translation>Minimalizacja do zasobnika nie jest jeszcze wspierana pod Twoim systemem.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="4147"/> <location filename="../bitmessageqt/__init__.py" line="4165"/>
<source>Tray notifications not yet supported on your OS.</source> <source>Tray notifications not yet supported on your OS.</source>
<translation>Powiadomienia w zasobniku nie jeszcze wspierane pod Twoim systemem.</translation> <translation>Powiadomienia w zasobniku nie jeszcze wspierane pod Twoim systemem.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="4318"/> <location filename="../bitmessageqt/__init__.py" line="4336"/>
<source>Testing...</source> <source>Testing...</source>
<translation>Testowanie</translation> <translation>Testowanie</translation>
</message> </message>
@ -1126,7 +1170,7 @@ Czy na pewno chcesz usunąć ten kanał?</translation>
<translation>Dołącz / Utwórz kanał</translation> <translation>Dołącz / Utwórz kanał</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/foldertree.py" line="181"/> <location filename="../bitmessageqt/foldertree.py" line="206"/>
<source>All accounts</source> <source>All accounts</source>
<translation>Wszystkie konta</translation> <translation>Wszystkie konta</translation>
</message> </message>
@ -1136,12 +1180,12 @@ Czy na pewno chcesz usunąć ten kanał?</translation>
<translation>Poziom powiększenia %1%</translation> <translation>Poziom powiększenia %1%</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="90"/> <location filename="../bitmessageqt/blacklist.py" line="91"/>
<source>Error: You cannot add the same address to your list twice. Perhaps rename the existing one if you want.</source> <source>Error: You cannot add the same address to your list twice. Perhaps rename the existing one if you want.</source>
<translation>Błąd: Adres znajduje sie już na liście.</translation> <translation>Błąd: Adres znajduje sie już na liście.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="111"/> <location filename="../bitmessageqt/blacklist.py" line="112"/>
<source>Add new entry</source> <source>Add new entry</source>
<translation>Dodaj nowy wpis</translation> <translation>Dodaj nowy wpis</translation>
</message> </message>
@ -1151,42 +1195,42 @@ Czy na pewno chcesz usunąć ten kanał?</translation>
<translation type="unfinished"/> <translation type="unfinished"/>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1774"/> <location filename="../bitmessageqt/__init__.py" line="1783"/>
<source>New version of PyBitmessage is available: %1. Download it from https://github.com/Bitmessage/PyBitmessage/releases/latest</source> <source>New version of PyBitmessage is available: %1. Download it from https://github.com/Bitmessage/PyBitmessage/releases/latest</source>
<translation>Nowa wersja Bitmessage jest dostępna: %1. Pobierz z https://github.com/Bitmessage/PyBitmessage/releases/latest</translation> <translation>Nowa wersja Bitmessage jest dostępna: %1. Pobierz z https://github.com/Bitmessage/PyBitmessage/releases/latest</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2774"/> <location filename="../bitmessageqt/__init__.py" line="2785"/>
<source>Waiting for PoW to finish... %1%</source> <source>Waiting for PoW to finish... %1%</source>
<translation>Oczekiwanie na wykonanie dowodu pracy %1%</translation> <translation>Oczekiwanie na wykonanie dowodu pracy %1%</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2784"/> <location filename="../bitmessageqt/__init__.py" line="2795"/>
<source>Shutting down Pybitmessage... %1%</source> <source>Shutting down Pybitmessage... %1%</source>
<translation>Zamykanie PyBitmessage %1%</translation> <translation>Zamykanie PyBitmessage %1%</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2802"/> <location filename="../bitmessageqt/__init__.py" line="2814"/>
<source>Waiting for objects to be sent... %1%</source> <source>Waiting for objects to be sent... %1%</source>
<translation>Oczekiwanie na wysłanie obiektów %1%</translation> <translation>Oczekiwanie na wysłanie obiektów %1%</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2822"/> <location filename="../bitmessageqt/__init__.py" line="2832"/>
<source>Saving settings... %1%</source> <source>Saving settings... %1%</source>
<translation>Zapisywanie ustawień %1%</translation> <translation>Zapisywanie ustawień %1%</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2835"/> <location filename="../bitmessageqt/__init__.py" line="2845"/>
<source>Shutting down core... %1%</source> <source>Shutting down core... %1%</source>
<translation>Zamykanie rdzenia programu %1%</translation> <translation>Zamykanie rdzenia programu %1%</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2841"/> <location filename="../bitmessageqt/__init__.py" line="2851"/>
<source>Stopping notifications... %1%</source> <source>Stopping notifications... %1%</source>
<translation>Zatrzymywanie powiadomień %1%</translation> <translation>Zatrzymywanie powiadomień %1%</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2845"/> <location filename="../bitmessageqt/__init__.py" line="2855"/>
<source>Shutdown imminent... %1%</source> <source>Shutdown imminent... %1%</source>
<translation>Zaraz zamknę %1%</translation> <translation>Zaraz zamknę %1%</translation>
</message> </message>
@ -1196,42 +1240,42 @@ Czy na pewno chcesz usunąć ten kanał?</translation>
<translation><numerusform>%n godzina</numerusform><numerusform>%n godziny</numerusform><numerusform>%n godzin</numerusform><numerusform>%n godzin</numerusform></translation> <translation><numerusform>%n godzina</numerusform><numerusform>%n godziny</numerusform><numerusform>%n godzin</numerusform><numerusform>%n godzin</numerusform></translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="../bitmessageqt/__init__.py" line="829"/> <location filename="../bitmessageqt/__init__.py" line="834"/>
<source>%n day(s)</source> <source>%n day(s)</source>
<translation><numerusform>%n dzień</numerusform><numerusform>%n dni</numerusform><numerusform>%n dni</numerusform><numerusform>%n dni</numerusform></translation> <translation><numerusform>%n dzień</numerusform><numerusform>%n dni</numerusform><numerusform>%n dni</numerusform><numerusform>%n dni</numerusform></translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2742"/> <location filename="../bitmessageqt/__init__.py" line="2753"/>
<source>Shutting down PyBitmessage... %1%</source> <source>Shutting down PyBitmessage... %1%</source>
<translation>Zamykanie PyBitmessage %1%</translation> <translation>Zamykanie PyBitmessage %1%</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1148"/> <location filename="../bitmessageqt/__init__.py" line="1153"/>
<source>Sent</source> <source>Sent</source>
<translation>Wysłane</translation> <translation>Wysłane</translation>
</message> </message>
<message> <message>
<location filename="../class_addressGenerator.py" line="91"/> <location filename="../class_addressGenerator.py" line="115"/>
<source>Generating one new address</source> <source>Generating one new address</source>
<translation>Generowanie jednego nowego adresu</translation> <translation>Generowanie jednego nowego adresu</translation>
</message> </message>
<message> <message>
<location filename="../class_addressGenerator.py" line="153"/> <location filename="../class_addressGenerator.py" line="193"/>
<source>Done generating address. Doing work necessary to broadcast it...</source> <source>Done generating address. Doing work necessary to broadcast it...</source>
<translation>Adresy wygenerowany. Wykonywanie dowodu pracy niezbędnego na jego rozesłanie</translation> <translation>Adresy wygenerowany. Wykonywanie dowodu pracy niezbędnego na jego rozesłanie</translation>
</message> </message>
<message> <message>
<location filename="../class_addressGenerator.py" line="170"/> <location filename="../class_addressGenerator.py" line="219"/>
<source>Generating %1 new addresses.</source> <source>Generating %1 new addresses.</source>
<translation>Generowanie %1 nowych adresów.</translation> <translation>Generowanie %1 nowych adresów.</translation>
</message> </message>
<message> <message>
<location filename="../class_addressGenerator.py" line="247"/> <location filename="../class_addressGenerator.py" line="323"/>
<source>%1 is already in &apos;Your Identities&apos;. Not adding it again.</source> <source>%1 is already in &apos;Your Identities&apos;. Not adding it again.</source>
<translation>%1 jest już w &apos;Twoich tożsamościach&apos;. Nie zostanie tu dodany.</translation> <translation>%1 jest już w &apos;Twoich tożsamościach&apos;. Nie zostanie tu dodany.</translation>
</message> </message>
<message> <message>
<location filename="../class_addressGenerator.py" line="283"/> <location filename="../class_addressGenerator.py" line="377"/>
<source>Done generating address</source> <source>Done generating address</source>
<translation>Ukończono generowanie adresów</translation> <translation>Ukończono generowanie adresów</translation>
</message> </message>
@ -1241,96 +1285,96 @@ Czy na pewno chcesz usunąć ten kanał?</translation>
<translation type="unfinished"/> <translation type="unfinished"/>
</message> </message>
<message> <message>
<location filename="../class_sqlThread.py" line="584"/> <location filename="../class_sqlThread.py" line="566"/>
<source>Disk full</source> <source>Disk full</source>
<translation>Dysk pełny</translation> <translation>Dysk pełny</translation>
</message> </message>
<message> <message>
<location filename="../class_sqlThread.py" line="584"/> <location filename="../class_sqlThread.py" line="566"/>
<source>Alert: Your disk or data storage volume is full. Bitmessage will now exit.</source> <source>Alert: Your disk or data storage volume is full. Bitmessage will now exit.</source>
<translation>Uwaga: Twój dysk lub partycja jest pełny. Bitmessage zamknie się.</translation> <translation>Uwaga: Twój dysk lub partycja jest pełny. Bitmessage zamknie się.</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="747"/> <location filename="../class_singleWorker.py" line="1060"/>
<source>Error! Could not find sender address (your address) in the keys.dat file.</source> <source>Error! Could not find sender address (your address) in the keys.dat file.</source>
<translation>Błąd! Nie można odnaleźć adresu nadawcy (Twojego adresu) w pliku keys.dat.</translation> <translation>Błąd! Nie można odnaleźć adresu nadawcy (Twojego adresu) w pliku keys.dat.</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="495"/> <location filename="../class_singleWorker.py" line="580"/>
<source>Doing work necessary to send broadcast...</source> <source>Doing work necessary to send broadcast...</source>
<translation>Wykonywanie dowodu pracy niezbędnego do wysłania przekazu</translation> <translation>Wykonywanie dowodu pracy niezbędnego do wysłania przekazu</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="518"/> <location filename="../class_singleWorker.py" line="613"/>
<source>Broadcast sent on %1</source> <source>Broadcast sent on %1</source>
<translation>Wysłano: %1</translation> <translation>Wysłano: %1</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="587"/> <location filename="../class_singleWorker.py" line="721"/>
<source>Encryption key was requested earlier.</source> <source>Encryption key was requested earlier.</source>
<translation>Prośba o klucz szyfrujący została już wysłana.</translation> <translation>Prośba o klucz szyfrujący została już wysłana.</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="624"/> <location filename="../class_singleWorker.py" line="795"/>
<source>Sending a request for the recipient&apos;s encryption key.</source> <source>Sending a request for the recipient&apos;s encryption key.</source>
<translation>Wysyłanie zapytania o klucz szyfrujący odbiorcy.</translation> <translation>Wysyłanie zapytania o klucz szyfrujący odbiorcy.</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="639"/> <location filename="../class_singleWorker.py" line="820"/>
<source>Looking up the receiver&apos;s public key</source> <source>Looking up the receiver&apos;s public key</source>
<translation>Wyszukiwanie klucza publicznego odbiorcy</translation> <translation>Wyszukiwanie klucza publicznego odbiorcy</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="673"/> <location filename="../class_singleWorker.py" line="878"/>
<source>Problem: Destination is a mobile device who requests that the destination be included in the message but this is disallowed in your settings. %1</source> <source>Problem: Destination is a mobile device who requests that the destination be included in the message but this is disallowed in your settings. %1</source>
<translation>Problem: adres docelowy jest urządzeniem przenośnym, które wymaga, aby adres docelowy był zawarty w wiadomości, ale jest to zabronione w Twoich ustawieniach. %1</translation> <translation>Problem: adres docelowy jest urządzeniem przenośnym, które wymaga, aby adres docelowy był zawarty w wiadomości, ale jest to zabronione w Twoich ustawieniach. %1</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="687"/> <location filename="../class_singleWorker.py" line="909"/>
<source>Doing work necessary to send message. <source>Doing work necessary to send message.
There is no required difficulty for version 2 addresses like this.</source> There is no required difficulty for version 2 addresses like this.</source>
<translation>Wykonywanie dowodu pracy niezbędnego do wysłania wiadomości. <translation>Wykonywanie dowodu pracy niezbędnego do wysłania wiadomości.
Nie ma wymaganej trudności dla adresów w wersji 2, takich jak ten adres.</translation> Nie ma wymaganej trudności dla adresów w wersji 2, takich jak ten adres.</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="701"/> <location filename="../class_singleWorker.py" line="944"/>
<source>Doing work necessary to send message. <source>Doing work necessary to send message.
Receiver&apos;s required difficulty: %1 and %2</source> Receiver&apos;s required difficulty: %1 and %2</source>
<translation>Wykonywanie dowodu pracy niezbędnego do wysłania wiadomości. <translation>Wykonywanie dowodu pracy niezbędnego do wysłania wiadomości.
Odbiorca wymaga trudności: %1 i %2</translation> Odbiorca wymaga trudności: %1 i %2</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="710"/> <location filename="../class_singleWorker.py" line="984"/>
<source>Problem: The work demanded by the recipient (%1 and %2) is more difficult than you are willing to do. %3</source> <source>Problem: The work demanded by the recipient (%1 and %2) is more difficult than you are willing to do. %3</source>
<translation>Problem: dowód pracy wymagany przez odbiorcę (%1 i %2) jest trudniejszy niż chciałbyś wykonać. %3</translation> <translation>Problem: dowód pracy wymagany przez odbiorcę (%1 i %2) jest trudniejszy niż chciałbyś wykonać. %3</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="722"/> <location filename="../class_singleWorker.py" line="1012"/>
<source>Problem: You are trying to send a message to yourself or a chan but your encryption key could not be found in the keys.dat file. Could not encrypt message. %1</source> <source>Problem: You are trying to send a message to yourself or a chan but your encryption key could not be found in the keys.dat file. Could not encrypt message. %1</source>
<translation>Problem: próbujesz wysłać wiadomość do siebie lub na kanał, ale Twój klucz szyfrujący nie został znaleziony w pliku keys.dat. Nie można zaszyfrować wiadomości. %1</translation> <translation>Problem: próbujesz wysłać wiadomość do siebie lub na kanał, ale Twój klucz szyfrujący nie został znaleziony w pliku keys.dat. Nie można zaszyfrować wiadomości. %1</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1049"/> <location filename="../bitmessageqt/__init__.py" line="1054"/>
<source>Doing work necessary to send message.</source> <source>Doing work necessary to send message.</source>
<translation>Wykonywanie pracy potrzebnej do wysłania wiadomości.</translation> <translation>Wykonywanie pracy potrzebnej do wysłania wiadomości.</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="845"/> <location filename="../class_singleWorker.py" line="1218"/>
<source>Message sent. Waiting for acknowledgement. Sent on %1</source> <source>Message sent. Waiting for acknowledgement. Sent on %1</source>
<translation>Wiadomość wysłana. Oczekiwanie na potwierdzenie odbioru. Wysłano o %1</translation> <translation>Wiadomość wysłana. Oczekiwanie na potwierdzenie odbioru. Wysłano o %1</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1037"/> <location filename="../bitmessageqt/__init__.py" line="1042"/>
<source>Doing work necessary to request encryption key.</source> <source>Doing work necessary to request encryption key.</source>
<translation>Wykonywanie pracy niezbędnej do prośby o klucz szyfrujący.</translation> <translation>Wykonywanie pracy niezbędnej do prośby o klucz szyfrujący.</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="961"/> <location filename="../class_singleWorker.py" line="1380"/>
<source>Broadcasting the public key request. This program will auto-retry if they are offline.</source> <source>Broadcasting the public key request. This program will auto-retry if they are offline.</source>
<translation>Rozsyłanie prośby o klucz publiczny. Program spróbuje ponownie, jeżeli jest on niepołączony.</translation> <translation>Rozsyłanie prośby o klucz publiczny. Program spróbuje ponownie, jeżeli jest on niepołączony.</translation>
</message> </message>
<message> <message>
<location filename="../class_singleWorker.py" line="963"/> <location filename="../class_singleWorker.py" line="1387"/>
<source>Sending public key request. Waiting for reply. Requested at %1</source> <source>Sending public key request. Waiting for reply. Requested at %1</source>
<translation>Wysyłanie prośby o klucz publiczny. Oczekiwanie na odpowiedź. Zapytano o %1</translation> <translation>Wysyłanie prośby o klucz publiczny. Oczekiwanie na odpowiedź. Zapytano o %1</translation>
</message> </message>
@ -1345,97 +1389,82 @@ Odbiorca wymaga trudności: %1 i %2</translation>
<translation>Usunięto mapowanie portów UPnP</translation> <translation>Usunięto mapowanie portów UPnP</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="248"/> <location filename="../bitmessageqt/__init__.py" line="244"/>
<source>Mark all messages as read</source> <source>Mark all messages as read</source>
<translation>Oznacz wszystkie jako przeczytane</translation> <translation>Oznacz wszystkie jako przeczytane</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2636"/> <location filename="../bitmessageqt/__init__.py" line="2645"/>
<source>Are you sure you would like to mark all messages read?</source> <source>Are you sure you would like to mark all messages read?</source>
<translation>Czy na pewno chcesz oznaczyć wszystkie wiadomości jako przeczytane?</translation> <translation>Czy na pewno chcesz oznaczyć wszystkie wiadomości jako przeczytane?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1058"/> <location filename="../bitmessageqt/__init__.py" line="1063"/>
<source>Doing work necessary to send broadcast.</source> <source>Doing work necessary to send broadcast.</source>
<translation>Wykonywanie dowodu pracy niezbędnego do wysłania przekazu.</translation> <translation>Wykonywanie dowodu pracy niezbędnego do wysłania przekazu.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2708"/> <location filename="../bitmessageqt/__init__.py" line="2721"/>
<source>Proof of work pending</source> <source>Proof of work pending</source>
<translation>Dowód pracy zawieszony</translation> <translation>Dowód pracy zawieszony</translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="../bitmessageqt/__init__.py" line="2708"/> <location filename="../bitmessageqt/__init__.py" line="2721"/>
<source>%n object(s) pending proof of work</source> <source>%n object(s) pending proof of work</source>
<translation><numerusform>Zawieszony dowód pracy %n obiektu</numerusform><numerusform>Zawieszony dowód pracy %n obiektów</numerusform><numerusform>Zawieszony dowód pracy %n obiektów</numerusform><numerusform>Zawieszony dowód pracy %n obiektów</numerusform></translation> <translation><numerusform>Zawieszony dowód pracy %n obiektu</numerusform><numerusform>Zawieszony dowód pracy %n obiektów</numerusform><numerusform>Zawieszony dowód pracy %n obiektów</numerusform><numerusform>Zawieszony dowód pracy %n obiektów</numerusform></translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="../bitmessageqt/__init__.py" line="2708"/> <location filename="../bitmessageqt/__init__.py" line="2721"/>
<source>%n object(s) waiting to be distributed</source> <source>%n object(s) waiting to be distributed</source>
<translation><numerusform>%n obiekt oczekuje na wysłanie</numerusform><numerusform>%n obiektów oczekuje na wysłanie</numerusform><numerusform>%n obiektów oczekuje na wysłanie</numerusform><numerusform>%n obiektów oczekuje na wysłanie</numerusform></translation> <translation><numerusform>%n obiekt oczekuje na wysłanie</numerusform><numerusform>%n obiektów oczekuje na wysłanie</numerusform><numerusform>%n obiektów oczekuje na wysłanie</numerusform><numerusform>%n obiektów oczekuje na wysłanie</numerusform></translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2708"/> <location filename="../bitmessageqt/__init__.py" line="2721"/>
<source>Wait until these tasks finish?</source> <source>Wait until these tasks finish?</source>
<translation>Czy poczekać te zadania zostaną zakończone?</translation> <translation>Czy poczekać te zadania zostaną zakończone?</translation>
</message> </message>
<message> <message>
<location filename="../class_outgoingSynSender.py" line="211"/> <location filename="../namecoin.py" line="115"/>
<source>Problem communicating with proxy: %1. Please check your network settings.</source>
<translation>Błąd podczas komunikacji z proxy: %1. Proszę sprawdź swoje ustawienia sieci.</translation>
</message>
<message>
<location filename="../class_outgoingSynSender.py" line="240"/>
<source>SOCKS5 Authentication problem: %1. Please check your SOCKS5 settings.</source>
<translation>Problem z autoryzacją SOCKS5: %1. Proszę sprawdź swoje ustawienia SOCKS5.</translation>
</message>
<message>
<location filename="../class_receiveDataThread.py" line="171"/>
<source>The time on your computer, %1, may be wrong. Please verify your settings.</source>
<translation>Czas na Twoim komputerze, %1, może być błędny. Proszę sprawdź swoje ustawienia.</translation>
</message>
<message>
<location filename="../namecoin.py" line="101"/>
<source>The name %1 was not found.</source> <source>The name %1 was not found.</source>
<translation>Ksywka %1 nie została znaleziona.</translation> <translation>Ksywka %1 nie została znaleziona.</translation>
</message> </message>
<message> <message>
<location filename="../namecoin.py" line="110"/> <location filename="../namecoin.py" line="124"/>
<source>The namecoin query failed (%1)</source> <source>The namecoin query failed (%1)</source>
<translation>Zapytanie namecoin nie powiodło się (%1)</translation> <translation>Zapytanie namecoin nie powiodło się (%1)</translation>
</message> </message>
<message> <message>
<location filename="../namecoin.py" line="113"/> <location filename="../namecoin.py" line="127"/>
<source>The namecoin query failed.</source> <source>The namecoin query failed.</source>
<translation>Zapytanie namecoin nie powiodło się.</translation> <translation>Zapytanie namecoin nie powiodło się.</translation>
</message> </message>
<message> <message>
<location filename="../namecoin.py" line="119"/> <location filename="../namecoin.py" line="133"/>
<source>The name %1 has no valid JSON data.</source> <source>The name %1 has no valid JSON data.</source>
<translation>Ksywka %1 nie zawiera prawidłowych danych JSON.</translation> <translation>Ksywka %1 nie zawiera prawidłowych danych JSON.</translation>
</message> </message>
<message> <message>
<location filename="../namecoin.py" line="127"/> <location filename="../namecoin.py" line="141"/>
<source>The name %1 has no associated Bitmessage address.</source> <source>The name %1 has no associated Bitmessage address.</source>
<translation>Ksywka %1 nie ma powiązanego adresu Bitmessage.</translation> <translation>Ksywka %1 nie ma powiązanego adresu Bitmessage.</translation>
</message> </message>
<message> <message>
<location filename="../namecoin.py" line="149"/> <location filename="../namecoin.py" line="171"/>
<source>Success! Namecoind version %1 running.</source> <source>Success! Namecoind version %1 running.</source>
<translation>Namecoind wersja %1 działa poprawnie!</translation> <translation>Namecoind wersja %1 działa poprawnie!</translation>
</message> </message>
<message> <message>
<location filename="../namecoin.py" line="155"/> <location filename="../namecoin.py" line="182"/>
<source>Success! NMControll is up and running.</source> <source>Success! NMControll is up and running.</source>
<translation>NMControl działa poprawnie!</translation> <translation>NMControl działa poprawnie!</translation>
</message> </message>
<message> <message>
<location filename="../namecoin.py" line="158"/> <location filename="../namecoin.py" line="185"/>
<source>Couldn&apos;t understand NMControl.</source> <source>Couldn&apos;t understand NMControl.</source>
<translation>Nie można zrozumieć NMControl.</translation> <translation>Nie można zrozumieć NMControl.</translation>
</message> </message>
<message> <message>
<location filename="../namecoin.py" line="165"/> <location filename="../namecoin.py" line="195"/>
<source>The connection to namecoin failed.</source> <source>The connection to namecoin failed.</source>
<translation>Nie udało się połączyć z namecoin.</translation> <translation>Nie udało się połączyć z namecoin.</translation>
</message> </message>
@ -1445,12 +1474,12 @@ Odbiorca wymaga trudności: %1 i %2</translation>
<translation>Twoje procesory graficzne nie obliczyły poprawnie, wyłączam OpenCL. Prosimy zaraportować przypadek twórcom programu.</translation> <translation>Twoje procesory graficzne nie obliczyły poprawnie, wyłączam OpenCL. Prosimy zaraportować przypadek twórcom programu.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3793"/> <location filename="../bitmessageqt/__init__.py" line="3807"/>
<source>Set notification sound...</source> <source>Set notification sound...</source>
<translation>Ustaw dźwięk powiadomień</translation> <translation>Ustaw dźwięk powiadomień</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="637"/> <location filename="../bitmessageqt/__init__.py" line="645"/>
<source> <source>
Welcome to easy and secure Bitmessage Welcome to easy and secure Bitmessage
* send messages to other people * send messages to other people
@ -1464,112 +1493,112 @@ Witamy w przyjaznym i bezpiecznym Bitmessage
* dyskutuj na kanałach (chany) z innymi ludźmi</translation> * dyskutuj na kanałach (chany) z innymi ludźmi</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="820"/> <location filename="../bitmessageqt/__init__.py" line="825"/>
<source>not recommended for chans</source> <source>not recommended for chans</source>
<translation>niezalecany dla kanałów</translation> <translation>niezalecany dla kanałów</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1213"/> <location filename="../bitmessageqt/__init__.py" line="1218"/>
<source>Quiet Mode</source> <source>Quiet Mode</source>
<translation>Tryb cichy</translation> <translation>Tryb cichy</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1603"/> <location filename="../bitmessageqt/__init__.py" line="1610"/>
<source>Problems connecting? Try enabling UPnP in the Network Settings</source> <source>Problems connecting? Try enabling UPnP in the Network Settings</source>
<translation>Problem z połączeniem? Spróbuj włączyć UPnP w ustawieniach sieci.</translation> <translation>Problem z połączeniem? Spróbuj włączyć UPnP w ustawieniach sieci.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1928"/> <location filename="../bitmessageqt/__init__.py" line="1937"/>
<source>You are trying to send an email instead of a bitmessage. This requires registering with a gateway. Attempt to register?</source> <source>You are trying to send an email instead of a bitmessage. This requires registering with a gateway. Attempt to register?</source>
<translation>Próbujesz wysłać e-mail zamiast wiadomość bitmessage. To wymaga zarejestrowania się na bramce. Czy zarejestrować?</translation> <translation>Próbujesz wysłać e-mail zamiast wiadomość bitmessage. To wymaga zarejestrowania się na bramce. Czy zarejestrować?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1960"/> <location filename="../bitmessageqt/__init__.py" line="1969"/>
<source>Error: Bitmessage addresses start with BM- Please check the recipient address %1</source> <source>Error: Bitmessage addresses start with BM- Please check the recipient address %1</source>
<translation>Błąd: adresy Bitmessage zaczynają się od BM-. Proszę sprawdzić adres odbiorcy %1.</translation> <translation>Błąd: adresy Bitmessage zaczynają się od BM-. Proszę sprawdzić adres odbiorcy %1.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1966"/> <location filename="../bitmessageqt/__init__.py" line="1975"/>
<source>Error: The recipient address %1 is not typed or copied correctly. Please check it.</source> <source>Error: The recipient address %1 is not typed or copied correctly. Please check it.</source>
<translation>Błąd: adres odbiorcy %1 nie został skopiowany lub przepisany poprawnie. Proszę go sprawdzić.</translation> <translation>Błąd: adres odbiorcy %1 nie został skopiowany lub przepisany poprawnie. Proszę go sprawdzić.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1972"/> <location filename="../bitmessageqt/__init__.py" line="1981"/>
<source>Error: The recipient address %1 contains invalid characters. Please check it.</source> <source>Error: The recipient address %1 contains invalid characters. Please check it.</source>
<translation>Błąd: adres odbiorcy %1 zawiera nieprawidłowe znaki. Proszę go sprawdzić.</translation> <translation>Błąd: adres odbiorcy %1 zawiera nieprawidłowe znaki. Proszę go sprawdzić.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1978"/> <location filename="../bitmessageqt/__init__.py" line="1987"/>
<source>Error: The version of the recipient address %1 is too high. Either you need to upgrade your Bitmessage software or your acquaintance is being clever.</source> <source>Error: The version of the recipient address %1 is too high. Either you need to upgrade your Bitmessage software or your acquaintance is being clever.</source>
<translation>Błąd: wersja adresu odbiorcy %1 jest za wysoka. Musisz albo zaktualizować Twoje oprogramowanie Bitmessage, albo twój znajomy Cię trolluje.</translation> <translation>Błąd: wersja adresu odbiorcy %1 jest za wysoka. Musisz albo zaktualizować Twoje oprogramowanie Bitmessage, albo twój znajomy Cię trolluje.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1986"/> <location filename="../bitmessageqt/__init__.py" line="1995"/>
<source>Error: Some data encoded in the recipient address %1 is too short. There might be something wrong with the software of your acquaintance.</source> <source>Error: Some data encoded in the recipient address %1 is too short. There might be something wrong with the software of your acquaintance.</source>
<translation>Błąd: niektóre dane zakodowane w adresie odbiorcy %1 zbyt krótkie. Być może coś nie działa należycie w programie Twojego znajomego.</translation> <translation>Błąd: niektóre dane zakodowane w adresie odbiorcy %1 zbyt krótkie. Być może coś nie działa należycie w programie Twojego znajomego.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="1994"/> <location filename="../bitmessageqt/__init__.py" line="2003"/>
<source>Error: Some data encoded in the recipient address %1 is too long. There might be something wrong with the software of your acquaintance.</source> <source>Error: Some data encoded in the recipient address %1 is too long. There might be something wrong with the software of your acquaintance.</source>
<translation>Błąd: niektóre dane zakodowane w adresie odbiorcy %1 zbyt długie. Być może coś nie działa należycie w programie Twojego znajomego.</translation> <translation>Błąd: niektóre dane zakodowane w adresie odbiorcy %1 zbyt długie. Być może coś nie działa należycie w programie Twojego znajomego.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2002"/> <location filename="../bitmessageqt/__init__.py" line="2011"/>
<source>Error: Some data encoded in the recipient address %1 is malformed. There might be something wrong with the software of your acquaintance.</source> <source>Error: Some data encoded in the recipient address %1 is malformed. There might be something wrong with the software of your acquaintance.</source>
<translation>Błąd: niektóre dane zakodowane w adresie odbiorcy %1 uszkodzone. Być może coś nie działa należycie w programie Twojego znajomego.</translation> <translation>Błąd: niektóre dane zakodowane w adresie odbiorcy %1 uszkodzone. Być może coś nie działa należycie w programie Twojego znajomego.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2010"/> <location filename="../bitmessageqt/__init__.py" line="2019"/>
<source>Error: Something is wrong with the recipient address %1.</source> <source>Error: Something is wrong with the recipient address %1.</source>
<translation>Błąd: coś jest nie tak z adresem odbiorcy %1.</translation> <translation>Błąd: coś jest nie tak z adresem odbiorcy %1.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2160"/> <location filename="../bitmessageqt/__init__.py" line="2169"/>
<source>Error: %1</source> <source>Error: %1</source>
<translation>Błąd: %1</translation> <translation>Błąd: %1</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2277"/> <location filename="../bitmessageqt/__init__.py" line="2286"/>
<source>From %1</source> <source>From %1</source>
<translation>Od %1</translation> <translation>Od %1</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2719"/> <location filename="../bitmessageqt/__init__.py" line="2732"/>
<source>Synchronisation pending</source> <source>Synchronisation pending</source>
<translation>Synchronizacja zawieszona</translation> <translation>Synchronizacja zawieszona</translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="../bitmessageqt/__init__.py" line="2719"/> <location filename="../bitmessageqt/__init__.py" line="2732"/>
<source>Bitmessage hasn&apos;t synchronised with the network, %n object(s) to be downloaded. If you quit now, it may cause delivery delays. Wait until the synchronisation finishes?</source> <source>Bitmessage hasn&apos;t synchronised with the network, %n object(s) to be downloaded. If you quit now, it may cause delivery delays. Wait until the synchronisation finishes?</source>
<translation><numerusform>Bitmessage nie zsynchronizował się z siecią, %n obiekt oczekuje na pobranie. Jeżeli zamkniesz go teraz, może to spowodować opóźnienia dostarczeń. Czy poczekać na zakończenie synchronizacji?</numerusform><numerusform>Bitmessage nie zsynchronizował się z siecią, %n obiekty oczekują na pobranie. Jeżeli zamkniesz go teraz, może to spowodować opóźnienia dostarczeń. Czy poczekać na zakończenie synchronizacji?</numerusform><numerusform>Bitmessage nie zsynchronizował się z siecią, %n obiektów oczekuje na pobranie. Jeżeli zamkniesz go teraz, może to spowodować opóźnienia dostarczeń. Czy poczekać na zakończenie synchronizacji?</numerusform><numerusform>Bitmessage nie zsynchronizował się z siecią, %n obiektów oczekuje na pobranie. Jeżeli zamkniesz go teraz, może to spowodować opóźnienia dostarczeń. Czy poczekać na zakończenie synchronizacji?</numerusform></translation> <translation><numerusform>Bitmessage nie zsynchronizował się z siecią, %n obiekt oczekuje na pobranie. Jeżeli zamkniesz go teraz, może to spowodować opóźnienia dostarczeń. Czy poczekać na zakończenie synchronizacji?</numerusform><numerusform>Bitmessage nie zsynchronizował się z siecią, %n obiekty oczekują na pobranie. Jeżeli zamkniesz go teraz, może to spowodować opóźnienia dostarczeń. Czy poczekać na zakończenie synchronizacji?</numerusform><numerusform>Bitmessage nie zsynchronizował się z siecią, %n obiektów oczekuje na pobranie. Jeżeli zamkniesz go teraz, może to spowodować opóźnienia dostarczeń. Czy poczekać na zakończenie synchronizacji?</numerusform><numerusform>Bitmessage nie zsynchronizował się z siecią, %n obiektów oczekuje na pobranie. Jeżeli zamkniesz go teraz, może to spowodować opóźnienia dostarczeń. Czy poczekać na zakończenie synchronizacji?</numerusform></translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2731"/> <location filename="../bitmessageqt/__init__.py" line="2742"/>
<source>Not connected</source> <source>Not connected</source>
<translation>Niepołączony</translation> <translation>Niepołączony</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2731"/> <location filename="../bitmessageqt/__init__.py" line="2742"/>
<source>Bitmessage isn&apos;t connected to the network. If you quit now, it may cause delivery delays. Wait until connected and the synchronisation finishes?</source> <source>Bitmessage isn&apos;t connected to the network. If you quit now, it may cause delivery delays. Wait until connected and the synchronisation finishes?</source>
<translation>Bitmessage nie połączył się z siecią. Jeżeli zamkniesz go teraz, może to spowodować opóźnienia dostarczeń. Czy poczekać na połączenie i zakończenie synchronizacji?</translation> <translation>Bitmessage nie połączył się z siecią. Jeżeli zamkniesz go teraz, może to spowodować opóźnienia dostarczeń. Czy poczekać na połączenie i zakończenie synchronizacji?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2746"/> <location filename="../bitmessageqt/__init__.py" line="2757"/>
<source>Waiting for network connection...</source> <source>Waiting for network connection...</source>
<translation>Oczekiwanie na połączenie sieciowe</translation> <translation>Oczekiwanie na połączenie sieciowe</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="2756"/> <location filename="../bitmessageqt/__init__.py" line="2767"/>
<source>Waiting for finishing synchronisation...</source> <source>Waiting for finishing synchronisation...</source>
<translation>Oczekiwanie na zakończenie synchronizacji</translation> <translation>Oczekiwanie na zakończenie synchronizacji</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="3811"/> <location filename="../bitmessageqt/__init__.py" line="3825"/>
<source>You have already set a notification sound for this address book entry. Do you really want to overwrite it?</source> <source>You have already set a notification sound for this address book entry. Do you really want to overwrite it?</source>
<translation>Już ustawiłeś dźwięk powiadomienia dla tego kontaktu. Czy chcesz go zastąpić?</translation> <translation>Już ustawiłeś dźwięk powiadomienia dla tego kontaktu. Czy chcesz go zastąpić?</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/__init__.py" line="4028"/> <location filename="../bitmessageqt/__init__.py" line="4046"/>
<source>Error occurred: could not load message from disk.</source> <source>Error occurred: could not load message from disk.</source>
<translation>Wystąpił błąd: nie można załadować wiadomości z dysku.</translation> <translation>Wystąpił błąd: nie można załadować wiadomości z dysku.</translation>
</message> </message>
@ -1594,22 +1623,22 @@ Witamy w przyjaznym i bezpiecznym Bitmessage
<translation>Wymaż</translation> <translation>Wymaż</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/foldertree.py" line="11"/> <location filename="../bitmessageqt/foldertree.py" line="10"/>
<source>inbox</source> <source>inbox</source>
<translation>odebrane</translation> <translation>odebrane</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/foldertree.py" line="12"/> <location filename="../bitmessageqt/foldertree.py" line="11"/>
<source>new</source> <source>new</source>
<translation>nowe</translation> <translation>nowe</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/foldertree.py" line="13"/> <location filename="../bitmessageqt/foldertree.py" line="12"/>
<source>sent</source> <source>sent</source>
<translation>wysłane</translation> <translation>wysłane</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/foldertree.py" line="14"/> <location filename="../bitmessageqt/foldertree.py" line="13"/>
<source>trash</source> <source>trash</source>
<translation>kosz</translation> <translation>kosz</translation>
</message> </message>
@ -1640,14 +1669,14 @@ Witamy w przyjaznym i bezpiecznym Bitmessage
<context> <context>
<name>MsgDecode</name> <name>MsgDecode</name>
<message> <message>
<location filename="../helper_msgcoding.py" line="80"/> <location filename="../helper_msgcoding.py" line="81"/>
<source>The message has an unknown encoding. <source>The message has an unknown encoding.
Perhaps you should upgrade Bitmessage.</source> Perhaps you should upgrade Bitmessage.</source>
<translation>Wiadomość zawiera nierozpoznane kodowanie. <translation>Wiadomość zawiera nierozpoznane kodowanie.
Prawdopodobnie powinieneś zaktualizować Bitmessage.</translation> Prawdopodobnie powinieneś zaktualizować Bitmessage.</translation>
</message> </message>
<message> <message>
<location filename="../helper_msgcoding.py" line="81"/> <location filename="../helper_msgcoding.py" line="82"/>
<source>Unknown encoding</source> <source>Unknown encoding</source>
<translation>Nierozpoznane kodowanie</translation> <translation>Nierozpoznane kodowanie</translation>
</message> </message>
@ -1874,12 +1903,12 @@ Generowanie adresów „losowych” jest wybrane domyślnie, jednak deterministy
<translation>Adres</translation> <translation>Adres</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="150"/> <location filename="../bitmessageqt/blacklist.py" line="151"/>
<source>Blacklist</source> <source>Blacklist</source>
<translation>Czarna lista</translation> <translation>Czarna lista</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/blacklist.py" line="152"/> <location filename="../bitmessageqt/blacklist.py" line="153"/>
<source>Whitelist</source> <source>Whitelist</source>
<translation>Biała lista</translation> <translation>Biała lista</translation>
</message> </message>
@ -2230,14 +2259,6 @@ Generowanie adresów „losowych” jest wybrane domyślnie, jednak deterministy
<translation>Moduł C PoW niedostępny. Prosimy zbudować go.</translation> <translation>Moduł C PoW niedostępny. Prosimy zbudować go.</translation>
</message> </message>
</context> </context>
<context>
<name>qrcodeDialog</name>
<message>
<location filename="../plugins/qrcodeui.py" line="67"/>
<source>QR-code</source>
<translation>Kod QR</translation>
</message>
</context>
<context> <context>
<name>regenerateAddressesDialog</name> <name>regenerateAddressesDialog</name>
<message> <message>
@ -2294,218 +2315,218 @@ Generowanie adresów „losowych” jest wybrane domyślnie, jednak deterministy
<context> <context>
<name>settingsDialog</name> <name>settingsDialog</name>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="453"/> <location filename="../bitmessageqt/settings.py" line="483"/>
<source>Settings</source> <source>Settings</source>
<translation>Ustawienia</translation> <translation>Ustawienia</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="454"/> <location filename="../bitmessageqt/settings.py" line="484"/>
<source>Start Bitmessage on user login</source> <source>Start Bitmessage on user login</source>
<translation>Uruchom Bitmessage po zalogowaniu</translation> <translation>Uruchom Bitmessage po zalogowaniu</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="455"/> <location filename="../bitmessageqt/settings.py" line="485"/>
<source>Tray</source> <source>Tray</source>
<translation>Zasobnik systemowy</translation> <translation>Zasobnik systemowy</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="456"/> <location filename="../bitmessageqt/settings.py" line="486"/>
<source>Start Bitmessage in the tray (don&apos;t show main window)</source> <source>Start Bitmessage in the tray (don&apos;t show main window)</source>
<translation>Uruchom Bitmessage w zasobniku (nie pokazuj głównego okna)</translation> <translation>Uruchom Bitmessage w zasobniku (nie pokazuj głównego okna)</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="457"/> <location filename="../bitmessageqt/settings.py" line="491"/>
<source>Minimize to tray</source> <source>Minimize to tray</source>
<translation>Minimalizuj do zasobnika</translation> <translation>Minimalizuj do zasobnika</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="458"/> <location filename="../bitmessageqt/settings.py" line="492"/>
<source>Close to tray</source> <source>Close to tray</source>
<translation>Zamknij do zasobnika</translation> <translation>Zamknij do zasobnika</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="460"/> <location filename="../bitmessageqt/settings.py" line="495"/>
<source>Show notification when message received</source> <source>Show notification when message received</source>
<translation>Wyświetl powiadomienia o przychodzących wiadomościach</translation> <translation>Wyświetl powiadomienia o przychodzących wiadomościach</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="461"/> <location filename="../bitmessageqt/settings.py" line="500"/>
<source>Run in Portable Mode</source> <source>Run in Portable Mode</source>
<translation>Uruchom w trybie przenośnym</translation> <translation>Uruchom w trybie przenośnym</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="462"/> <location filename="../bitmessageqt/settings.py" line="501"/>
<source>In Portable Mode, messages and config files are stored in the same directory as the program rather than the normal application-data folder. This makes it convenient to run Bitmessage from a USB thumb drive.</source> <source>In Portable Mode, messages and config files are stored in the same directory as the program rather than the normal application-data folder. This makes it convenient to run Bitmessage from a USB thumb drive.</source>
<translation>W trybie przenośnym, wiadomości i pliki konfiguracyjne przechowywane w tym samym katalogu co program, zamiast w osobistym katalogu danych użytkownika. To sprawia, że wygodnie można uruchamiać Bitmessage z pamięci przenośnych.</translation> <translation>W trybie przenośnym, wiadomości i pliki konfiguracyjne przechowywane w tym samym katalogu co program, zamiast w osobistym katalogu danych użytkownika. To sprawia, że wygodnie można uruchamiać Bitmessage z pamięci przenośnych.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="463"/> <location filename="../bitmessageqt/settings.py" line="508"/>
<source>Willingly include unencrypted destination address when sending to a mobile device</source> <source>Willingly include unencrypted destination address when sending to a mobile device</source>
<translation>Chętnie umieść niezaszyfrowany adres docelowy podczas wysyłania na urządzenia przenośne.</translation> <translation>Chętnie umieść niezaszyfrowany adres docelowy podczas wysyłania na urządzenia przenośne.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="464"/> <location filename="../bitmessageqt/settings.py" line="513"/>
<source>Use Identicons</source> <source>Use Identicons</source>
<translation>Użyj graficznych awatarów</translation> <translation>Użyj graficznych awatarów</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="465"/> <location filename="../bitmessageqt/settings.py" line="514"/>
<source>Reply below Quote</source> <source>Reply below Quote</source>
<translation>Odpowiedź pod cytatem</translation> <translation>Odpowiedź pod cytatem</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="466"/> <location filename="../bitmessageqt/settings.py" line="515"/>
<source>Interface Language</source> <source>Interface Language</source>
<translation>Język interfejsu</translation> <translation>Język interfejsu</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="467"/> <location filename="../bitmessageqt/settings.py" line="516"/>
<source>System Settings</source> <source>System Settings</source>
<comment>system</comment> <comment>system</comment>
<translation>Język systemu</translation> <translation>Język systemu</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="468"/> <location filename="../bitmessageqt/settings.py" line="517"/>
<source>User Interface</source> <source>User Interface</source>
<translation>Interfejs</translation> <translation>Interfejs</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="469"/> <location filename="../bitmessageqt/settings.py" line="522"/>
<source>Listening port</source> <source>Listening port</source>
<translation>Port nasłuchujący</translation> <translation>Port nasłuchujący</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="470"/> <location filename="../bitmessageqt/settings.py" line="523"/>
<source>Listen for connections on port:</source> <source>Listen for connections on port:</source>
<translation>Nasłuchuj połaczeń na porcie:</translation> <translation>Nasłuchuj połaczeń na porcie:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="471"/> <location filename="../bitmessageqt/settings.py" line="524"/>
<source>UPnP:</source> <source>UPnP:</source>
<translation>UPnP:</translation> <translation>UPnP:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="472"/> <location filename="../bitmessageqt/settings.py" line="525"/>
<source>Bandwidth limit</source> <source>Bandwidth limit</source>
<translation>Limity przepustowości</translation> <translation>Limity przepustowości</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="473"/> <location filename="../bitmessageqt/settings.py" line="526"/>
<source>Maximum download rate (kB/s): [0: unlimited]</source> <source>Maximum download rate (kB/s): [0: unlimited]</source>
<translation>Maksymalna prędkość pobierania (w kB/s): [0: bez limitu]</translation> <translation>Maksymalna prędkość pobierania (w kB/s): [0: bez limitu]</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="474"/> <location filename="../bitmessageqt/settings.py" line="527"/>
<source>Maximum upload rate (kB/s): [0: unlimited]</source> <source>Maximum upload rate (kB/s): [0: unlimited]</source>
<translation>Maksymalna prędkość wysyłania (w kB/s): [0: bez limitu]</translation> <translation>Maksymalna prędkość wysyłania (w kB/s): [0: bez limitu]</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="476"/> <location filename="../bitmessageqt/settings.py" line="529"/>
<source>Proxy server / Tor</source> <source>Proxy server / Tor</source>
<translation>Serwer proxy / Tor</translation> <translation>Serwer proxy / Tor</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="477"/> <location filename="../bitmessageqt/settings.py" line="530"/>
<source>Type:</source> <source>Type:</source>
<translation>Typ:</translation> <translation>Typ:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="478"/> <location filename="../bitmessageqt/settings.py" line="531"/>
<source>Server hostname:</source> <source>Server hostname:</source>
<translation>Adres serwera:</translation> <translation>Adres serwera:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="501"/> <location filename="../bitmessageqt/settings.py" line="601"/>
<source>Port:</source> <source>Port:</source>
<translation>Port:</translation> <translation>Port:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="480"/> <location filename="../bitmessageqt/settings.py" line="533"/>
<source>Authentication</source> <source>Authentication</source>
<translation>Uwierzytelnienie</translation> <translation>Uwierzytelnienie</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="502"/> <location filename="../bitmessageqt/settings.py" line="602"/>
<source>Username:</source> <source>Username:</source>
<translation>Użytkownik:</translation> <translation>Użytkownik:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="482"/> <location filename="../bitmessageqt/settings.py" line="535"/>
<source>Pass:</source> <source>Pass:</source>
<translation>Hasło:</translation> <translation>Hasło:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="483"/> <location filename="../bitmessageqt/settings.py" line="536"/>
<source>Listen for incoming connections when using proxy</source> <source>Listen for incoming connections when using proxy</source>
<translation>Nasłuchuj przychodzących połączeń podczas używania proxy</translation> <translation>Nasłuchuj przychodzących połączeń podczas używania proxy</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="484"/> <location filename="../bitmessageqt/settings.py" line="541"/>
<source>none</source> <source>none</source>
<translation>brak</translation> <translation>brak</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="485"/> <location filename="../bitmessageqt/settings.py" line="542"/>
<source>SOCKS4a</source> <source>SOCKS4a</source>
<translation>SOCKS4a</translation> <translation>SOCKS4a</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="486"/> <location filename="../bitmessageqt/settings.py" line="543"/>
<source>SOCKS5</source> <source>SOCKS5</source>
<translation>SOCKS5</translation> <translation>SOCKS5</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="487"/> <location filename="../bitmessageqt/settings.py" line="544"/>
<source>Network Settings</source> <source>Network Settings</source>
<translation>Sieć</translation> <translation>Sieć</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="488"/> <location filename="../bitmessageqt/settings.py" line="549"/>
<source>Total difficulty:</source> <source>Total difficulty:</source>
<translation>Całkowita trudność:</translation> <translation>Całkowita trudność:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="489"/> <location filename="../bitmessageqt/settings.py" line="550"/>
<source>The &apos;Total difficulty&apos; affects the absolute amount of work the sender must complete. Doubling this value doubles the amount of work.</source> <source>The &apos;Total difficulty&apos; affects the absolute amount of work the sender must complete. Doubling this value doubles the amount of work.</source>
<translation>&apos;Całkowita trudność&apos; ma wpływ na całkowitą ilość pracy jaką nadawca musi wykonać. Podwojenie tej wartości, podwaja ilość pracy do wykonania.</translation> <translation>&apos;Całkowita trudność&apos; ma wpływ na całkowitą ilość pracy jaką nadawca musi wykonać. Podwojenie tej wartości, podwaja ilość pracy do wykonania.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="490"/> <location filename="../bitmessageqt/settings.py" line="556"/>
<source>Small message difficulty:</source> <source>Small message difficulty:</source>
<translation>Trudność małej wiadomości:</translation> <translation>Trudność małej wiadomości:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="491"/> <location filename="../bitmessageqt/settings.py" line="557"/>
<source>When someone sends you a message, their computer must first complete some work. The difficulty of this work, by default, is 1. You may raise this default for new addresses you create by changing the values here. Any new addresses you create will require senders to meet the higher difficulty. There is one exception: if you add a friend or acquaintance to your address book, Bitmessage will automatically notify them when you next send a message that they need only complete the minimum amount of work: difficulty 1. </source> <source>When someone sends you a message, their computer must first complete some work. The difficulty of this work, by default, is 1. You may raise this default for new addresses you create by changing the values here. Any new addresses you create will require senders to meet the higher difficulty. There is one exception: if you add a friend or acquaintance to your address book, Bitmessage will automatically notify them when you next send a message that they need only complete the minimum amount of work: difficulty 1. </source>
<translation>Kiedy ktoś wysyła Ci wiadomość, jego komputer musi najpierw wykonać dowód pracy. Trudność tej pracy domyślnie wynosi 1. Możesz podwyższyć wartość dla nowo-utworzonych adresów podwyższając wartości tutaj. Każdy nowy adres będzie wymagał przez nadawców wyższej trudności. Jest jeden wyjątek: jeżeli dodasz kolegę do swojej książki adresowej, Bitmessage automatycznie powiadomi go kiedy następnym razem wyślesz do niego wiadomość, że musi tylko wykonać minimalną ilość pracy: trudność 1.</translation> <translation>Kiedy ktoś wysyła Ci wiadomość, jego komputer musi najpierw wykonać dowód pracy. Trudność tej pracy domyślnie wynosi 1. Możesz podwyższyć wartość dla nowo-utworzonych adresów podwyższając wartości tutaj. Każdy nowy adres będzie wymagał przez nadawców wyższej trudności. Jest jeden wyjątek: jeżeli dodasz kolegę do swojej książki adresowej, Bitmessage automatycznie powiadomi go kiedy następnym razem wyślesz do niego wiadomość, że musi tylko wykonać minimalną ilość pracy: trudność 1.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="492"/> <location filename="../bitmessageqt/settings.py" line="566"/>
<source>The &apos;Small message difficulty&apos; mostly only affects the difficulty of sending small messages. Doubling this value makes it almost twice as difficult to send a small message but doesn&apos;t really affect large messages.</source> <source>The &apos;Small message difficulty&apos; mostly only affects the difficulty of sending small messages. Doubling this value makes it almost twice as difficult to send a small message but doesn&apos;t really affect large messages.</source>
<translation>&apos;Trudność małej wiadomości&apos; głównie ma wpływ na trudność wysyłania małych wiadomości. Podwojenie tej wartości, prawie podwaja pracę potrzebną do wysłania małej wiadomości, ale w rzeczywistości nie ma wpływu na większe wiadomości.</translation> <translation>&apos;Trudność małej wiadomości&apos; głównie ma wpływ na trudność wysyłania małych wiadomości. Podwojenie tej wartości, prawie podwaja pracę potrzebną do wysłania małej wiadomości, ale w rzeczywistości nie ma wpływu na większe wiadomości.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="493"/> <location filename="../bitmessageqt/settings.py" line="573"/>
<source>Demanded difficulty</source> <source>Demanded difficulty</source>
<translation>Wymagana trudność</translation> <translation>Wymagana trudność</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="494"/> <location filename="../bitmessageqt/settings.py" line="578"/>
<source>Here you may set the maximum amount of work you are willing to do to send a message to another person. Setting these values to 0 means that any value is acceptable.</source> <source>Here you may set the maximum amount of work you are willing to do to send a message to another person. Setting these values to 0 means that any value is acceptable.</source>
<translation>Tutaj możesz ustawić maksymalną ilość pracy jaką zamierzasz wykonać aby wysłać wiadomość innej osobie. Ustawienie tych wartości na 0 oznacza, że każda wartość jest akceptowana.</translation> <translation>Tutaj możesz ustawić maksymalną ilość pracy jaką zamierzasz wykonać aby wysłać wiadomość innej osobie. Ustawienie tych wartości na 0 oznacza, że każda wartość jest akceptowana.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="495"/> <location filename="../bitmessageqt/settings.py" line="584"/>
<source>Maximum acceptable total difficulty:</source> <source>Maximum acceptable total difficulty:</source>
<translation>Maksymalna akceptowalna całkowita trudność:</translation> <translation>Maksymalna akceptowalna całkowita trudność:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="496"/> <location filename="../bitmessageqt/settings.py" line="585"/>
<source>Maximum acceptable small message difficulty:</source> <source>Maximum acceptable small message difficulty:</source>
<translation>Maksymalna akceptowalna trudność dla małych wiadomości:</translation> <translation>Maksymalna akceptowalna trudność dla małych wiadomości:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="497"/> <location filename="../bitmessageqt/settings.py" line="586"/>
<source>Max acceptable difficulty</source> <source>Max acceptable difficulty</source>
<translation>Maksymalna akceptowalna trudność</translation> <translation>Maksymalna akceptowalna trudność</translation>
</message> </message>
@ -2515,87 +2536,87 @@ Generowanie adresów „losowych” jest wybrane domyślnie, jednak deterministy
<translation type="unfinished"/> <translation type="unfinished"/>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="499"/> <location filename="../bitmessageqt/settings.py" line="592"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Bitmessage can utilize a different Bitcoin-based program called Namecoin to make addresses human-friendly. For example, instead of having to tell your friend your long Bitmessage address, you can simply tell him to send a message to &lt;span style=&quot; font-style:italic;&quot;&gt;test. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;(Getting your own Bitmessage address into Namecoin is still rather difficult).&lt;/p&gt;&lt;p&gt;Bitmessage can use either namecoind directly or a running nmcontrol instance.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Bitmessage can utilize a different Bitcoin-based program called Namecoin to make addresses human-friendly. For example, instead of having to tell your friend your long Bitmessage address, you can simply tell him to send a message to &lt;span style=&quot; font-style:italic;&quot;&gt;test. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;(Getting your own Bitmessage address into Namecoin is still rather difficult).&lt;/p&gt;&lt;p&gt;Bitmessage can use either namecoind directly or a running nmcontrol instance.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Bitmessage potrafi wykorzystać inny program oparty na Bitcoinie - Namecoin - aby sprawić adresy czytelnymi dla ludzi. Na przykład, zamiast podawać koledze swój długi adres Bitmessage, możesz po prostu powiedzieć mu aby wysłał wiadomość pod &lt;span style=&quot; font-style:italic;&quot;&gt;id/ksywka&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;(Utworzenie swojego adresu Bitmessage w Namecoinie jest ciągle racze trudne).&lt;/p&gt;&lt;p&gt;Bitmessage może skorzystać albo bezpośrednio z namecoind, albo z działającego wątku nmcontrol.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Bitmessage potrafi wykorzystać inny program oparty na Bitcoinie - Namecoin - aby sprawić adresy czytelnymi dla ludzi. Na przykład, zamiast podawać koledze swój długi adres Bitmessage, możesz po prostu powiedzieć mu aby wysłał wiadomość pod &lt;span style=&quot; font-style:italic;&quot;&gt;id/ksywka&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;(Utworzenie swojego adresu Bitmessage w Namecoinie jest ciągle racze trudne).&lt;/p&gt;&lt;p&gt;Bitmessage może skorzystać albo bezpośrednio z namecoind, albo z działającego wątku nmcontrol.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="500"/> <location filename="../bitmessageqt/settings.py" line="600"/>
<source>Host:</source> <source>Host:</source>
<translation>Host:</translation> <translation>Host:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="503"/> <location filename="../bitmessageqt/settings.py" line="603"/>
<source>Password:</source> <source>Password:</source>
<translation>Hasło:</translation> <translation>Hasło:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="504"/> <location filename="../bitmessageqt/settings.py" line="604"/>
<source>Test</source> <source>Test</source>
<translation>Test</translation> <translation>Test</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="505"/> <location filename="../bitmessageqt/settings.py" line="605"/>
<source>Connect to:</source> <source>Connect to:</source>
<translation>Połącz z:</translation> <translation>Połącz z:</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="506"/> <location filename="../bitmessageqt/settings.py" line="606"/>
<source>Namecoind</source> <source>Namecoind</source>
<translation>Namecoind</translation> <translation>Namecoind</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="507"/> <location filename="../bitmessageqt/settings.py" line="607"/>
<source>NMControl</source> <source>NMControl</source>
<translation>NMControl</translation> <translation>NMControl</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="508"/> <location filename="../bitmessageqt/settings.py" line="608"/>
<source>Namecoin integration</source> <source>Namecoin integration</source>
<translation>Połączenie z Namecoin</translation> <translation>Połączenie z Namecoin</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="509"/> <location filename="../bitmessageqt/settings.py" line="613"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;By default, if you send a message to someone and he is offline for more than two days, Bitmessage will send the message again after an additional two days. This will be continued with exponential backoff forever; messages will be resent after 5, 10, 20 days ect. until the receiver acknowledges them. Here you may change that behavior by having Bitmessage give up after a certain number of days or months.&lt;/p&gt;&lt;p&gt;Leave these input fields blank for the default behavior. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;By default, if you send a message to someone and he is offline for more than two days, Bitmessage will send the message again after an additional two days. This will be continued with exponential backoff forever; messages will be resent after 5, 10, 20 days ect. until the receiver acknowledges them. Here you may change that behavior by having Bitmessage give up after a certain number of days or months.&lt;/p&gt;&lt;p&gt;Leave these input fields blank for the default behavior. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Domyślnie jeżeli wyślesz wiadomość do kogoś i ta osoba będzie poza siecią przez jakiś czas, Bitmessage spróbuje ponownie wysłać wiadomość trochę później, i potem ponownie. Program będzie próbował wysyłać wiadomość do czasu odbiorca potwierdzi odbiór. Tutaj możesz zmienić kiedy Bitmessage ma zaprzestać próby wysyłania.&lt;/p&gt;&lt;p&gt;Pozostaw te poza puste, aby ustawić domyślne zachowanie.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Domyślnie jeżeli wyślesz wiadomość do kogoś i ta osoba będzie poza siecią przez jakiś czas, Bitmessage spróbuje ponownie wysłać wiadomość trochę później, i potem ponownie. Program będzie próbował wysyłać wiadomość do czasu odbiorca potwierdzi odbiór. Tutaj możesz zmienić kiedy Bitmessage ma zaprzestać próby wysyłania.&lt;/p&gt;&lt;p&gt;Pozostaw te poza puste, aby ustawić domyślne zachowanie.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="510"/> <location filename="../bitmessageqt/settings.py" line="622"/>
<source>Give up after</source> <source>Give up after</source>
<translation>Poddaj się po</translation> <translation>Poddaj się po</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="511"/> <location filename="../bitmessageqt/settings.py" line="623"/>
<source>and</source> <source>and</source>
<translation>i</translation> <translation>i</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="512"/> <location filename="../bitmessageqt/settings.py" line="624"/>
<source>days</source> <source>days</source>
<translation>dniach</translation> <translation>dniach</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="513"/> <location filename="../bitmessageqt/settings.py" line="625"/>
<source>months.</source> <source>months.</source>
<translation>miesiącach.</translation> <translation>miesiącach.</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="514"/> <location filename="../bitmessageqt/settings.py" line="626"/>
<source>Resends Expire</source> <source>Resends Expire</source>
<translation>Niedoręczone wiadomości</translation> <translation>Niedoręczone wiadomości</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="459"/> <location filename="../bitmessageqt/settings.py" line="493"/>
<source>Hide connection notifications</source> <source>Hide connection notifications</source>
<translation>Nie pokazuj powiadomień o połączeniu</translation> <translation>Nie pokazuj powiadomień o połączeniu</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="475"/> <location filename="../bitmessageqt/settings.py" line="528"/>
<source>Maximum outbound connections: [0: none]</source> <source>Maximum outbound connections: [0: none]</source>
<translation>Maksymalnych połączeń wychodzących: [0: brak]</translation> <translation>Maksymalnych połączeń wychodzących: [0: brak]</translation>
</message> </message>
<message> <message>
<location filename="../bitmessageqt/settings.py" line="498"/> <location filename="../bitmessageqt/settings.py" line="591"/>
<source>Hardware GPU acceleration (OpenCL):</source> <source>Hardware GPU acceleration (OpenCL):</source>
<translation>Przyspieszenie sprzętowe GPU (OpenCL):</translation> <translation>Przyspieszenie sprzętowe GPU (OpenCL):</translation>
</message> </message>