diff --git a/Makefile b/Makefile old mode 100644 new mode 100755 index b9a85ff7..cacc103f --- a/Makefile +++ b/Makefile @@ -1,45 +1,51 @@ APP=pybitmessage VERSION=0.3.4 -RELEASE=1 -ARCH_TYPE=`uname -m` +DEST_SHARE=${DESTDIR}/usr/share +DEST_APP=${DEST_SHARE}/${APP} all: + debug: + source: tar -cvzf ../${APP}_${VERSION}.orig.tar.gz ../${APP}-${VERSION} --exclude-vcs + install: - mkdir -p ${DESTDIR}/usr - mkdir -p ${DESTDIR}/usr/bin - mkdir -m 755 -p ${DESTDIR}/usr/share - mkdir -m 755 -p ${DESTDIR}/usr/share/man - mkdir -m 755 -p ${DESTDIR}/usr/share/man/man1 - install -m 644 man/${APP}.1.gz ${DESTDIR}/usr/share/man/man1 - mkdir -m 755 -p ${DESTDIR}/usr/share/${APP} - mkdir -m 755 -p ${DESTDIR}/usr/share/applications - mkdir -m 755 -p ${DESTDIR}/usr/share/pixmaps - mkdir -m 755 -p ${DESTDIR}/usr/share/icons - mkdir -m 755 -p ${DESTDIR}/usr/share/icons/hicolor - mkdir -m 755 -p ${DESTDIR}/usr/share/icons/hicolor/scalable - mkdir -m 755 -p ${DESTDIR}/usr/share/icons/hicolor/scalable/apps - mkdir -m 755 -p ${DESTDIR}/usr/share/icons/hicolor/24x24 - mkdir -m 755 -p ${DESTDIR}/usr/share/icons/hicolor/24x24/apps - install -m 644 desktop/${APP}.desktop ${DESTDIR}/usr/share/applications/${APP}.desktop - install -m 644 desktop/icon24.png ${DESTDIR}/usr/share/icons/hicolor/24x24/apps/${APP}.png - cp -rf src/* ${DESTDIR}/usr/share/${APP} - echo '#!/bin/sh' > ${DESTDIR}/usr/bin/${APP} - echo 'cd /usr/share/pybitmessage' >> ${DESTDIR}/usr/bin/${APP} - echo 'LD_LIBRARY_PATH="/opt/openssl-compat-bitcoin/lib/" exec python2 bitmessagemain.py' >> ${DESTDIR}/usr/bin/${APP} - chmod +x ${DESTDIR}/usr/bin/${APP} + mkdir -m 755 -p ${DESTDIR}/usr/bin + mkdir -m 755 -p ${DEST_APP} + mkdir -m 755 -p ${DEST_SHARE}/applications + mkdir -m 755 -p ${DEST_APP}/images + mkdir -m 755 -p ${DEST_APP}/pyelliptic + mkdir -m 755 -p ${DEST_APP}/socks + mkdir -m 755 -p ${DEST_APP}/bitmessageqt + mkdir -m 755 -p ${DEST_APP}/translations + mkdir -m 755 -p ${DEST_SHARE}/pixmaps + mkdir -m 755 -p ${DEST_SHARE}/icons + mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor + mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/scalable + mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/scalable/apps + mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/24x24 + mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/24x24/apps + + cp -r src/* ${DEST_APP} + install -m 755 debian/pybm ${DESTDIR}/usr/bin/${APP} + + install -m 644 desktop/${APP}.desktop ${DEST_SHARE}/applications/${APP}.desktop + install -m 644 src/images/can-icon-24px.png ${DEST_SHARE}/icons/hicolor/24x24/apps/${APP}.png + install -m 644 desktop/can-icon.svg ${DEST_SHARE}/icons/hicolor/scalable/apps/${APP}.svg + install -m 644 desktop/can-icon.svg ${DEST_SHARE}/pixmaps/${APP}.svg + uninstall: - rm -f /usr/share/man/man1/${APP}.1.gz - rm -rf /usr/share/${APP} - rm -f /usr/bin/${APP} - rm -f /usr/share/applications/${APP}.desktop - rm -f /usr/share/icons/hicolor/scalable/apps/${APP}.svg - /usr/share/pixmaps/${APP}.svg + rm -Rf "${DEST_APP}" + rm -f "${DESTDIR}/usr/bin/${APP}" + rm -f "${DEST_SHARE}/applications/${APP}.desktop" + rm -f "${DEST_SHARE}/icons/hicolor/24x24/apps/${APP}.png" + rm -f "${DEST_SHARE}/icons/hicolor/scalable/apps/${APP}.svg" + rm -f "${DEST_SHARE}/pixmaps/${APP}.svg" + clean: - rm -f ${APP} \#* \.#* gnuplot* *.png debian/*.substvars debian/*.log - rm -fr deb.* debian/${APP} rpmpackage/${ARCH_TYPE} - rm -f ../${APP}*.deb ../${APP}*.changes ../${APP}*.asc ../${APP}*.dsc - rm -f rpmpackage/*.src.rpm archpackage/*.gz archpackage/*.xz - rm -f puppypackage/*.gz puppypackage/*.pet slackpackage/*.txz + rm -rf debian/${APP} + rm -f ../${APP}_*.deb ../${APP}_*.asc ../${APP}_*.dsc ../${APP}*.changes + rm -f *.sh~ src/*.pyc src/socks/*.pyc src/pyelliptic/*.pyc + rm -f *.deb \#* \.#* debian/*.log debian/*.substvars + rm -f Makefile~ diff --git a/arch.sh b/arch.sh deleted file mode 100755 index 77332d09..00000000 --- a/arch.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -APP=pybitmessage -PREV_VERSION=0.3.4 -VERSION=0.3.4 -RELEASE=1 -ARCH_TYPE=`uname -m` -CURRDIR=`pwd` -SOURCE=archpackage/${APP}-${VERSION}.tar.gz - -# Update version numbers automatically - so you don't have to -sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' Makefile debian.sh rpm.sh puppy.sh ebuild.sh slack.sh -sed -i 's/Version: '${PREV_VERSION}'/Version: '${VERSION}'/g' rpmpackage/${APP}.spec -sed -i 's/Release: '${RELEASE}'/Release: '${RELEASE}'/g' rpmpackage/${APP}.spec -sed -i 's/pkgrel='${RELEASE}'/pkgrel='${RELEASE}'/g' archpackage/PKGBUILD -sed -i 's/pkgver='${PREV_VERSION}'/pkgver='${VERSION}'/g' archpackage/PKGBUILD -sed -i "s/-${PREV_VERSION}-/-${VERSION}-/g" puppypackage/*.specs -sed -i "s/|${PREV_VERSION}|/|${VERSION}|/g" puppypackage/*.specs -sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' puppypackage/pinstall.sh puppypackage/puninstall.sh -sed -i 's/-'${PREV_VERSION}'.so/-'${VERSION}'.so/g' debian/*.links - - -# Create the source code -make clean -rm -f archpackage/*.gz - -# having the root directory called name-version seems essential -mv ../${APP} ../${APP}-${VERSION} -tar -cvzf ${SOURCE} ../${APP}-${VERSION} --exclude-vcs - -# rename the root directory without the version number -mv ../${APP}-${VERSION} ../${APP} - -# calculate the MD5 checksum -CHECKSM=$(md5sum ${SOURCE}) -sed -i "s/md5sums[^)]*)/md5sums=(${CHECKSM%% *})/g" archpackage/PKGBUILD - -cd archpackage - -# Create the package -tar -c -f ${APP}-${VERSION}.pkg.tar . -sync -xz ${APP}-${VERSION}.pkg.tar -sync - -# Move back to the original directory -cd ${CURRDIR} - diff --git a/archpackage/PKGBUILD b/archpackage/PKGBUILD deleted file mode 100644 index 79ee8ded..00000000 --- a/archpackage/PKGBUILD +++ /dev/null @@ -1,31 +0,0 @@ -# Maintainer: Bob Mottram (4096 bits) -pkgname=pybitmessage -pkgver=0.3.4 -pkgrel=1 -pkgdesc="Bitmessage is a P2P communications protocol used to send encrypted messages to another person or to many subscribers. It is decentralized and trustless, meaning that you need-not inherently trust any entities like root certificate authorities. It uses strong authentication which means that the sender of a message cannot be spoofed, and it aims to hide "non-content" data, like the sender and receiver of messages, from passive eavesdroppers like those running warrantless wiretapping programs." -arch=('i686' 'x86_64') -url="https://github.com/Bitmessage/PyBitmessage" -license=('MIT') -groups=() -depends=('python2' 'qt4' 'python2-pyqt4' 'sqlite' 'openssl') -makedepends=() -optdepends=('python2-gevent') -provides=() -conflicts=() -replaces=() -backup=() -options=() -install= -changelog= -source=($pkgname-$pkgver.tar.gz) -noextract=() -md5sums=() -build() { - cd "$srcdir/$pkgname-$pkgver" - ./configure --prefix=/usr - make -} -package() { - cd "$srcdir/$pkgname-$pkgver" - make DESTDIR="$pkgdir/" install -} diff --git a/configure b/configure deleted file mode 100755 index 0519ecba..00000000 --- a/configure +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/debian.sh b/debian.sh old mode 100644 new mode 100755 index 2d924251..10cbf61e --- a/debian.sh +++ b/debian.sh @@ -1,46 +1,32 @@ +# To build a debian package first ensure that the code exists +# within a directory called pybitmessage-x.x.x (where the x's +# are the version number), make sure that the VERSION parameter +# within debian/rules and this script are correct, then run +# this script. + #!/bin/bash APP=pybitmessage -PREV_VERSION=0.3.4 +PREV_VERSION=0.3.3 VERSION=0.3.4 RELEASE=1 -ARCH_TYPE=`uname -m` -DIR=${APP}-${VERSION} +ARCH_TYPE=all -if [ $ARCH_TYPE == "x86_64" ]; then - ARCH_TYPE="amd64" -fi -if [ $ARCH_TYPE == "i686" ]; then - ARCH_TYPE="i386" -fi - - -# Update version numbers automatically - so you don't have to -sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' Makefile rpm.sh arch.sh puppy.sh ebuild.sh slack.sh -sed -i 's/Version: '${PREV_VERSION}'/Version: '${VERSION}'/g' rpmpackage/${APP}.spec -sed -i 's/Release: '${RELEASE}'/Release: '${RELEASE}'/g' rpmpackage/${APP}.spec -sed -i 's/pkgrel='${RELEASE}'/pkgrel='${RELEASE}'/g' archpackage/PKGBUILD -sed -i 's/pkgver='${PREV_VERSION}'/pkgver='${VERSION}'/g' archpackage/PKGBUILD -sed -i "s/-${PREV_VERSION}-/-${VERSION}-/g" puppypackage/*.specs -sed -i "s/|${PREV_VERSION}|/|${VERSION}|/g" puppypackage/*.specs -sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' puppypackage/pinstall.sh puppypackage/puninstall.sh -sed -i 's/-'${PREV_VERSION}'.so/-'${VERSION}'.so/g' debian/*.links - -make clean -make - -# change the parent directory name to debian format -mv ../${APP} ../${DIR} +#update version numbers automatically - so you don't have to +sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' Makefile +sed -i 's/'''${PREV_VERSION}'''/'''${VERSION}'''/g' src/shared.py # Create a source archive +make clean +# change the directory name to pybitmessage-version +mv ../PyBitmessage ../${APP}-${VERSION} make source # Build the package -dpkg-buildpackage -F +dpkg-buildpackage -A || exit 1 -# sign files -gpg -ba ../${APP}_${VERSION}-1_${ARCH_TYPE}.deb +# change the directory name back +mv ../${APP}-${VERSION} ../PyBitmessage + +gpg -ba ../${APP}_${VERSION}-${RELEASE}_${ARCH_TYPE}.deb gpg -ba ../${APP}_${VERSION}.orig.tar.gz - -# restore the parent directory name -mv ../${DIR} ../${APP} diff --git a/debian/changelog b/debian/changelog index b6e8adbf..1d822cd1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,7 +18,7 @@ pybitmessage (0.3.3-1) raring; urgency=low via Portage (Gentoo) * Fix message authentication bug - -- Bob Mottram (4096 bits) Sat, 29 June 2013 11:23:00 +0100 + -- Bob Mottram (4096 bits) Sun, 30 June 2013 11:23:00 +0100 pybitmessage (0.3.211-1) raring; urgency=low @@ -26,7 +26,7 @@ pybitmessage (0.3.211-1) raring; urgency=low as the multiprocessing module does not work well with pyinstaller's --onefile option. - -- Bob Mottram (4096 bits) Fri, 28 June 2013 11:23:00 +0100 + -- Bob Mottram (4096 bits) Sun, 30 June 2013 11:23:00 +0100 pybitmessage (0.3.2-1) raring; urgency=low diff --git a/debian/compat b/debian/compat index ec635144..45a4fb75 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -9 +8 diff --git a/debian/control b/debian/control index 01bd7d8c..2dd19194 100644 --- a/debian/control +++ b/debian/control @@ -1,21 +1,21 @@ Source: pybitmessage +Section: contrib/comm Priority: extra -Maintainer: Bob Mottram (4096 bits) -Build-Depends: debhelper (>= 9.0.0) -Standards-Version: 3.9.4 -Homepage: https://github.com/Bitmessage/PyBitmessage -Vcs-Git: https://github.com/fuzzgun/fin.git +Maintainer: Jonathan Warren +Build-Depends: debhelper (>= 8.0.0), python (>= 2.7.0), openssl, python-qt4, libqt4-dev (>= 4.8.0), python-qt4-dev, sqlite3, libsqlite3-dev, libmessaging-menu-dev +Standards-Version: 3.9.2 +Homepage: https://bitmessage.org/ +Vcs-Browser: https://github.com/Bitmessage/PyBitmessage +Vcs-Git: https://github.com/Bitmessage/PyBitmessage.git Package: pybitmessage -Section: mail -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, python (>= 2.7.0), openssl, python-qt4, libqt4-dev (>= 4.8.0), python-qt4-dev, sqlite3, libsqlite3-dev -Suggests: libmessaging-menu-dev -Description: Send encrypted messages - Bitmessage is a P2P communications protocol used to send encrypted - messages to another person or to many subscribers. It is decentralized and - trustless, meaning that you need-not inherently trust any entities like - root certificate authorities. It uses strong authentication which means - that the sender of a message cannot be spoofed, and it aims to hide - "non-content" data, like the sender and receiver of messages, from passive - eavesdroppers like those running warrantless wiretapping programs. +Architecture: all +Depends: ${misc:Depends}, python (>= 2.7.0), openssl, python-qt4, libqt4-dev (>= 4.8.0), python-qt4-dev, sqlite3, libsqlite3-dev, libmessaging-menu-dev +Description: Send encrypted messages to another person or to many subscribers + Bitmessage is a P2P communications protocol used to send encrypted messages + to another person or to many subscribers. It is decentralized and trustless, + meaning that you need-not inherently trust any entities like root certificate + authorities. It uses strong authentication which means that the sender of a + message cannot be spoofed, and it aims to hide "non-content" data, like the + sender and receiver of messages, from passive eavesdroppers like those + running warrantless wiretapping programs. diff --git a/debian/copyright b/debian/copyright index 32f13f19..4c5f69f3 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,30 +1,30 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: -Source: +Format: http://dep.debian.net/deps/dep5 +Upstream-Name: PyBitmessage +Source: https://github.com/Bitmessage/PyBitmessage Files: * -Copyright: Copyright 2013 Bob Mottram (4096 bits) +Copyright: 2012 Jonathan Warren License: MIT Files: debian/* -Copyright: Copyright 2013 Bob Mottram (4096 bits) +Copyright: 2012 Jonathan Warren License: MIT License: MIT - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: . - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER 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. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + 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. \ No newline at end of file diff --git a/debian/manpages b/debian/manpages deleted file mode 100644 index 54af5648..00000000 --- a/debian/manpages +++ /dev/null @@ -1 +0,0 @@ -man/pybitmessage.1.gz diff --git a/debian/rules b/debian/rules old mode 100644 new mode 100755 index 233679ca..2a7767b6 --- a/debian/rules +++ b/debian/rules @@ -1,42 +1,66 @@ #!/usr/bin/make -f - APP=pybitmessage -build: build-stamp +DESTDIR=${CURDIR}/debian/${APP} +DEST_SHARE=${DESTDIR}/usr/share +DEST_APP=${DEST_SHARE}/${APP} + +build: build-stamp make build-arch: build-stamp build-indep: build-stamp build-stamp: - dh_testdir - touch build-stamp - + dh_testdir + touch build-stamp clean: - dh_testdir - dh_testroot - rm -f build-stamp - dh_clean + dh_testdir + dh_testroot + rm -f build-stamp + dh_clean +install: + dh_testdir + dh_testroot + dh_prep + dh_clean -k + dh_installdirs + + mkdir -m 755 -p ${DESTDIR}/usr/bin + mkdir -m 755 -p ${DEST_APP} + mkdir -m 755 -p ${DEST_SHARE}/applications + mkdir -m 755 -p ${DEST_APP}/images + mkdir -m 755 -p ${DEST_APP}/pyelliptic + mkdir -m 755 -p ${DEST_APP}/socks + mkdir -m 755 -p ${DEST_APP}/bitmessageqt + mkdir -m 755 -p ${DEST_APP}/translations + mkdir -m 755 -p ${DEST_SHARE}/pixmaps + mkdir -m 755 -p ${DEST_SHARE}/icons + mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor + mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/scalable + mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/scalable/apps + mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/24x24 + mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/24x24/apps + + cp -r src/* ${DEST_APP} + install -m 755 debian/pybm ${DESTDIR}/usr/bin/${APP} + + install -m 644 desktop/${APP}.desktop ${DEST_SHARE}/applications/${APP}.desktop + install -m 644 src/images/can-icon-24px.png ${DEST_SHARE}/icons/hicolor/24x24/apps/${APP}.png + install -m 644 desktop/can-icon.svg ${DEST_SHARE}/icons/hicolor/scalable/apps/${APP}.svg + install -m 644 desktop/can-icon.svg ${DEST_SHARE}/pixmaps/${APP}.svg -install: build clean - dh_testdir - dh_testroot - dh_prep - dh_installdirs - ${MAKE} install -B DESTDIR=${CURDIR}/debian/${APP} binary-indep: build install - dh_testdir - dh_testroot - dh_installchangelogs - dh_installdocs - dh_installexamples - dh_installman - dh_link - dh_compress - dh_fixperms - dh_installdeb - dh_gencontrol - dh_md5sums - dh_builddeb - + dh_shlibdeps + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs +# dh_installman + dh_link + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb binary-arch: build install - binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install +.PHONY: build clean binary-indep binary install diff --git a/desktop/icon14.xpm b/desktop/icon14.xpm deleted file mode 100644 index 6d50c8c7..00000000 --- a/desktop/icon14.xpm +++ /dev/null @@ -1,111 +0,0 @@ -/* XPM */ -static char * icon14_xpm[] = { -"14 14 94 2", -" c None", -". c #B9BABC", -"+ c #D2D3D4", -"@ c #BEBFC1", -"# c #CBCCCF", -"$ c #E0E3E1", -"% c #F6F8F8", -"& c #F3F3F3", -"* c #B9BABD", -"= c #C8C9CB", -"- c #DADCDB", -"; c #E6E8E7", -"> c #F7F7F7", -", c #FCFCFC", -"' c #F5F5F5", -") c #BCBDBF", -"! c #D3D5D5", -"~ c #E3E5E4", -"{ c #F1F2F2", -"] c #FDFDFD", -"^ c #F8F8F8", -"/ c #CBCCCC", -"( c #B2B3B6", -"_ c #B0B1B3", -": c #D3D4D6", -"< c #DFE0E0", -"[ c #EAEDEB", -"} c #FAF9F9", -"| c #DFE0DF", -"1 c #B9BBBD", -"2 c #C2C3C5", -"3 c #B7B8BC", -"4 c #CDCED0", -"5 c #DCDDDE", -"6 c #E7E9E7", -"7 c #F6F6F6", -"8 c #C0C1C2", -"9 c #DDDFDF", -"0 c #BCBCBF", -"a c #D7D9DA", -"b c #E2E4E3", -"c c #F0F2F1", -"d c #FAFAFA", -"e c #F9F9F9", -"f c #CCCDCD", -"g c #B6B7B9", -"h c #C7C8CA", -"i c #A6A7A9", -"j c #D3D4D5", -"k c #F2F5F3", -"l c #F1F2F1", -"m c #F6F8F7", -"n c #FCFBFC", -"o c #E8EAE9", -"p c #B6B7B8", -"q c #BFC0C2", -"r c #323138", -"s c #1D1D22", -"t c #111117", -"u c #4C4C51", -"v c #ECECED", -"w c #FFFFFF", -"x c #BBBDBD", -"y c #C9CACB", -"z c #333238", -"A c #313036", -"B c #27272C", -"C c #1E1F24", -"D c #16171D", -"E c #919193", -"F c #F2F3F3", -"G c #B4B5B7", -"H c #CDCFCF", -"I c #67666B", -"J c #37363C", -"K c #2C2B31", -"L c #2A292F", -"M c #16171C", -"N c #68696B", -"O c #C7C8C9", -"P c #CBCDCC", -"Q c #49474E", -"R c #39383E", -"S c #36353B", -"T c #333138", -"U c #28272D", -"V c #CED0D0", -"W c #67676C", -"X c #414046", -"Y c #424147", -"Z c #39383F", -"` c #8C8D8F", -" . c #6B6C70", -".. c #75757A", -" . + ", -" @ # $ % & ", -" * = - ; > , ' ", -" ) ! ~ { ] ^ / ( ", -" _ : < [ } , | 1 2 ", -" 3 4 5 6 7 , { 8 . 9 ", -" 2 0 a b c d e f g h ", -" i j k l m n o p q h ", -" r s t u v w ' x g y ", -" z A B C D E F G H ", -" I J A K L M N O P ", -" Q R R S T U V ", -" W X Y X Z ` ", -" ... "}; diff --git a/desktop/icon24.png b/desktop/icon24.png deleted file mode 100644 index 30f7313e..00000000 Binary files a/desktop/icon24.png and /dev/null differ diff --git a/desktop/pybitmessage.desktop b/desktop/pybitmessage.desktop index a97bd664..2b1b6902 100644 --- a/desktop/pybitmessage.desktop +++ b/desktop/pybitmessage.desktop @@ -2,8 +2,29 @@ Type=Application Name=PyBitmessage GenericName=PyBitmessage -Comment=Send encrypted messages -Exec=pybitmessage %F +X-GNOME-FullName=PyBitmessage Secure Messaging +Comment=Send encrypted messages to another person or to many subscribers +Exec=pybitmessage %U Icon=pybitmessage Terminal=false -Categories=Office;Email; +Categories=Network;Email;Application; +Keywords=Email;E-mail;Newsgroup;Messaging; +X-MessagingMenu-UsesChatSection=true +X-Ubuntu-Gettext-Domain=pybitmessage + +Actions=Send;Subscribe;AddressBook; + +[Desktop Action Send] +Name=Send +Exec=pybitmessage -s +OnlyShowIn=Unity; + +[Desktop Action Subscribe] +Name=Subscribe +Exec=pybitmessage -b +OnlyShowIn=Unity; + +[Desktop Action AddressBook] +Name=Address Book +Exec=pybitmessage -a +OnlyShowIn=Unity; diff --git a/ebuild.sh b/ebuild.sh deleted file mode 100755 index 1a3d16e0..00000000 --- a/ebuild.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -APP=pybitmessage -PREV_VERSION=0.3.4 -VERSION=0.3.4 -RELEASE=1 -SOURCEDIR=. -ARCH_TYPE=`uname -m` -CURRDIR=`pwd` -SOURCE=~/ebuild/${APP}-${VERSION}.tar.gz - - -# Update version numbers automatically - so you don't have to -sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' Makefile debian.sh rpm.sh arch.sh puppy.sh slack.sh -sed -i 's/Version: '${PREV_VERSION}'/Version: '${VERSION}'/g' rpmpackage/${APP}.spec -sed -i 's/Release: '${RELEASE}'/Release: '${RELEASE}'/g' rpmpackage/${APP}.spec -sed -i 's/pkgrel='${RELEASE}'/pkgrel='${RELEASE}'/g' archpackage/PKGBUILD -sed -i 's/pkgver='${PREV_VERSION}'/pkgver='${VERSION}'/g' archpackage/PKGBUILD -sed -i "s/-${PREV_VERSION}-/-${VERSION}-/g" puppypackage/*.specs -sed -i "s/|${PREV_VERSION}|/|${VERSION}|/g" puppypackage/*.specs -sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' puppypackage/pinstall.sh puppypackage/puninstall.sh -sed -i 's/-'${PREV_VERSION}'.so/-'${VERSION}'.so/g' debian/*.links - -# create the source code in the SOURCES directory -make clean -mkdir -p ~/ebuild -rm -f ${SOURCE} -mv ../${APP} ../${APP}-${VERSION} -tar -cvzf ${SOURCE} ../${APP}-${VERSION} --exclude-vcs - -# rename the root directory without the version number -mv ../${APP}-${VERSION} ../${APP} - diff --git a/ebuildpackage/pybitmessage-0.3.4-1.ebuild b/ebuildpackage/pybitmessage-0.3.4-1.ebuild deleted file mode 100755 index 20f056e4..00000000 --- a/ebuildpackage/pybitmessage-0.3.4-1.ebuild +++ /dev/null @@ -1,22 +0,0 @@ -# $Header: $ - -EAPI=4 - -DESCRIPTION="Bitmessage is a P2P communications protocol used to send encrypted messages to another person or to many subscribers. It is decentralized and trustless, meaning that you need-not inherently trust any entities like root certificate authorities. It uses strong authentication which means that the sender of a message cannot be spoofed, and it aims to hide "non-content" data, like the sender and receiver of messages, from passive eavesdroppers like those running warrantless wiretapping programs." -HOMEPAGE="https://github.com/Bitmessage/PyBitmessage" -SRC_URI="${PN}/${P}.tar.gz" -LICENSE="MIT" -SLOT="0" -KEYWORDS="x86" -RDEPEND="dev-libs/popt" -DEPEND="${RDEPEND}" - -src_configure() { - econf --with-popt -} - -src_install() { - emake DESTDIR="${D}" install - # Install README and (Debian) changelog - dodoc README.md debian/changelog -} diff --git a/generate.sh b/generate.sh deleted file mode 100755 index 8909cf2f..00000000 --- a/generate.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# Generates packaging - -rm -f Makefile rpmpackage/*.spec - -packagemonkey -n "PyBitmessage" --version "0.3.4" --dir "." -l "mit" -e "Bob Mottram (4096 bits) " --brief "Send encrypted messages" --desc "Bitmessage is a P2P communications protocol used to send encrypted messages to another person or to many subscribers. It is decentralized and trustless, meaning that you need-not inherently trust any entities like root certificate authorities. It uses strong authentication which means that the sender of a message cannot be spoofed, and it aims to hide \"non-content\" data, like the sender and receiver of messages, from passive eavesdroppers like those running warrantless wiretapping programs." --homepage "https://github.com/Bitmessage/PyBitmessage" --section "mail" --categories "Office/Email" --dependsdeb "python (>= 2.7.0), openssl, python-qt4, libqt4-dev (>= 4.8.0), python-qt4-dev, sqlite3, libsqlite3-dev" --dependsrpm "python, PyQt4, openssl-compat-bitcoin-libs" --mainscript "bitmessagemain.py" --librarypath "/opt/openssl-compat-bitcoin/lib/" --suggestsdeb "libmessaging-menu-dev" --dependspuppy "openssl, python-qt4, sqlite3, sqlite3-dev, python-openssl, python-sip" --dependsarch "python2, qt4, python2-pyqt4, sqlite, openssl" --suggestsarch "python2-gevent" --pythonversion 2 diff --git a/man/pybitmessage.1.gz b/man/pybitmessage.1.gz deleted file mode 100644 index efa686a8..00000000 Binary files a/man/pybitmessage.1.gz and /dev/null differ diff --git a/osx.sh b/osx.sh old mode 100644 new mode 100755 diff --git a/puppy.sh b/puppy.sh deleted file mode 100755 index dd54ecc9..00000000 --- a/puppy.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -APP=pybitmessage -PREV_VERSION=0.3.4 -VERSION=0.3.4 -RELEASE=1 -BUILDDIR=~/petbuild -CURRDIR=`pwd` -PROJECTDIR=${BUILDDIR}/${APP}-${VERSION}-${RELEASE} - -# Update version numbers automatically - so you don't have to -sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' Makefile debian.sh rpm.sh arch.sh ebuild.sh slack.sh -sed -i 's/Version: '${PREV_VERSION}'/Version: '${VERSION}'/g' rpmpackage/${APP}.spec -sed -i 's/Release: '${RELEASE}'/Release: '${RELEASE}'/g' rpmpackage/${APP}.spec -sed -i 's/pkgrel='${RELEASE}'/pkgrel='${RELEASE}'/g' archpackage/PKGBUILD -sed -i 's/pkgver='${PREV_VERSION}'/pkgver='${VERSION}'/g' archpackage/PKGBUILD -sed -i "s/-${PREV_VERSION}-/-${VERSION}-/g" puppypackage/*.specs -sed -i "s/|${PREV_VERSION}|/|${VERSION}|/g" puppypackage/*.specs -sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' puppypackage/pinstall.sh puppypackage/puninstall.sh -sed -i 's/-'${PREV_VERSION}'.so/-'${VERSION}'.so/g' debian/*.links - - -# Make directories within which the project will be built -mkdir -p ${BUILDDIR} -mkdir -p ${PROJECTDIR} - -# Build the project -make clean -make -make install -B DESTDIR=${PROJECTDIR} - -# Alter the desktop file categories -sed -i "s/Categories=Office;Email;/Categories=Internet;mailnews;/g" ${PROJECTDIR}/usr/share/applications/${APP}.desktop - -# Create directories specific to puppy -mkdir ${PROJECTDIR}/usr -mkdir ${PROJECTDIR}/usr/local -mkdir ${PROJECTDIR}/usr/local/bin - -# Copy anything in /usr/bin into /usr/local/bin -cp ${PROJECTDIR}/usr/bin/* ${PROJECTDIR}/usr/local/bin/ - -# Copy the spec file into the build directory -cp ${CURRDIR}/puppypackage/${APP}-${VERSION}.pet.specs ${PROJECTDIR} - -# Copy the XPM mini icon into the build directory -cp ${CURRDIR}/desktop/icon14.xpm ${PROJECTDIR}/${APP}.xpm - -# Compress the build directory -cd ${BUILDDIR} -tar -c -f ${APP}-${VERSION}-${RELEASE}.tar . -sync -gzip ${APP}-${VERSION}-${RELEASE}.tar -mv ${APP}-${VERSION}-${RELEASE}.tar.gz ${CURRDIR}/puppypackage -cd ${CURRDIR}/puppypackage - -# Create the PET package -MD5SUM="`md5sum ${APP}-${VERSION}-${RELEASE}.tar.gz | cut -f 1 -d ' '`" -echo -n "$MD5SUM" >> ${APP}-${VERSION}-${RELEASE}.tar.gz -sync -mv -f ${APP}-${VERSION}-${RELEASE}.tar.gz ${APP}-${VERSION}-${RELEASE}.pet -sync -cd ${CURRDIR} - -# Remove the temporary build directory -rm -fr ${BUILDDIR} diff --git a/puppypackage/icon14.xpm b/puppypackage/icon14.xpm deleted file mode 100644 index 6d50c8c7..00000000 --- a/puppypackage/icon14.xpm +++ /dev/null @@ -1,111 +0,0 @@ -/* XPM */ -static char * icon14_xpm[] = { -"14 14 94 2", -" c None", -". c #B9BABC", -"+ c #D2D3D4", -"@ c #BEBFC1", -"# c #CBCCCF", -"$ c #E0E3E1", -"% c #F6F8F8", -"& c #F3F3F3", -"* c #B9BABD", -"= c #C8C9CB", -"- c #DADCDB", -"; c #E6E8E7", -"> c #F7F7F7", -", c #FCFCFC", -"' c #F5F5F5", -") c #BCBDBF", -"! c #D3D5D5", -"~ c #E3E5E4", -"{ c #F1F2F2", -"] c #FDFDFD", -"^ c #F8F8F8", -"/ c #CBCCCC", -"( c #B2B3B6", -"_ c #B0B1B3", -": c #D3D4D6", -"< c #DFE0E0", -"[ c #EAEDEB", -"} c #FAF9F9", -"| c #DFE0DF", -"1 c #B9BBBD", -"2 c #C2C3C5", -"3 c #B7B8BC", -"4 c #CDCED0", -"5 c #DCDDDE", -"6 c #E7E9E7", -"7 c #F6F6F6", -"8 c #C0C1C2", -"9 c #DDDFDF", -"0 c #BCBCBF", -"a c #D7D9DA", -"b c #E2E4E3", -"c c #F0F2F1", -"d c #FAFAFA", -"e c #F9F9F9", -"f c #CCCDCD", -"g c #B6B7B9", -"h c #C7C8CA", -"i c #A6A7A9", -"j c #D3D4D5", -"k c #F2F5F3", -"l c #F1F2F1", -"m c #F6F8F7", -"n c #FCFBFC", -"o c #E8EAE9", -"p c #B6B7B8", -"q c #BFC0C2", -"r c #323138", -"s c #1D1D22", -"t c #111117", -"u c #4C4C51", -"v c #ECECED", -"w c #FFFFFF", -"x c #BBBDBD", -"y c #C9CACB", -"z c #333238", -"A c #313036", -"B c #27272C", -"C c #1E1F24", -"D c #16171D", -"E c #919193", -"F c #F2F3F3", -"G c #B4B5B7", -"H c #CDCFCF", -"I c #67666B", -"J c #37363C", -"K c #2C2B31", -"L c #2A292F", -"M c #16171C", -"N c #68696B", -"O c #C7C8C9", -"P c #CBCDCC", -"Q c #49474E", -"R c #39383E", -"S c #36353B", -"T c #333138", -"U c #28272D", -"V c #CED0D0", -"W c #67676C", -"X c #414046", -"Y c #424147", -"Z c #39383F", -"` c #8C8D8F", -" . c #6B6C70", -".. c #75757A", -" . + ", -" @ # $ % & ", -" * = - ; > , ' ", -" ) ! ~ { ] ^ / ( ", -" _ : < [ } , | 1 2 ", -" 3 4 5 6 7 , { 8 . 9 ", -" 2 0 a b c d e f g h ", -" i j k l m n o p q h ", -" r s t u v w ' x g y ", -" z A B C D E F G H ", -" I J A K L M N O P ", -" Q R R S T U V ", -" W X Y X Z ` ", -" ... "}; diff --git a/puppypackage/pybitmessage-0.3.4.pet.specs b/puppypackage/pybitmessage-0.3.4.pet.specs deleted file mode 100644 index e346d0c9..00000000 --- a/puppypackage/pybitmessage-0.3.4.pet.specs +++ /dev/null @@ -1 +0,0 @@ -pybitmessage-0.3.4-1|PyBitmessage|0.3.4|1|Internet;mailnews;|5.1M||pybitmessage-0.3.4-1.pet|+openssl,+python-qt4,+sqlite3,+sqlite3-dev,+python-openssl,+python-sip|Send encrypted messages|ubuntu|precise|5| diff --git a/rpm.sh b/rpm.sh deleted file mode 100755 index 8269ed9c..00000000 --- a/rpm.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -APP=pybitmessage -PREV_VERSION=0.3.4 -VERSION=0.3.4 -RELEASE=1 -SOURCEDIR=. -ARCH_TYPE=`uname -m` -CURRDIR=`pwd` -SOURCE=~/rpmbuild/SOURCES/${APP}_${VERSION}.orig.tar.gz - - -# Update version numbers automatically - so you don't have to -sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' Makefile debian.sh arch.sh puppy.sh ebuild.sh slack.sh -sed -i 's/Version: '${PREV_VERSION}'/Version: '${VERSION}'/g' rpmpackage/${APP}.spec -sed -i 's/Release: '${RELEASE}'/Release: '${RELEASE}'/g' rpmpackage/${APP}.spec -sed -i 's/pkgrel='${RELEASE}'/pkgrel='${RELEASE}'/g' archpackage/PKGBUILD -sed -i 's/pkgver='${PREV_VERSION}'/pkgver='${VERSION}'/g' archpackage/PKGBUILD -sed -i "s/-${PREV_VERSION}-/-${VERSION}-/g" puppypackage/*.specs -sed -i "s/|${PREV_VERSION}|/|${VERSION}|/g" puppypackage/*.specs -sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' puppypackage/pinstall.sh puppypackage/puninstall.sh -sed -i 's/-'${PREV_VERSION}'.so/-'${VERSION}'.so/g' debian/*.links - -sudo yum groupinstall "Development Tools" -sudo yum install rpmdevtools - -# setup the rpmbuild directory tree -rpmdev-setuptree - -# create the source code in the SOURCES directory -make clean -mkdir -p ~/rpmbuild/SOURCES -rm -f ${SOURCE} - -# having the root directory called name-version seems essential -mv ../${APP} ../${APP}-${VERSION} -tar -cvzf ${SOURCE} ../${APP}-${VERSION} --exclude-vcs - -# rename the root directory without the version number -mv ../${APP}-${VERSION} ../${APP} - -# copy the spec file into the SPECS directory -cp -f rpmpackage/${APP}.spec ~/rpmbuild/SPECS - -# build -cd ~/rpmbuild/SPECS -rpmbuild -ba ${APP}.spec -cd ${CURRDIR} - -# Copy the results into the rpmpackage directory -mkdir -p rpmpackage/${ARCH_TYPE} -cp -r ~/rpmbuild/RPMS/${ARCH_TYPE}/${APP}* rpmpackage/${ARCH_TYPE} -cp -r ~/rpmbuild/SRPMS/${APP}* rpmpackage diff --git a/rpmpackage/pybitmessage.spec b/rpmpackage/pybitmessage.spec deleted file mode 100644 index 27485d73..00000000 --- a/rpmpackage/pybitmessage.spec +++ /dev/null @@ -1,207 +0,0 @@ -Name: pybitmessage -Version: 0.3.4 -Release: 1%{?dist} -Summary: Send encrypted messages -License: MIT -URL: https://github.com/Bitmessage/PyBitmessage -Packager: Bob Mottram (4096 bits) -Source0: http://yourdomainname.com/src/%{name}_%{version}.orig.tar.gz -Group: Office/Email - -Requires: python, PyQt4, openssl-compat-bitcoin-libs - - -%description -Bitmessage is a P2P communications protocol used to send encrypted messages -to another person or to many subscribers. It is decentralized and -trustless, meaning that you need-not inherently trust any entities like -root certificate authorities. It uses strong authentication which means -that the sender of a message cannot be spoofed, and it aims to hide -"non-content" data, like the sender and receiver of messages, from passive -eavesdroppers like those running warrantless wiretapping programs. - -%prep -%setup -q - -%build -%configure -make %{?_smp_mflags} - -%install -rm -rf %{buildroot} -mkdir -p %{buildroot} -mkdir -p %{buildroot}/etc -mkdir -p %{buildroot}/etc/%{name} -mkdir -p %{buildroot}/usr -mkdir -p %{buildroot}/usr/bin -mkdir -p %{buildroot}/usr/share -mkdir -p %{buildroot}/usr/share/man -mkdir -p %{buildroot}/usr/share/man/man1 -mkdir -p %{buildroot}/usr/share/%{name} -mkdir -p %{buildroot}/usr/share/applications -mkdir -p %{buildroot}/usr/share/icons -mkdir -p %{buildroot}/usr/share/icons/hicolor -mkdir -p %{buildroot}/usr/share/icons/hicolor/24x24 -mkdir -p %{buildroot}/usr/share/icons/hicolor/24x24/apps - -mkdir -p %{buildroot}/usr/share/pixmaps -mkdir -p %{buildroot}/usr/share/icons/hicolor/scalable -mkdir -p %{buildroot}/usr/share/icons/hicolor/scalable/apps -# Make install but to the RPM BUILDROOT directory -make install -B DESTDIR=%{buildroot} - -%files -%doc README.md LICENSE -%defattr(-,root,root,-) -%dir /usr/share/%{name} -%dir /usr/share/applications -%dir /usr/share/icons/hicolor -%dir /usr/share/icons/hicolor/24x24 -%dir /usr/share/icons/hicolor/24x24/apps -%dir /usr/share/pixmaps -%dir /usr/share/icons/hicolor/scalable -%dir /usr/share/icons/hicolor/scalable/apps -/usr/share/%{name}/* -%{_bindir}/* -%{_mandir}/man1/* -%attr(644,root,root) /usr/share/applications/%{name}.desktop -%attr(644,root,root) /usr/share/icons/hicolor/24x24/apps/%{name}.png - -%changelog -* Sun Jun 30 2013 Bob Mottram (4096 bits) - 0.3.4-1 -- Switched addr, msg, broadcast, and getpubkey message types - to 8 byte time. Last remaining type is pubkey. -- Added tooltips to show the full subject of messages -- Added Maximum Acceptable Difficulty fields in the settings -- Send out pubkey immediately after generating deterministic - addresses rather than waiting for a request - -* Sat Jun 29 2013 Bob Mottram (4096 bits) - 0.3.3-1 -- Remove inbox item from GUI when using API command trashMessage -- Add missing trailing semicolons to pybitmessage.desktop -- Ensure $(DESTDIR)/usr/bin exists -- Update Makefile to correct sandbox violations when built - via Portage (Gentoo) -- Fix message authentication bug - -* Fri Jun 28 2013 Bob Mottram (4096 bits) - 0.3.211-1 -- Removed multi-core proof of work - as the multiprocessing module does not work well with - pyinstaller's --onefile option. - -* Mon Jun 03 2013 Bob Mottram (4096 bits) - 0.3.2-1 -- Bugfix: Remove remaining references to the old myapp.trayIcon -- Refactored message status-related code. API function getStatus - now returns one of these strings: notfound, msgqueued, - broadcastqueued, broadcastsent, doingpubkeypow, awaitingpubkey, - doingmsgpow, msgsent, or ackreceived -- Moved proof of work to low-priority multi-threaded child - processes -- Added menu option to delete all trashed messages -- Added inv flooding attack mitigation -- On Linux, when selecting Show Bitmessage, do not maximize - automatically -- Store tray icons in bitmessage_icons_rc.py - -* Sat May 25 2013 Jonathan Warren (4096 bits) - 0.3.1-1 -- Added new API commands: getDeterministicAddress, - addSubscription, deleteSubscription -- TCP Connection timeout for non-fully-established connections - now 20 seconds -- Don't update the time we last communicated with a node unless - the connection is fully established. This will allow us to - forget about active but non-Bitmessage nodes which have made - it into our knownNodes file. -- Prevent incoming connection flooding from crashing - singleListener thread. Client will now only accept one - connection per remote node IP -- Bugfix: Worker thread crashed when doing a POW to send out - a v2 pubkey (bug introduced in 0.3.0) -- Wrap all sock.shutdown functions in error handlers -- Put all 'commit' commands within SQLLocks -- Bugfix: If address book label is blank, Bitmessage wouldn't - show message (bug introduced in 0.3.0) -- Messaging menu item selects the oldest unread message -- Standardize on 'Quit' rather than 'Exit' -- [OSX] Try to seek homebrew installation of OpenSSL -- Prevent multiple instances of the application from running -- Show 'Connected' or 'Connection Lost' indicators -- Use only 9 half-open connections on Windows but 32 for - everyone else -- Added appIndicator (a more functional tray icon) and Ubuntu - Messaging Menu integration -- Changed Debian install directory and run script name based - on Github issue #135 - -* Tue May 6 2013 Bob Mottram (4096 bits) - 0.3.0-1 -- Added new API function: getStatus -- Added error-handling around all sock.sendall() functions - in the receiveData thread so that if there is a problem - sending data, the threads will close gracefully -- Abandoned and removed the connectionsCount data structure; - use the connectedHostsList instead because it has proved to be - more accurate than trying to maintain the connectionsCount -- Added daemon mode. All UI code moved into a module and many - shared objects moved into shared.py -- Truncate display of very long messages to avoid freezing the UI -- Added encrypted broadcasts for v3 addresses or v2 addresses - after 2013-05-28 10:00 UTC -- No longer self.sock.close() from within receiveDataThreads, - let the sendDataThreads do it -- Swapped out the v2 announcements subscription address for a v3 - announcements subscription address -- Vacuum the messages.dat file once a month: will greatly reduce the file size -- Added a settings table in message.dat -- Implemented v3 addresses: - pubkey messages must now include two var_ints: nonce_trials_per_byte - and extra_bytes, and also be signed. When sending a message to a v3 - address, the sender must use these values in calculating its POW or - else the message will not be accepted by the receiver. -- Display a privacy warning when selecting 'Send Broadcast from this address' -- Added gitignore file -- Added code in preparation for a switch from 32-bit time to 64-bit time. - Nodes will now advertise themselves as using protocol version 2. -- Don't necessarily delete entries from the inventory after 2.5 days; - leave pubkeys there for 28 days so that we don't process the same ones - many times throughout a month. This was causing the 'pubkeys processed' - indicator on the 'Network Status' tab to not accurately reflect the - number of truly new addresses on the network. -- Use 32 threads for outgoing connections in order to connect quickly -- Fix typo when calling os.environ in the sys.platform=='darwin' case -- Allow the cancelling of a message which is in the process of being - sent by trashing it then restarting Bitmessage -- Bug fix: can't delete address from address book - -* Tue Apr 9 2013 Bob Mottram (4096 bits) - 0.2.8-1 -- Fixed Ubuntu & OS X issue: - Bitmessage wouldn't receive any objects from peers after restart. -- Inventory flush to disk when exiting program now vastly faster. -- Fixed address generation bug (kept Bitmessage from restarting). -- Improve deserialization of messages - before processing (a 'best practice'). -- Change to help Macs find OpenSSL the way Unix systems find it. -- Do not share or accept IPs which are in the private IP ranges. -- Added time-fuzzing - to the embedded time in pubkey and getpubkey messages. -- Added a knownNodes lock - to prevent an exception from sometimes occurring when saving - the data-structure to disk. -- Show unread messages in bold - and do not display new messages automatically. -- Support selecting multiple items - in the inbox, sent box, and address book. -- Use delete key to trash Inbox or Sent messages. -- Display richtext(HTML) messages - from senders in address book or subscriptions (although not - pseudo-mailing-lists; use new right-click option). -- Trim spaces - from the beginning and end of addresses when adding to - address book, subscriptions, and blacklist. -- Improved the display of the time for foreign language users. - -* Tue Apr 1 2013 Bob Mottram (4096 bits) - 0.2.7-1 -- Added debian packaging -- Script to generate debian packages -- SVG icon for Gnome shell, etc -- Source moved int src directory for debian standards compatibility -- Trailing carriage return on COPYING LICENSE and README.md diff --git a/slack.sh b/slack.sh deleted file mode 100755 index cc71e1f3..00000000 --- a/slack.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -APP=pybitmessage -PREV_VERSION=0.3.4 -VERSION=0.3.4 -RELEASE=1 -ARCH_TYPE=`uname -m` -BUILDDIR=~/slackbuild -CURRDIR=`pwd` -PROJECTDIR=${BUILDDIR}/${APP}-${VERSION}-${RELEASE} - -# Update version numbers automatically - so you don't have to -sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' Makefile debian.sh rpm.sh arch.sh puppy.sh ebuild.sh -sed -i 's/Version: '${PREV_VERSION}'/Version: '${VERSION}'/g' rpmpackage/${APP}.spec -sed -i 's/Release: '${RELEASE}'/Release: '${RELEASE}'/g' rpmpackage/${APP}.spec -sed -i 's/pkgrel='${RELEASE}'/pkgrel='${RELEASE}'/g' archpackage/PKGBUILD -sed -i 's/pkgver='${PREV_VERSION}'/pkgver='${VERSION}'/g' archpackage/PKGBUILD -sed -i "s/-${PREV_VERSION}-/-${VERSION}-/g" puppypackage/*.specs -sed -i "s/|${PREV_VERSION}|/|${VERSION}|/g" puppypackage/*.specs -sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' puppypackage/pinstall.sh puppypackage/puninstall.sh -sed -i 's/-'${PREV_VERSION}'.so/-'${VERSION}'.so/g' debian/*.links - - -# Make directories within which the project will be built -mkdir -p ${BUILDDIR} -mkdir -p ${PROJECTDIR} - -# Build the project -make clean -make -make install -B DESTDIR=${PROJECTDIR} - -# Copy the slack-desc and doinst.sh files into the build install directory -mkdir ${PROJECTDIR}/install -cp ${CURRDIR}/slackpackage/slack-desc ${PROJECTDIR}/install -cp ${CURRDIR}/slackpackage/doinst.sh ${PROJECTDIR}/install - -# Compress the build directory -cd ${BUILDDIR} -tar -c -f ${APP}-${VERSION}-${RELEASE}.tar . -sync -xz ${APP}-${VERSION}-${RELEASE}.tar -sync -mv ${APP}-${VERSION}-${RELEASE}.tar.xz ${CURRDIR}/slackpackage/${APP}-${VERSION}-${ARCH_TYPE}-${RELEASE}.txz -cd ${CURRDIR} - -# Remove the temporary build directory -rm -fr ${BUILDDIR} diff --git a/slackpackage/doinst.sh b/slackpackage/doinst.sh deleted file mode 100755 index 2d703395..00000000 --- a/slackpackage/doinst.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -e - -# This script is run after installation. -# Any additional configuration goes here. diff --git a/slackpackage/slack-desc b/slackpackage/slack-desc deleted file mode 100644 index 8705a13b..00000000 --- a/slackpackage/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line -# up the first '|' above the ':' following the base package name, and the '|' on -# the right side marks the last column you can put a character in. You must make -# exactly 11 lines for the formatting to be correct. It's also customary to -# leave one space after the ':'. - - |-----handy-ruler--------------------------------------------------| -pybitmessage: pybitmessage (Send encrypted messages) -pybitmessage: -pybitmessage: Bitmessage is a P2P communications protocol used to send -pybitmessage: encrypted messages to another person or to many subscribers. It -pybitmessage: is decentralized and trustless, meaning that you need-not -pybitmessage: inherently trust any entities like root certificate authorities. -pybitmessage: It uses strong authentication which means that the sender of a -pybitmessage: message cannot be spoofed, and it aims to hide "non-content" -pybitmessage: data, like the sender and receiver of messages, from passive -pybitmessage: eavesdroppers like those running warrantless wiretapping -pybitmessage: programs. diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index 15acf545..e93fbd46 100644 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -14,7 +14,7 @@ try: from gevent import monkey monkey.patch_all() except ImportError as ex: - print "Not using the gevent module as it was not found. No need to worry." + print "cannot find gevent" import signal # Used to capture a Ctrl-C keypress so that Bitmessage can shutdown gracefully. # The next 3 are used for the API @@ -32,6 +32,7 @@ from class_singleListener import * from class_addressGenerator import * # Helper Functions +import helper_startup import helper_bootstrap import sys @@ -718,8 +719,11 @@ if __name__ == "__main__": signal.signal(signal.SIGINT, helper_generic.signal_handler) # signal.signal(signal.SIGINT, signal.SIG_DFL) + helper_startup.loadConfig() + helper_bootstrap.knownNodes() helper_bootstrap.dns() + # Start the address generation thread addressGeneratorThread = addressGenerator() addressGeneratorThread.daemon = True # close the main program even if there are threads left diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 46bac1f3..ae5ab8a7 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -29,8 +29,6 @@ import os from pyelliptic.openssl import OpenSSL import pickle import platform -import debug -from debug import logger try: from PyQt4 import QtCore, QtGui @@ -310,10 +308,205 @@ class MyForm(QtGui.QMainWindow): addressInKeysFile) # Load inbox from messages database file - self.loadInbox() + font = QFont() + font.setBold(True) + shared.sqlLock.acquire() + shared.sqlSubmitQueue.put( + '''SELECT msgid, toaddress, fromaddress, subject, received, message, read FROM inbox where folder='inbox' ORDER BY received''') + shared.sqlSubmitQueue.put('') + queryreturn = shared.sqlReturnQueue.get() + shared.sqlLock.release() + for row in queryreturn: + msgid, toAddress, fromAddress, subject, received, message, read = row + subject = shared.fixPotentiallyInvalidUTF8Data(subject) + message = shared.fixPotentiallyInvalidUTF8Data(message) + try: + if toAddress == self.str_broadcast_subscribers: + toLabel = self.str_broadcast_subscribers + else: + toLabel = shared.config.get(toAddress, 'label') + except: + toLabel = '' + if toLabel == '': + toLabel = toAddress + + fromLabel = '' + t = (fromAddress,) + shared.sqlLock.acquire() + shared.sqlSubmitQueue.put( + '''select label from addressbook where address=?''') + shared.sqlSubmitQueue.put(t) + queryreturn = shared.sqlReturnQueue.get() + shared.sqlLock.release() + + if queryreturn != []: + for row in queryreturn: + fromLabel, = row + + if fromLabel == '': # If this address wasn't in our address book... + t = (fromAddress,) + shared.sqlLock.acquire() + shared.sqlSubmitQueue.put( + '''select label from subscriptions where address=?''') + shared.sqlSubmitQueue.put(t) + queryreturn = shared.sqlReturnQueue.get() + shared.sqlLock.release() + + if queryreturn != []: + for row in queryreturn: + fromLabel, = row + + self.ui.tableWidgetInbox.insertRow(0) + newItem = QtGui.QTableWidgetItem(unicode(toLabel, 'utf-8')) + newItem.setToolTip(unicode(toLabel, 'utf-8')) + newItem.setFlags( + QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) + if not read: + newItem.setFont(font) + newItem.setData(Qt.UserRole, str(toAddress)) + if shared.safeConfigGetBoolean(toAddress, 'mailinglist'): + newItem.setTextColor(QtGui.QColor(137, 04, 177)) + self.ui.tableWidgetInbox.setItem(0, 0, newItem) + if fromLabel == '': + newItem = QtGui.QTableWidgetItem( + unicode(fromAddress, 'utf-8')) + newItem.setToolTip(unicode(fromAddress, 'utf-8')) + else: + newItem = QtGui.QTableWidgetItem(unicode(fromLabel, 'utf-8')) + newItem.setToolTip(unicode(fromLabel, 'utf-8')) + newItem.setFlags( + QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) + if not read: + newItem.setFont(font) + newItem.setData(Qt.UserRole, str(fromAddress)) + + self.ui.tableWidgetInbox.setItem(0, 1, newItem) + newItem = QtGui.QTableWidgetItem(unicode(subject, 'utf-8')) + newItem.setToolTip(unicode(subject, 'utf-8')) + newItem.setData(Qt.UserRole, unicode(message, 'utf-8)')) + newItem.setFlags( + QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) + if not read: + newItem.setFont(font) + self.ui.tableWidgetInbox.setItem(0, 2, newItem) + newItem = myTableWidgetItem(unicode(strftime(shared.config.get( + 'bitmessagesettings', 'timeformat'), localtime(int(received))), 'utf-8')) + newItem.setToolTip(unicode(strftime(shared.config.get( + 'bitmessagesettings', 'timeformat'), localtime(int(received))), 'utf-8')) + newItem.setData(Qt.UserRole, QByteArray(msgid)) + newItem.setData(33, int(received)) + newItem.setFlags( + QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) + if not read: + newItem.setFont(font) + self.ui.tableWidgetInbox.setItem(0, 3, newItem) + self.ui.tableWidgetInbox.sortItems(3, Qt.DescendingOrder) + self.ui.tableWidgetInbox.keyPressEvent = self.tableWidgetInboxKeyPressEvent # Load Sent items from database - self.loadSent() + shared.sqlLock.acquire() + shared.sqlSubmitQueue.put( + '''SELECT toaddress, fromaddress, subject, message, status, ackdata, lastactiontime FROM sent where folder = 'sent' ORDER BY lastactiontime''') + shared.sqlSubmitQueue.put('') + queryreturn = shared.sqlReturnQueue.get() + shared.sqlLock.release() + for row in queryreturn: + toAddress, fromAddress, subject, message, status, ackdata, lastactiontime = row + subject = shared.fixPotentiallyInvalidUTF8Data(subject) + message = shared.fixPotentiallyInvalidUTF8Data(message) + try: + fromLabel = shared.config.get(fromAddress, 'label') + except: + fromLabel = '' + if fromLabel == '': + fromLabel = fromAddress + + toLabel = '' + t = (toAddress,) + shared.sqlLock.acquire() + shared.sqlSubmitQueue.put( + '''select label from addressbook where address=?''') + shared.sqlSubmitQueue.put(t) + queryreturn = shared.sqlReturnQueue.get() + shared.sqlLock.release() + + if queryreturn != []: + for row in queryreturn: + toLabel, = row + + self.ui.tableWidgetSent.insertRow(0) + if toLabel == '': + newItem = QtGui.QTableWidgetItem(unicode(toAddress, 'utf-8')) + newItem.setToolTip(unicode(toAddress, 'utf-8')) + else: + newItem = QtGui.QTableWidgetItem(unicode(toLabel, 'utf-8')) + newItem.setToolTip(unicode(toLabel, 'utf-8')) + newItem.setData(Qt.UserRole, str(toAddress)) + newItem.setFlags( + QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) + self.ui.tableWidgetSent.setItem(0, 0, newItem) + if fromLabel == '': + newItem = QtGui.QTableWidgetItem( + unicode(fromAddress, 'utf-8')) + newItem.setToolTip(unicode(fromAddress, 'utf-8')) + else: + newItem = QtGui.QTableWidgetItem(unicode(fromLabel, 'utf-8')) + newItem.setToolTip(unicode(fromLabel, 'utf-8')) + newItem.setData(Qt.UserRole, str(fromAddress)) + newItem.setFlags( + QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) + self.ui.tableWidgetSent.setItem(0, 1, newItem) + newItem = QtGui.QTableWidgetItem(unicode(subject, 'utf-8')) + newItem.setToolTip(unicode(subject, 'utf-8')) + newItem.setData(Qt.UserRole, unicode(message, 'utf-8)')) + newItem.setFlags( + QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) + self.ui.tableWidgetSent.setItem(0, 2, newItem) + if status == 'awaitingpubkey': + statusText = _translate( + "MainWindow", "Waiting on their encryption key. Will request it again soon.") + elif status == 'doingpowforpubkey': + statusText = _translate( + "MainWindow", "Encryption key request queued.") + elif status == 'msgqueued': + statusText = _translate( + "MainWindow", "Queued.") + elif status == 'msgsent': + statusText = _translate("MainWindow", "Message sent. Waiting on acknowledgement. Sent at %1").arg( + unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) + elif status == 'doingmsgpow': + statusText = _translate( + "MainWindow", "Need to do work to send message. Work is queued.") + elif status == 'ackreceived': + statusText = _translate("MainWindow", "Acknowledgement of the message received %1").arg( + unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) + elif status == 'broadcastqueued': + statusText = _translate( + "MainWindow", "Broadcast queued.") + elif status == 'broadcastsent': + statusText = _translate("MainWindow", "Broadcast on %1").arg(unicode(strftime( + shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) + elif status == 'toodifficult': + statusText = _translate("MainWindow", "Problem: The work demanded by the recipient is more difficult than you are willing to do. %1").arg( + unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) + elif status == 'badkey': + statusText = _translate("MainWindow", "Problem: The recipient\'s encryption key is no good. Could not encrypt message. %1").arg( + unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) + elif status == 'forcepow': + statusText = _translate( + "MainWindow", "Forced difficulty override. Send should start soon.") + else: + statusText = _translate("MainWindow", "Unknown status: %1 %2").arg(status).arg(unicode( + strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) + newItem = myTableWidgetItem(statusText) + newItem.setToolTip(statusText) + newItem.setData(Qt.UserRole, QByteArray(ackdata)) + newItem.setData(33, int(lastactiontime)) + newItem.setFlags( + QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) + self.ui.tableWidgetSent.setItem(0, 3, newItem) + self.ui.tableWidgetSent.sortItems(3, Qt.DescendingOrder) + self.ui.tableWidgetSent.keyPressEvent = self.tableWidgetSentKeyPressEvent # Initialize the address book shared.sqlLock.acquire() @@ -334,14 +527,6 @@ class MyForm(QtGui.QMainWindow): # Initialize the Subscriptions self.rerenderSubscriptions() - # Initialize the inbox search - QtCore.QObject.connect(self.ui.inboxSearchLineEdit, QtCore.SIGNAL( - "returnPressed()"), self.inboxSearchLineEditPressed) - - # Initialize the sent search - QtCore.QObject.connect(self.ui.sentSearchLineEdit, QtCore.SIGNAL( - "returnPressed()"), self.sentSearchLineEditPressed) - # Initialize the Blacklist or Whitelist if shared.config.get('bitmessagesettings', 'blackwhitelist') == 'black': self.loadBlackWhiteList() @@ -501,251 +686,6 @@ class MyForm(QtGui.QMainWindow): self.appIndicatorShow() self.ui.tabWidget.setCurrentIndex(5) - # Load Sent items from database - def loadSent(self, where="", what=""): - what = "%" + what + "%" - if where == "To": - where = "toaddress" - elif where == "From": - where = "fromaddress" - elif where == "Subject": - where = "subject" - elif where == "Message": - where = "message" - else: - where = "toaddress || fromaddress || subject || message" - - sqlQuery = ''' - SELECT toaddress, fromaddress, subject, message, status, ackdata, lastactiontime - FROM sent WHERE folder="sent" AND %s LIKE ? - ORDER BY lastactiontime - ''' % (where,) - - while self.ui.tableWidgetSent.rowCount() > 0: - self.ui.tableWidgetSent.removeRow(0) - - t = (what,) - shared.sqlLock.acquire() - shared.sqlSubmitQueue.put(sqlQuery) - shared.sqlSubmitQueue.put(t) - queryreturn = shared.sqlReturnQueue.get() - shared.sqlLock.release() - for row in queryreturn: - toAddress, fromAddress, subject, message, status, ackdata, lastactiontime = row - subject = shared.fixPotentiallyInvalidUTF8Data(subject) - message = shared.fixPotentiallyInvalidUTF8Data(message) - try: - fromLabel = shared.config.get(fromAddress, 'label') - except: - fromLabel = '' - if fromLabel == '': - fromLabel = fromAddress - - toLabel = '' - t = (toAddress,) - shared.sqlLock.acquire() - shared.sqlSubmitQueue.put( - '''select label from addressbook where address=?''') - shared.sqlSubmitQueue.put(t) - queryreturn = shared.sqlReturnQueue.get() - shared.sqlLock.release() - - if queryreturn != []: - for row in queryreturn: - toLabel, = row - - self.ui.tableWidgetSent.insertRow(0) - if toLabel == '': - newItem = QtGui.QTableWidgetItem(unicode(toAddress, 'utf-8')) - newItem.setToolTip(unicode(toAddress, 'utf-8')) - else: - newItem = QtGui.QTableWidgetItem(unicode(toLabel, 'utf-8')) - newItem.setToolTip(unicode(toLabel, 'utf-8')) - newItem.setData(Qt.UserRole, str(toAddress)) - newItem.setFlags( - QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) - self.ui.tableWidgetSent.setItem(0, 0, newItem) - if fromLabel == '': - newItem = QtGui.QTableWidgetItem( - unicode(fromAddress, 'utf-8')) - newItem.setToolTip(unicode(fromAddress, 'utf-8')) - else: - newItem = QtGui.QTableWidgetItem(unicode(fromLabel, 'utf-8')) - newItem.setToolTip(unicode(fromLabel, 'utf-8')) - newItem.setData(Qt.UserRole, str(fromAddress)) - newItem.setFlags( - QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) - self.ui.tableWidgetSent.setItem(0, 1, newItem) - newItem = QtGui.QTableWidgetItem(unicode(subject, 'utf-8')) - newItem.setToolTip(unicode(subject, 'utf-8')) - newItem.setData(Qt.UserRole, unicode(message, 'utf-8)')) - newItem.setFlags( - QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) - self.ui.tableWidgetSent.setItem(0, 2, newItem) - if status == 'awaitingpubkey': - statusText = _translate( - "MainWindow", "Waiting on their encryption key. Will request it again soon.") - elif status == 'doingpowforpubkey': - statusText = _translate( - "MainWindow", "Encryption key request queued.") - elif status == 'msgqueued': - statusText = _translate( - "MainWindow", "Queued.") - elif status == 'msgsent': - statusText = _translate("MainWindow", "Message sent. Waiting on acknowledgement. Sent at %1").arg( - unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) - elif status == 'doingmsgpow': - statusText = _translate( - "MainWindow", "Need to do work to send message. Work is queued.") - elif status == 'ackreceived': - statusText = _translate("MainWindow", "Acknowledgement of the message received %1").arg( - unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) - elif status == 'broadcastqueued': - statusText = _translate( - "MainWindow", "Broadcast queued.") - elif status == 'broadcastsent': - statusText = _translate("MainWindow", "Broadcast on %1").arg(unicode(strftime( - shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) - elif status == 'toodifficult': - statusText = _translate("MainWindow", "Problem: The work demanded by the recipient is more difficult than you are willing to do. %1").arg( - unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) - elif status == 'badkey': - statusText = _translate("MainWindow", "Problem: The recipient\'s encryption key is no good. Could not encrypt message. %1").arg( - unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) - elif status == 'forcepow': - statusText = _translate( - "MainWindow", "Forced difficulty override. Send should start soon.") - else: - statusText = _translate("MainWindow", "Unknown status: %1 %2").arg(status).arg(unicode( - strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) - newItem = myTableWidgetItem(statusText) - newItem.setToolTip(statusText) - newItem.setData(Qt.UserRole, QByteArray(ackdata)) - newItem.setData(33, int(lastactiontime)) - newItem.setFlags( - QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) - self.ui.tableWidgetSent.setItem(0, 3, newItem) - self.ui.tableWidgetSent.sortItems(3, Qt.DescendingOrder) - self.ui.tableWidgetSent.keyPressEvent = self.tableWidgetSentKeyPressEvent - - # Load inbox from messages database file - def loadInbox(self, where="", what=""): - what = "%" + what + "%" - if where == "To": - where = "toaddress" - elif where == "From": - where = "fromaddress" - elif where == "Subject": - where = "subject" - elif where == "Message": - where = "message" - else: - where = "toaddress || fromaddress || subject || message" - - sqlQuery = ''' - SELECT msgid, toaddress, fromaddress, subject, received, message, read - FROM inbox WHERE folder="inbox" AND %s LIKE ? - ORDER BY received - ''' % (where,) - - while self.ui.tableWidgetInbox.rowCount() > 0: - self.ui.tableWidgetInbox.removeRow(0) - - font = QFont() - font.setBold(True) - t = (what,) - shared.sqlLock.acquire() - shared.sqlSubmitQueue.put(sqlQuery) - shared.sqlSubmitQueue.put(t) - queryreturn = shared.sqlReturnQueue.get() - shared.sqlLock.release() - for row in queryreturn: - msgid, toAddress, fromAddress, subject, received, message, read = row - subject = shared.fixPotentiallyInvalidUTF8Data(subject) - message = shared.fixPotentiallyInvalidUTF8Data(message) - try: - if toAddress == self.str_broadcast_subscribers: - toLabel = self.str_broadcast_subscribers - else: - toLabel = shared.config.get(toAddress, 'label') - except: - toLabel = '' - if toLabel == '': - toLabel = toAddress - - fromLabel = '' - t = (fromAddress,) - shared.sqlLock.acquire() - shared.sqlSubmitQueue.put( - '''select label from addressbook where address=?''') - shared.sqlSubmitQueue.put(t) - queryreturn = shared.sqlReturnQueue.get() - shared.sqlLock.release() - - if queryreturn != []: - for row in queryreturn: - fromLabel, = row - - if fromLabel == '': # If this address wasn't in our address book... - t = (fromAddress,) - shared.sqlLock.acquire() - shared.sqlSubmitQueue.put( - '''select label from subscriptions where address=?''') - shared.sqlSubmitQueue.put(t) - queryreturn = shared.sqlReturnQueue.get() - shared.sqlLock.release() - - if queryreturn != []: - for row in queryreturn: - fromLabel, = row - - self.ui.tableWidgetInbox.insertRow(0) - newItem = QtGui.QTableWidgetItem(unicode(toLabel, 'utf-8')) - newItem.setToolTip(unicode(toLabel, 'utf-8')) - newItem.setFlags( - QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) - if not read: - newItem.setFont(font) - newItem.setData(Qt.UserRole, str(toAddress)) - if shared.safeConfigGetBoolean(toAddress, 'mailinglist'): - newItem.setTextColor(QtGui.QColor(137, 04, 177)) - self.ui.tableWidgetInbox.setItem(0, 0, newItem) - if fromLabel == '': - newItem = QtGui.QTableWidgetItem( - unicode(fromAddress, 'utf-8')) - newItem.setToolTip(unicode(fromAddress, 'utf-8')) - else: - newItem = QtGui.QTableWidgetItem(unicode(fromLabel, 'utf-8')) - newItem.setToolTip(unicode(fromLabel, 'utf-8')) - newItem.setFlags( - QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) - if not read: - newItem.setFont(font) - newItem.setData(Qt.UserRole, str(fromAddress)) - - self.ui.tableWidgetInbox.setItem(0, 1, newItem) - newItem = QtGui.QTableWidgetItem(unicode(subject, 'utf-8')) - newItem.setToolTip(unicode(subject, 'utf-8')) - newItem.setData(Qt.UserRole, unicode(message, 'utf-8)')) - newItem.setFlags( - QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) - if not read: - newItem.setFont(font) - self.ui.tableWidgetInbox.setItem(0, 2, newItem) - newItem = myTableWidgetItem(unicode(strftime(shared.config.get( - 'bitmessagesettings', 'timeformat'), localtime(int(received))), 'utf-8')) - newItem.setToolTip(unicode(strftime(shared.config.get( - 'bitmessagesettings', 'timeformat'), localtime(int(received))), 'utf-8')) - newItem.setData(Qt.UserRole, QByteArray(msgid)) - newItem.setData(33, int(received)) - newItem.setFlags( - QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) - if not read: - newItem.setFont(font) - self.ui.tableWidgetInbox.setItem(0, 3, newItem) - self.ui.tableWidgetInbox.sortItems(3, Qt.DescendingOrder) - self.ui.tableWidgetInbox.keyPressEvent = self.tableWidgetInboxKeyPressEvent - # create application indicator def appIndicatorInit(self, app): self.tray = QSystemTrayIcon(QtGui.QIcon( @@ -1824,8 +1764,6 @@ class MyForm(QtGui.QMainWindow): self.settingsDialogInstance.ui.lineEditSocksUsername.text())) shared.config.set('bitmessagesettings', 'sockspassword', str( self.settingsDialogInstance.ui.lineEditSocksPassword.text())) - shared.config.set('bitmessagesettings', 'sockslisten', str( - self.settingsDialogInstance.ui.checkBoxSocksListen.isChecked())) if float(self.settingsDialogInstance.ui.lineEditTotalDifficulty.text()) >= 1: shared.config.set('bitmessagesettings', 'defaultnoncetrialsperbyte', str(int(float( self.settingsDialogInstance.ui.lineEditTotalDifficulty.text()) * shared.networkDefaultProofOfWorkNonceTrialsPerByte))) @@ -1878,14 +1816,7 @@ class MyForm(QtGui.QMainWindow): shared.knownNodesLock.release() os.remove(shared.appdata + 'keys.dat') os.remove(shared.appdata + 'knownnodes.dat') - previousAppdataLocation = shared.appdata shared.appdata = '' - debug.restartLoggingInUpdatedAppdataLocation() - try: - os.remove(previousAppdataLocation + 'debug.log') - os.remove(previousAppdataLocation + 'debug.log.1') - except: - pass if shared.appdata == '' and not self.settingsDialogInstance.ui.checkBoxPortableMode.isChecked(): # If we ARE using portable mode now but the user selected that we shouldn't... shared.appdata = shared.lookupAppdataFolder() @@ -1905,12 +1836,6 @@ class MyForm(QtGui.QMainWindow): shared.knownNodesLock.release() os.remove('keys.dat') os.remove('knownnodes.dat') - debug.restartLoggingInUpdatedAppdataLocation() - try: - os.remove('debug.log') - os.remove('debug.log.1') - except: - pass def click_radioButtonBlacklist(self): if shared.config.get('bitmessagesettings', 'blackwhitelist') == 'white': @@ -2582,20 +2507,6 @@ class MyForm(QtGui.QMainWindow): self.popMenuSent.addAction(self.actionForceSend) self.popMenuSent.exec_(self.ui.tableWidgetSent.mapToGlobal(point)) - def inboxSearchLineEditPressed(self): - searchKeyword = self.ui.inboxSearchLineEdit.text().toUtf8().data() - searchOption = self.ui.inboxSearchOptionCB.currentText().toUtf8().data() - self.ui.inboxSearchLineEdit.setText(QString("")) - self.ui.textEditInboxMessage.setPlainText(QString("")) - self.loadInbox(searchOption, searchKeyword) - - def sentSearchLineEditPressed(self): - searchKeyword = self.ui.sentSearchLineEdit.text().toUtf8().data() - searchOption = self.ui.sentSearchOptionCB.currentText().toUtf8().data() - self.ui.sentSearchLineEdit.setText(QString("")) - self.ui.textEditInboxMessage.setPlainText(QString("")) - self.loadSent(searchOption, searchKeyword) - def tableWidgetInboxItemClicked(self): currentRow = self.ui.tableWidgetInbox.currentRow() if currentRow >= 0: @@ -2780,8 +2691,6 @@ class settingsDialog(QtGui.QDialog): shared.config.get('bitmessagesettings', 'port'))) self.ui.checkBoxAuthentication.setChecked(shared.config.getboolean( 'bitmessagesettings', 'socksauthentication')) - self.ui.checkBoxSocksListen.setChecked(shared.config.getboolean( - 'bitmessagesettings', 'sockslisten')) if str(shared.config.get('bitmessagesettings', 'socksproxytype')) == 'none': self.ui.comboBoxProxyType.setCurrentIndex(0) self.ui.lineEditSocksHostname.setEnabled(False) @@ -2789,7 +2698,6 @@ class settingsDialog(QtGui.QDialog): self.ui.lineEditSocksUsername.setEnabled(False) self.ui.lineEditSocksPassword.setEnabled(False) self.ui.checkBoxAuthentication.setEnabled(False) - self.ui.checkBoxSocksListen.setEnabled(False) elif str(shared.config.get('bitmessagesettings', 'socksproxytype')) == 'SOCKS4a': self.ui.comboBoxProxyType.setCurrentIndex(1) self.ui.lineEditTCPPort.setEnabled(False) @@ -2846,13 +2754,11 @@ class settingsDialog(QtGui.QDialog): self.ui.lineEditSocksUsername.setEnabled(False) self.ui.lineEditSocksPassword.setEnabled(False) self.ui.checkBoxAuthentication.setEnabled(False) - self.ui.checkBoxSocksListen.setEnabled(False) self.ui.lineEditTCPPort.setEnabled(True) elif comboBoxIndex == 1 or comboBoxIndex == 2: self.ui.lineEditSocksHostname.setEnabled(True) self.ui.lineEditSocksPort.setEnabled(True) self.ui.checkBoxAuthentication.setEnabled(True) - self.ui.checkBoxSocksListen.setEnabled(True) if self.ui.checkBoxAuthentication.isChecked(): self.ui.lineEditSocksUsername.setEnabled(True) self.ui.lineEditSocksPassword.setEnabled(True) diff --git a/src/bitmessageqt/bitmessage_icons.qrc b/src/bitmessageqt/bitmessage_icons.qrc index bdd3fd07..a186b01b 100644 --- a/src/bitmessageqt/bitmessage_icons.qrc +++ b/src/bitmessageqt/bitmessage_icons.qrc @@ -1,20 +1,20 @@ - ../images/can-icon-24px-yellow.png - ../images/can-icon-24px-red.png - ../images/can-icon-24px-green.png - ../images/can-icon-24px.png - ../images/can-icon-16px.png - ../images/greenicon.png - ../images/redicon.png - ../images/yellowicon.png - ../images/addressbook.png - ../images/blacklist.png - ../images/identities.png - ../images/networkstatus.png - ../images/sent.png - ../images/subscriptions.png - ../images/send.png - ../images/inbox.png + images/can-icon-24px-yellow.png + images/can-icon-24px-red.png + images/can-icon-24px-green.png + images/can-icon-24px.png + images/can-icon-16px.png + images/greenicon.png + images/redicon.png + images/yellowicon.png + images/addressbook.png + images/blacklist.png + images/identities.png + images/networkstatus.png + images/sent.png + images/subscriptions.png + images/send.png + images/inbox.png diff --git a/src/bitmessageqt/bitmessageui.py b/src/bitmessageqt/bitmessageui.py index 1d04e5f1..1186e814 100644 --- a/src/bitmessageqt/bitmessageui.py +++ b/src/bitmessageqt/bitmessageui.py @@ -2,8 +2,8 @@ # Form implementation generated from reading ui file 'bitmessageui.ui' # -# Created: Sat Jul 13 20:23:44 2013 -# by: PyQt4 UI code generator 4.10.2 +# Created: Thu Jun 13 01:02:50 2013 +# by: PyQt4 UI code generator 4.10.1 # # WARNING! All changes made in this file will be lost! @@ -54,21 +54,6 @@ class Ui_MainWindow(object): self.inbox.setObjectName(_fromUtf8("inbox")) self.verticalLayout_2 = QtGui.QVBoxLayout(self.inbox) self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) - self.horizontalLayoutSearch = QtGui.QHBoxLayout() - self.horizontalLayoutSearch.setContentsMargins(-1, 0, -1, -1) - self.horizontalLayoutSearch.setObjectName(_fromUtf8("horizontalLayoutSearch")) - self.inboxSearchLineEdit = QtGui.QLineEdit(self.inbox) - self.inboxSearchLineEdit.setObjectName(_fromUtf8("inboxSearchLineEdit")) - self.horizontalLayoutSearch.addWidget(self.inboxSearchLineEdit) - self.inboxSearchOptionCB = QtGui.QComboBox(self.inbox) - self.inboxSearchOptionCB.setObjectName(_fromUtf8("inboxSearchOptionCB")) - self.inboxSearchOptionCB.addItem(_fromUtf8("")) - self.inboxSearchOptionCB.addItem(_fromUtf8("")) - self.inboxSearchOptionCB.addItem(_fromUtf8("")) - self.inboxSearchOptionCB.addItem(_fromUtf8("")) - self.inboxSearchOptionCB.addItem(_fromUtf8("")) - self.horizontalLayoutSearch.addWidget(self.inboxSearchOptionCB) - self.verticalLayout_2.addLayout(self.horizontalLayoutSearch) self.tableWidgetInbox = QtGui.QTableWidget(self.inbox) self.tableWidgetInbox.setAlternatingRowColors(True) self.tableWidgetInbox.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) @@ -172,21 +157,6 @@ class Ui_MainWindow(object): self.sent.setObjectName(_fromUtf8("sent")) self.verticalLayout = QtGui.QVBoxLayout(self.sent) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) - self.horizontalLayout = QtGui.QHBoxLayout() - self.horizontalLayout.setContentsMargins(-1, 0, -1, -1) - self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) - self.sentSearchLineEdit = QtGui.QLineEdit(self.sent) - self.sentSearchLineEdit.setObjectName(_fromUtf8("sentSearchLineEdit")) - self.horizontalLayout.addWidget(self.sentSearchLineEdit) - self.sentSearchOptionCB = QtGui.QComboBox(self.sent) - self.sentSearchOptionCB.setObjectName(_fromUtf8("sentSearchOptionCB")) - self.sentSearchOptionCB.addItem(_fromUtf8("")) - self.sentSearchOptionCB.addItem(_fromUtf8("")) - self.sentSearchOptionCB.addItem(_fromUtf8("")) - self.sentSearchOptionCB.addItem(_fromUtf8("")) - self.sentSearchOptionCB.addItem(_fromUtf8("")) - self.horizontalLayout.addWidget(self.sentSearchOptionCB) - self.verticalLayout.addLayout(self.horizontalLayout) self.tableWidgetSent = QtGui.QTableWidget(self.sent) self.tableWidgetSent.setDragDropMode(QtGui.QAbstractItemView.DragDrop) self.tableWidgetSent.setAlternatingRowColors(True) @@ -497,12 +467,6 @@ class Ui_MainWindow(object): def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(_translate("MainWindow", "Bitmessage", None)) - self.inboxSearchLineEdit.setPlaceholderText(_translate("MainWindow", "Search", None)) - self.inboxSearchOptionCB.setItemText(0, _translate("MainWindow", "All", None)) - self.inboxSearchOptionCB.setItemText(1, _translate("MainWindow", "To", None)) - self.inboxSearchOptionCB.setItemText(2, _translate("MainWindow", "From", None)) - self.inboxSearchOptionCB.setItemText(3, _translate("MainWindow", "Subject", None)) - self.inboxSearchOptionCB.setItemText(4, _translate("MainWindow", "Message", None)) self.tableWidgetInbox.setSortingEnabled(True) item = self.tableWidgetInbox.horizontalHeaderItem(0) item.setText(_translate("MainWindow", "To", None)) @@ -528,12 +492,6 @@ class Ui_MainWindow(object): self.pushButtonSend.setText(_translate("MainWindow", "Send", None)) self.labelSendBroadcastWarning.setText(_translate("MainWindow", "Be aware that broadcasts are only encrypted with your address. Anyone who knows your address can read them.", None)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.send), _translate("MainWindow", "Send", None)) - self.sentSearchLineEdit.setPlaceholderText(_translate("MainWindow", "Search", None)) - self.sentSearchOptionCB.setItemText(0, _translate("MainWindow", "All", None)) - self.sentSearchOptionCB.setItemText(1, _translate("MainWindow", "To", None)) - self.sentSearchOptionCB.setItemText(2, _translate("MainWindow", "From", None)) - self.sentSearchOptionCB.setItemText(3, _translate("MainWindow", "Subject", None)) - self.sentSearchOptionCB.setItemText(4, _translate("MainWindow", "Message", None)) self.tableWidgetSent.setSortingEnabled(True) item = self.tableWidgetSent.horizontalHeaderItem(0) item.setText(_translate("MainWindow", "To", None)) @@ -601,3 +559,13 @@ class Ui_MainWindow(object): self.actionDeleteAllTrashedMessages.setText(_translate("MainWindow", "Delete all trashed messages", None)) import bitmessage_icons_rc + +if __name__ == "__main__": + import sys + app = QtGui.QApplication(sys.argv) + MainWindow = QtGui.QMainWindow() + ui = Ui_MainWindow() + ui.setupUi(MainWindow) + MainWindow.show() + sys.exit(app.exec_()) + diff --git a/src/bitmessageqt/bitmessageui.ui b/src/bitmessageqt/bitmessageui.ui index 6c18cbe0..48f5c224 100644 --- a/src/bitmessageqt/bitmessageui.ui +++ b/src/bitmessageqt/bitmessageui.ui @@ -14,7 +14,7 @@ Bitmessage - + :/newPrefix/images/can-icon-24px.png:/newPrefix/images/can-icon-24px.png @@ -61,56 +61,13 @@ - + :/newPrefix/images/inbox.png:/newPrefix/images/inbox.png Inbox - - - - 0 - - - - - Search - - - - - - - - All - - - - - To - - - - - From - - - - - Subject - - - - - Message - - - - - - @@ -188,7 +145,7 @@ - + :/newPrefix/images/send.png:/newPrefix/images/send.png @@ -346,56 +303,13 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/sent.png:/newPrefix/images/sent.png Sent - - - - 0 - - - - - Search - - - - - - - - All - - - - - To - - - - - From - - - - - Subject - - - - - Message - - - - - - @@ -466,7 +380,7 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/identities.png:/newPrefix/images/identities.png @@ -566,7 +480,7 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/subscriptions.png:/newPrefix/images/subscriptions.png @@ -651,7 +565,7 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/addressbook.png:/newPrefix/images/addressbook.png @@ -733,7 +647,7 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/blacklist.png:/newPrefix/images/blacklist.png @@ -825,7 +739,7 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/networkstatus.png:/newPrefix/images/networkstatus.png @@ -844,7 +758,7 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/redicon.png:/newPrefix/images/redicon.png diff --git a/src/bitmessageqt/settings.py b/src/bitmessageqt/settings.py index d7672e9d..8c94333c 100644 --- a/src/bitmessageqt/settings.py +++ b/src/bitmessageqt/settings.py @@ -2,8 +2,8 @@ # Form implementation generated from reading ui file 'settings.ui' # -# Created: Fri Jul 12 12:37:53 2013 -# by: PyQt4 UI code generator 4.10.1 +# Created: Mon Jun 10 11:31:56 2013 +# by: PyQt4 UI code generator 4.9.4 # # WARNING! All changes made in this file will be lost! @@ -12,16 +12,7 @@ from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: - def _fromUtf8(s): - return s - -try: - _encoding = QtGui.QApplication.UnicodeUTF8 - def _translate(context, text, disambig): - return QtGui.QApplication.translate(context, text, disambig, _encoding) -except AttributeError: - def _translate(context, text, disambig): - return QtGui.QApplication.translate(context, text, disambig) + _fromUtf8 = lambda s: s class Ui_settingsDialog(object): def setupUi(self, settingsDialog): @@ -131,9 +122,6 @@ class Ui_settingsDialog(object): self.lineEditSocksPassword.setEchoMode(QtGui.QLineEdit.Password) self.lineEditSocksPassword.setObjectName(_fromUtf8("lineEditSocksPassword")) self.gridLayout_2.addWidget(self.lineEditSocksPassword, 2, 5, 1, 1) - self.checkBoxSocksListen = QtGui.QCheckBox(self.groupBox_2) - self.checkBoxSocksListen.setObjectName(_fromUtf8("checkBoxSocksListen")) - self.gridLayout_2.addWidget(self.checkBoxSocksListen, 3, 1, 1, 4) self.gridLayout_4.addWidget(self.groupBox_2, 1, 0, 1, 1) spacerItem2 = QtGui.QSpacerItem(20, 70, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.gridLayout_4.addItem(spacerItem2, 2, 0, 1, 1) @@ -247,40 +235,38 @@ class Ui_settingsDialog(object): settingsDialog.setTabOrder(self.lineEditSocksPort, self.checkBoxAuthentication) settingsDialog.setTabOrder(self.checkBoxAuthentication, self.lineEditSocksUsername) settingsDialog.setTabOrder(self.lineEditSocksUsername, self.lineEditSocksPassword) - settingsDialog.setTabOrder(self.lineEditSocksPassword, self.checkBoxSocksListen) - settingsDialog.setTabOrder(self.checkBoxSocksListen, self.buttonBox) + settingsDialog.setTabOrder(self.lineEditSocksPassword, self.buttonBox) def retranslateUi(self, settingsDialog): - settingsDialog.setWindowTitle(_translate("settingsDialog", "Settings", None)) - self.checkBoxStartOnLogon.setText(_translate("settingsDialog", "Start Bitmessage on user login", 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.checkBoxShowTrayNotifications.setText(_translate("settingsDialog", "Show notification when message received", None)) - self.checkBoxPortableMode.setText(_translate("settingsDialog", "Run in Portable Mode", None)) - self.label_7.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.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tabUserInterface), _translate("settingsDialog", "User Interface", None)) - self.groupBox.setTitle(_translate("settingsDialog", "Listening port", None)) - self.label.setText(_translate("settingsDialog", "Listen for connections on port:", None)) - self.groupBox_2.setTitle(_translate("settingsDialog", "Proxy server / Tor", None)) - self.label_2.setText(_translate("settingsDialog", "Type:", None)) - self.comboBoxProxyType.setItemText(0, _translate("settingsDialog", "none", None)) - self.comboBoxProxyType.setItemText(1, _translate("settingsDialog", "SOCKS4a", None)) - self.comboBoxProxyType.setItemText(2, _translate("settingsDialog", "SOCKS5", None)) - self.label_3.setText(_translate("settingsDialog", "Server hostname:", None)) - self.label_4.setText(_translate("settingsDialog", "Port:", None)) - self.checkBoxAuthentication.setText(_translate("settingsDialog", "Authentication", None)) - self.label_5.setText(_translate("settingsDialog", "Username:", None)) - self.label_6.setText(_translate("settingsDialog", "Pass:", None)) - self.checkBoxSocksListen.setText(_translate("settingsDialog", "Listen for incoming connections when using proxy", None)) - self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tabNetworkSettings), _translate("settingsDialog", "Network Settings", 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_9.setText(_translate("settingsDialog", "Total difficulty:", None)) - self.label_11.setText(_translate("settingsDialog", "Small message difficulty:", 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.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.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tab), _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_14.setText(_translate("settingsDialog", "Maximum acceptable small message difficulty:", None)) - self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tab_2), _translate("settingsDialog", "Max acceptable difficulty", None)) + settingsDialog.setWindowTitle(QtGui.QApplication.translate("settingsDialog", "Settings", None, QtGui.QApplication.UnicodeUTF8)) + self.checkBoxStartOnLogon.setText(QtGui.QApplication.translate("settingsDialog", "Start Bitmessage on user login", None, QtGui.QApplication.UnicodeUTF8)) + self.checkBoxStartInTray.setText(QtGui.QApplication.translate("settingsDialog", "Start Bitmessage in the tray (don\'t show main window)", None, QtGui.QApplication.UnicodeUTF8)) + self.checkBoxMinimizeToTray.setText(QtGui.QApplication.translate("settingsDialog", "Minimize to tray", None, QtGui.QApplication.UnicodeUTF8)) + self.checkBoxShowTrayNotifications.setText(QtGui.QApplication.translate("settingsDialog", "Show notification when message received", None, QtGui.QApplication.UnicodeUTF8)) + self.checkBoxPortableMode.setText(QtGui.QApplication.translate("settingsDialog", "Run in Portable Mode", None, QtGui.QApplication.UnicodeUTF8)) + self.label_7.setText(QtGui.QApplication.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, QtGui.QApplication.UnicodeUTF8)) + self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tabUserInterface), QtGui.QApplication.translate("settingsDialog", "User Interface", None, QtGui.QApplication.UnicodeUTF8)) + self.groupBox.setTitle(QtGui.QApplication.translate("settingsDialog", "Listening port", None, QtGui.QApplication.UnicodeUTF8)) + self.label.setText(QtGui.QApplication.translate("settingsDialog", "Listen for connections on port:", None, QtGui.QApplication.UnicodeUTF8)) + self.groupBox_2.setTitle(QtGui.QApplication.translate("settingsDialog", "Proxy server / Tor", None, QtGui.QApplication.UnicodeUTF8)) + self.label_2.setText(QtGui.QApplication.translate("settingsDialog", "Type:", None, QtGui.QApplication.UnicodeUTF8)) + self.comboBoxProxyType.setItemText(0, QtGui.QApplication.translate("settingsDialog", "none", None, QtGui.QApplication.UnicodeUTF8)) + self.comboBoxProxyType.setItemText(1, QtGui.QApplication.translate("settingsDialog", "SOCKS4a", None, QtGui.QApplication.UnicodeUTF8)) + self.comboBoxProxyType.setItemText(2, QtGui.QApplication.translate("settingsDialog", "SOCKS5", None, QtGui.QApplication.UnicodeUTF8)) + self.label_3.setText(QtGui.QApplication.translate("settingsDialog", "Server hostname:", None, QtGui.QApplication.UnicodeUTF8)) + self.label_4.setText(QtGui.QApplication.translate("settingsDialog", "Port:", None, QtGui.QApplication.UnicodeUTF8)) + self.checkBoxAuthentication.setText(QtGui.QApplication.translate("settingsDialog", "Authentication", None, QtGui.QApplication.UnicodeUTF8)) + self.label_5.setText(QtGui.QApplication.translate("settingsDialog", "Username:", None, QtGui.QApplication.UnicodeUTF8)) + self.label_6.setText(QtGui.QApplication.translate("settingsDialog", "Pass:", None, QtGui.QApplication.UnicodeUTF8)) + self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tabNetworkSettings), QtGui.QApplication.translate("settingsDialog", "Network Settings", None, QtGui.QApplication.UnicodeUTF8)) + self.label_8.setText(QtGui.QApplication.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, QtGui.QApplication.UnicodeUTF8)) + self.label_9.setText(QtGui.QApplication.translate("settingsDialog", "Total difficulty:", None, QtGui.QApplication.UnicodeUTF8)) + self.label_11.setText(QtGui.QApplication.translate("settingsDialog", "Small message difficulty:", None, QtGui.QApplication.UnicodeUTF8)) + self.label_12.setText(QtGui.QApplication.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, QtGui.QApplication.UnicodeUTF8)) + self.label_10.setText(QtGui.QApplication.translate("settingsDialog", "The \'Total difficulty\' affects the absolute amount of work the sender must complete. Doubling this value doubles the amount of work.", None, QtGui.QApplication.UnicodeUTF8)) + self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tab), QtGui.QApplication.translate("settingsDialog", "Demanded difficulty", None, QtGui.QApplication.UnicodeUTF8)) + self.label_15.setText(QtGui.QApplication.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, QtGui.QApplication.UnicodeUTF8)) + self.label_13.setText(QtGui.QApplication.translate("settingsDialog", "Maximum acceptable total difficulty:", None, QtGui.QApplication.UnicodeUTF8)) + self.label_14.setText(QtGui.QApplication.translate("settingsDialog", "Maximum acceptable small message difficulty:", None, QtGui.QApplication.UnicodeUTF8)) + self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tab_2), QtGui.QApplication.translate("settingsDialog", "Max acceptable difficulty", None, QtGui.QApplication.UnicodeUTF8)) diff --git a/src/bitmessageqt/settings.ui b/src/bitmessageqt/settings.ui index 9414e1a4..a1bb7c88 100644 --- a/src/bitmessageqt/settings.ui +++ b/src/bitmessageqt/settings.ui @@ -247,13 +247,6 @@ - - - - Listen for incoming connections when using proxy - - - @@ -515,7 +508,6 @@ checkBoxAuthentication lineEditSocksUsername lineEditSocksPassword - checkBoxSocksListen buttonBox diff --git a/src/class_receiveDataThread.py b/src/class_receiveDataThread.py index e73f3d2b..ad5e7b34 100644 --- a/src/class_receiveDataThread.py +++ b/src/class_receiveDataThread.py @@ -528,7 +528,13 @@ class receiveDataThread(threading.Thread): print 'fromAddress:', fromAddress if messageEncodingType == 2: - subject, body = self.decodeType2Message(message) + bodyPositionIndex = string.find(message, '\nBody:') + if bodyPositionIndex > 1: + subject = message[8:bodyPositionIndex] + body = message[bodyPositionIndex + 6:] + else: + subject = '' + body = message elif messageEncodingType == 1: body = message subject = '' @@ -678,7 +684,13 @@ class receiveDataThread(threading.Thread): print 'fromAddress:', fromAddress if messageEncodingType == 2: - subject, body = self.decodeType2Message(message) + bodyPositionIndex = string.find(message, '\nBody:') + if bodyPositionIndex > 1: + subject = message[8:bodyPositionIndex] + body = message[bodyPositionIndex + 6:] + else: + subject = '' + body = message elif messageEncodingType == 1: body = message subject = '' @@ -993,7 +1005,15 @@ class receiveDataThread(threading.Thread): toLabel = toAddress if messageEncodingType == 2: - subject, body = self.decodeType2Message(message) + bodyPositionIndex = string.find(message, '\nBody:') + if bodyPositionIndex > 1: + subject = message[8:bodyPositionIndex] + subject = subject[ + :500] # Only save and show the first 500 characters of the subject. Any more is probably an attak. + body = message[bodyPositionIndex + 6:] + else: + subject = '' + body = message elif messageEncodingType == 1: body = message subject = '' @@ -1066,21 +1086,6 @@ class receiveDataThread(threading.Thread): print 'Time to decrypt this message successfully:', timeRequiredToAttemptToDecryptMessage print 'Average time for all message decryption successes since startup:', sum / len(shared.successfullyDecryptMessageTimings) - def decodeType2Message(self, message): - bodyPositionIndex = string.find(message, '\nBody:') - if bodyPositionIndex > 1: - subject = message[8:bodyPositionIndex] - # Only save and show the first 500 characters of the subject. - # Any more is probably an attack. - subject = subject[:500] - body = message[bodyPositionIndex + 6:] - else: - subject = '' - body = message - # Throw away any extra lines (headers) after the subject. - if subject: - subject = subject.splitlines()[0] - return subject, body def isAckDataValid(self, ackData): if len(ackData) < 24: diff --git a/src/class_singleListener.py b/src/class_singleListener.py index d6b46643..58bddf6f 100644 --- a/src/class_singleListener.py +++ b/src/class_singleListener.py @@ -21,11 +21,10 @@ class singleListener(threading.Thread): self.selfInitiatedConnections = selfInitiatedConnections def run(self): - # We typically don't want to accept incoming connections if the user is using a - # SOCKS proxy, unless they have configured otherwise. If they eventually select - # proxy 'none' or configure SOCKS listening then this will start listening for - # connections. - while shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS' and not shared.config.getboolean('bitmessagesettings', 'sockslisten'): + # We don't want to accept incoming connections if the user is using a + # SOCKS proxy. If they eventually select proxy 'none' then this will + # start listening for connections. + while shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS': time.sleep(300) with shared.printLock: @@ -41,11 +40,10 @@ class singleListener(threading.Thread): sock.listen(2) while True: - # We typically don't want to accept incoming connections if the user is using a - # SOCKS proxy, unless they have configured otherwise. If they eventually select - # proxy 'none' or configure SOCKS listening then this will start listening for - # connections. - while shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS' and not shared.config.getboolean('bitmessagesettings', 'sockslisten'): + # We don't want to accept incoming connections if the user is using + # a SOCKS proxy. If the user eventually select proxy 'none' then + # this will start listening for connections. + while shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS': time.sleep(10) while len(shared.connectedHostsList) > 220: with shared.printLock: diff --git a/src/class_singleWorker.py b/src/class_singleWorker.py index 56b7be6e..1a0fe149 100644 --- a/src/class_singleWorker.py +++ b/src/class_singleWorker.py @@ -414,10 +414,10 @@ class singleWorker(threading.Thread): # Update the status of the message in the 'sent' table to have # a 'broadcastsent' status shared.sqlLock.acquire() - t = (inventoryHash,'broadcastsent', int( + t = ('broadcastsent', int( time.time()), fromaddress, subject, body, 'broadcastqueued') shared.sqlSubmitQueue.put( - 'UPDATE sent SET msgid=?, status=?, lastactiontime=? WHERE fromaddress=? AND subject=? AND message=? AND status=?') + 'UPDATE sent SET status=?, lastactiontime=? WHERE fromaddress=? AND subject=? AND message=? AND status=?') shared.sqlSubmitQueue.put(t) queryreturn = shared.sqlReturnQueue.get() shared.sqlSubmitQueue.put('commit') @@ -774,8 +774,8 @@ class singleWorker(threading.Thread): # Update the status of the message in the 'sent' table to have a # 'msgsent' status shared.sqlLock.acquire() - t = (inventoryHash,ackdata,) - shared.sqlSubmitQueue.put('''UPDATE sent SET msgid=?, status='msgsent' WHERE ackdata=?''') + t = (ackdata,) + shared.sqlSubmitQueue.put('''UPDATE sent SET status='msgsent' WHERE ackdata=?''') shared.sqlSubmitQueue.put(t) queryreturn = shared.sqlReturnQueue.get() shared.sqlSubmitQueue.put('commit') diff --git a/src/class_sqlThread.py b/src/class_sqlThread.py index f1a428d2..84014a8c 100644 --- a/src/class_sqlThread.py +++ b/src/class_sqlThread.py @@ -5,7 +5,6 @@ import time import shutil # used for moving the messages.dat file import sys import os -from debug import logger # This thread exists because SQLITE3 is so un-threadsafe that we must # submit queries to it and it puts results back in a different queue. They @@ -81,7 +80,6 @@ class sqlThread(threading.Thread): shared.config.set('bitmessagesettings', 'socksauthentication', 'false') shared.config.set('bitmessagesettings', 'socksusername', '') shared.config.set('bitmessagesettings', 'sockspassword', '') - shared.config.set('bitmessagesettings', 'sockslisten', 'false') shared.config.set('bitmessagesettings', 'keysencrypted', 'false') shared.config.set('bitmessagesettings', 'messagesencrypted', 'false') with open(shared.appdata + 'keys.dat', 'wb') as configfile: diff --git a/src/debug.py b/src/debug.py index fe7815e7..d8033f2d 100644 --- a/src/debug.py +++ b/src/debug.py @@ -18,64 +18,48 @@ Use: `from debug import logger` to import this facility into whatever module you ''' import logging import logging.config -import shared # TODO(xj9): Get from a config file. log_level = 'DEBUG' -def configureLogging(): - logging.config.dictConfig({ - 'version': 1, - 'formatters': { - 'default': { - 'format': '%(asctime)s - %(levelname)s - %(message)s', - }, +logging.config.dictConfig({ + 'version': 1, + 'formatters': { + 'default': { + 'format': '%(asctime)s - %(levelname)s - %(message)s', }, - 'handlers': { - 'console': { - 'class': 'logging.StreamHandler', - 'formatter': 'default', - 'level': log_level, - 'stream': 'ext://sys.stdout' - }, - 'file': { - 'class': 'logging.handlers.RotatingFileHandler', - 'formatter': 'default', - 'level': log_level, - 'filename': shared.appdata + 'debug.log', - 'maxBytes': 2097152, # 2 MiB - 'backupCount': 1, - } - }, - 'loggers': { - 'console_only': { - 'handlers': ['console'], - 'propagate' : 0 - }, - 'file_only': { - 'handlers': ['file'], - 'propagate' : 0 - }, - 'both': { - 'handlers': ['console', 'file'], - 'propagate' : 0 - }, - }, - 'root': { + }, + 'handlers': { + 'console': { + 'class': 'logging.StreamHandler', + 'formatter': 'default', 'level': log_level, + 'stream': 'ext://sys.stdout' + }, + 'file': { + 'class': 'logging.handlers.RotatingFileHandler', + 'formatter': 'default', + 'level': log_level, + 'filename': 'bm.log', + 'maxBytes': 1024, + 'backupCount': 0, + } + }, + 'loggers': { + 'console_only': { 'handlers': ['console'], }, - }) + 'file_only': { + 'handlers': ['file'], + }, + 'both': { + 'handlers': ['console', 'file'], + }, + }, + 'root': { + 'level': log_level, + 'handlers': ['console'], + }, +}) # TODO (xj9): Get from a config file. -#logger = logging.getLogger('console_only') -configureLogging() -logger = logging.getLogger('both') - -def restartLoggingInUpdatedAppdataLocation(): - global logger - for i in list(logger.handlers): - logger.removeHandler(i) - i.flush() - i.close() - configureLogging() - logger = logging.getLogger('both') \ No newline at end of file +logger = logging.getLogger('console_only') diff --git a/src/helper_bootstrap.py b/src/helper_bootstrap.py index c3d5c1fd..296dda6b 100644 --- a/src/helper_bootstrap.py +++ b/src/helper_bootstrap.py @@ -33,7 +33,7 @@ def dns(): print 'Adding', item[4][0], 'to knownNodes based on DNS boostrap method' shared.knownNodes[1][item[4][0]] = (8080, int(time.time())) except: - print 'bootstrap8080.bitmessage.org DNS bootstrapping failed.' + print 'bootstrap8080.bitmessage.org DNS bootstraping failed.' try: for item in socket.getaddrinfo('bootstrap8444.bitmessage.org', 80): print 'Adding', item[4][0], 'to knownNodes based on DNS boostrap method' diff --git a/src/helper_startup.py b/src/helper_startup.py index 46150d4d..e6590b0e 100644 --- a/src/helper_startup.py +++ b/src/helper_startup.py @@ -50,8 +50,6 @@ def loadConfig(): shared.config.set('bitmessagesettings', 'socksport', '9050') shared.config.set( 'bitmessagesettings', 'socksauthentication', 'false') - shared.config.set( - 'bitmessagesettings', 'sockslisten', 'false') shared.config.set('bitmessagesettings', 'socksusername', '') shared.config.set('bitmessagesettings', 'sockspassword', '') shared.config.set('bitmessagesettings', 'keysencrypted', 'false') @@ -76,13 +74,5 @@ def loadConfig(): print 'Creating new config files in', shared.appdata if not os.path.exists(shared.appdata): os.makedirs(shared.appdata) - if not sys.platform.startswith('win'): - os.umask(0o077) with open(shared.appdata + 'keys.dat', 'wb') as configfile: shared.config.write(configfile) - - # Initialize settings that may be missing due to upgrades and could - # cause errors if missing. - if not shared.config.has_option('bitmessagesettings', 'sockslisten'): - shared.config.set('bitmessagesettings', 'sockslisten', 'false') - diff --git a/src/shared.py b/src/shared.py index 557b332d..4b3ef73b 100644 --- a/src/shared.py +++ b/src/shared.py @@ -8,25 +8,19 @@ maximumAgeOfNodesThatIAdvertiseToOthers = 10800 # Equals three hours useVeryEasyProofOfWorkForTesting = False # If you set this to True while on the normal network, you won't be able to send or sometimes receive messages. -# Libraries. -import ConfigParser -import os -import pickle -import Queue -import random -import socket -import sys -import stat import threading -import time - -# Project imports. +import sys from addresses import * import highlevelcrypto +import Queue +import pickle +import os +import time +import ConfigParser +import socket +import random +import highlevelcrypto import shared -import helper_startup - - config = ConfigParser.SafeConfigParser() myECCryptorObjects = {} @@ -68,6 +62,8 @@ ackdataForWhichImWatching = {} networkDefaultProofOfWorkNonceTrialsPerByte = 320 #The amount of work that should be performed (and demanded) per byte of the payload. Double this number to double the work. networkDefaultPayloadLengthExtraBytes = 14000 #To make sending short messages a little more difficult, this value is added to the payload length for use in calculating the proof of work target. + + def isInSqlInventory(hash): t = (hash,) shared.sqlLock.acquire() @@ -122,11 +118,7 @@ def lookupAppdataFolder(): if "HOME" in environ: dataFolder = path.join(os.environ["HOME"], "Library/Application Support/", APPNAME) + '/' else: - stringToLog = 'Could not find home folder, please report this message and your OS X version to the BitMessage Github.' - if 'logger' in globals(): - logger.critical(stringToLog) - else: - print stringToLog + print 'Could not find home folder, please report this message and your OS X version to the BitMessage Github.' sys.exit() elif 'win32' in sys.platform or 'win64' in sys.platform: @@ -137,19 +129,13 @@ def lookupAppdataFolder(): dataFolder = path.join(environ["XDG_CONFIG_HOME"], APPNAME) except KeyError: dataFolder = path.join(environ["HOME"], ".config", APPNAME) - # Migrate existing data to the proper location if this is an existing install try: + print "Moving data folder to ~/.config/%s" % APPNAME move(path.join(environ["HOME"], ".%s" % APPNAME), dataFolder) - stringToLog = "Moving data folder to %s" % (dataFolder) - if 'logger' in globals(): - logger.info(stringToLog) - else: - print stringToLog + dataFolder = dataFolder + '/' except IOError: - # Old directory may not exist. - pass - dataFolder = dataFolder + '/' + dataFolder = dataFolder + '/' return dataFolder def isAddressInMyAddressBook(address): @@ -193,63 +179,51 @@ def isAddressInMyAddressBookSubscriptionsListOrWhitelist(address): return False def safeConfigGetBoolean(section,field): - try: - return config.getboolean(section,field) - except: - return False + try: + return config.getboolean(section,field) + except: + return False def decodeWalletImportFormat(WIFstring): fullString = arithmetic.changebase(WIFstring,58,256) privkey = fullString[:-4] if fullString[-4:] != hashlib.sha256(hashlib.sha256(privkey).digest()).digest()[:4]: - logger.error('Major problem! When trying to decode one of your private keys, the checksum ' - 'failed. Here is the PRIVATE key: %s\n' % str(WIFstring)) + sys.stderr.write('Major problem! When trying to decode one of your private keys, the checksum failed. Here is the PRIVATE key: %s\n' % str(WIFstring)) return "" else: #checksum passed if privkey[0] == '\x80': return privkey[1:] else: - logger.error('Major problem! When trying to decode one of your private keys, the ' - 'checksum passed but the key doesn\'t begin with hex 80. Here is the ' - 'PRIVATE key: %s\n' % str(WIFstring)) + sys.stderr.write('Major problem! When trying to decode one of your private keys, the checksum passed but the key doesn\'t begin with hex 80. Here is the PRIVATE key: %s\n' % str(WIFstring)) return "" def reloadMyAddressHashes(): - logger.debug('reloading keys from keys.dat file') + printLock.acquire() + print 'reloading keys from keys.dat file' + printLock.release() myECCryptorObjects.clear() myAddressesByHash.clear() #myPrivateKeys.clear() - - keyfileSecure = checkSensitiveFilePermissions(appdata + 'keys.dat') configSections = config.sections() - hasEnabledKeys = False for addressInKeysFile in configSections: if addressInKeysFile <> 'bitmessagesettings': isEnabled = config.getboolean(addressInKeysFile, 'enabled') if isEnabled: - hasEnabledKeys = True status,addressVersionNumber,streamNumber,hash = decodeAddress(addressInKeysFile) if addressVersionNumber == 2 or addressVersionNumber == 3: - # Returns a simple 32 bytes of information encoded in 64 Hex characters, - # or null if there was an error. - privEncryptionKey = decodeWalletImportFormat( - config.get(addressInKeysFile, 'privencryptionkey')).encode('hex') - + privEncryptionKey = decodeWalletImportFormat(config.get(addressInKeysFile, 'privencryptionkey')).encode('hex') #returns a simple 32 bytes of information encoded in 64 Hex characters, or null if there was an error if len(privEncryptionKey) == 64:#It is 32 bytes encoded as 64 hex characters myECCryptorObjects[hash] = highlevelcrypto.makeCryptor(privEncryptionKey) myAddressesByHash[hash] = addressInKeysFile - else: - logger.error('Error in reloadMyAddressHashes: Can\'t handle address ' - 'versions other than 2 or 3.\n') - - if not keyfileSecure: - fixSensitiveFilePermissions(appdata + 'keys.dat', hasEnabledKeys) + sys.stderr.write('Error in reloadMyAddressHashes: Can\'t handle address versions other than 2 or 3.\n') def reloadBroadcastSendersForWhichImWatching(): - logger.debug('reloading subscriptions...') + printLock.acquire() + print 'reloading subscriptions...' + printLock.release() broadcastSendersForWhichImWatching.clear() MyECSubscriptionCryptorObjects.clear() sqlLock.acquire() @@ -272,45 +246,46 @@ def doCleanShutdown(): knownNodesLock.acquire() UISignalQueue.put(('updateStatusBar','Saving the knownNodes list of peers to disk...')) output = open(appdata + 'knownnodes.dat', 'wb') - logger.info('finished opening knownnodes.dat. Now pickle.dump') + print 'finished opening knownnodes.dat. Now pickle.dump' pickle.dump(knownNodes, output) - logger.info('Completed pickle.dump. Closing output...') + print 'Completed pickle.dump. Closing output...' output.close() knownNodesLock.release() - logger.info('Finished closing knownnodes.dat output file.') + printLock.acquire() + print 'Finished closing knownnodes.dat output file.' + printLock.release() UISignalQueue.put(('updateStatusBar','Done saving the knownNodes list of peers to disk.')) broadcastToSendDataQueues((0, 'shutdown', 'all')) - logger.info('Flushing inventory in memory out to disk...') - UISignalQueue.put(( - 'updateStatusBar', - 'Flushing inventory in memory out to disk. This should normally only take a second...')) + printLock.acquire() + print 'Flushing inventory in memory out to disk...' + printLock.release() + UISignalQueue.put(('updateStatusBar','Flushing inventory in memory out to disk. This should normally only take a second...')) flushInventory() - # This one last useless query will guarantee that the previous flush committed before we close - # the program. + #This one last useless query will guarantee that the previous flush committed before we close the program. sqlLock.acquire() sqlSubmitQueue.put('SELECT address FROM subscriptions') sqlSubmitQueue.put('') sqlReturnQueue.get() sqlSubmitQueue.put('exit') sqlLock.release() - logger.info('Finished flushing inventory.') + printLock.acquire() + print 'Finished flushing inventory.' + printLock.release() - # Wait long enough to guarantee that any running proof of work worker threads will check the - # shutdown variable and exit. If the main thread closes before they do then they won't stop. - time.sleep(.25) + time.sleep(.25) #Wait long enough to guarantee that any running proof of work worker threads will check the shutdown variable and exit. If the main thread closes before they do then they won't stop. if safeConfigGetBoolean('bitmessagesettings','daemon'): - logger.info('Clean shutdown complete.') + printLock.acquire() + print 'Done.' + printLock.release() os._exit(0) -# When you want to command a sendDataThread to do something, like shutdown or send some data, this -# function puts your data into the queues for each of the sendDataThreads. The sendDataThreads are -# responsible for putting their queue into (and out of) the sendDataQueues list. +#When you want to command a sendDataThread to do something, like shutdown or send some data, this function puts your data into the queues for each of the sendDataThreads. The sendDataThreads are responsible for putting their queue into (and out of) the sendDataQueues list. def broadcastToSendDataQueues(data): - # logger.debug('running broadcastToSendDataQueues') + #print 'running broadcastToSendDataQueues' for q in sendDataQueues: q.put((data)) @@ -334,41 +309,3 @@ def fixPotentiallyInvalidUTF8Data(text): except: output = 'Part of the message is corrupt. The message cannot be displayed the normal way.\n\n' + repr(text) return output - -# Checks sensitive file permissions for inappropriate umask during keys.dat creation. -# (Or unwise subsequent chmod.) -# -# Returns true iff file appears to have appropriate permissions. -def checkSensitiveFilePermissions(filename): - if sys.platform == 'win32': - # TODO: This might deserve extra checks by someone familiar with - # Windows systems. - return True - else: - present_permissions = os.stat(filename)[0] - disallowed_permissions = stat.S_IRWXG | stat.S_IRWXO - return present_permissions & disallowed_permissions == 0 - -# Fixes permissions on a sensitive file. -def fixSensitiveFilePermissions(filename, hasEnabledKeys): - if hasEnabledKeys: - logger.warning('Keyfile had insecure permissions, and there were enabled keys. ' - 'The truly paranoid should stop using them immediately.') - else: - logger.warning('Keyfile had insecure permissions, but there were no enabled keys.') - try: - present_permissions = os.stat(filename)[0] - disallowed_permissions = stat.S_IRWXG | stat.S_IRWXO - allowed_permissions = ((1<<32)-1) ^ disallowed_permissions - new_permissions = ( - allowed_permissions & present_permissions) - os.chmod(filename, new_permissions) - - logger.info('Keyfile permissions automatically fixed.') - - except Exception, e: - logger.exception('Keyfile permissions could not be fixed.') - raise - -helper_startup.loadConfig() -from debug import logger \ No newline at end of file diff --git a/src/translations/bitmessage_ru_RU.pro b/src/translations/bitmessage_ru_RU.pro new file mode 100644 index 00000000..71cac3ae --- /dev/null +++ b/src/translations/bitmessage_ru_RU.pro @@ -0,0 +1,30 @@ +SOURCES += ../addresses.py +SOURCES += ../bitmessagemain.py +SOURCES += ../class_addressGenerator.py +SOURCES += ../class_outgoingSynSender.py +SOURCES += ../class_receiveDataThread.py +SOURCES += ../class_sendDataThread.py +SOURCES += ../class_singleCleaner.py +SOURCES += ../class_singleListener.py +SOURCES += ../class_singleWorker.py +SOURCES += ../class_sqlThread.py +SOURCES += ../helper_bitcoin.py +SOURCES += ../helper_bootstrap.py +SOURCES += ../helper_generic.py +SOURCES += ../helper_inbox.py +SOURCES += ../helper_sent.py +SOURCES += ../helper_startup.py +SOURCES += ../shared.py +SOURCES += ../bitmessageqt/__init__.py +SOURCES += ../bitmessageqt/about.py +SOURCES += ../bitmessageqt/bitmessageui.py +SOURCES += ../bitmessageqt/help.py +SOURCES += ../bitmessageqt/iconglossary.py +SOURCES += ../bitmessageqt/newaddressdialog.py +SOURCES += ../bitmessageqt/newchandialog.py +SOURCES += ../bitmessageqt/newsubscriptiondialog.py +SOURCES += ../bitmessageqt/regenerateaddresses.py +SOURCES += ../bitmessageqt/settings.py +SOURCES += ../bitmessageqt/specialaddressbehavior.py + +TRANSLATIONS = bitmessage_ru_RU.ts diff --git a/src/translations/bitmessage_ru_RU.qm b/src/translations/bitmessage_ru_RU.qm new file mode 100644 index 00000000..e917c3b0 Binary files /dev/null and b/src/translations/bitmessage_ru_RU.qm differ diff --git a/src/translations/bitmessage_ru_RU.ts b/src/translations/bitmessage_ru_RU.ts new file mode 100644 index 00000000..e6337bf0 --- /dev/null +++ b/src/translations/bitmessage_ru_RU.ts @@ -0,0 +1,1260 @@ + + + + + MainWindow + + + One of your addresses, %1, is an old version 1 address. Version 1 addresses are no longer supported. May we delete it now? + Один из Ваших адресов, %1, является устаревшим адресом версии 1. Адреса версии 1 больше не поддерживаются. Хотите ли Вы удалить его сейчас? + + + + Reply + Ответить + + + + Add sender to your Address Book + Добавить отправителя в адресную книгу + + + + Move to Trash + Поместить в корзину + + + + View HTML code as formatted text + Просмотреть HTML код как отформатированный текст + + + + Save message as... + Сохранить сообщение как ... + + + + New + Новый адрес + + + + Enable + Включить + + + + Disable + Выключить + + + + Copy address to clipboard + Скопировать адрес в буфер обмена + + + + Special address behavior... + Особое поведение адресов... + + + + Send message to this address + Отправить сообщение на этот адрес + + + + Subscribe to this address + Подписаться на рассылку с этого адреса + + + + Add New Address + Добавить новый адрес + + + + Delete + Удалить + + + + Copy destination address to clipboard + Скопировать адрес отправки в буфер обмена + + + + Force send + Форсировать отправку + + + + Add new entry + Добавить новую запись + + + + Waiting on their encryption key. Will request it again soon. + Ожидаем ключ шифрования от Вашего собеседника. Запрос будет повторен через некоторое время. + + + + Encryption key request queued. + Запрос ключа шифрования поставлен в очередь. + + + + Queued. + В очереди. + + + + Message sent. Waiting on acknowledgement. Sent at %1 + Сообщение отправлено. Ожидаем подтверждения. Отправлено в %1 + + + + Need to do work to send message. Work is queued. + Нужно провести требуемые вычисления, чтобы отправить сообщение. Вычисления ожидают очереди. + + + + Acknowledgement of the message received %1 + Сообщение получено %1 + + + + Broadcast queued. + Рассылка ожидает очереди. + + + + Broadcast on %1 + Рассылка на %1 + + + + Problem: The work demanded by the recipient is more difficult than you are willing to do. %1 + Проблема: Ваш получатель требует более сложных вычислений, чем максимум, указанный в Ваших настройках. %1 + + + + Problem: The recipient's encryption key is no good. Could not encrypt message. %1 + Проблема: ключ получателя неправильный. Невозможно зашифровать сообщение. %1 + + + + Forced difficulty override. Send should start soon. + Форсирована смена сложности. Отправляем через некоторое время. + + + + Unknown status: %1 %2 + Неизвестный статус: %1 %2 + + + + Since startup on %1 + С начала работы %1 + + + + Not Connected + Не соединено + + + + Show Bitmessage + Показать Bitmessage + + + + Send + Отправка + + + + Subscribe + Подписки + + + + Address Book + Адресная книга + + + + Quit + Выйти + + + + 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. + Вы можете управлять Вашими ключами, отредактировав файл keys.dat, находящийся в той же папке, что и эта программа. +Создайте резервную копию этого файла перед тем как будете его редактировать. + + + + You may manage your keys by editing the keys.dat file stored in + %1 +It is important that you back up this file. + Вы можете управлять Вашими ключами, отредактировав файл keys.dat, находящийся в + %1 +Создайте резервную копию этого файла перед тем как будете его редактировать. + + + + Open keys.dat? + Открыть файл keys.dat? + + + + 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.) + Вы можете управлять Вашими ключами, отредактировав файл keys.dat, находящийся в той же папке, что и эта программа. +Создайте резервную копию этого файла перед тем как будете его редактировать. Хотели бы Вы открыть этот файл сейчас? +(пожалуйста, закройте Bitmessage до того как Вы внесете в этот файл какие-либо изменения.) + + + + You may manage your keys by editing the keys.dat file stored in + %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.) + Вы можете управлять Вашими ключами, отредактировав файл keys.dat, находящийся в + %1 +Создайте резервную копию этого файла перед тем как будете его редактировать. Хотели бы Вы открыть этот файл сейчас? +(пожалуйста, закройте Bitmessage до того как Вы внесете в этот файл какие-либо изменения.) + + + + Delete trash? + Очистить корзину? + + + + Are you sure you want to delete all trashed messages? + Вы уверены, что хотите очистить корзину? + + + + bad passphrase + Неподходящая секретная фраза + + + + You must type your passphrase. If you don't have one then this is not the form for you. + Вы должны ввести секретную фразу. Если Вы не хотите это делать, то Вы выбрали неправильную опцию. + + + + Processed %1 person-to-person messages. + Обработано %1 сообщений. + + + + Processed %1 broadcast messages. + Обработано %1 рассылок. + + + + Processed %1 public keys. + Обработано %1 открытых ключей. + + + + Total Connections: %1 + Всего соединений: %1 + + + + Connection lost + Соединение потеряно + + + + Connected + Соединено + + + + Message trashed + Сообщение удалено + + + + Error: Bitmessage addresses start with BM- Please check %1 + Ошибка: Bitmessage адреса начинаются с BM- Пожалуйста, проверьте %1 + + + + Error: The address %1 is not typed or copied correctly. Please check it. + Ошибка: адрес %1 внесен или скопирован неправильно. Пожалуйста, перепроверьте. + + + + Error: The address %1 contains invalid characters. Please check it. + Ошибка: адрес %1 содержит запрещенные символы. Пожалуйста, перепроверьте. + + + + Error: The address version in %1 is too high. Either you need to upgrade your Bitmessage software or your acquaintance is being clever. + Ошибка: версия адреса в %1 слишком новая. Либо Вам нужно обновить Bitmessage, либо Ваш собеседник дал неправильный адрес. + + + + Error: Some data encoded in the address %1 is too short. There might be something wrong with the software of your acquaintance. + Ошибка: некоторые данные, закодированные в адресе %1, слишком короткие. Возможно, что-то не так с программой Вашего собеседника. + + + + Error: Some data encoded in the address %1 is too long. There might be something wrong with the software of your acquaintance. + Ошибка: некоторые данные, закодированные в адресе %1, слишком длинные. Возможно, что-то не так с программой Вашего собеседника. + + + + Error: Something is wrong with the address %1. + Ошибка: что-то не так с адресом %1. + + + + Error: You must specify a From address. If you don't have one, go to the 'Your Identities' tab. + Вы должны указать адрес в поле "От кого". Вы можете найти Ваш адрес во вкладе "Ваши Адреса". + + + + Sending to your address + Отправка на Ваш собственный адрес + + + + Error: One of the addresses to which you are sending a message, %1, is yours. Unfortunately the Bitmessage client cannot process its own messages. Please try running a second client on a different computer or within a VM. + Ошибка: Один из адресов, на который Вы отправляете сообщение, %1, принадлежит Вам. К сожалению, Bitmessage не может отправлять сообщения самому себе. Попробуйте запустить второго клиента на другом компьютере или на виртуальной машине. + + + + Address version number + Версия адреса + + + + Concerning the address %1, Bitmessage cannot understand address version numbers of %2. Perhaps upgrade Bitmessage to the latest version. + По поводу адреса %1: Bitmessage не поддерживаем адреса версии %2. Возможно, Вам нужно обновить клиент Bitmessage. + + + + Stream number + Номер потока + + + + Concerning the address %1, Bitmessage cannot handle stream numbers of %2. Perhaps upgrade Bitmessage to the latest version. + По поводу адреса %1: Bitmessage не поддерживаем стрим номер %2. Возможно, Вам нужно обновить клиент Bitmessage. + + + + Warning: You are currently not connected. Bitmessage will do the work necessary to send the message but it won't send until you connect. + Внимание: Вы не подключены к сети. Bitmessage проделает необходимые вычисления, чтобы отправить сообщение, но не отправит его до тех пор, пока Вы не подсоединитесь к сети. + + + + Your 'To' field is empty. + Вы не заполнили поле 'Кому'. + + + + Work is queued. + Вычисления поставлены в очередь. + + + + Right click one or more entries in your address book and select 'Send message to this address'. + Нажмите правую кнопку мышки на каком-либо адресе и выберите "Отправить сообщение на этот адрес". + + + + Work is queued. %1 + Вычисления поставлены в очередь. %1 + + + + New Message + Новое сообщение + + + + From + От + + + + Address is valid. + Адрес введен правильно. + + + + Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want. + Ошибка: Вы не можете добавлять один и тот же адрес в Адресную Книгу несколько раз. Просто переименуйте существующий адрес. + + + + The address you entered was invalid. Ignoring it. + Вы ввели неправильный адрес. Это адрес проигнорирован. + + + + Error: You cannot add the same address to your subsciptions twice. Perhaps rename the existing one if you want. + Ошибка: Вы не можете добавлять один и тот же адрес в подписку несколько раз. Просто переименуйте существующую подписку. + + + + Restart + Перезапустить + + + + You must restart Bitmessage for the port number change to take effect. + Вы должны перезапустить Bitmessage, чтобы смена номера порта имела эффект. + + + + Bitmessage will use your proxy from now on but you may want to manually restart Bitmessage now to close existing connections. + Bitmessage будет использовать Ваш прокси в дальнейшем, тем не менее, мы рекомендуем перезапустить Bitmessage в ручную, чтобы закрыть уже существующие соединения. + + + + Error: You cannot add the same address to your list twice. Perhaps rename the existing one if you want. + Ошибка: Вы не можете добавлять один и тот же адрес в список несколько раз. Просто переименуйте существующий адрес. + + + + Passphrase mismatch + Секретная фраза не подходит + + + + The passphrase you entered twice doesn't match. Try again. + Вы ввели две разные секретные фразы. Пожалуйста, повторите заново. + + + + Choose a passphrase + Придумайте секретную фразу + + + + You really do need a passphrase. + Вы действительно должны ввести секретную фразу. + + + + All done. Closing user interface... + Программа завершена. Закрываем пользовательский интерфейс... + + + + Address is gone + Адрес утерян + + + + Bitmessage cannot find your address %1. Perhaps you removed it? + Bitmessage не может найти Ваш адрес %1. Возможно Вы удалили его? + + + + Address disabled + Адрес выключен + + + + 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. + Ошибка: адрес, с которого Вы пытаетесь отправить, выключен. Вам нужно будет включить этот адрес во вкладке "Ваши адреса". + + + + Entry added to the Address Book. Edit the label to your liking. + Запись добавлена в Адресную Книгу. Вы можете ее отредактировать. + + + + Moved items to trash. There is no user interface to view your trash, but it is still on disk if you are desperate to get it back. + Удалено в корзину. Чтобы попасть в корзину, Вам нужно будет найти файл корзины на диске. + + + + Save As... + Сохранить как ... + + + + Write error. + Ошибка записи. + + + + No addresses selected. + Вы не выбрали адрес. + + + + Options have been disabled because they either aren't applicable or because they haven't yet been implemented for your operating system. + Опции были отключены, потому что ли они либо не подходят, либо еще не выполнены под Вашу операционную систему. + + + + The address should start with ''BM-'' + Адрес должен начинаться с "BM-" + + + + The address is not typed or copied correctly (the checksum failed). + Адрес введен или скопирован неверно (контрольная сумма не сходится). + + + + The version number of this address is higher than this software can support. Please upgrade Bitmessage. + Версия этого адреса более поздняя, чем Ваша программа. Пожалуйста, обновите программу Bitmessage. + + + + The address contains invalid characters. + Адрес содержит запрещенные символы. + + + + Some data encoded in the address is too short. + Данные, закодированные в адресе, слишком короткие. + + + + Some data encoded in the address is too long. + Данные, закодированные в адресе, слишком длинные. + + + + You are using TCP port %1. (This can be changed in the settings). + Вы используете TCP порт %1 (Его можно поменять в настройках). + + + + Bitmessage + Bitmessage + + + + To + Кому + + + + From + От кого + + + + Subject + Тема + + + + Received + Получено + + + + Inbox + Входящие + + + + Load from Address book + Взять из адресной книги + + + + Message: + Сообщение: + + + + Subject: + Тема: + + + + Send to one or more specific people + Отправить одному или нескольким указанным получателям + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> + + + + To: + Кому: + + + + From: + От: + + + + Broadcast to everyone who is subscribed to your address + Рассылка всем, кто подписался на Ваш адрес + + + + Be aware that broadcasts are only encrypted with your address. Anyone who knows your address can read them. + Пожалуйста, учитывайте, что рассылки шифруются лишь Вашим адресом. Любой человек, который знает Ваш адрес, сможет прочитать Вашу рассылку. + + + + Status + Статус + + + + Sent + Отправленные + + + + Label (not shown to anyone) + Название (не показывается никому) + + + + Address + Адрес + + + + Stream + Поток + + + + Your Identities + Ваши Адреса + + + + Here you can subscribe to 'broadcast messages' that are sent by other users. Messages will appear in your Inbox. Addresses here override those on the Blacklist tab. + Здесь Вы можете подписаться на рассылки от других пользователей. Все рассылки будут появляться у Вас во Входящих. Вы будете следить за всеми адресами, указанными здесь, даже если они в черном списке. + + + + Add new Subscription + Добавить новую подписку + + + + Label + Название + + + + Subscriptions + Подписки + + + + The Address book is useful for adding names or labels to other people's Bitmessage addresses so that you can recognize them more easily in your inbox. You can add entries here using the 'Add' button, or from your inbox by right-clicking on a message. + Адресная книга удобна для присвоения осмысленных имен Bitmessage адресам Ваших друзей. Вы можете добавлять новые записи с помощью кнопки "Добавить новую запись", или же правым кликом мышки на сообщении. + + + + Name or Label + Название + + + + Use a Blacklist (Allow all incoming messages except those on the Blacklist) + Использовать черный список (Разрешить все входящие сообщения, кроме указанных в черном списке) + + + + Use a Whitelist (Block all incoming messages except those on the Whitelist) + Использовать белый список (блокировать все входящие сообщения, кроме указанных в белом списке) + + + + Blacklist + Черный список + + + + Stream # + № потока + + + + Connections + Соединений + + + + Total connections: 0 + Всего соединений: 0 + + + + Since startup at asdf: + С начала работы программы в asdf: + + + + Processed 0 person-to-person message. + Обработано 0 сообщений. + + + + Processed 0 public key. + Обработано 0 открытых ключей. + + + + Processed 0 broadcast. + Обработано 0 рассылок. + + + + Network Status + Статус сети + + + + File + Файл + + + + Settings + Настройки + + + + Help + Помощь + + + + Import keys + Импортировать ключи + + + + Manage keys + Управлять ключами + + + + About + О программе + + + + Regenerate deterministic addresses + Сгенерировать заново все адреса + + + + Delete all trashed messages + Стереть все сообщения из корзины + + + + NewAddressDialog + + + Create new Address + Создать новый адрес + + + + Here you may generate as many addresses as you like. Indeed, creating and abandoning addresses is encouraged. You may generate addresses by using either random numbers or by using a passphrase. If you use a passphrase, the address is called a "deterministic" address. +The 'Random Number' option is selected by default but deterministic addresses have several pros and cons: + Здесь Вы сможете сгенерировать столько адресов сколько хотите. На самом деле, создание и выкидывание адресов даже поощряется. Вы можете сгенерировать адреса используя либо генератор случайных чисел либо придумав секретную фразу. Если Вы используете секретную фразу, то адреса будут называться "детерминистическими". Генератор случайных чисел выбран по умолчанию, однако детерминистические адреса имеют следующие плюсы и минусы по сравнению с ними: + + + + <html><head/><body><p><span style=" font-weight:600;">Pros:<br/></span>You can recreate your addresses on any computer from memory. <br/>You need-not worry about backing up your keys.dat file as long as you can remember your passphrase. <br/><span style=" font-weight:600;">Cons:<br/></span>You must remember (or write down) your passphrase if you expect to be able to recreate your keys if they are lost. <br/>You must remember the address version number and the stream number along with your passphrase. <br/>If you choose a weak passphrase and someone on the Internet can brute-force it, they can read your messages and send messages as you.</p></body></html> + <html><head/><body><p><span style=" font-weight:600;">Плюсы:<br/></span>Вы сможете восстановить адрес по памяти на любом компьютере<br/>Вам не нужно беспокоиться о сохранении файла keys.dat, если Вы запомнили секретную фразу<br/><span style=" font-weight:600;">Минусы:<br/></span>Вы должны запомнить (или записать) секретную фразу, если Вы хотите когда-либо восстановить Ваш адрес на другом компьютере <br/>Вы должны также запомнить версию адреса и номер потока вместе с секретной фразой<br/>Если Вы выберите слишком короткую секретную фразу, кто-нибудь в интернете сможет подобрать ключ и, как следствие, читать и отправлять от Вашего имени сообщения.</p></body></html> + + + + Use a random number generator to make an address + Использовать генератор случайных чисел для создания адреса + + + + Use a passphrase to make addresses + Использовать секретную фразу для создания адресов + + + + Spend several minutes of extra computing time to make the address(es) 1 or 2 characters shorter + Потратить несколько лишних минут, чтобы сделать адрес(а) короче на 1 или 2 символа + + + + Make deterministic addresses + Создать детерминистический адрес + + + + Address version number: 3 + Версия адреса: 3 + + + + In addition to your passphrase, you must remember these numbers: + В дополнение к секретной фразе, Вам необходимо запомнить эти числа: + + + + Passphrase + Придумайте секретную фразу + + + + Number of addresses to make based on your passphrase: + Кол-во адресов, которые Вы хотите получить из секретной фразы: + + + + Stream number: 1 + Номер потока: 1 + + + + Retype passphrase + Повторите секретную фразу + + + + Randomly generate address + Сгенерировать случайный адрес + + + + Label (not shown to anyone except you) + Название (не показывается никому кроме Вас) + + + + Use the most available stream + Использовать наиболее доступный поток + + + + (best if this is the first of many addresses you will create) + (выберите этот вариант, если это лишь первый из многих адресов, которые Вы планируете создать) + + + + Use the same stream as an existing address + Использовать тот же поток, что и указанный существующий адрес + + + + (saves you some bandwidth and processing power) + (немного сэкономит Вам пропускную способность сети и вычислительную мощь) + + + + NewChanDialog + + + Dialog + Новый chan + + + + Create a new chan + Создать новый chan + + + + Join a chan + Присоединиться к chan + + + + <html><head/><body><p>A chan is a set of encryption keys that is shared by a group of people. The keys and bitmessage address used by a chan is generated from a human-friendly word or phrase (the chan name).</p><p>Chans are experimental and are unmoderatable.</p></body></html> + <html><head/><body><p>Chan - это набор ключей шифрования, которые известны некоторой группе людей. Ключи и Bitmessage-адрес используемый chan-ом генерируется из слова или фразы (имя chan-а).</p><p>Chan-ы - это экспериментальная новинка.</p></body></html> + + + + Chan name: + Имя chan: + + + + Chan bitmessage address: + Bitmessage адрес chan: + + + + Create a chan + Создать chan + + + + Enter a name for your chan. If you choose a sufficiently complex chan name (like a strong and unique passphrase) and none of your friends share it publicly then the chan will be secure and private. + Введите имя Вашего chan-a. Если Вы выберете достаточно сложное имя для chan-а (например, сложную и необычную секретную фразу) и никто из Ваших друзей не опубликует эту фразу, то Вам chan будет надежно зашифрован. + + + + NewSubscriptionDialog + + + Add new entry + Добавить новую запись + + + + Label + Название + + + + Address + Адрес + + + + SpecialAddressBehaviorDialog + + + Special Address Behavior + Особое поведение адреса + + + + Behave as a normal address + Вести себя как обычный адрес + + + + Behave as a pseudo-mailing-list address + Вести себя как адрес псевдо-рассылки + + + + Mail received to a pseudo-mailing-list address will be automatically broadcast to subscribers (and thus will be public). + Почта, полученная на адрес псевдо-рассылки, будет автоматически разослана всем подписчикам (и поэтому будет доступна общей публике). + + + + Name of the pseudo-mailing-list: + Имя псевдо-рассылки: + + + + aboutDialog + + + About + О программе + + + + PyBitmessage + PyBitmessage + + + + version ? + версия ? + + + + Copyright © 2013 Jonathan Warren + Копирайт © 2013 Джонатан Уоррен + + + + <html><head/><body><p>Distributed under the MIT/X11 software license; see <a href="http://www.opensource.org/licenses/mit-license.php"><span style=" text-decoration: underline; color:#0000ff;">http://www.opensource.org/licenses/mit-license.php</span></a></p></body></html> + <html><head/><body><p>Программа распространяется в соответствии с лицензией MIT/X11; см. <a href="http://www.opensource.org/licenses/mit-license.php"><span style=" text-decoration: underline; color:#0000ff;">http://www.opensource.org/licenses/mit-license.php</span></a></p></body></html> + + + + This is Beta software. + Это бета версия программы. + + + + helpDialog + + + Help + Помощь + + + + <a href="http://Bitmessage.org/wiki/PyBitmessage_Help">http://Bitmessage.org/wiki/PyBitmessage_Help</a> + <a href="http://Bitmessage.org/wiki/PyBitmessage_Help">http://Bitmessage.org/wiki/PyBitmessage_Help</a> + + + + As Bitmessage is a collaborative project, help can be found online in the Bitmessage Wiki: + Bitmessage - общественный проект. Вы можете найти подсказки и советы на Wiki-страничке Bitmessage: + + + + iconGlossaryDialog + + + Icon Glossary + Описание значков + + + + You have no connections with other peers. + Нет соединения с другими участниками сети. + + + + You have made at least one connection to a peer using an outgoing connection but you have not yet received any incoming connections. Your firewall or home router probably isn't configured to forward incoming TCP connections to your computer. Bitmessage will work just fine but it would help the Bitmessage network if you allowed for incoming connections and will help you be a better-connected node. + На текущий момент Вы установили по-крайней мере одно исходящее соединение, но пока ни одного входящего. Ваш файрвол или маршрутизатор скорее всего не настроен на переброс входящих TCP соединений к Вашему компьютеру. Bitmessage будет прекрасно работать и без этого, но Вы могли бы помочь сети если бы разрешили и входящие соединения тоже. Это помогло бы Вам стать более важным узлом сети. + + + + You are using TCP port ?. (This can be changed in the settings). + Вы используете TCP порт ?. (Его можно поменять в настройках). + + + + You do have connections with other peers and your firewall is correctly configured. + Вы установили соединение с другими участниками сети и ваш файрвол настроен правильно. + + + + regenerateAddressesDialog + + + Regenerate Existing Addresses + Сгенерировать заново существующие адреса + + + + Regenerate existing addresses + Сгенерировать заново существующие адреса + + + + Passphrase + Секретная фраза + + + + Number of addresses to make based on your passphrase: + Кол-во адресов, которые Вы хотите получить из Вашей секретной фразы: + + + + Address version Number: + Версия адреса: + + + + 3 + 3 + + + + Stream number: + Номер потока: + + + + 1 + 1 + + + + Spend several minutes of extra computing time to make the address(es) 1 or 2 characters shorter + Потратить несколько лишних минут, чтобы сделать адрес(а) короче на 1 или 2 символа + + + + You must check (or not check) this box just like you did (or didn't) when you made your addresses the first time. + Вы должны кликнуть эту галочку (или не кликать) точно также как Вы сделали в самый первый раз, когда создавали Ваши адреса. + + + + If you have previously made deterministic addresses but lost them due to an accident (like hard drive failure), you can regenerate them here. If you used the random number generator to make your addresses then this form will be of no use to you. + Если Вы ранее делали детерминистические адреса, но случайно потеряли их, Вы можете их восстановить здесь. Если же Вы использовали генератор случайных чисел, чтобы создать Ваши адреса, то Вы не сможете их здесь восстановить. + + + + settingsDialog + + + Settings + Настройки + + + + Start Bitmessage on user login + Запускать Bitmessage при входе в систему + + + + Start Bitmessage in the tray (don't show main window) + Запускать Bitmessage в свернутом виде (не показывать главное окно) + + + + Minimize to tray + Сворачивать в трей + + + + Show notification when message received + Показывать уведомления при получении новых сообщений + + + + Run in Portable Mode + Запустить в переносном режиме + + + + 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. + В переносном режиме, все сообщения и конфигурационные файлы сохраняются в той же самой папке что и сама программа. Это делает более удобным использование Bitmessage с USB-флэшки. + + + + User Interface + Пользовательские + + + + Listening port + Порт прослушивания + + + + Listen for connections on port: + Прослушивать соединения на порту: + + + + Proxy server / Tor + Прокси сервер / Tor + + + + Type: + Тип: + + + + none + отсутствует + + + + SOCKS4a + SOCKS4a + + + + SOCKS5 + SOCKS5 + + + + Server hostname: + Адрес сервера: + + + + Port: + Порт: + + + + Authentication + Авторизация + + + + Username: + Имя пользователя: + + + + Pass: + Прль: + + + + Network Settings + Сетевые настройки + + + + 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. + Когда кто-либо отправляет Вам сообщение, его компьютер должен сперва решить определенную вычислительную задачу. Сложность этой задачи по умолчанию равна 1. Вы можете повысить эту сложность для новых адресов, которые Вы создадите, здесь. Таким образом, любые новые адреса, которые Вы создадите, могут требовать от отправителей сложность большую чем 1. Однако, есть одно исключение: если Вы специально добавите Вашего собеседника в адресную книгу, то Bitmessage автоматически уведомит его о том, что для него минимальная сложность будет составлять всегда всего лишь 1. + + + + Total difficulty: + Общая сложность: + + + + Small message difficulty: + Сложность для маленьких сообщений: + + + + 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. + "Сложность для маленьких сообщений" влияет исключительно на небольшие сообщения. Увеличив это число в два раза, вы сделаете отправку маленьких сообщений в два раза сложнее, в то время как сложность отправки больших сообщений не изменится. + + + + The 'Total difficulty' affects the absolute amount of work the sender must complete. Doubling this value doubles the amount of work. + "Общая сложность" влияет на абсолютное количество вычислений, которые отправитель должен провести, чтобы отправить сообщение. Увеличив это число в два раза, вы увеличите в два раза объем требуемых вычислений. + + + + Demanded difficulty + Требуемая сложность + + + + 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. + Здесь Вы можете установить максимальную вычислительную работу, которую Вы согласны проделать, чтобы отправить сообщение другому пользователю. Ноль означает, чтобы любое значение допустимо. + + + + Maximum acceptable total difficulty: + Макс допустимая общая сложность: + + + + Maximum acceptable small message difficulty: + Макс допустимая сложность для маленький сообщений: + + + + Max acceptable difficulty + Макс допустимая сложность + + +