--- bittornado-0.3.18.orig/debian/btmaketorrentgui.sgml
+++ bittornado-0.3.18/debian/btmaketorrentgui.sgml
@@ -0,0 +1,116 @@
+
+ Cameron">
+ Dale">
+
+ April 17, 2005">
+
+ 1">
+ camrdale@gmail.com">
+
+ btmaketorrentgui">
+
+
+ Debian">
+ GNU">
+ GPL">
+]>
+
+
+
+
+ &dhemail;
+
+
+ &dhfirstname;
+ &dhsurname;
+
+
+ 2006
+ &dhusername;
+
+ &dhdate;
+
+
+ &dhucpackage;
+
+ &dhsection;
+
+
+
+ &dhpackage;
+
+ GUI program to generate torrent meta-info files for use with bittorrent
+
+
+
+ &dhpackage;
+
+
+
+
+ DESCRIPTION
+
+ This manual page documents briefly the
+ &dhpackage; command.
+
+ This manual page was written for the &debian; distribution
+ because the original program does not have a manual page.
+
+ &dhpackage; is a GUI interface to btmakemetafile, it generates
+ the torrent info files that are distributed to bittorrent clients (usually over http) to inform them
+ of where the designated tracker for the torrent is located, and to enable them
+ to verify the file's contents.
+
+ &dhpackage; does not require arguments like btmakemetafile does,
+ instead everything is done in the GUI interface. The first box in the GUI is the
+ file or directory that the torrent info file will be generated for, the second is the
+ "announce" address of the tracker (ex. http://my.tracker:6969/announce). The
+ third box is for an optional list of announces, separated by commas or whitespace and on
+ several lines. You can also optionally set the piece size and a comment.
+
+
+
+
+ SEE ALSO
+
+ btcompletedir1,
+ btcompletedirgui1,
+ btmakemetafile1,
+ btshowmetainfo1,
+ bittorrent-downloader1.
+
+
+
+ AUTHOR
+ This manual page was written by &dhusername; <&dhemail;> (based on the original man pages written by Micah Anderson <micah@debian.org>) for
+ the &debian; system (but may be used by others). Permission is
+ granted to copy, distribute and/or modify this document under
+ the terms of the &gnu; General Public License, Version 2 or any
+ later version published by the Free Software Foundation.
+
+
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in /usr/share/common-licenses/GPL.
+
+
+
+
+
--- bittornado-0.3.18.orig/debian/NEWS
+++ bittornado-0.3.18/debian/NEWS
@@ -0,0 +1,65 @@
+bittornado (0.3.18-1) unstable; urgency=low
+
+ Here is some information on the new encryption available in BitTornado,
+ which I obtained from the BitTornado forum:
+
+ The encryption standard followed, developed by Azureus, is available at:
+ http://www.azureuswiki.com/index.php/Message_Stream_Encryption
+
+ BitTornado supports both header-only and full-stream encryption, though
+ header-only is only supported in one of BitTornado's four encryption
+ modes.
+
+ These modes are:
+
+ 1. No encryption permitted. The client won't make any encrypted
+ connections.
+
+ 2. Encryption enabled (default). The client will accept incoming
+ encrypted connections, and will make outgoing encrypted connections
+ if the tracker tells it that peer requires it (and if the tracker has
+ the extensions to do so). In this mode, the client will recognize
+ header-only encryption.
+
+ 3. Encrypted connections only. This restricts the client to only
+ connecting via encrpted links, and only via full stream encryption.
+ This may drastically affect the ability of the client to connect to
+ peers with a tracker that doesn't support the crypto extensions.
+
+ 4. Full stealth encryption. Like the above mode, except it also modifies
+ tracker communications so that (assuming peers are coded properly) the
+ client will never receive any unencrypted incoming connection attempts.
+ If the tracker doesn't support the crypto extensions, this will also
+ effectively firewall the client.
+
+ -- Cameron Dale Thu, 4 Jan 2007 13:56:24 -0800
+
+bittornado (0.3.15-3) unstable; urgency=low
+
+ The btcompletedirgui and btmaketorrentgui programs have been fixed, you
+ no longer need python-wxgtk2.4, they work fine with python-wxgtk2.6.
+
+ -- Cameron Dale Sun, 08 Oct 2006 12:31:54 -0800
+
+bittornado (0.3.15-1) unstable; urgency=low
+
+ [ Cameron Dale ]
+ The btcompletedirgui and btmaketorrentgui programs have been patched as
+ they were not working with python-wxgtk2.6. They do, however, work with
+ python-wxgtk2.4, and so it has been added as a Suggest dependency and
+ the programs have been patched to select the older version. If you want
+ to run either of these programs, you will need to install python-wxgtk2.4.
+ If you don't need either of these programs, you will not need to install
+ python-wxgtk2.4.
+
+ -- Micah Anderson Wed, 17 Apr 2006 12:31:54 -0800
+
+bittornado (0.2.0-7) unstable; urgency=low
+
+ The bittornado package has been split into two different packages, one
+ contains only the GUI pieces and dependancies, the other can be installed
+ stand-alone on machines which do not have or want X dependencies installed.
+ If you want the gui components, please install the bittornado-gui package
+ as well.
+
+ -- Micah Anderson Tue, 6 Jul 2004 17:12:37 -0500
--- bittornado-0.3.18.orig/debian/bittornado-gui.postinst
+++ bittornado-0.3.18/debian/bittornado-gui.postinst
@@ -0,0 +1,64 @@
+#! /bin/sh
+# postinst script for bittorrent
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `configure'
+# * `abort-upgrade'
+# * `abort-remove' `in-favour'
+#
+# * `abort-deconfigure' `in-favour'
+# `removing'
+#
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+ configure)
+
+ # Run the mimetypes program to add mimetypes into Netscape.
+ if [ -e /etc/init.d/mimetypes ]; then
+ /etc/init.d/mimetypes
+ fi
+
+ for i in btcompletedirgui btdownloadgui ; do
+ update-alternatives \
+ --install /usr/bin/$i $i /usr/bin/$i.bittornado 120 \
+ --slave /usr/share/man/man1/$i.1.gz $i.1.gz /usr/share/man/man1/$i.bittornado.1.gz \
+ || exit 1
+ done
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ for i in btcompletedirgui btdownloadgui ; do
+ update-alternatives \
+ --install /usr/bin/$i $i /usr/bin/$i.bittornado 120 \
+ --slave /usr/share/man/man1/$i.1.gz $i.1.gz /usr/share/man/man1/$i.bittornado.1.gz \
+ || exit 1
+ done
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- bittornado-0.3.18.orig/debian/dirs
+++ bittornado-0.3.18/debian/dirs
@@ -0,0 +1 @@
+usr/bin
--- bittornado-0.3.18.orig/debian/docs
+++ bittornado-0.3.18/debian/docs
@@ -0,0 +1,8 @@
+README.txt
+docs/credits.txt
+docs/README-Psyco.txt
+docs/IMPORTANT-multitracker-readme.txt
+docs/FAQ.txt
+ipranges.portugal.txt
+docs/multitracker-spec.txt
+docs/webseed-spec.txt
--- bittornado-0.3.18.orig/debian/bittornado-gui.manpages
+++ bittornado-0.3.18/debian/bittornado-gui.manpages
@@ -0,0 +1,3 @@
+debian/btdownloadgui.bittornado.1
+debian/btcompletedirgui.bittornado.1
+debian/btmaketorrentgui.1
--- bittornado-0.3.18.orig/debian/control
+++ bittornado-0.3.18/debian/control
@@ -0,0 +1,61 @@
+Source: bittornado
+Section: net
+Priority: optional
+Maintainer: Cameron Dale
+Uploaders: Micah Anderson
+Build-Depends: debhelper (>= 5.0.37.2), quilt
+Build-Depends-Indep: python-dev, python-support (>= 0.5.4), docbook-to-man
+Standards-Version: 3.8.0
+Vcs-Svn: svn://svn.debian.org/pkg-bittornado/bittornado/trunk
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-bittornado/bittornado/trunk/
+XS-Dm-Upload-Allowed: yes
+Homepage: http://bittornado.com
+
+Package: bittornado
+Architecture: all
+Depends: ${python:Depends}
+Conflicts: bittorrent (<= 3.4.2-2)
+Replaces: bittorrent
+Suggests: bittornado-gui, python-psyco
+Recommends: mime-support, python-crypto
+Provides: python-bittornado
+Description: bittorrent client with enhanced curses interface
+ bittorrent is a tool for distributing files. Whenever more than one
+ person is downloading at once they send pieces of the file(s) to each
+ other, thus relieving the central server's bandwidth burden. Even with
+ many simultaneous downloads, the upload burden on the central server
+ remains quite small, since each new downloader introduces new upload
+ capacity.
+ .
+ BitTornado is the next generation bittorrent client built on
+ the original BitTorrent. This client features an enhanced
+ console/curses mode, lots of new features under the hood, and is
+ generally one of the most advanced clients out there. Get this if you
+ need to limit your bandwidth, or you want more control of your
+ torrents. It does everything the original bittorrent does, plus more...
+ .
+ This package only contains the curses interfaces, install the package
+ bittornado-gui to get the GUI components
+
+Package: bittornado-gui
+Architecture: all
+Depends: ${python:Depends}, bittornado (= ${source:Version}), python-wxgtk2.6 | python-wxgtk2.8
+Conflicts: bittorrent (<= 3.4.2-2), libfreetype6 (= 2.1.7-2.4)
+Replaces: bittorrent
+Suggests: python-psyco
+Recommends: mime-support, python-crypto
+Description: bittorrent client with enhanced GUI interface
+ bittorrent is a tool for distributing files. It's extremely easy to
+ use - downloads are started by clicking on hyperlinks. Whenever more
+ than one person is downloading at once they send pieces of the
+ file(s) to each other, thus relieving the central server's bandwidth
+ burden. Even with many simultaneous downloads, the upload burden on
+ the central server remains quite small, since each new downloader
+ introduces new upload capacity.
+ .
+ BitTornado is the next generation bittorrent client built on
+ the original BitTorrent. This client features an enhanced GUI, lots
+ of new features under the hood, and is generally one of the most
+ advanced clients out there. Get this if you need to limit your
+ bandwidth, or you want more control of your torrents. It does
+ everything the original bittorrent does, plus more...
--- bittornado-0.3.18.orig/debian/rules
+++ bittornado-0.3.18/debian/rules
@@ -0,0 +1,94 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+PYTHON_VERSION=$(shell /usr/bin/python -V 2>&1 | /usr/bin/perl -le 'print "$$1.$$2" if <> =~m/^Python\s+(\d+)\.(\d+)(\.\d+)*/')
+
+include /usr/share/quilt/quilt.make
+
+build-stamp: $(QUILT_STAMPFN) bittorrent-downloader.bittornado.1 bittorrent-multi-downloader.bittornado.1 btcompletedir.bittornado.1 btcompletedirgui.bittornado.1 btcopyannounce.1 btdownloadcurses.bittornado.1 btdownloadgui.bittornado.1 btdownloadheadless.bittornado.1 btlaunchmany.bittornado.1 btlaunchmanycurses.bittornado.1 btmakemetafile.bittornado.1 btmaketorrentgui.1 btreannounce.bittornado.1 btrename.bittornado.1 btsethttpseeds.1 btshowmetainfo.bittornado.1 bttrack.bittornado.1
+ dh_testdir
+ touch build-stamp
+
+%.1: debian/%.sgml
+ /usr/bin/docbook-to-man $< > debian/$@
+
+clean: unpatch
+ dh_testdir
+ dh_testroot
+ rm -rf build/ BitTornado/BT1/*.pyc BitTornado/*.pyc *.pyc
+ rm -f debian/*.1
+ rm -f build-stamp
+ dh_clean
+
+install: build-stamp
+
+
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/bittornado.
+ chmod +x ./setup.py
+ ./setup.py install --prefix=$(CURDIR)/debian/tmp/usr --install-lib=$(CURDIR)/debian/tmp/usr/share/python-support/bittornado
+
+ install -d debian/tmp/usr/share/mimelnk/application
+
+ install -D -m644 debian/bittornado.desktop debian/bittornado-gui/usr/share/applications/bittornado.desktop
+ install -D -m644 debian/bittornado.xpm debian/tmp/usr/share/pixmaps/bittornado.xpm
+ install -d debian/tmp/usr/share/bittorrent
+ chmod 755 debian/tmp/usr/share/python-support/bittornado/BitTornado/launchmanycore.py
+ cp debian/tmp/usr/bin/btmakemetafile.py debian/tmp/usr/share/python-support/bittornado/BitTornado
+ cp debian/tmp/usr/bin/btcompletedir.py debian/tmp/usr/share/python-support/bittornado/BitTornado
+
+ # Remove the generated .pyc files
+ ( cd debian/tmp/usr/share/python-support/bittornado/BitTornado && \
+ rm -f *.pyc && \
+ cd BT1 && \
+ rm -f *.pyc )
+
+# Build architecture-independent files here.
+binary-indep: build install
+ dh_testdir
+ dh_testroot
+ dh_installdocs
+ dh_installexamples
+ dh_installmenu
+ dh_installmime
+ dh_desktop
+ dh_installman
+
+ # Remove the .py from the end of each of these and add .bittornado
+ # so that the alternatives system can work
+ ( cd debian/tmp/usr/bin && \
+ for i in btdownloadgui btdownloadheadless bttrack btmakemetafile \
+ btlaunchmany btcompletedir btcompletedirgui \
+ btdownloadcurses btlaunchmanycurses btreannounce btrename \
+ btshowmetainfo; \
+ do mv $$i.py $$i.bittornado || exit 1 ; done )
+
+ # Remove the .py from the end of each of these, the following are not
+ # included in bittorrent, so they are not renamed to having the
+ # suffix of .bittornado
+ ( cd debian/tmp/usr/bin && \
+ for i in btcopyannounce btsethttpseeds btmaketorrentgui; \
+ do mv $$i.py $$i || exit 1; done )
+
+ dh_installchangelogs
+ dh_install --sourcedir=debian/tmp
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_pysupport
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- bittornado-0.3.18.orig/debian/watch
+++ bittornado-0.3.18/debian/watch
@@ -0,0 +1,3 @@
+# Site Directory Pattern Version Script
+version=3
+http://download2.bittornado.com/download/BitTornado-(.*)\.tar\.gz debian
--- bittornado-0.3.18.orig/debian/bttrack.bittornado.sgml
+++ bittornado-0.3.18/debian/bttrack.bittornado.sgml
@@ -0,0 +1,375 @@
+
+ Cameron">
+ Dale">
+
+ April 17, 2005">
+
+ 1">
+ camrdale@gmail.com">
+
+ bttrack.bittornado">
+
+
+ Debian">
+ GNU">
+ GPL">
+]>
+
+
+
+
+ &dhemail;
+
+
+ &dhfirstname;
+ &dhsurname;
+
+
+ 2006
+ &dhusername;
+
+ &dhdate;
+
+
+ &dhucpackage;
+
+ &dhsection;
+
+
+
+ &dhpackage;
+
+ bittorrent tracker
+
+
+
+
+ &dhpackage;
+
+
+
+
+
+
+ DESCRIPTION
+
+ This manual page documents briefly the
+ &dhpackage; command.
+
+ This manual page was written for the &debian; distribution
+ because the original program does not have a manual page.
+
+ &dhpackage; is a "tracker" for bittorrent clients. This program keeps track
+ of the completion of each client, and communicates that information when
+ requested to other clients.
+
+ There is one required option, --dfile, which specifies what file to store the recent downloader information.
+
+
+
+ OPTIONS
+
+ These programs follow the usual &gnu; command line syntax,
+ with long options starting with two dashes (`--'). A summary of
+ options is included below.
+
+
+
+
+
+ the file to store the recent downloader information (required)
+
+
+
+
+
+ the port to listen on (defaults to 80)
+
+
+
+
+
+ a comma-separated list of ips and hostnames to bind to locally (defaults to '')
+
+
+
+ 0|1
+
+ whether to allow the tracker to connect to peers via IPv6 (defaults to 0)
+
+
+
+ 0|1
+
+ whether an IPv6 server socket will also field IPv4 connections (defaults to 0)
+
+
+
+
+
+ then number of seconds to use as a timeout for closing connections (defaults to 15)
+
+
+
+
+
+ the number of seconds between saving the dfile (defaults to 300)
+
+
+
+
+
+ the number of seconds between expiring downloaders (defaults to 2700)
+
+
+
+
+
+ the number of seconds downloaders should wait between reannouncements
+ (defaults to 1800)
+
+
+
+
+
+ the num of peers to send in an info message (defaults to 50)
+
+
+
+
+
+ the number of seconds to wait between checking if any connections have timed out
+ (defaults to 5)
+
+
+
+
+
+ check num times if a downloader is behind a NAT (0 = don't
+ check) (defaults to 3)
+
+
+
+ 0|1
+
+ whether to add entries to the log for nat-check results (defaults to 0)
+
+
+
+
+
+ the minimum number of seconds it must have been since the last flush to do another one
+ (defaults to 3.0)
+
+
+
+
+
+ the minimum number of seconds before a cache is considered stale and is
+ flushed (defaults to 600.0)
+
+
+
+
+
+ only allow downloads for torrents in this directory (defaults to '')
+
+
+
+
+
+ only allow downloads for hashes in this file (hex format, one per
+ line), cannot be used with allowed_dir (defaults to '')
+
+
+
+ 0|1
+
+ whether to allow special keys in torrents in the allowed_dir to affect tracker
+ access (defaults to 0)
+
+
+
+ 0|1
+
+ whether to enable multitracker operation (defaults to 0)
+
+
+
+ autodetect|none|all
+
+ whether to allow incoming tracker announces (can be none, autodetect
+ or all) (defaults to 'autodetect')
+
+
+
+
+
+ number of seconds between outgoing tracker announces (defaults to 120)
+
+
+
+
+
+ the num of peers to get in a tracker announce (defaults to 20)
+
+
+
+
+
+ if set, forwards all non-multitracker to
+ this url with this optional password (defaults to '')
+
+
+
+ 0|1|password
+
+ whether to act as a data aggregator rather than a tracker. If
+ enabled, may be 1, or password; if password is set, then an
+ incoming password is required for access (defaults to '0')
+
+
+
+ 0|1
+
+ whether to reopen the log file upon receipt of HUP signal (defaults to 0)
+
+
+
+
+
+ number of seconds to wait before assuming that an http connection has
+ timed out (defaults to 60)
+
+
+
+
+
+ number of seconds between reloading of allowed_dir (defaults to 60)
+
+
+
+ 0|1
+
+ whether to display an info page when the tracker's root dir is loaded
+ (defaults to 1)
+
+
+
+
+
+ redirect the info page to this URL (defaults to '')
+
+
+
+ 0|1
+
+ whether to display names from allowed dir (defaults to 1)
+
+
+
+
+
+ the filename containing x-icon data to return when browser requests
+ favicon.ico (defaults to '')
+
+
+
+
+
+ only allow connections from IPs specified in the given file, which
+ contains subnet data in the format: aa.bb.cc.dd/len (defaults to '')
+
+
+
+
+
+ don't allow connections from IPs specified in the given file, which
+ contains IP range data in the format: xxx:xxx:ip1-ip2 (defaults to '')
+
+
+
+ 0|1|2
+
+ ignore the ip GET parameter from machines which aren't on local
+ network IPs (0 = never, 1 = always, 2 = ignore if NAT checking is not
+ enabled) (defaults to 2)
+
+
+
+
+
+ write tracker logs to this file, use '-' for stdout (defaults to '-')
+
+
+
+ 0|1
+
+ use with allowed_dir; adds a /file?hash=hash URL that allows users
+ to download the torrent file (defaults to 0)
+
+
+
+ 0|1
+
+ keep dead torrents after they expire (so they still show up on your
+ /scrape and web page) (defaults to 0)
+
+
+
+ full|specific|none
+
+ scrape access allowed (can be none, specific or full) (defaults to full)
+
+
+
+
+
+ the code to require from clients to indicate that they are
+ dedicated seeders. This allows the tracker to monitor dedicated seed(s) and flag torrents as
+ seeded. (defaults to '')
+
+
+
+
+
+
+ SEE ALSO
+
+ bittorrent-downloader1,
+
+
+
+ AUTHOR
+ This manual page was written by &dhusername; <&dhemail;> (based on the original man pages written by Micah Anderson <micah@debian.org>) for
+ the &debian; system (but may be used by others). Permission is
+ granted to copy, distribute and/or modify this document under
+ the terms of the &gnu; General Public License, Version 2 or any
+ later version published by the Free Software Foundation.
+
+
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in /usr/share/common-licenses/GPL.
+
+
+
+
+
--- bittornado-0.3.18.orig/debian/bittornado-gui.menu
+++ bittornado-0.3.18/debian/bittornado-gui.menu
@@ -0,0 +1,6 @@
+?package(bittornado-gui):needs="X11"\
+ section="Applications/Network/File Transfer"\
+ icon="/usr/share/pixmaps/bittornado.xpm"\
+ title="BitTornado Client"\
+ command="/usr/bin/btdownloadgui.bittornado"\
+ hints="Internet"
--- bittornado-0.3.18.orig/debian/README.source
+++ bittornado-0.3.18/debian/README.source
@@ -0,0 +1,8 @@
+This package uses quilt to manage all modifications to the upstream
+source. Changes are stored in the source package as diffs in
+debian/patches and applied during the build. Please see:
+
+ /usr/share/doc/quilt/README.source
+
+for more information on how to apply the patches, modify patches, or
+remove a patch.
--- bittornado-0.3.18.orig/debian/bittornado-gui.install
+++ bittornado-0.3.18/debian/bittornado-gui.install
@@ -0,0 +1,2 @@
+usr/bin/*gui*
+usr/share/pixmaps
--- bittornado-0.3.18.orig/debian/bittorrent-multi-downloader.bittornado.sgml
+++ bittornado-0.3.18/debian/bittorrent-multi-downloader.bittornado.sgml
@@ -0,0 +1,146 @@
+
+
+ Cameron">
+ Dale">
+
+ April 17, 2005">
+
+ 1">
+ camrdale@gmail.com">
+
+ bittorrent-multi-downloader">
+
+
+ Debian">
+ GNU">
+ GPL">
+]>
+
+
+
+
+ &dhemail;
+
+
+ &dhfirstname;
+ &dhsurname;
+
+
+ 2006
+ &dhusername;
+
+ &dhdate;
+
+
+ &dhucpackage;
+
+ &dhsection;
+
+
+
+ &dhpackage;
+
+ download multiple files using a scatter-gather network
+
+
+
+ btlaunchmany directory
+
+
+ btlaunchmanycurses directory
+
+
+
+ DESCRIPTION
+
+ This manual page documents briefly the
+ &dhpackage; command.
+
+ This manual page was written for the &debian; distribution
+ because the original program does not have a manual page.
+
+ btlaunchmany and btlaunchmanycurses are
+ programs that ease the use of bittorrent in multiple-downloader situations.
+ The programs check the provided directory for torrent files. When they find any, they start
+ a separate downloader thread for each torrent file. These programs share a common set of options, shown below.
+ For more information on how to run them, and any program-specific options, see their individual man pages.
+
+
+
+ OPTIONS
+
+ These programs follow the usual &gnu; command line syntax,
+ with long options starting with two dashes (`--').
+
+ In addition to the options shown below, these programs share the same common options
+ with the normal downloaders, which are documented in
+ bittorrent-downloader1.
+
+
+
+
+
+
+ the number of seconds between re-scanning the provided directory (defaults to 60)
+
+
+
+ 1|2|3
+
+ how to name torrent downloads (1 = rename to torrent name, 2 = save
+ under name in torrent, 3 = save in directory under torrent name)
+ (defaults to 1 for btlaunchmany, 2 for btlaunchmanycurses)
+
+
+
+ 0|1
+
+ whether to display the full path or the torrent contents for each
+ torrent (defaults to 1 for btlaunchmany, 0 for btlaunchmanycurses)
+
+
+
+
+
+
+ SEE ALSO
+
+ bittorrent-downloader1,
+ btlaunchmany1,
+ btlaunchmanycurses1.
+
+
+
+ AUTHOR
+ This manual page was written by &dhusername; <&dhemail;> (based on the original man pages written by Micah Anderson <micah@debian.org>) for
+ the &debian; system (but may be used by others). Permission is
+ granted to copy, distribute and/or modify this document under
+ the terms of the &gnu; General Public License, Version 2 or any
+ later version published by the Free Software Foundation.
+
+
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in /usr/share/common-licenses/GPL.
+
+
+
+
+
--- bittornado-0.3.18.orig/debian/changelog
+++ bittornado-0.3.18/debian/changelog
@@ -0,0 +1,428 @@
+bittornado (0.3.18-8) unstable; urgency=low
+
+ * Removed btdownloadheadless curses dependency so it can run
+ in a terminal (Closes: #327505)
+
+ -- Cameron Dale Tue, 11 Nov 2008 11:24:32 -0800
+
+bittornado (0.3.18-7) unstable; urgency=medium
+
+ * Refresh all the quilt patches (Closes: #485320)
+ * Update standards version to 3.8.0
+ - Add a README.source file pointing to the quilt documentation
+ * medium urgency to get it into lenny
+
+ -- Cameron Dale Sat, 19 Jul 2008 16:08:44 -0700
+
+bittornado (0.3.18-6) unstable; urgency=low
+
+ * Migrate from the old 'from wxPython.wx import *' to the
+ new 'import wx' namespace (LP: #206898)
+ (quilt patch 21_remove_deprecated_wxPython_usage.dpatch)
+ - add python-wxgtk2.8 as an alternative depends
+ * Fix an issue with the makemetafile error-handling (Closes: #476652)
+ (quilt patch 22_fix_makemetafile_error-handling.dpatch)
+ - thanks to Mario Lang for the fix.
+ * Remove the Windows-only UPnP options (Closes: #315026)
+ (quilt patch 23_remove_UPnP_options.dpatch)
+ * Clarify the use of the 'ip' parameter (Closes: #323784)
+ (quilt patch 24_clarify_ip_parameter.dpatch)
+ * Fix a bug in the error handling of btdownloadcurses/headless
+ (quilt patch 25_errors_in_error_handling.dpatch)
+ * Fix some minor packaging issues
+ * Switch to quilt for patches
+ * Fix some lintian warnings
+ - upgrade Standards-Version to 3.7.3 (no changes)
+ - use non-XS VCS headers
+ - move Homepage field to source package headers
+ - remove the unused binary-arch target
+
+ -- Cameron Dale Sat, 03 May 2008 19:46:19 -0700
+
+bittornado (0.3.18-5) unstable; urgency=low
+
+ [ Cameron Dale ]
+ * Switch Cameron to Maintainer, Micah to Uploaders
+ * Added Dm-Upload-Allowed for Debian Maintainer uploads
+ * Remove the remaining 04_btlaunchmany.py_transpose_transfer_totals
+ which should have gone when we removed
+ 03_btlaunchmanycurses.py_transpose_transfer_totals
+ [ Micah Anderson ]
+ * Update debian/NEWS to fix invalid sytax as reported by lintian check
+ syntax-error-in-debian-news-file
+
+ -- Cameron Dale Sat, 27 Oct 2007 15:46:53 -0700
+
+bittornado (0.3.18-4) unstable; urgency=low
+
+ * 18_fix_launchmany_encrypter.dpatch: fix a bug in the Encrypter
+ that dropped all launchmany handled connections (Closes: #422098)
+ * Fixed absolute path and other spec problems in .desktop file
+ (thanks to Ubuntu)
+ * Fixed other .desktop issues from new lintian checks
+ * Switch bittornado-gui dependence from Source-Version to source:Version
+ * Fix the menu entry to comply with the new menu transition
+ * 19_fix_tracker_return_all.dpatch: fix a tracker bug that caused
+ all torrents' peers to be returned for every request
+ * 20_tracker_cache_minor_fix.dpatch: a minor fix for the new cache
+ structure used by the tracker
+
+ -- Cameron Dale Mon, 17 Sep 2007 13:56:24 -0800
+
+bittornado (0.3.18-3) unstable; urgency=low
+
+ * Added a recommends on python-crypto for encrypted communications
+ * Add XS-Vcs-Browser to debian/control
+
+ -- Cameron Dale Fri, 11 May 2007 13:56:24 -0800
+
+bittornado (0.3.18-2) unstable; urgency=low
+
+ * Fixed some man page typos (Closes: #409584, #409585)
+ * Updated man pages for encryption
+ * Removed 14_enable_gui_commandline.dpatch (Closes: #413749)
+ * Removed the obsolete icons directory
+
+ -- Cameron Dale Sun, 22 Apr 2007 13:56:24 -0800
+
+bittornado (0.3.18-1) unstable; urgency=low
+
+ * New upstream release
+ . removed unnecessary 03_btlaunchmanycurses.py_transpose_transfer_totals
+ * Fixed a small syntax error (17_fix_NatCheck_bufferlen_error)
+
+ -- Cameron Dale Thu, 4 Jan 2007 13:56:24 -0800
+
+bittornado (0.3.17-1) unstable; urgency=low
+
+ * New upstream release (Closes: #395326)
+ . Fixes BitTorrent engine error (Closes: #385721)
+ . Fixes problem with super-seeding
+ * Fix the ipv6 in SocketHandler.py (Closes: #305388)
+ (thanks to Tobias Diedrich for this fix)
+
+ -- Cameron Dale Fri, 27 Oct 2006 15:46:48 -0700
+
+bittornado (0.3.15-4) unstable; urgency=high
+
+ * Removed the generated pyc files (Closes: #394180)
+
+ -- Cameron Dale Fri, 20 Oct 2006 12:31:54 -0800
+
+bittornado (0.3.15-3) unstable; urgency=low
+
+ * Enabled the gui commandline arguments for btdownloadgui (Closes: #378490)
+ * Switch to version-independent build-dependencies for python
+ * Drop dh_python and improve dh_pysupport implementation
+ * Start providing python-bittornado as bittornado module
+ * Make btlaunchmany send stopped event on exit (Closes: #387658)
+ * Fix unicode support in btmaketorrentgui (Closes: #330955)
+ * Fix btmaketorrentgui and btcompletedirgui dependence on
+ python-wxgtk2.4 (Closes: #391792)
+ * Thanks to Jérémy Bobbio for the previous 2 fixes
+ * Update Build-Depends python-support version to avoid #391689
+
+ -- Cameron Dale Fri, 06 Oct 2006 12:31:54 -0800
+
+bittornado (0.3.15-2) unstable; urgency=low
+
+ * Python transition update
+ . Update build debhelper Depends for python transition
+ . Add debian/pycompat to instruct dh_python to follow new policy
+ . Add XB-Python-Version: ${python:Versions} to debian/control
+ . Add Build-Depends: python-support (>= 0.3)
+ . Add dh_pysupport to debian/rules
+ * Moved debhelper and dpatch dependency out of Build-Depends-Indep
+ to comply with Policy Section 7.6
+ * Updated policy to 3.7.2 (no changes)
+
+ -- Micah Anderson Sat, 24 Jun 2006 11:14:47 -0400
+
+bittornado (0.3.15-1) unstable; urgency=low
+
+ [ Cameron Dale ]
+ * New upstream release
+ * Added Cameron Dale as Co-Maintainer
+ * Changed bittornado-gui dependency to match bittornado (Closes: #358912)
+ * Updated patches to work with new upstream
+ * Removed unnecessary modifications from Tim Tucker patch
+ * Updated watch file to work again
+ * New patch 12_make_guis_use_2.4, makes 2 GUIs choose wxPython 2.4
+ * New patch 13_fix_btcompletedirgui_bug
+ * Switch to docbook-to-man for man pages
+ * Updated all man pages
+
+ -- Micah Anderson Mon, 17 Apr 2006 12:31:54 -0800
+
+bittornado (0.3.13-2) unstable; urgency=low
+
+ [ Cameron Dale ]
+ * Add 08_btdownloadcurses_indent patch back in
+ * Update to standards version 3.6.2
+ * Added conflict with libfreetype6 (=2.1.7-2.4) (Closes: #354184)
+
+ [ Micah Anderson ]
+ * Updated bug reporting address (Closes: #348155)
+
+ [ Cameron Dale ]
+ * Update btdowloadcurses.py to be identical to orig.tar.gz one
+ * Updated bttrack.bittornado manpage (Closes: #335679)
+
+ -- Micah Anderson Tue, 28 Feb 2006 11:49:27 -0500
+
+bittornado (0.3.13-1) unstable; urgency=low
+
+ * New upstream release
+ * Applied fixes from TimTucker
+ * Changed Dependency from libwxgtk2.4-1-python to python-wxgtk2.6
+ (Closes: #326701)
+ * Updated man pages to fix parsing problems
+ * Applied fix for selfcheck hashes to be sorted
+
+ -- Micah Anderson Wed, 27 Jul 2005 23:50:53 -0500
+
+bittornado (0.3.12-1) unstable; urgency=low
+
+ * Updated manpages to have more infomrative short descriptions, better
+ command-line summaries, more proper man-page formatting and some
+ spelling errors were fixed (Closes: #310345, Closes: #310540).
+ * Updated to latest upstream release (Closes: #305071).
+ * Changed bug report address to be the Debian BTS
+
+ -- Micah Anderson Sat, 9 Apr 2005 23:36:40 -0500
+
+bittornado (0.3.11-1) unstable; urgency=medium
+
+ * New upstream release, should also fix problems on
+ 64-bit machines (Closes: #303813)
+
+ -- Micah Anderson Thu, 7 Apr 2005 09:24:53 -0500
+
+bittornado (0.3.10-5) unstable; urgency=medium
+
+ * Disabled psyco support from being enabled automatically, in
+ some situations it increases memory usage and can cause
+ reliability problems.
+
+ -- Micah Anderson Wed, 6 Apr 2005 22:14:56 -0500
+
+bittornado (0.3.10-4) unstable; urgency=medium
+
+ * Updated Build-Depends-Indep to be specific for python 2.4
+ * Updated btdownloadcurses.bittornado.1, bttrack.bittornado.1,
+ bittorrent-downloader.bittornado.1, btcompletedir.bittornado.1
+ btcompletedirgui.bittornado.1, btdownloadgui.bittornado.1,
+ btdownloadheadless.bittornado.1, btlaunchmany.bittornado.1,
+ btlaunchmanycurses.bittornado.1, btmakemetafile.bittornado.1
+ patched README.txt to list the correct ports (Closes: #301456)
+ * Added patch to enable PSYCO support if package is installed
+ updated debian/control to Suggest on python-psyco, not Depending
+ because psyco is i386 only (Closes: #303360)
+ * Actually enable bttrack connection AttributeError fix patch
+
+ -- Micah Anderson Wed, 9 Mar 2005 18:04:11 -0600
+
+bittornado (0.3.10-3) unstable; urgency=low
+
+ * Changed bittornado.desktop to cause the client to no longer show up
+ in the Other menu in GNOME (Closes: #298635)
+ * Updated bttrack manpage to have proper arguments and remove duplicates
+ * Changed maintainer address in debian/control
+
+ -- Micah Anderson Sun, 13 Feb 2005 21:39:34 -0600
+
+bittornado (0.3.10-2) unstable; urgency=low
+
+ * Changed debian/control back for bittornado-gui so it is building
+ against libwxgtk2.4-python instead of libwxgtk2.5.3-python as this
+ will not enter testing
+ * Added patch from http://forums.degreez.net/viewtopic.php?t=3848 to
+ fix bttrack connection AttributeError (Closes: #294803)
+ * Updated btlaunchmanycurses manpage to indicate that --saveas can use a
+ directory (Closes: #293286)
+ -- Micah Anderson Fri, 21 Jan 2005 12:09:54 -0600
+
+bittornado (0.3.10-1) unstable; urgency=low
+
+ * New upstream release (Closes: #290765, #281841, #288345)
+ * Created debian/watch file
+ * Updated debian/control for bittornado-gui to build against
+ libwxgtk2.5.3-python
+ * Updated debian/bittornado.desktop to have the right categories and
+ installed into the proper directory, added dh_desktop to debian/rules
+ * Changed debian/control to fit new lintian requirements
+
+ -- Micah Anderson Fri, 21 Jan 2005 10:05:47 -0600
+
+bittornado (0.3.9b-1) unstable; urgency=low
+
+ * Upgraded to latest upstream version (Closes: #286554)
+ * Fixed setup.py executable FTBS problem (Closes: #286060)
+ * Removed predictable port and TOS port patches (Closes: #285804)
+
+ -- Micah Anderson Fri, 31 Dec 2004 16:38:42 -0600
+
+bittornado (0.3.8-1) unstable; urgency=low
+
+ * Upgraded to latest upstream version
+ * Added two patches to enhance the ability to filter/traffic, one
+ patch from Greg Smith which sets the port
+ for outbound connections so they come from a predictable port.
+ same port is used for outgoing as is used for incoming. From
+ http://krypto.org/bt/bittornado-SocketHandler-sourceport.diff
+ The other copies code from bittorrent which sets IP_TOS - but fix
+ the bitfield because bittorrent accidentially uses 0x20 which is
+ the reverse of the correct 0x8 (IPTOS_THROUGHPUT). Thanks to
+ dean gaudet for these. (Closes: #284413)
+ * Added bittornado icon, created by Stefani Banerian, added menu
+ entry referencing this icon and modified desktop entry to use icon
+
+ -- Micah Anderson Thu, 9 Dec 2004 22:42:03 -0600
+
+bittornado (0.3.7-5) unstable; urgency=low
+
+ * Changed Recommends on bittornado-gui to Suggests because, as Mr.
+ Thaddeus H. Black points out, a Recommends means that if someone
+ tries to dselect bittornado, then dselect will automatically pull
+ in bittornado-gui and several other packages a non-X system does
+ not want.
+ * Fixed typos in control (Closes: #283277)
+ * Added patch to increase significant digit in btdownloadcurses,
+ thanks , (Closes: #250904)
+ * Re-introduced patch to transpose up and down rates as they are broken
+ had to make an additional patch to btlaunchmany (Closes: #272690)
+ * Updated man pages for btlaunchmany, btlaunchmanycurses,
+ btdownloadheadless, btdownloadcurses and btdownloadgui and
+ btmakemetafile (Closes: #280241)
+
+ -- Micah Anderson Thu, 21 Oct 2004 15:44:04 -0500
+
+bittornado (0.3.7-4) unstable; urgency=low
+
+ * Created new man page for bttrack and btmakemetafile
+ * Added patch to fix bttrack --allowed_dir bug. (Closes: #271489)
+ * Removed improper alternatives connections for btcompletedirgui
+ and btdownloadgui in the bittornado package as these are handled
+ in bittornado-gui (Closes: #272445)
+ * Removed erroneous %s in Exec line of bittornado.desktop. (Closes: #271847)
+
+ -- micah Sun, 26 Sep 2004 23:27:48 -0500
+
+bittornado (0.3.7-3) unstable; urgency=low
+
+ * Fixed postrm to work with dash (Closes: #267700)
+ * Removed patch to transpose transfer total order as this was causing
+ totals to be misrepresented in btlaunchmany and btlaunchmanycurses and
+ possibly others. Forwarding that request to upstream. (Closes: #262862)
+ * Removed patch to fix icon location and stopped installing icons and gifs in
+ the icon directory, this version of bittornado generates the icons
+ in users .BitTornado directory so that they can be user customizable.
+ * Removed bt_MakeCreateIcons.py from source distro at the recommendation of
+ upstream.
+ * Removed bt-t-make.py as upstream indicates that it is unfinished and
+ not very usable.
+ * Changed package to use the alternatives system so that it can be installed
+ alongside bittorrent (Closes: #254489, #255409)
+ * Made btcompletedirgui, btdownloadgui, and btmaketorrentgui man pages
+ (Closes: #250313, #269764)
+
+ -- Micah Anderson Fri, 3 Sep 2004 16:50:19 -0500
+
+bittornado (0.3.7-2) unstable; urgency=low
+
+ * Upgraded depends for bittornado-gui (Closes: #264935)
+ * Created new man pages for btdownloadcurses, btdownloadheadless,
+ btlaunchmany, btlaunchmanycurses (Closes: #264425)
+
+ -- Micah Anderson Wed, 11 Aug 2004 10:49:32 -0500
+
+bittornado (0.3.7-1) unstable; urgency=low
+
+ * Upgraded to the latest upstream release (Closes: #259673)
+ * Added versioned depends on bittornado (>= 0.2.0-7) for
+ bittornado-gui as people with older versions installed would get
+ errors (Closes: #258644)
+ * Removed the patches which displayed an error if you did not have
+ the proper libwxgtk package installed, no longer necessary.
+ * Removed patches which fixed a number of upstream bugs, as these
+ have been fixed in the upstream version now.
+ * Transposed the order in which transfer totals are presented in
+ btlaunchmanycurses so that they correspond with the ordering used for
+ data rates, making it easier to scan as the column headings are no
+ longer misleading (Closes: #259672), thanks Euan MacGregor
+
+ -- Micah Anderson Wed, 21 Jul 2004 20:25:48 -0500
+
+bittornado (0.2.0-7) unstable; urgency=low
+
+ * Created NEWS file to note the package split
+ * Removed debconf note (Closes: #257402, #257666, #257369), thanks Tollef
+ * Changed Suggests: bittornado-gui to Recommends:
+ * Fixed invalid syntax in wxPython error message which kept btdownloadgui
+ from starting
+ * Removed duplicate manpage from bittornado-gui (Closes: #257334, #257959, #257960)
+
+ -- Micah Anderson Tue, 6 Jul 2004 17:12:37 -0500
+
+bittornado (0.2.0-6) unstable; urgency=low
+
+ * Split package into GUI/non-GUI componants, all GUI componants will
+ be in the bittornado-gui package (Closes: #251977, #254657)
+ * Added debconf warning for those who already have the package installed
+ that they need to install the bittornado-gui package to get those
+ componants, only appears for those upgrading from prior version
+
+ -- Micah Anderson Wed, 16 Jun 2004 17:34:15 -0500
+
+bittornado (0.2.0-5) unstable; urgency=low
+
+ * Fixed importing of module in btmaketorrentgui (Closes: #254266)
+
+ -- Micah Anderson Tue, 15 Jun 2004 19:51:23 -0500
+
+bittornado (0.2.0-4) unstable; urgency=low
+
+ * Updated the copyright file to have a link to the upstream source
+ and to properly credit the upstream author
+ * Fixed location of bittornado.desktop menu file so it appears in the
+ proper place now (Closes: #253752)
+ * Removed unneeded build-stamp target from the rules file
+ * Added patches to GUI componants to warn if libwxgtk2.4-python is not
+ installed until package split into X and -noX componants is completed
+
+ -- Micah Anderson Mon, 14 Jun 2004 11:50:03 -0500
+
+bittornado (0.2.0-3) unstable; urgency=low
+
+ * Changed rules to be more python version independent
+ * Changed nowxmsg so that it was up to date
+ * Fixed library location of btcompletedir for
+ btcompletedirgui (Closes: #251337)
+ * Fixed library location of btcompletedir for
+ btmaketorrentgui (Closes: #251338)
+
+ -- Micah Anderson Mon, 7 Jun 2004 20:14:32 -0300
+
+bittornado (0.2.0-2) unstable; urgency=low
+
+ * Fixed dependencies on specific versions of python
+ and cleaned up install to not duplicate debhelper work (Closes: #249517)
+
+ -- Micah Anderson Fri, 21 May 2004 22:06:20 -0500
+
+bittornado (0.2.0-1) unstable; urgency=low
+
+ * Initial Release.
+ * Changed btdownloadgui.py to use icons in FHS standard directory
+ (/usr/share/icons/bittornado)
+ * Removed bttest.py and btdownloadlibrary.py from distribution because
+ they are broken and according to upstream, "btdownloadlibrary.py and
+ bttest.py are old and will probably stay broken"
+ * Modified btmaketorrentgui.py and btcompletedir.py so that they pulled
+ btmakemetafile from BitTornado.btmakemetafile instead of relying on
+ it in /usr/bin, bug filed with upstream, to be fixed in next version
+ * Fixed btcompletedir.py to exit properly, upstream notified
+ * Created man page for btcompletedir and btcopyannounce
+
+ -- Micah Anderson Sat, 8 May 2004 18:03:58 -0500
+
--- bittornado-0.3.18.orig/debian/bittornado.xpm
+++ bittornado-0.3.18/debian/bittornado.xpm
@@ -0,0 +1,205 @@
+/* XPM */
+static char * bittornado_xpm[] = {
+"32 32 170 2",
+" c None",
+". c #8D8D8D",
+"+ c #131313",
+"@ c #000000",
+"# c #1E1E1E",
+"$ c #505050",
+"% c #1B1B1B",
+"& c #010101",
+"* c #2E2E2E",
+"= c #5D5D5D",
+"- c #6C6C6C",
+"; c #696969",
+"> c #6D6D6D",
+", c #787878",
+"' c #888888",
+") c #858585",
+"! c #404040",
+"~ c #373737",
+"{ c #474747",
+"] c #0A0A0A",
+"^ c #464646",
+"/ c #595959",
+"( c #4E4E4E",
+"_ c #626262",
+": c #737373",
+"< c #717171",
+"[ c #7F7F7F",
+"} c #8E8E8E",
+"| c #919191",
+"1 c #5C5C5C",
+"2 c #616161",
+"3 c #A1A1A1",
+"4 c #252525",
+"5 c #5E5E5E",
+"6 c #7C7C7C",
+"7 c #757575",
+"8 c #7A7A7A",
+"9 c #909090",
+"0 c #949494",
+"a c #232323",
+"b c #B1B1B1",
+"c c #BFBFBF",
+"d c #C7C7C7",
+"e c #C0C0C0",
+"f c #5A5A5A",
+"g c #383838",
+"h c #636363",
+"i c #818181",
+"j c #7B7B7B",
+"k c #7D7D7D",
+"l c #1D1D1D",
+"m c #171717",
+"n c #323232",
+"o c #2A2A2A",
+"p c #646464",
+"q c #4D4D4D",
+"r c #9A9A9A",
+"s c #8B8B8B",
+"t c #606060",
+"u c #5B5B5B",
+"v c #242424",
+"w c #222222",
+"x c #111111",
+"y c #B3B3B3",
+"z c #4C4C4C",
+"A c #707070",
+"B c #575757",
+"C c #8A8A8A",
+"D c #898989",
+"E c #6E6E6E",
+"F c #484848",
+"G c #434343",
+"H c #141414",
+"I c #555555",
+"J c #A3A3A3",
+"K c #CECECE",
+"L c #CACACA",
+"M c #C2C2C2",
+"N c #B0B0B0",
+"O c #A0A0A0",
+"P c #979797",
+"Q c #8C8C8C",
+"R c #5F5F5F",
+"S c #444444",
+"T c #121212",
+"U c #303030",
+"V c #2D2D2D",
+"W c #333333",
+"X c #969696",
+"Y c #C4C4C4",
+"Z c #B4B4B4",
+"` c #A4A4A4",
+" . c #9B9B9B",
+".. c #929292",
+"+. c #727272",
+"@. c #545454",
+"#. c #202020",
+"$. c #B2B2B2",
+"%. c #393939",
+"&. c #666666",
+"*. c #676767",
+"=. c #6A6A6A",
+"-. c #9C9C9C",
+";. c #ABABAB",
+">. c #A8A8A8",
+",. c #A2A2A2",
+"'. c #424242",
+"). c #3F3F3F",
+"!. c #3E3E3E",
+"~. c #313131",
+"{. c #292929",
+"]. c #0F0F0F",
+"^. c #212121",
+"/. c #A7A7A7",
+"(. c #AAAAAA",
+"_. c #808080",
+":. c #4F4F4F",
+"<. c #272727",
+"[. c #363636",
+"}. c #B7B7B7",
+"|. c #B5B5B5",
+"1. c #848484",
+"2. c #6B6B6B",
+"3. c #525252",
+"4. c #080808",
+"5. c #191919",
+"6. c #3A3A3A",
+"7. c #1F1F1F",
+"8. c #656565",
+"9. c #A5A5A5",
+"0. c #C9C9C9",
+"a. c #CBCBCB",
+"b. c #747474",
+"c. c #3C3C3C",
+"d. c #414141",
+"e. c #2B2B2B",
+"f. c #454545",
+"g. c #C3C3C3",
+"h. c #C6C6C6",
+"i. c #ADADAD",
+"j. c #A9A9A9",
+"k. c #262626",
+"l. c #767676",
+"m. c #ACACAC",
+"n. c #878787",
+"o. c #4A4A4A",
+"p. c #353535",
+"q. c #0D0D0D",
+"r. c #686868",
+"s. c #9D9D9D",
+"t. c #868686",
+"u. c #070707",
+"v. c #797979",
+"w. c #B9B9B9",
+"x. c #6F6F6F",
+"y. c #777777",
+"z. c #0E0E0E",
+"A. c #151515",
+"B. c #838383",
+"C. c #9E9E9E",
+"D. c #565656",
+"E. c #494949",
+"F. c #585858",
+"G. c #8F8F8F",
+"H. c #2C2C2C",
+"I. c #1C1C1C",
+"J. c #060606",
+"K. c #515151",
+"L. c #A6A6A6",
+"M. c #BDBDBD",
+" . + @ @ @ @ @ # ",
+" $ % & * = - ; > , ' ) ! ",
+" ~ { ] ^ / ( ( _ : < : [ } | : ",
+" 1 2 3 < 1 4 5 6 , 7 8 ' 9 0 , = ",
+" a 7 b c d e f g h } ' i j k _ l m n o p ",
+" q r s f t > u @ @ @ @ v 5 - 6 - h ; - @ @ w ",
+" < @ x y 7 @ @ z : : A { B C . 9 0 9 D E F G x ",
+" 5 H I J K L M N O P 9 } Q Q 9 } [ > R f { S ",
+" T U V v W X Y K L M Z ` .P ..| Q } C ) +.B ( @.W ",
+" F #.S ' $.# %.I &.*.=.-.;.>.,.-.| _ { ^ S '.).!.!.@. ",
+" ~.{.].# ^.x ( 7 5 > /.(.` .8 _.:.!.s ",
+" <.@ [. @ f p < }.M |.1.u 2.p @ @ @ 3.+ 4.5. ",
+" 6.7.l 8.9.M 0.a.M N b.c.@ @ @ @ d. &.e. ",
+" 1 ].f.= e.: Z g.h.L M |.i.>.j.X 8./ H ",
+" q B -. 3.E R 1 < k.b.G l.i.m.i.n.5. o.p. ",
+" [ - ^ k.h q.[ ] - r._./.s.1.t.- 2.B l ]. ",
+" u.v.4.z / D Y w.x.:.& [.8 1.k , S !.!. ",
+" q <.%.:.y.b h.| ; z.q. ",
+" !.A.!.C ^ k.' e t.I -.|., ",
+" 4.~.B.: &.t t C.9.6 / { q ",
+" D. - E.v F.D B.=.a i. ",
+" *.1 p.G. ",
+" # D.1.o.u t #. ",
+" z.I ( } >.- _ 5 2. ",
+"! ` *.&.^ f. Y ",
+"H. h , /.b.). I.J.U ",
+"[. t.Q : >.f. z. ",
+" A 4. I z. ",
+" p. a G e. ",
+" ^ < K.u L. ",
+" '. A M. ",
+" X u . "};
--- bittornado-0.3.18.orig/debian/bittornado-gui.prerm
+++ bittornado-0.3.18/debian/bittornado-gui.prerm
@@ -0,0 +1,48 @@
+#! /bin/sh
+# prerm script for #PACKAGE#
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `remove'
+# * `upgrade'
+# * `failed-upgrade'
+# * `remove' `in-favour'
+# * `deconfigure' `in-favour'
+# `removing'
+#
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+PACKAGE="bittornado"
+
+dpkg --listfiles $PACKAGE |
+ awk '$0~/\.py$/ {print $0"c\n" $0"o"}' |
+ xargs rm -f >&2
+
+
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ for i in btcompletedirgui btdownloadgui ; do
+ update-alternatives --remove $i /usr/bin/$i.bittornado || exit 1
+ done
+ ;;
+ failed-upgrade)
+ ;;
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- bittornado-0.3.18.orig/debian/btdownloadheadless.bittornado.sgml
+++ bittornado-0.3.18/debian/btdownloadheadless.bittornado.sgml
@@ -0,0 +1,116 @@
+
+ Cameron">
+ Dale">
+
+ Apr 12, 2006">
+
+ 1">
+ camrdale@gmail.com">
+
+ btdownloadheadless.bittornado">
+
+
+ Debian">
+ GNU">
+ GPL">
+]>
+
+
+
+
+ &dhemail;
+
+
+ &dhfirstname;
+ &dhsurname;
+
+
+ 2005
+ &dhusername;
+
+ &dhdate;
+
+
+ &dhucpackage;
+
+ &dhsection;
+
+
+ &dhpackage;
+
+ headless bittorrent download interface
+
+
+
+ &dhpackage; URL
+
+
+ &dhpackage; filename
+
+
+
+ DESCRIPTION
+
+ This manual page documents briefly the
+ &dhpackage; command.
+
+ This manual page was written for the &debian; distribution
+ because the original program does not have a manual page.
+
+ &dhpackage; downloads torrents in the same manner as btdownloadcurses or
+ btdownloadgui, but does not require a terminal to stay alive.
+
+ &dhpackage; will open a provided torrent URL or
+ file and download it until complete. It will then seed (upload) the torrent until it is stopped.
+
+
+
+ OPTIONS
+
+ This program uses the same common options as the other bittorrent downloaders, which are documented in
+ bittorrent-downloader1.
+
+
+
+
+ SEE ALSO
+
+ bittorrent-downloader1,
+ btdownloadcurses1.
+ btdownloadgui1.
+
+
+
+ AUTHOR
+ This manual page was written by &dhusername; <&dhemail;> (based on the original man pages written by Micah Anderson <micah@debian.org>) for
+ the &debian; system (but may be used by others). Permission is
+ granted to copy, distribute and/or modify this document under
+ the terms of the &gnu; General Public License, Version 2 or any
+ later version published by the Free Software Foundation.
+
+
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in /usr/share/common-licenses/GPL.
+
+
+
+
+
--- bittornado-0.3.18.orig/debian/bittornado.install
+++ bittornado-0.3.18/debian/bittornado.install
@@ -0,0 +1,13 @@
+usr/bin/btcompletedir.bittornado
+usr/bin/btcopyannounce
+usr/bin/btdownloadcurses.bittornado
+usr/bin/btdownloadheadless.bittornado
+usr/bin/btlaunchmany.bittornado
+usr/bin/btlaunchmanycurses.bittornado
+usr/bin/btmakemetafile.bittornado
+usr/bin/btreannounce.bittornado
+usr/bin/btrename.bittornado
+usr/bin/btsethttpseeds
+usr/bin/btshowmetainfo.bittornado
+usr/bin/bttrack.bittornado
+usr/share/python-support/bittornado
--- bittornado-0.3.18.orig/debian/bittornado.prerm
+++ bittornado-0.3.18/debian/bittornado.prerm
@@ -0,0 +1,49 @@
+#! /bin/sh
+# prerm script for #PACKAGE#
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `remove'
+# * `upgrade'
+# * `failed-upgrade'
+# * `remove' `in-favour'
+# * `deconfigure' `in-favour'
+# `removing'
+#
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+PACKAGE="bittornado"
+
+dpkg --listfiles $PACKAGE |
+ awk '$0~/\.py$/ {print $0"c\n" $0"o"}' |
+ xargs rm -f >&2
+
+
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ for i in btcompletedir btcompletedirgui btdownloadcurses btdownloadgui btdownloadheadless btlaunchmany btlaunchmanycurses btmakemetafile btreannounce btrename btshowmetainfo bttrack ; do
+ update-alternatives --remove $i /usr/bin/$i.bittornado || exit 1
+ done
+
+ ;;
+ failed-upgrade)
+ ;;
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- bittornado-0.3.18.orig/debian/btreannounce.bittornado.sgml
+++ bittornado-0.3.18/debian/btreannounce.bittornado.sgml
@@ -0,0 +1,162 @@
+
+ Cameron">
+ Dale">
+
+ April 17, 2005">
+
+ 1">
+ camrdale@gmail.com">
+
+ btreannounce.bittornado">
+
+
+ Debian">
+ GNU">
+ GPL">
+]>
+
+
+
+
+ &dhemail;
+
+
+ &dhfirstname;
+ &dhsurname;
+
+
+ 2006
+ &dhusername;
+
+ &dhdate;
+
+
+ &dhucpackage;
+
+ &dhsection;
+
+
+
+ &dhpackage;
+
+ change the announce address of a torrent file
+
+
+
+ &dhpackage;
+
+ trackerURL
+ file
+ file
+
+
+
+
+ DESCRIPTION
+
+ This manual page documents briefly the
+ &dhpackage; command.
+
+ This manual page was written for the &debian; distribution
+ because the original program does not have a manual page.
+
+ &dhpackage; is a program which will change the announce
+ address of a existing torrent file. The already existing torrent specified by
+ the file argument will be modified to use the new
+ announce url given by the trackerURL argument.
+
+
+
+
+ OPTIONS
+
+ These programs follow the usual &gnu; command line syntax,
+ with long options starting with two dashes (`--'). A summary of
+ options is included below.
+
+
+
+
+
+ a list of announce URLs. This is an optional list
+ of redundant/backup tracker URLs. The format of announceURLlist is as follows:
+
+ URL[,URL ...][|URL[,URL ...] ...]
+
+ where the URLs separated by commas are tried randomly, then the
+ groups of URLs separated by pipes are tried in sequential order.
+ If this option is omitted, it is assumed you don't want an announce_list field in the metafile.
+ If announce_list is given, clients which support it
+ will ignore the trackerURL value. (defaults to '')
+
+
+
+
+
+ EXAMPLES
+
+ These examples show how to use the --announce_list option in a few scenarios.
+
+ Try the three trackers (1-3) in sequential order:
+
+
+ &dhpackage; trackerURL file --announce_list http://track1.com|http://track2.com|http://track3.com
+
+
+ Try the three trackers (1-3) in a randomly selected order:
+
+
+ &dhpackage; trackerURL file --announce_list http://track1.com,http://track2.com,http://track3.com
+
+
+ Try the main tracker (1) first, then try the two backups (2 and 3) randomly:
+
+
+ &dhpackage; trackerURL file --announce_list http://track1.com|http://track2.com,http://track3.com
+
+
+
+
+ SEE ALSO
+
+ btcopyannounce1,
+ btrename1,
+ btsethttpseeds1,
+ btshowmetainfo1,
+ bittorrent-downloader1.
+
+
+
+ AUTHOR
+ This manual page was written by &dhusername; <&dhemail;> (based on the original man pages written by Micah Anderson <micah@debian.org>) for
+ the &debian; system (but may be used by others). Permission is
+ granted to copy, distribute and/or modify this document under
+ the terms of the &gnu; General Public License, Version 2 or any
+ later version published by the Free Software Foundation.
+
+
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in /usr/share/common-licenses/GPL.
+
+
+
+
+
--- bittornado-0.3.18.orig/debian/compat
+++ bittornado-0.3.18/debian/compat
@@ -0,0 +1 @@
+5
--- bittornado-0.3.18.orig/debian/btcopyannounce.sgml
+++ bittornado-0.3.18/debian/btcopyannounce.sgml
@@ -0,0 +1,110 @@
+
+ Cameron">
+ Dale">
+
+ April 17, 2005">
+
+ 1">
+ camrdale@gmail.com">
+
+ btcopyannounce">
+
+
+ Debian">
+ GNU">
+ GPL">
+]>
+
+
+
+
+ &dhemail;
+
+
+ &dhfirstname;
+ &dhsurname;
+
+
+ 2006
+ &dhusername;
+
+ &dhdate;
+
+
+ &dhucpackage;
+
+ &dhsection;
+
+
+
+ &dhpackage;
+
+ copy torrent announce information to other torrents
+
+
+
+ &dhpackage;
+
+ source.torrent
+ destination1.torrent
+ destination2.torrent
+
+
+
+ DESCRIPTION
+
+ This manual page documents briefly the
+ &dhpackage; command.
+
+ This manual page was written for the &debian; distribution
+ because the original program does not have a manual page.
+
+ &dhpackage; copies the "announce" information from
+ the source torrent to all specified destination torrents.
+
+
+
+
+ SEE ALSO
+
+ btreannounce1,
+ btrename1,
+ btsethttpseeds1,
+ btshowmetainfo1,
+ bittorrent-downloader1.
+
+
+
+ AUTHOR
+ This manual page was written by &dhusername; <&dhemail;> (based on the original man pages written by Micah Anderson <micah@debian.org>) for
+ the &debian; system (but may be used by others). Permission is
+ granted to copy, distribute and/or modify this document under
+ the terms of the &gnu; General Public License, Version 2 or any
+ later version published by the Free Software Foundation.
+
+
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in /usr/share/common-licenses/GPL.
+
+
+
+
+
--- bittornado-0.3.18.orig/debian/btlaunchmanycurses.bittornado.sgml
+++ bittornado-0.3.18/debian/btlaunchmanycurses.bittornado.sgml
@@ -0,0 +1,115 @@
+
+ Cameron">
+ Dale">
+
+ April 17, 2005">
+
+ 1">
+ camrdale@gmail.com">
+
+ btlaunchmanycurses.bittornado">
+
+
+ Debian">
+ GNU">
+ GPL">
+]>
+
+
+
+
+ &dhemail;
+
+
+ &dhfirstname;
+ &dhsurname;
+
+
+ 2006
+ &dhusername;
+
+ &dhdate;
+
+
+ &dhucpackage;
+
+ &dhsection;
+
+
+
+ &dhpackage;
+
+ launch multiple torrent downloads, using a curses interface
+
+
+
+ &dhpackage; directory
+
+
+
+ DESCRIPTION
+
+ This manual page documents briefly the
+ &dhpackage; command.
+
+ This manual page was written for the &debian; distribution
+ because the original program does not have a manual page.
+
+ &dhpackage; is a curses-based program that eases the use of managing multiple torrent downloads.
+ The program checks the provided directory for torrent
+ files. When it finds any, it starts a separate downloader thread for each torrent file.
+
+
+
+ OPTIONS
+
+ This program uses the same common options as the other bittorrent downloaders, which are documented in
+ bittorrent-downloader1.
+
+ This program also uses some options specific to multiple-torrent downloaders, which are documented in
+ bittorrent-multi-downloader1.
+
+
+
+
+ SEE ALSO
+
+ bittorrent-downloader1,
+ bittorrent-multi-downloader1,
+ btlaunchmany1.
+
+
+
+ AUTHOR
+ This manual page was written by &dhusername; <&dhemail;> (based on the original man pages written by Micah Anderson <micah@debian.org>) for
+ the &debian; system (but may be used by others). Permission is
+ granted to copy, distribute and/or modify this document under
+ the terms of the &gnu; General Public License, Version 2 or any
+ later version published by the Free Software Foundation.
+
+
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in /usr/share/common-licenses/GPL.
+
+
+
+
+
--- bittornado-0.3.18.orig/debian/btshowmetainfo.bittornado.sgml
+++ bittornado-0.3.18/debian/btshowmetainfo.bittornado.sgml
@@ -0,0 +1,112 @@
+
+ Cameron">
+ Dale">
+
+ April 17, 2005">
+
+ 1">
+ camrdale@gmail.com">
+
+ btshowmetainfo.bittornado">
+
+
+ Debian">
+ GNU">
+ GPL">
+]>
+
+
+
+
+ &dhemail;
+
+
+ &dhfirstname;
+ &dhsurname;
+
+
+ 2006
+ &dhusername;
+
+ &dhdate;
+
+
+ &dhucpackage;
+
+ &dhsection;
+
+
+ &dhpackage;
+
+ display the meta-information in bittorrent files
+
+
+
+ &dhpackage;
+
+ file
+ file
+
+
+
+
+ DESCRIPTION
+
+ This manual page documents briefly the
+ &dhpackage; command.
+
+ This manual page was written for the &debian; distribution
+ because the original program does not have a manual page.
+
+ &dhpackage; is a program which will display the meta-information
+ stored in a bittorrent file.
+
+
+
+ SEE ALSO
+
+ bittorrent-downloader1,
+ btmakemetafile1,
+ btmaketorrentgui1,
+ btcompletedir1,
+ btcompletedirgui1,
+ btcopyannounce1,
+ btreannounce1,
+ btrename1,
+ btsethttpseeds1.
+
+
+
+ AUTHOR
+ This manual page was written by &dhusername; <&dhemail;> (based on the original man pages written by Micah Anderson <micah@debian.org>) for
+ the &debian; system (but may be used by others). Permission is
+ granted to copy, distribute and/or modify this document under
+ the terms of the &gnu; General Public License, Version 2 or any
+ later version published by the Free Software Foundation.
+
+
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in /usr/share/common-licenses/GPL.
+
+
+
+
+
--- bittornado-0.3.18.orig/debian/bittorrent-downloader.bittornado.sgml
+++ bittornado-0.3.18/debian/bittorrent-downloader.bittornado.sgml
@@ -0,0 +1,538 @@
+
+ Cameron">
+ Dale">
+
+ April 17, 2005">
+
+ 1">
+ camrdale@gmail.com">
+
+ bittorrent-downloader.bittornado">
+
+
+ Debian">
+ GNU">
+ GPL">
+]>
+
+
+
+
+ &dhemail;
+
+
+ &dhfirstname;
+ &dhsurname;
+
+
+ 2006
+ &dhusername;
+
+ &dhdate;
+
+
+ &dhucpackage;
+
+ &dhsection;
+
+
+
+ &dhpackage;
+
+ download files using a scatter-gather network
+
+
+
+ btdownloadheadless URL
+
+
+ btdownloadheadless filename
+
+
+ btdownloadcurses URL
+
+
+ btdownloadcurses filename
+
+
+ btdownloadgui URL
+
+
+ btdownloadgui filename
+
+
+ btlaunchmany directory
+
+
+ btlaunchmanycurses directory
+
+
+
+ DESCRIPTION
+
+ This manual page documents briefly the options available to the &dhpackage; commands.
+
+ This manual page was written for the &debian; distribution
+ because the original program does not have a manual page.
+
+ btdownloadheadless, btdownloadcurses, btdownloadgui,
+ btlaunchmany, and btlaunchmanycurses are all programs that allow a user to download files using
+ bittorrent, a peer to peer, scatter-gather network protocol. They all share a common set of options, shown below. For
+ more information on how to run them, and their program-specific options, see their individual man pages.
+
+
+
+ OPTIONS
+
+ These programs follow the usual &gnu; command line syntax,
+ with long options starting with two dashes (`--'). A summary of
+ options is included below.
+
+
+
+
+
+ the maximum number of uploads to allow at once (defaults to 7)
+
+
+
+
+
+ the number of seconds to pause between sending keepalives (defaults to 120.0)
+
+
+
+
+
+ the number of bytes to query for per request (defaults to 16384)
+
+
+
+
+
+ when limiting the upload rate, the number of bytes to send at a time (defaults to 1460)
+
+
+
+
+
+ the maximum number of requests to keep in a single pipe at once (defaults to 10)
+
+
+
+
+
+ the maximum length prefix encoding you'll accept over the wire.
+ Larger values will get the connection dropped. (defaults to 8388608)
+
+
+
+
+
+ the ip to report you have to the tracker (defaults to '')
+
+
+
+
+
+ the minimum port to listen on (defaults to 10000)
+
+
+
+
+
+ the maximum port to listen on (defaults to 60000)
+
+
+
+ 0|1
+
+ whether to choose randomly inside the port range (instead of counting up linearly from min to max) (defaults to 1)
+
+
+
+
+
+ the file the server response was stored in, as an alternative to --url. If this option is used,
+ no filename or URL should be present on the command line. (defaults to '')
+
+
+
+
+
+ the URL to get the torrent file from, as an alternative to --responsefile. If this option is used,
+ no filename or URL should be present on the command line. (defaults to '')
+
+
+
+ 0|1
+
+ whether to allow the client to accept encrypted connections. (defaults to 0)
+
+
+
+ 0|1
+
+ whether to only create or allow encrypted connections. (defaults to 0)
+
+
+
+ 0|1
+
+ whether to prevent all non-encrypted connection attempts; will result
+ in an effectively firewalled state on older trackers. (defaults to 0)
+
+
+
+ 0|1
+
+ whether to enable the file selector and fast resume function (defaults to 1)
+
+
+
+
+
+ the number of days after which you wish to expire old cache data (0 = disabled) (defaults to 10)
+
+
+
+ -1|0|1|2[,-1|0|1|2 ...]
+
+ a list of file priorities, separated by commas. There must be one per file. 0 = highest,
+ 1 = normal, 2 = lowest, -1 = download disabled. Order is based
+ on the file/torrent order as shown by btshowmetainfo. For example, to download only
+ the third of four files use: --priority -1,-1,2,-1 (defaults to '')
+
+
+
+
+
+ the local filename to save the file as, null indicates query user (defaults to '')
+
+
+
+
+
+ the number of seconds to wait between closing sockets which nothing has been received on
+ (defaults to 300.0)
+
+
+
+
+
+ the number of seconds to wait between checking if any connections have timed out (defaults to 60.0)
+
+
+
+
+
+ the maximum length slice to send to peers, larger requests are ignored (defaults to 131072)
+
+
+
+
+
+ the maximum number of seconds to use in guessing what the current rate estimate represents (defaults to 20.0)
+
+
+
+
+
+ a comma-separated list of ips and hostnames to bind to locally (defaults to '')
+
+
+
+ 0|1
+
+ whether to allow the client to connect to peers via IPv6 (defaults to 0)
+
+
+
+ 0|1
+
+ set if an IPv6 server socket won't also field IPv4 connections (defaults to 0)
+
+
+
+
+
+ the time equivalent in seconds of writing to kernel-level TCP buffer, for rate adjustment (defaults to
+ 5.0)
+
+
+
+
+
+ how much TCP ACK download overhead to add to upload rate calculations (0 = disabled)
+ (defaults to 0.029999999999999999)
+
+
+
+
+
+ the number of seconds between updates of displayed information (defaults to 0.5)
+
+
+
+
+
+ the number of seconds between requesting more peers (defaults to 300)
+
+
+
+
+
+ make tracker requests every --rerequest_interval until this number has been reached, then switch to the standard longer interval (defaults to 20)
+
+
+
+
+
+ the number of seconds to wait before assuming that an http connection
+ has timed out (defaults to 60)
+
+
+
+
+
+ the number of peers at which to stop initiating new connections (defaults to 40)
+
+
+
+ 0|1
+
+ whether to check hashes on disk (defaults to 1)
+
+
+
+
+
+ the maximum kB/s to upload at (0 = no limit, -1 = automatic) (defaults to 0)
+
+
+
+
+
+ the maximum kB/s to download at (0 = no limit) (defaults to 0)
+
+
+
+ normal|background|pre-allocate|sparse
+
+ the allocation type (may be 'normal', 'background', 'pre-allocate' or 'sparse') (defaults to 'normal')
+
+
+
+
+
+ the rate (in MiB/s) to allocate space at using background allocation (defaults to 2.0)
+
+
+
+ 0|1
+
+ whether to buffer disk reads (defaults to 1)
+
+
+
+
+
+ the maximum amount of space to use for buffering disk writes (in megabytes, 0 = disabled)
+ (defaults to 4)
+
+
+
+ 0|1
+
+ whether to send an incomplete bitfield and then 'have' messages, in
+ order to get around stupid ISP manipulation (defaults to 1)
+
+
+
+
+
+ the number of seconds to wait for data to come in over a connection before assuming it's
+ semi-permanently choked (defaults to 30.0)
+
+
+
+ 0|1
+
+ whether to display diagnostic info to stdout. This option is not very useful when using the curses or gui interfaces. (defaults to 0)
+
+
+
+
+
+ the number of downloads at which to switch from random to rarest first (defaults to 2)
+
+
+
+
+
+ the number of peers which need to have a piece before other partials take priority over
+ rarest first (defaults to 5)
+
+
+
+
+
+ the number of uploads to fill out to with extra optimistic unchokes (defaults to 4)
+
+
+
+
+
+ the maximum number of files to keep open at a time, 0 means no limit (defaults to 50)
+
+
+
+
+
+ the number of seconds between the client switching upload targets (defaults to 30)
+
+
+
+ 0|1
+
+ whether to use special upload-efficiency-maximizing routines (only for dedicated seeds)
+ (defaults to 0)
+
+
+
+ 0|1
+
+ whether to enable extra security features intended to prevent abuse (defaults to 1)
+
+
+
+
+
+ the absolute maximum number of peers to connect with (0 = no limit) (defaults to 0)
+
+
+
+ 0|1
+
+ whether to allow the client to automatically kick/ban peers that send bad data (defaults to 1)
+
+
+
+ 0|1
+
+ whether to double-check data being written to the disk for errors (may increase CPU load)
+ (defaults to 1)
+
+
+
+ 0|1
+
+ whether to thoroughly check data being written to the disk (may slow disk access)
+ (defaults to 0)
+
+
+
+ 0|1
+
+ whether to lock files the client is working with (defaults to 1)
+
+
+
+ 0|1
+
+ whether to lock access to files being read (defaults to 0)
+
+
+
+
+
+ the number of minutes between automatic flushes to disk (0 = disabled) (defaults to 0)
+
+
+
+
+
+ the code to send to a tracker, identifying as a dedicated seed (defaults to '')
+
+
+
+ 0|1
+
+ whether to save the current options as the new default configuration
+ for the current program (defaults to 0)
+
+
+
+
+
+
+ SEE ALSO
+
+ The single torrent downloaders:
+ btdownloadheadless1,
+ btdownloadcurses1,
+ btdownloadgui1.
+
+
+ The multiple torrent downloaders:
+ bittorrent-multi-downloader1,
+ btlaunchmany1,
+ btlaunchmanycurses1.
+
+
+ The bittorrent tracker:
+ bttrack1.
+
+
+ The torrent file creators:
+ btmakemetafile1,
+ btmaketorrentgui1,
+ btcompletedir1,
+ btcompletedirgui1.
+
+
+ The torrent file modifiers:
+ btcopyannounce1,
+ btreannounce1,
+ btrename1,
+ btsethttpseeds1.
+
+
+ The torrent file displayer:
+ btshowmetainfo1.
+
+
+
+ AUTHOR
+ This manual page was written by &dhusername; <&dhemail;> (based on the original man pages written by Micah Anderson <micah@debian.org>) for
+ the &debian; system (but may be used by others). Permission is
+ granted to copy, distribute and/or modify this document under
+ the terms of the &gnu; General Public License, Version 2 or any
+ later version published by the Free Software Foundation.
+
+
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in /usr/share/common-licenses/GPL.
+
+
+
+
+
--- bittornado-0.3.18.orig/debian/bittornado.desktop
+++ bittornado-0.3.18/debian/bittornado.desktop
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Version=0.3.10
+Name=Bittornado Client
+GenericName=Bittorrent Client
+X-MultipleArgs=false
+Exec=/usr/bin/btdownloadgui.bittornado
+X-test=test -n "$DISPLAY"
+Type=Application
+Icon=bittornado
+MimeType=application/x-bittorrent;
+NoDisplay=false
+Categories=GNOME;Network;FileTransfer;P2P;
+Terminal=false
--- bittornado-0.3.18.orig/debian/btcompletedir.bittornado.sgml
+++ bittornado-0.3.18/debian/btcompletedir.bittornado.sgml
@@ -0,0 +1,206 @@
+
+ Cameron">
+ Dale">
+
+ April 17, 2005">
+
+ 1">
+ camrdale@gmail.com">
+
+ btcompletedir.bittornado">
+
+
+ Debian">
+ GNU">
+ GPL">
+]>
+
+
+
+
+ &dhemail;
+
+
+ &dhfirstname;
+ &dhsurname;
+
+
+ 2006
+ &dhusername;
+
+ &dhdate;
+
+
+ &dhucpackage;
+
+ &dhsection;
+
+
+
+ &dhpackage;
+
+ creates torrent meta-info files for all files/directories within a directory
+
+
+
+ &dhpackage;
+
+ trackerURL
+ directory
+ directory
+
+
+
+
+
+
+
+
+
+ DESCRIPTION
+
+ This manual page documents briefly the
+ &dhpackage; command.
+
+ This manual page was written for the &debian; distribution
+ because the original program does not have a manual page.
+
+ &dhpackage; is a program that is used to generate the torrent info files
+ that are distributed to bittorrent clients (usually over http) to inform them
+ of where the designated tracker for the torrent is located, and to enable them
+ to verify the file's contents.
+
+ &dhpackage; requires two arguments. The first is the trackerURL which is the
+ "announce" address of a tracker (ex. http://127.0.0.1:6969/announce), the second is the
+ directory that you wish to parse to generate torrent info files.
+
+ &dhpackage; will parse each directory given and create a torrent file for every file and directory
+ within it. All torrent files will also reside in the directory after the program is complete.
+
+
+
+ OPTIONS
+
+ These programs follow the usual &gnu; command line syntax,
+ with long options starting with two dashes (`--'). A summary of
+ options is included below.
+
+
+
+
+
+ set the piece size to this power of 2 (0 = automatic) (defaults
+ to 0)
+
+
+
+
+
+ optional human-readable comment to put in the torrent file (defaults to '')
+
+
+
+
+
+ an optional encoding specification for the filesystem (set automatically in
+ recent Python versions) (defaults to '')
+
+
+
+
+
+ a list of http seed URLs. These alternate URLs will be used to seed
+ the file if there are no other seeds available. The format of seedURLlist is as follows:
+
+ URL[|URL ...]
+
+ (defaults to '')
+
+
+
+
+
+ a list of announce URLs. This is an optional list
+ of redundant/backup tracker URLs. The format of announceURLlist is as follows:
+
+ URL[,URL ...][|URL[,URL ...] ...]
+
+ where the URLs separated by commas are tried randomly, then the groups of URLs separated by pipes
+ are tried in sequential order.
+ If this option is omitted, it is assumed you don't want an announce_list field in the metafile.
+ If announce_list is given, clients which support it
+ will ignore the trackerURL value. (defaults to '')
+
+
+
+
+
+
+ EXAMPLES
+
+ These examples show how to use the --announce_list option in a few scenarios.
+
+ Try the three trackers (1-3) in sequential order:
+
+
+ &dhpackage; trackerURL directory --announce_list http://track1.com|http://track2.com|http://track3.com
+
+
+ Try the three trackers (1-3) in a randomly selected order:
+
+
+ &dhpackage; trackerURL directory --announce_list http://track1.com,http://track2.com,http://track3.com
+
+
+ Try the main tracker (1) first, then try the two backups (2 and 3) randomly:
+
+
+ &dhpackage; trackerURL directory --announce_list http://track1.com|http://track2.com,http://track3.com
+
+
+
+
+
+ SEE ALSO
+
+ btcompletedirgui1,
+ btmakemetafile1,
+ btmaketorrentgui1,
+ btshowmetainfo1,
+ bittorrent-downloader1.
+
+
+
+ AUTHOR
+ This manual page was written by &dhusername; <&dhemail;> (based on the original man pages written by Micah Anderson <micah@debian.org>) for
+ the &debian; system (but may be used by others). Permission is
+ granted to copy, distribute and/or modify this document under
+ the terms of the &gnu; General Public License, Version 2 or any
+ later version published by the Free Software Foundation.
+
+
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in /usr/share/common-licenses/GPL.
+
+
+
+
+
--- bittornado-0.3.18.orig/debian/README.Debian
+++ bittornado-0.3.18/debian/README.Debian
@@ -0,0 +1,9 @@
+
+bittornado
+----------
+
+If you want the gui componants of bittornado, install the package
+bittornado-gui.
+
+-- Micah Anderson Wed Jun 16 18:04:55 CDT 2004
+
--- bittornado-0.3.18.orig/debian/bittornado.postinst
+++ bittornado-0.3.18/debian/bittornado.postinst
@@ -0,0 +1,66 @@
+#! /bin/sh
+# postinst script for bittorrent
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `configure'
+# * `abort-upgrade'
+# * `abort-remove' `in-favour'
+#
+# * `abort-deconfigure' `in-favour'
+# `removing'
+#
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+ configure)
+
+ # Run the mimetypes program to add mimetypes into Netscape.
+ if [ -e /etc/init.d/mimetypes ]; then
+ /etc/init.d/mimetypes
+ fi
+
+ for i in btcompletedir btdownloadcurses btdownloadheadless btlaunchmany btlaunchmanycurses btmakemetafile btreannounce btrename btshowmetainfo bttrack ; do
+ update-alternatives \
+ --install /usr/bin/$i $i /usr/bin/$i.bittornado 120 \
+ --slave /usr/share/man/man1/$i.1.gz $i.1.gz /usr/share/man/man1/$i.bittornado.1.gz \
+ || exit 1
+ done
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ for i in btcompletedir btcompletedirgui btdownloadcurses btdownloadgui btdownloadheadless btlaunchmany btlaunchmanycurses btmakemetafile btreannounce btrename btshowmetainfo bttrack ; do
+ update-alternatives \
+ --install /usr/bin/$i $i /usr/bin/$i.bittornado 120 \
+ --slave /usr/share/man/man1/$i.1.gz $i.1.gz /usr/share/man/man1/$i.bittornado.1.gz \
+ || exit 1
+ done
+
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- bittornado-0.3.18.orig/debian/bittornado.manpages
+++ bittornado-0.3.18/debian/bittornado.manpages
@@ -0,0 +1,14 @@
+debian/bittorrent-downloader.bittornado.1
+debian/bttrack.bittornado.1
+debian/btmakemetafile.bittornado.1
+debian/bittorrent-multi-downloader.bittornado.1
+debian/btreannounce.bittornado.1
+debian/btrename.bittornado.1
+debian/btshowmetainfo.bittornado.1
+debian/btcompletedir.bittornado.1
+debian/btcopyannounce.1
+debian/btsethttpseeds.1
+debian/btdownloadcurses.bittornado.1
+debian/btdownloadheadless.bittornado.1
+debian/btlaunchmany.bittornado.1
+debian/btlaunchmanycurses.bittornado.1
--- bittornado-0.3.18.orig/debian/postrm
+++ bittornado-0.3.18/debian/postrm
@@ -0,0 +1,41 @@
+#! /bin/sh
+# postrm script for bittorrent
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `remove'
+# * `purge'
+# * `upgrade'
+# * `failed-upgrade'
+# * `abort-install'
+# * `abort-install'
+# * `abort-upgrade'
+# * `disappear' overwrit>r>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+ # Run the mimetypes program to add mimetypes into Netscape.
+ if [ -e /etc/init.d/mimetypes ] ; then
+ /etc/init.d/mimetypes
+ fi
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- bittornado-0.3.18.orig/debian/btlaunchmany.bittornado.sgml
+++ bittornado-0.3.18/debian/btlaunchmany.bittornado.sgml
@@ -0,0 +1,117 @@
+
+ Cameron">
+ Dale">
+
+ April 17, 2005">
+
+ 1">
+ camrdale@gmail.com">
+
+ btlaunchmany.bittornado">
+
+
+ Debian">
+ GNU">
+ GPL">
+]>
+
+
+
+
+ &dhemail;
+
+
+ &dhfirstname;
+ &dhsurname;
+
+
+ 2006
+ &dhusername;
+
+ &dhdate;
+
+
+ &dhucpackage;
+
+ &dhsection;
+
+
+
+ &dhpackage;
+
+ launch multiple torrent downloads, using a text interface
+
+
+
+ &dhpackage; directory
+
+
+
+ DESCRIPTION
+
+ This manual page documents briefly the
+ &dhpackage; command.
+
+ This manual page was written for the &debian; distribution
+ because the original program does not have a manual page.
+
+ &dhpackage; is a program that eases the use of managing multiple torrent downloads.
+ The program checks the provided directory for torrent
+ files. When it finds any, it starts a separate downloader thread for each torrent file.
+
+ Unlike btlaunchmanycurses,
+ this program does not require a terminal to stay alive.
+
+
+
+ OPTIONS
+
+ This program uses the same common options as the other bittorrent downloaders, which are documented in
+ bittorrent-downloader1.
+
+ This program also uses some options specific to multiple-torrent downloaders, which are documented in
+ bittorrent-multi-downloader1.
+
+
+
+ SEE ALSO
+
+ bittorrent-downloader1,
+ bittorrent-multi-downloader1,
+ btlaunchmanycurses1.
+
+
+
+ AUTHOR
+ This manual page was written by &dhusername; <&dhemail;> (based on the original man pages written by Micah Anderson <micah@debian.org>) for
+ the &debian; system (but may be used by others). Permission is
+ granted to copy, distribute and/or modify this document under
+ the terms of the &gnu; General Public License, Version 2 or any
+ later version published by the Free Software Foundation.
+
+
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in /usr/share/common-licenses/GPL.
+
+
+
+
+
--- bittornado-0.3.18.orig/debian/btcompletedirgui.bittornado.sgml
+++ bittornado-0.3.18/debian/btcompletedirgui.bittornado.sgml
@@ -0,0 +1,113 @@
+
+ Cameron">
+ Dale">
+
+ April 17, 2005">
+
+ 1">
+ camrdale@gmail.com">
+
+ btcompletedirgui.bittornado">
+
+
+ Debian">
+ GNU">
+ GPL">
+]>
+
+
+
+
+ &dhemail;
+
+
+ &dhfirstname;
+ &dhsurname;
+
+
+ 2006
+ &dhusername;
+
+ &dhdate;
+
+
+ &dhucpackage;
+
+ &dhsection;
+
+
+
+ &dhpackage;
+
+ GUI interface to create torrent meta-info files for all files/directories within a directory
+
+
+
+ &dhpackage;
+
+
+
+
+ DESCRIPTION
+
+ This manual page documents briefly the
+ &dhpackage; command.
+
+ This manual page was written for the &debian; distribution
+ because the original program does not have a manual page.
+
+ &dhpackage; does not require arguments like btcompletedir does,
+ everything is done in the GUI interface. The first box in the GUI is the
+ directory that the program will parse, the second is the
+ "announce" address of a tracker (ex. http://my.tracker:6969/announce). Additionally, you
+ can set a piece size.
+
+ &dhpackage; will parse the directory given and create a torrent file for every file and directory
+ within it. All torrent files will also reside in that directory after the program is complete.
+
+
+
+
+ SEE ALSO
+
+ btcompletedir1,
+ btmakemetafile1,
+ btmaketorrentgui1,
+ btshowmetainfo1,
+ bittorrent-downloader1.
+
+
+
+ AUTHOR
+ This manual page was written by &dhusername; <&dhemail;> (based on the original man pages written by Micah Anderson <micah@debian.org>) for
+ the &debian; system (but may be used by others). Permission is
+ granted to copy, distribute and/or modify this document under
+ the terms of the &gnu; General Public License, Version 2 or any
+ later version published by the Free Software Foundation.
+
+
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in /usr/share/common-licenses/GPL.
+
+
+
+
+
--- bittornado-0.3.18.orig/debian/btdownloadgui.bittornado.sgml
+++ bittornado-0.3.18/debian/btdownloadgui.bittornado.sgml
@@ -0,0 +1,212 @@
+
+ Cameron">
+ Dale">
+
+ April 17, 2005">
+
+ 1">
+ camrdale@gmail.com">
+
+ btdownloadgui.bittornado">
+
+
+ Debian">
+ GNU">
+ GPL">
+]>
+
+
+
+
+ &dhemail;
+
+
+ &dhfirstname;
+ &dhsurname;
+
+
+ 2006
+ &dhusername;
+
+ &dhdate;
+
+
+ &dhucpackage;
+
+ &dhsection;
+
+
+
+ &dhpackage;
+
+ GUI bittorrent download interface
+
+
+
+
+ &dhpackage; URL
+
+
+ &dhpackage; filename
+
+
+
+ DESCRIPTION
+
+ This manual page documents briefly the
+ &dhpackage; command.
+
+ This manual page was written for the &debian; distribution
+ because the original program does not have a manual page.
+
+ &dhpackage; is a GUI interface to download torrents.
+
+ &dhpackage; will open a provided torrent URL or
+ file and download it until complete. It will then seed (upload) the torrent until it is stopped.
+
+
+
+ OPTIONS
+
+ This program follows the usual &gnu; command line syntax,
+ with long options starting with two dashes (`--'). A summary of
+ options is included below.
+
+ In addition to the program-specific options described below, this program uses the same common
+ options as the other bittorrent downloaders, which are documented in
+ bittorrent-downloader1.
+
+
+
+ 0|1
+
+ whether to iconize to the system try or not (only for win32) (defaults to 1)
+
+
+
+ 0|1
+
+ whether to stretch the download status window to fit the torrent name (defaults to 0)
+
+
+
+ 0|1
+
+ whether to display statistics on peers and seeds (defaults to 1)
+
+
+
+ 0|1
+
+ whether to display miscellaneous other statistics (defaults to 1)
+
+
+
+ automatic|unlimited|dialup/isdn|dsl/cable slow|dsl/cable fast|T1|T3+|seeder
+
+ the default rate setting to use for maximum upload rate
+ (options are 'automatic', 'unlimited', 'dialup/isdn', 'dsl/cable slow', 'dsl/cable fast', 'T1', 'T3+', 'seeder')
+ (defaults to 'automatic')
+
+
+
+ none|basic|full
+
+ the rate setting controls to display (options are 'none', 'basic', and 'full')
+ (defaults to 'full')
+
+
+
+ 0|1
+
+ forces the status icon to be green even if the client seems to be firewalled (defaults to 0)
+
+
+
+
+
+ the default directory to save to (defaults to '')
+
+
+
+
+
+ the directory where the last torrent was saved (defaults to '')
+
+
+
+
+
+ the font size to use (defaults to 10)
+
+
+
+ 0|1|-1
+
+ whether to ask where to download to (0 = never, 1 = always, -1 = automatic resume)
+ (defaults to 0)
+
+
+
+
+
+ the color to use for the progress bar when checking (defaults to '92 91 8d')
+
+
+
+
+
+ the color to use for the progress bar when downloading (defaults to '4b 69 83')
+
+
+
+
+
+ the color to use for the progress bar when seeding (defaults to '00 ff 00')
+
+
+
+
+
+
+ SEE ALSO
+
+ bittorrent-downloader1,
+ btdownloadcurses1,
+ btdownloadheadless1,
+
+
+
+ AUTHOR
+ This manual page was written by &dhusername; <&dhemail;> (based on the original man pages written by Micah Anderson <micah@debian.org>) for
+ the &debian; system (but may be used by others). Permission is
+ granted to copy, distribute and/or modify this document under
+ the terms of the &gnu; General Public License, Version 2 or any
+ later version published by the Free Software Foundation.
+
+
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in /usr/share/common-licenses/GPL.
+
+
+
+
+
--- bittornado-0.3.18.orig/debian/copyright
+++ bittornado-0.3.18/debian/copyright
@@ -0,0 +1,30 @@
+This was turned into a debian package by Micah Anderson
+on Sat May 8 22:13:09 UTC 2004.
+
+The upstream source was obtained from http://bittornado.com/download.html
+and was written by theshadow@degreez.net.
+
+Unless otherwise noted, all files are released under the MIT
+license, exceptions contain licensing information in them.
+
+Copyright (C) 2001-2002 Bram Cohen
+
+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 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.
--- bittornado-0.3.18.orig/debian/btdownloadcurses.bittornado.sgml
+++ bittornado-0.3.18/debian/btdownloadcurses.bittornado.sgml
@@ -0,0 +1,116 @@
+
+ Cameron">
+ Dale">
+
+ April 17, 2005">
+
+ 1">
+ camrdale@gmail.com">
+
+ btdownloadcurses.bittornado">
+
+
+ Debian">
+ GNU">
+ GPL">
+]>
+
+
+
+
+ &dhemail;
+
+
+ &dhfirstname;
+ &dhsurname;
+
+
+ 2006
+ &dhusername;
+
+ &dhdate;
+
+
+ &dhucpackage;
+
+ &dhsection;
+
+
+
+ &dhpackage;
+
+ curses bittornado download interface
+
+
+
+ &dhpackage; URL
+
+
+ &dhpackage; filename
+
+
+
+ DESCRIPTION
+
+ This manual page documents briefly the
+ &dhpackage; command.
+
+ This manual page was written for the &debian; distribution
+ because the original program does not have a manual page.
+
+ &dhpackage; is a curses interface to download torrents.
+
+ &dhpackage; will open a provided torrent URL or
+ file and download it until complete. It will then seed (upload) the torrent until it is stopped.
+
+
+
+ OPTIONS
+
+ This program uses the same common options as the other bittorrent downloaders, which are documented in
+ bittorrent-downloader1.
+
+
+
+
+ SEE ALSO
+
+ bittorrent-downloader1,
+ btdownloadgui1,
+ btdownloadheadless1.
+
+
+
+ AUTHOR
+ This manual page was written by &dhusername; <&dhemail;> (based on the original man pages written by Micah Anderson <micah@debian.org>) for
+ the &debian; system (but may be used by others). Permission is
+ granted to copy, distribute and/or modify this document under
+ the terms of the &gnu; General Public License, Version 2 or any
+ later version published by the Free Software Foundation.
+
+
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in /usr/share/common-licenses/GPL.
+
+
+
+
+
--- bittornado-0.3.18.orig/debian/btrename.bittornado.sgml
+++ bittornado-0.3.18/debian/btrename.bittornado.sgml
@@ -0,0 +1,112 @@
+
+ Cameron">
+ Dale">
+
+ April 17, 2005">
+
+ 1">
+ camrdale@gmail.com">
+
+ btrename.bittornado">
+
+
+ Debian">
+ GNU">
+ GPL">
+]>
+
+
+
+
+ &dhemail;
+
+
+ &dhfirstname;
+ &dhsurname;
+
+
+ 2006
+ &dhusername;
+
+ &dhdate;
+
+
+ &dhucpackage;
+
+ &dhsection;
+
+
+
+ &dhpackage;
+
+ change the suggested filename inside a bittorrent file
+
+
+
+ &dhpackage;
+
+ file.torrent
+ newfilename
+
+
+
+ DESCRIPTION
+
+ This manual page documents briefly the
+ &dhpackage; command.
+
+ This manual page was written for the &debian; distribution
+ because the original program does not have a manual page.
+
+ &dhpackage; is a program which will change the suggested
+ filename presented to the user for a bittorrent file download. This
+ will make the downloader save the download as a different name by default.
+ The torrent specified by the file.torrent option is modified
+ in-place, changing the suggested filename in it's meta-info to newfilename.
+
+
+
+
+ SEE ALSO
+
+ btcopyannounce1,
+ btreannounce1,
+ btsethttpseeds1,
+ btshowmetainfo1,
+ bittorrent-downloader1.
+
+
+
+ AUTHOR
+ This manual page was written by &dhusername; <&dhemail;> (based on the original man pages written by Micah Anderson <micah@debian.org>) for
+ the &debian; system (but may be used by others). Permission is
+ granted to copy, distribute and/or modify this document under
+ the terms of the &gnu; General Public License, Version 2 or any
+ later version published by the Free Software Foundation.
+
+
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in /usr/share/common-licenses/GPL.
+
+
+
+
+
--- bittornado-0.3.18.orig/debian/bittornado.mime
+++ bittornado-0.3.18/debian/bittornado.mime
@@ -0,0 +1,2 @@
+application/x-bittorrent; /usr/bin/btdownloadgui --responsefile %s; test=test -n "$DISPLAY"
+application/x-bittorrent; /usr/bin/btdownloadcurses --responsefile %s; test=test -z "$DISPLAY"; needsterminal
--- bittornado-0.3.18.orig/debian/btsethttpseeds.sgml
+++ bittornado-0.3.18/debian/btsethttpseeds.sgml
@@ -0,0 +1,119 @@
+
+ Cameron">
+ Dale">
+
+ April 17, 2005">
+
+ 1">
+ camrdale@gmail.com">
+
+ btsethttpseeds">
+
+
+ Debian">
+ GNU">
+ GPL">
+]>
+
+
+
+
+ &dhemail;
+
+
+ &dhfirstname;
+ &dhsurname;
+
+
+ 2006
+ &dhusername;
+
+ &dhdate;
+
+
+ &dhucpackage;
+
+ &dhsection;
+
+
+
+ &dhpackage;
+
+ sets http-seeds information in torrents
+
+
+
+ &dhpackage;
+
+ seedURLlist
+ file
+ file
+
+
+
+ DESCRIPTION
+
+ This manual page documents briefly the
+ &dhpackage; command.
+
+ This manual page was written for the &debian; distribution
+ because the original program does not have a manual page.
+
+ &dhpackage; is a program which will change the http seed
+ URLs of an existing torrent file. The already existing torrent specified by
+ the file argument will be modified to use the new
+ http seed URLs given by the seedURLlist argument.
+ These alternate URLs will be used to seed the file if there are no other seeds available.
+
+ The seedURLlist can be '0', or formatted as follows:
+
+ URL[|URL ...]
+
+ if the seedURLlist is '0', any http seeds currently in file will be stripped.
+
+
+
+
+ SEE ALSO
+
+ btcopyannounce1,
+ btreannounce1,
+ btrename1,
+ btshowmetainfo1,
+ bittorrent-downloader1.
+
+
+
+ AUTHOR
+ This manual page was written by &dhusername; <&dhemail;> (based on the original man pages written by Micah Anderson <micah@debian.org>) for
+ the &debian; system (but may be used by others). Permission is
+ granted to copy, distribute and/or modify this document under
+ the terms of the &gnu; General Public License, Version 2 or any
+ later version published by the Free Software Foundation.
+
+
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in /usr/share/common-licenses/GPL.
+
+
+
+
+
--- bittornado-0.3.18.orig/debian/btmakemetafile.bittornado.sgml
+++ bittornado-0.3.18/debian/btmakemetafile.bittornado.sgml
@@ -0,0 +1,209 @@
+
+ Cameron">
+ Dale">
+
+ April 17, 2005">
+
+ 1">
+ camrdale@gmail.com">
+
+ btmakemetafile.bittornado">
+
+
+ Debian">
+ GNU">
+ GPL">
+]>
+
+
+
+
+ &dhemail;
+
+
+ &dhfirstname;
+ &dhsurname;
+
+
+ 2006
+ &dhusername;
+
+ &dhdate;
+
+
+ &dhucpackage;
+
+ &dhsection;
+
+
+
+ &dhpackage;
+
+ generates torrent meta-info files for use with bittorrent
+
+
+
+ &dhpackage;
+
+ trackerURL
+ file|directory
+ file|directory
+
+
+
+
+
+
+
+
+
+
+ DESCRIPTION
+
+ This manual page documents briefly the
+ &dhpackage; command.
+
+ This manual page was written for the &debian; distribution
+ because the original program does not have a manual page.
+
+ &dhpackage; is a program that is used to generate the torrent info files
+ that are distributed to bittorrent clients (usually over http) to inform them
+ of where the designated tracker for the torrent is located, and to enable them
+ to verify the file's contents.
+
+ &dhpackage; requires two arguments. The first is the trackerURL which is the
+ "announce" address of a tracker (ex. http://127.0.0.1:6969/announce), the second is the
+ file or directory of files that are to be included in to torrent.
+
+
+
+ OPTIONS
+
+ These programs follow the usual &gnu; command line syntax,
+ with long options starting with two dashes (`--'). A summary of
+ options is included below.
+
+
+
+
+
+ set the piece size to this power of 2 (0 = automatic) (defaults
+ to 0)
+
+
+
+
+
+ optional human-readable comment to put in the torrent file (defaults to '')
+
+
+
+
+
+ optional target file for the torrent (defaults to '')
+
+
+
+
+
+ an optional encoding specification for the filesystem (set automatically in
+ recent Python versions) (defaults to '')
+
+
+
+
+
+ a list of http seed URLs. These alternate URLs will be used to seed
+ the file if there are no other seeds available. The format of seedURLlist is as follows:
+
+ URL[|URL ...]
+
+ (defaults to '')
+
+
+
+
+
+ a list of announce URLs. This is an optional list
+ of redundant/backup tracker URLs. The format of announceURLlist is as follows:
+
+ URL[,URL ...][|URL[,URL ...] ...]
+
+ where the URLs separated by commas are tried randomly, then the
+ groups of URLs separated by pipes are tried in sequential order.
+ If this option is omitted, it is assumed you don't want an announce_list field in the metafile.
+ If announce_list is given, clients which support it
+ will ignore the trackerURL value. (defaults to '')
+
+
+
+
+
+ EXAMPLES
+
+ These examples show how to use the --announce_list option in a few scenarios.
+
+ Try the three trackers (1-3) in sequential order:
+
+
+ &dhpackage; trackerURL file --announce_list http://track1.com|http://track2.com|http://track3.com
+
+
+ Try the three trackers (1-3) in a randomly selected order:
+
+
+ &dhpackage; trackerURL file --announce_list http://track1.com,http://track2.com,http://track3.com
+
+
+ Try the main tracker (1) first, then try the two backups (2 and 3) randomly:
+
+
+ &dhpackage; trackerURL file --announce_list http://track1.com|http://track2.com,http://track3.com
+
+
+
+
+
+ SEE ALSO
+
+ btcompletedir1,
+ btcompletedirgui1,
+ btmaketorrentgui1,
+ btshowmetainfo1,
+ bittorrent-downloader1.
+
+
+
+ AUTHOR
+ This manual page was written by &dhusername; <&dhemail;> (based on the original man pages written by Micah Anderson <micah@debian.org>) for
+ the &debian; system (but may be used by others). Permission is
+ granted to copy, distribute and/or modify this document under
+ the terms of the &gnu; General Public License, Version 2 or any
+ later version published by the Free Software Foundation.
+
+
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in /usr/share/common-licenses/GPL.
+
+
+
+
+
--- bittornado-0.3.18.orig/debian/patches/10_removeCVScrud.dpatch
+++ bittornado-0.3.18/debian/patches/10_removeCVScrud.dpatch
@@ -0,0 +1,30 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 09_removeCVScrud.dpatch by Micah Anderson
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+--- bittornado.orig/BitTornado/BT1/.cvsignore
++++ /dev/null
+@@ -1,4 +0,0 @@
+-statefile
+-*.pyc
+-*.old
+-*.newCopy of IntraStorage.py
+--- bittornado.orig/BitTornado/.cvsignore
++++ /dev/null
+@@ -1,4 +0,0 @@
+-statefile
+-*.pyc
+-*.old
+-*.new
+\ No newline at end of file
+--- bittornado.orig/.cvsignore
++++ /dev/null
+@@ -1,4 +0,0 @@
+-statefile
+-*.pyc
+-*.old
+-*.new
+\ No newline at end of file
--- bittornado-0.3.18.orig/debian/patches/25_errors_in_error_handling.dpatch
+++ bittornado-0.3.18/debian/patches/25_errors_in_error_handling.dpatch
@@ -0,0 +1,42 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 25_errors_in_error_handling.dpatch by Cameron Dale
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix a bug in the error handling of btdownloadcurses/headless.
+
+@DPATCH@
+--- bittornado.orig/btdownloadcurses.py
++++ bittornado/btdownloadcurses.py
+@@ -162,10 +162,14 @@
+ self.downRate = '---'
+ self.display(fractionDone = 1)
+
+- def failed(self):
++ def failed(self, errormsg = None):
+ self.done = 1
+ self.activity = 'download failed!'
+ self.downRate = '---'
++ if errormsg:
++ newerrmsg = strftime('[%H:%M:%S] ') + errormsg
++ self.errors.append(newerrmsg)
++ self.errlist.append(newerrmsg)
+ self.display()
+
+ def error(self, errormsg):
+--- bittornado.orig/btdownloadheadless.py
++++ bittornado/btdownloadheadless.py
+@@ -74,11 +74,13 @@
+ self.downRate = ''
+ self.display()
+
+- def failed(self):
++ def failed(self, errormsg = None):
+ self.done = True
+ self.percentDone = '0'
+ self.timeEst = 'Download Failed!'
+ self.downRate = ''
++ if errormsg:
++ self.errors.append(errormsg)
+ self.display()
+
+ def error(self, errormsg):
--- bittornado-0.3.18.orig/debian/patches/13_fix_btcompletedirgui_bug.dpatch
+++ bittornado-0.3.18/debian/patches/13_fix_btcompletedirgui_bug.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 13_fix_btcompletedirgui_bug.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fixes a bug that caused the piece size to be way too big.
+
+@DPATCH@
+--- bittornado.orig/btcompletedirgui.py
++++ bittornado/btcompletedirgui.py
+@@ -99,7 +99,7 @@
+ dlg.Destroy()
+ return
+ try:
+- ps = 2 ** (21 - self.piece_length.GetSelection())
++ ps = (21 - self.piece_length.GetSelection())
+ CompleteDir(self.dirCtl.GetValue(), self.annCtl.GetValue(), ps)
+ except:
+ print_exc()
--- bittornado-0.3.18.orig/debian/patches/21_remove_deprecated_wxPython_usage.dpatch
+++ bittornado-0.3.18/debian/patches/21_remove_deprecated_wxPython_usage.dpatch
@@ -0,0 +1,3676 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 21_remove_deprecated_wxPython_usage.dpatch by Cameron Dale
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Migrate from the old 'from wxPython.wx import *' to the new
+## DP: 'import wx' namespace.
+
+@DPATCH@
+--- bittornado.orig/BitTornado/ConfigReader.py
++++ bittornado/BitTornado/ConfigReader.py
+@@ -1,7 +1,7 @@
+ #written by John Hoffman
+
+ from ConnChoice import *
+-from wxPython.wx import *
++import wx
+ from types import IntType, FloatType, StringType
+ from download_bt1 import defaults
+ from ConfigDir import ConfigDir
+@@ -16,11 +16,6 @@
+ True = 1
+ False = 0
+
+-try:
+- wxFULL_REPAINT_ON_RESIZE
+-except:
+- wxFULL_REPAINT_ON_RESIZE = 0 # fix for wx pre-2.5
+-
+ if (sys.platform == 'win32'):
+ _FONT = 9
+ else:
+@@ -28,7 +23,7 @@
+
+ def HexToColor(s):
+ r,g,b = s.split(' ')
+- return wxColour(red=int(r,16), green=int(g,16), blue=int(b,16))
++ return wx.Colour(red=int(r,16), green=int(g,16), blue=int(b,16))
+
+ def hex2(c):
+ h = hex(c)[2:]
+@@ -71,8 +66,8 @@
+ ]
+
+ def setwxconfigfiledefaults():
+- CHECKINGCOLOR = ColorToHex(wxSystemSettings_GetColour(wxSYS_COLOUR_3DSHADOW))
+- DOWNLOADCOLOR = ColorToHex(wxSystemSettings_GetColour(wxSYS_COLOUR_ACTIVECAPTION))
++ CHECKINGCOLOR = ColorToHex(wx.SystemSettings_GetColour(wx.SYS_COLOUR_3DSHADOW))
++ DOWNLOADCOLOR = ColorToHex(wx.SystemSettings_GetColour(wx.SYS_COLOUR_ACTIVECAPTION))
+
+ configFileDefaults.extend([
+ ('gui_checkingcolor', CHECKINGCOLOR,
+@@ -89,7 +84,7 @@
+ class configReader:
+
+ def __init__(self):
+- self.configfile = wxConfig("BitTorrent",style=wxCONFIG_USE_LOCAL_FILE)
++ self.configfile = wx.Config("BitTorrent",style=wx.CONFIG_USE_LOCAL_FILE)
+ self.configMenuBox = None
+ self.advancedMenuBox = None
+ self.cryptoMenuBox = None
+@@ -133,7 +128,7 @@
+
+
+ def importOldGUIConfig(self):
+- oldconfig = wxConfig("BitTorrent",style=wxCONFIG_USE_LOCAL_FILE)
++ oldconfig = wx.Config("BitTorrent",style=wx.CONFIG_USE_LOCAL_FILE)
+ cont, s, i = oldconfig.GetFirstEntry()
+ if not cont:
+ oldconfig.DeleteAll()
+@@ -195,22 +190,22 @@
+ return self.configDir.getTorrentData(t)
+
+ def setColorIcon(self, xxicon, xxiconptr, xxcolor):
+- idata = wxMemoryDC()
++ idata = wx.MemoryDC()
+ idata.SelectObject(xxicon)
+- idata.SetBrush(wxBrush(xxcolor,wxSOLID))
++ idata.SetBrush(wx.Brush(xxcolor,wx.SOLID))
+ idata.DrawRectangle(0,0,16,16)
+- idata.SelectObject(wxNullBitmap)
++ idata.SelectObject(wx.NullBitmap)
+ xxiconptr.Refresh()
+
+
+ def getColorFromUser(self, parent, colInit):
+- data = wxColourData()
++ data = wx.ColourData()
+ if colInit.Ok():
+ data.SetColour(colInit)
+ data.SetCustomColour(0, self.checkingcolor)
+ data.SetCustomColour(1, self.downloadcolor)
+ data.SetCustomColour(2, self.seedingcolor)
+- dlg = wxColourDialog(parent,data)
++ dlg = wx.ColourDialog(parent,data)
+ if not dlg.ShowModal():
+ return colInit
+ return dlg.GetColourData().GetColour()
+@@ -220,7 +215,7 @@
+ self.parent = parent
+ try:
+ self.FONT = self.config['gui_font']
+- self.default_font = wxFont(self.FONT, wxDEFAULT, wxNORMAL, wxNORMAL, False)
++ self.default_font = wx.Font(self.FONT, wx.DEFAULT, wx.NORMAL, wx.NORMAL, False)
+ self.checkingcolor = HexToColor(self.config['gui_checkingcolor'])
+ self.downloadcolor = HexToColor(self.config['gui_downloadcolor'])
+ self.seedingcolor = HexToColor(self.config['gui_seedingcolor'])
+@@ -228,133 +223,133 @@
+ if (self.configMenuBox is not None):
+ try:
+ self.configMenuBox.Close()
+- except wxPyDeadObjectError, e:
++ except wx.PyDeadObjectError, e:
+ self.configMenuBox = None
+
+- self.configMenuBox = wxFrame(None, -1, 'BitTornado Preferences', size = (1,1),
+- style = wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE)
++ self.configMenuBox = wx.Frame(None, -1, 'BitTornado Preferences', size = (1,1),
++ style = wx.DEFAULT_FRAME_STYLE|wx.FULL_REPAINT_ON_RESIZE)
+ if (sys.platform == 'win32'):
+ self.icon = self.parent.icon
+ self.configMenuBox.SetIcon(self.icon)
+
+- panel = wxPanel(self.configMenuBox, -1)
++ panel = wx.Panel(self.configMenuBox, -1)
+ self.panel = panel
+
+ def StaticText(text, font = self.FONT, underline = False, color = None, panel = panel):
+- x = wxStaticText(panel, -1, text, style = wxALIGN_LEFT)
+- x.SetFont(wxFont(font, wxDEFAULT, wxNORMAL, wxNORMAL, underline))
++ x = wx.StaticText(panel, -1, text, style = wx.ALIGN_LEFT)
++ x.SetFont(wx.Font(font, wx.DEFAULT, wx.NORMAL, wx.NORMAL, underline))
+ if color is not None:
+ x.SetForegroundColour(color)
+ return x
+
+- colsizer = wxFlexGridSizer(cols = 1, vgap = 8)
++ colsizer = wx.FlexGridSizer(cols = 1, vgap = 8)
+
+- self.gui_stretchwindow_checkbox = wxCheckBox(panel, -1, "Stretch window to fit torrent name *")
++ self.gui_stretchwindow_checkbox = wx.CheckBox(panel, -1, "Stretch window to fit torrent name *")
+ self.gui_stretchwindow_checkbox.SetFont(self.default_font)
+ self.gui_stretchwindow_checkbox.SetValue(self.config['gui_stretchwindow'])
+
+- self.gui_displaystats_checkbox = wxCheckBox(panel, -1, "Display peer and seed statistics")
++ self.gui_displaystats_checkbox = wx.CheckBox(panel, -1, "Display peer and seed statistics")
+ self.gui_displaystats_checkbox.SetFont(self.default_font)
+ self.gui_displaystats_checkbox.SetValue(self.config['gui_displaystats'])
+
+- self.gui_displaymiscstats_checkbox = wxCheckBox(panel, -1, "Display miscellaneous other statistics")
++ self.gui_displaymiscstats_checkbox = wx.CheckBox(panel, -1, "Display miscellaneous other statistics")
+ self.gui_displaymiscstats_checkbox.SetFont(self.default_font)
+ self.gui_displaymiscstats_checkbox.SetValue(self.config['gui_displaymiscstats'])
+
+- self.buffering_checkbox = wxCheckBox(panel, -1, "Enable read/write buffering *")
++ self.buffering_checkbox = wx.CheckBox(panel, -1, "Enable read/write buffering *")
+ self.buffering_checkbox.SetFont(self.default_font)
+ self.buffering_checkbox.SetValue(self.config['buffer_reads'])
+
+- self.breakup_checkbox = wxCheckBox(panel, -1, "Break-up seed bitfield to foil ISP manipulation")
++ self.breakup_checkbox = wx.CheckBox(panel, -1, "Break-up seed bitfield to foil ISP manipulation")
+ self.breakup_checkbox.SetFont(self.default_font)
+ self.breakup_checkbox.SetValue(self.config['breakup_seed_bitfield'])
+
+- self.autoflush_checkbox = wxCheckBox(panel, -1, "Flush data to disk every 5 minutes")
++ self.autoflush_checkbox = wx.CheckBox(panel, -1, "Flush data to disk every 5 minutes")
+ self.autoflush_checkbox.SetFont(self.default_font)
+ self.autoflush_checkbox.SetValue(self.config['auto_flush'])
+
+ if sys.version_info >= (2,3) and socket.has_ipv6:
+- self.ipv6enabled_checkbox = wxCheckBox(panel, -1, "Initiate and receive connections via IPv6 *")
++ self.ipv6enabled_checkbox = wx.CheckBox(panel, -1, "Initiate and receive connections via IPv6 *")
+ self.ipv6enabled_checkbox.SetFont(self.default_font)
+ self.ipv6enabled_checkbox.SetValue(self.config['ipv6_enabled'])
+
+- self.gui_forcegreenonfirewall_checkbox = wxCheckBox(panel, -1,
++ self.gui_forcegreenonfirewall_checkbox = wx.CheckBox(panel, -1,
+ "Force icon to display green when firewalled")
+ self.gui_forcegreenonfirewall_checkbox.SetFont(self.default_font)
+ self.gui_forcegreenonfirewall_checkbox.SetValue(self.config['gui_forcegreenonfirewall'])
+
+- cryptoButton = wxButton(panel, -1, 'Encryption/Security Settings...')
++ cryptoButton = wx.Button(panel, -1, 'Encryption/Security Settings...')
+
+- self.minport_data = wxSpinCtrl(panel, -1, '', (-1,-1), (self.FONT*8, -1))
++ self.minport_data = wx.SpinCtrl(panel, -1, '', (-1,-1), (self.FONT*8, -1))
+ self.minport_data.SetFont(self.default_font)
+ self.minport_data.SetRange(1,65535)
+ self.minport_data.SetValue(self.config['minport'])
+
+- self.maxport_data = wxSpinCtrl(panel, -1, '', (-1,-1), (self.FONT*8, -1))
++ self.maxport_data = wx.SpinCtrl(panel, -1, '', (-1,-1), (self.FONT*8, -1))
+ self.maxport_data.SetFont(self.default_font)
+ self.maxport_data.SetRange(1,65535)
+ self.maxport_data.SetValue(self.config['maxport'])
+
+- self.randomport_checkbox = wxCheckBox(panel, -1, "randomize")
++ self.randomport_checkbox = wx.CheckBox(panel, -1, "randomize")
+ self.randomport_checkbox.SetFont(self.default_font)
+ self.randomport_checkbox.SetValue(self.config['random_port'])
+
+- self.gui_font_data = wxSpinCtrl(panel, -1, '', (-1,-1), (self.FONT*5, -1))
++ self.gui_font_data = wx.SpinCtrl(panel, -1, '', (-1,-1), (self.FONT*5, -1))
+ self.gui_font_data.SetFont(self.default_font)
+ self.gui_font_data.SetRange(8,16)
+ self.gui_font_data.SetValue(self.config['gui_font'])
+
+- self.gui_ratesettingsdefault_data=wxChoice(panel, -1, choices = ratesettingslist)
++ self.gui_ratesettingsdefault_data=wx.Choice(panel, -1, choices = ratesettingslist)
+ self.gui_ratesettingsdefault_data.SetFont(self.default_font)
+ self.gui_ratesettingsdefault_data.SetStringSelection(self.config['gui_ratesettingsdefault'])
+
+- self.maxdownload_data = wxSpinCtrl(panel, -1, '', (-1,-1), (self.FONT*7, -1))
++ self.maxdownload_data = wx.SpinCtrl(panel, -1, '', (-1,-1), (self.FONT*7, -1))
+ self.maxdownload_data.SetFont(self.default_font)
+ self.maxdownload_data.SetRange(0,5000)
+ self.maxdownload_data.SetValue(self.config['max_download_rate'])
+
+- self.gui_ratesettingsmode_data=wxRadioBox(panel, -1, 'Rate Settings Mode',
++ self.gui_ratesettingsmode_data=wx.RadioBox(panel, -1, 'Rate Settings Mode',
+ choices = [ 'none', 'basic', 'full' ] )
+ self.gui_ratesettingsmode_data.SetFont(self.default_font)
+ self.gui_ratesettingsmode_data.SetStringSelection(self.config['gui_ratesettingsmode'])
+
+ if (sys.platform == 'win32'):
+- self.win32_taskbar_icon_checkbox = wxCheckBox(panel, -1, "Minimize to system tray")
++ self.win32_taskbar_icon_checkbox = wx.CheckBox(panel, -1, "Minimize to system tray")
+ self.win32_taskbar_icon_checkbox.SetFont(self.default_font)
+ self.win32_taskbar_icon_checkbox.SetValue(self.config['win32_taskbar_icon'])
+
+- self.upnp_data=wxChoice(panel, -1,
++ self.upnp_data=wx.Choice(panel, -1,
+ choices = ['disabled', 'type 1 (fast)', 'type 2 (slow)'])
+ self.upnp_data.SetFont(self.default_font)
+ self.upnp_data.SetSelection(self.config['upnp_nat_access'])
+
+- self.gui_default_savedir_ctrl = wxTextCtrl(parent = panel, id = -1,
++ self.gui_default_savedir_ctrl = wx.TextCtrl(parent = panel, id = -1,
+ value = self.config['gui_default_savedir'],
+- size = (26*self.FONT, -1), style = wxTE_PROCESS_TAB)
++ size = (26*self.FONT, -1), style = wx.TE_PROCESS_TAB)
+ self.gui_default_savedir_ctrl.SetFont(self.default_font)
+
+- self.gui_savemode_data=wxRadioBox(panel, -1, 'Ask where to save: *',
++ self.gui_savemode_data=wx.RadioBox(panel, -1, 'Ask where to save: *',
+ choices = [ 'always', 'never', 'auto-resume' ] )
+ self.gui_savemode_data.SetFont(self.default_font)
+ self.gui_savemode_data.SetSelection(1-self.config['gui_saveas_ask'])
+
+- self.checkingcolor_icon = wxEmptyBitmap(16,16)
+- self.checkingcolor_iconptr = wxStaticBitmap(panel, -1, self.checkingcolor_icon)
++ self.checkingcolor_icon = wx.EmptyBitmap(16,16)
++ self.checkingcolor_iconptr = wx.StaticBitmap(panel, -1, self.checkingcolor_icon)
+ self.setColorIcon(self.checkingcolor_icon, self.checkingcolor_iconptr, self.checkingcolor)
+
+- self.downloadcolor_icon = wxEmptyBitmap(16,16)
+- self.downloadcolor_iconptr = wxStaticBitmap(panel, -1, self.downloadcolor_icon)
++ self.downloadcolor_icon = wx.EmptyBitmap(16,16)
++ self.downloadcolor_iconptr = wx.StaticBitmap(panel, -1, self.downloadcolor_icon)
+ self.setColorIcon(self.downloadcolor_icon, self.downloadcolor_iconptr, self.downloadcolor)
+
+- self.seedingcolor_icon = wxEmptyBitmap(16,16)
+- self.seedingcolor_iconptr = wxStaticBitmap(panel, -1, self.seedingcolor_icon)
++ self.seedingcolor_icon = wx.EmptyBitmap(16,16)
++ self.seedingcolor_iconptr = wx.StaticBitmap(panel, -1, self.seedingcolor_icon)
+ self.setColorIcon(self.seedingcolor_icon, self.downloadcolor_iconptr, self.seedingcolor)
+
+- rowsizer = wxFlexGridSizer(cols = 2, hgap = 20)
++ rowsizer = wx.FlexGridSizer(cols = 2, hgap = 20)
+
+- block12sizer = wxFlexGridSizer(cols = 1, vgap = 12)
++ block12sizer = wx.FlexGridSizer(cols = 1, vgap = 12)
+
+- block1sizer = wxFlexGridSizer(cols = 1, vgap = 2)
++ block1sizer = wx.FlexGridSizer(cols = 1, vgap = 2)
+ if (sys.platform == 'win32'):
+ block1sizer.Add(self.win32_taskbar_icon_checkbox)
+ block1sizer.Add(self.gui_stretchwindow_checkbox)
+@@ -367,105 +362,105 @@
+ block1sizer.Add(self.ipv6enabled_checkbox)
+ block1sizer.Add(self.gui_forcegreenonfirewall_checkbox)
+ block12sizer.Add(block1sizer)
+- block12sizer.Add(cryptoButton, 0, wxALIGN_CENTER)
++ block12sizer.Add(cryptoButton, 0, wx.ALIGN_CENTER)
+
+- colorsizer = wxStaticBoxSizer(wxStaticBox(panel, -1, "Gauge Colors:"), wxVERTICAL)
+- colorsizer1 = wxFlexGridSizer(cols = 7)
+- colorsizer1.Add(StaticText(' Checking: '), 1, wxALIGN_BOTTOM)
+- colorsizer1.Add(self.checkingcolor_iconptr, 1, wxALIGN_BOTTOM)
+- colorsizer1.Add(StaticText(' Downloading: '), 1, wxALIGN_BOTTOM)
+- colorsizer1.Add(self.downloadcolor_iconptr, 1, wxALIGN_BOTTOM)
+- colorsizer1.Add(StaticText(' Seeding: '), 1, wxALIGN_BOTTOM)
+- colorsizer1.Add(self.seedingcolor_iconptr, 1, wxALIGN_BOTTOM)
++ colorsizer = wx.StaticBoxSizer(wx.StaticBox(panel, -1, "Gauge Colors:"), wx.VERTICAL)
++ colorsizer1 = wx.FlexGridSizer(cols = 7)
++ colorsizer1.Add(StaticText(' Checking: '), 1, wx.ALIGN_BOTTOM)
++ colorsizer1.Add(self.checkingcolor_iconptr, 1, wx.ALIGN_BOTTOM)
++ colorsizer1.Add(StaticText(' Downloading: '), 1, wx.ALIGN_BOTTOM)
++ colorsizer1.Add(self.downloadcolor_iconptr, 1, wx.ALIGN_BOTTOM)
++ colorsizer1.Add(StaticText(' Seeding: '), 1, wx.ALIGN_BOTTOM)
++ colorsizer1.Add(self.seedingcolor_iconptr, 1, wx.ALIGN_BOTTOM)
+ colorsizer1.Add(StaticText(' '))
+ minsize = self.checkingcolor_iconptr.GetBestSize()
+ minsize.SetHeight(minsize.GetHeight()+5)
+ colorsizer1.SetMinSize(minsize)
+ colorsizer.Add(colorsizer1)
+
+- block12sizer.Add(colorsizer, 1, wxALIGN_LEFT)
++ block12sizer.Add(colorsizer, 1, wx.ALIGN_LEFT)
+
+ rowsizer.Add(block12sizer)
+
+- block3sizer = wxFlexGridSizer(cols = 1)
++ block3sizer = wx.FlexGridSizer(cols = 1)
+
+- portsettingsSizer = wxStaticBoxSizer(wxStaticBox(panel, -1, "Port Range:*"), wxVERTICAL)
+- portsettingsSizer1 = wxGridSizer(cols = 2, vgap = 1)
+- portsettingsSizer1.Add(StaticText('From: '), 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT)
+- portsettingsSizer1.Add(self.minport_data, 1, wxALIGN_BOTTOM)
+- portsettingsSizer1.Add(StaticText('To: '), 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT)
+- portsettingsSizer1.Add(self.maxport_data, 1, wxALIGN_BOTTOM)
++ portsettingsSizer = wx.StaticBoxSizer(wx.StaticBox(panel, -1, "Port Range:*"), wx.VERTICAL)
++ portsettingsSizer1 = wx.GridSizer(cols = 2, vgap = 1)
++ portsettingsSizer1.Add(StaticText('From: '), 1, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT)
++ portsettingsSizer1.Add(self.minport_data, 1, wx.ALIGN_BOTTOM)
++ portsettingsSizer1.Add(StaticText('To: '), 1, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT)
++ portsettingsSizer1.Add(self.maxport_data, 1, wx.ALIGN_BOTTOM)
+ portsettingsSizer.Add(portsettingsSizer1)
+- portsettingsSizer.Add(self.randomport_checkbox, 1, wxALIGN_CENTER)
+- block3sizer.Add(portsettingsSizer, 1, wxALIGN_CENTER)
++ portsettingsSizer.Add(self.randomport_checkbox, 1, wx.ALIGN_CENTER)
++ block3sizer.Add(portsettingsSizer, 1, wx.ALIGN_CENTER)
+ block3sizer.Add(StaticText(' '))
+- block3sizer.Add(self.gui_ratesettingsmode_data, 1, wxALIGN_CENTER)
++ block3sizer.Add(self.gui_ratesettingsmode_data, 1, wx.ALIGN_CENTER)
+ block3sizer.Add(StaticText(' '))
+- ratesettingsSizer = wxFlexGridSizer(cols = 1, vgap = 2)
+- ratesettingsSizer.Add(StaticText('Default Rate Setting: *'), 1, wxALIGN_CENTER)
+- ratesettingsSizer.Add(self.gui_ratesettingsdefault_data, 1, wxALIGN_CENTER)
+- block3sizer.Add(ratesettingsSizer, 1, wxALIGN_CENTER)
++ ratesettingsSizer = wx.FlexGridSizer(cols = 1, vgap = 2)
++ ratesettingsSizer.Add(StaticText('Default Rate Setting: *'), 1, wx.ALIGN_CENTER)
++ ratesettingsSizer.Add(self.gui_ratesettingsdefault_data, 1, wx.ALIGN_CENTER)
++ block3sizer.Add(ratesettingsSizer, 1, wx.ALIGN_CENTER)
+ if (sys.platform == 'win32'):
+ block3sizer.Add(StaticText(' '))
+- upnpSizer = wxFlexGridSizer(cols = 1, vgap = 2)
+- upnpSizer.Add(StaticText('UPnP Port Forwarding: *'), 1, wxALIGN_CENTER)
+- upnpSizer.Add(self.upnp_data, 1, wxALIGN_CENTER)
+- block3sizer.Add(upnpSizer, 1, wxALIGN_CENTER)
++ upnpSizer = wx.FlexGridSizer(cols = 1, vgap = 2)
++ upnpSizer.Add(StaticText('UPnP Port Forwarding: *'), 1, wx.ALIGN_CENTER)
++ upnpSizer.Add(self.upnp_data, 1, wx.ALIGN_CENTER)
++ block3sizer.Add(upnpSizer, 1, wx.ALIGN_CENTER)
+
+ rowsizer.Add(block3sizer)
+ colsizer.Add(rowsizer)
+
+- block4sizer = wxFlexGridSizer(cols = 3, hgap = 15)
+- savepathsizer = wxFlexGridSizer(cols = 2, vgap = 1)
++ block4sizer = wx.FlexGridSizer(cols = 3, hgap = 15)
++ savepathsizer = wx.FlexGridSizer(cols = 2, vgap = 1)
+ savepathsizer.Add(StaticText('Default Save Path: *'))
+ savepathsizer.Add(StaticText(' '))
+- savepathsizer.Add(self.gui_default_savedir_ctrl, 1, wxEXPAND)
+- savepathButton = wxButton(panel, -1, '...', size = (18,18))
++ savepathsizer.Add(self.gui_default_savedir_ctrl, 1, wx.EXPAND)
++ savepathButton = wx.Button(panel, -1, '...', size = (18,18))
+ # savepathButton.SetFont(self.default_font)
+- savepathsizer.Add(savepathButton, 0, wxALIGN_CENTER)
+- savepathsizer.Add(self.gui_savemode_data, 0, wxALIGN_CENTER)
+- block4sizer.Add(savepathsizer, -1, wxALIGN_BOTTOM)
++ savepathsizer.Add(savepathButton, 0, wx.ALIGN_CENTER)
++ savepathsizer.Add(self.gui_savemode_data, 0, wx.ALIGN_CENTER)
++ block4sizer.Add(savepathsizer, -1, wx.ALIGN_BOTTOM)
+
+- fontsizer = wxFlexGridSizer(cols = 1, vgap = 2)
++ fontsizer = wx.FlexGridSizer(cols = 1, vgap = 2)
+ fontsizer.Add(StaticText(''))
+- fontsizer.Add(StaticText('Font: *'), 1, wxALIGN_CENTER)
+- fontsizer.Add(self.gui_font_data, 1, wxALIGN_CENTER)
+- block4sizer.Add(fontsizer, 1, wxALIGN_CENTER_VERTICAL)
+-
+- dratesettingsSizer = wxFlexGridSizer(cols = 1, vgap = 2)
+- dratesettingsSizer.Add(StaticText('Default Max'), 1, wxALIGN_CENTER)
+- dratesettingsSizer.Add(StaticText('Download Rate'), 1, wxALIGN_CENTER)
+- dratesettingsSizer.Add(StaticText('(kB/s): *'), 1, wxALIGN_CENTER)
+- dratesettingsSizer.Add(self.maxdownload_data, 1, wxALIGN_CENTER)
+- dratesettingsSizer.Add(StaticText('(0 = disabled)'), 1, wxALIGN_CENTER)
++ fontsizer.Add(StaticText('Font: *'), 1, wx.ALIGN_CENTER)
++ fontsizer.Add(self.gui_font_data, 1, wx.ALIGN_CENTER)
++ block4sizer.Add(fontsizer, 1, wx.ALIGN_CENTER_VERTICAL)
++
++ dratesettingsSizer = wx.FlexGridSizer(cols = 1, vgap = 2)
++ dratesettingsSizer.Add(StaticText('Default Max'), 1, wx.ALIGN_CENTER)
++ dratesettingsSizer.Add(StaticText('Download Rate'), 1, wx.ALIGN_CENTER)
++ dratesettingsSizer.Add(StaticText('(kB/s): *'), 1, wx.ALIGN_CENTER)
++ dratesettingsSizer.Add(self.maxdownload_data, 1, wx.ALIGN_CENTER)
++ dratesettingsSizer.Add(StaticText('(0 = disabled)'), 1, wx.ALIGN_CENTER)
+
+- block4sizer.Add(dratesettingsSizer, 1, wxALIGN_CENTER_VERTICAL)
++ block4sizer.Add(dratesettingsSizer, 1, wx.ALIGN_CENTER_VERTICAL)
+
+- colsizer.Add(block4sizer, 0, wxALIGN_CENTER)
++ colsizer.Add(block4sizer, 0, wx.ALIGN_CENTER)
+
+- savesizer = wxGridSizer(cols = 4, hgap = 10)
+- saveButton = wxButton(panel, -1, 'Save')
++ savesizer = wx.GridSizer(cols = 4, hgap = 10)
++ saveButton = wx.Button(panel, -1, 'Save')
+ # saveButton.SetFont(self.default_font)
+- savesizer.Add(saveButton, 0, wxALIGN_CENTER)
++ savesizer.Add(saveButton, 0, wx.ALIGN_CENTER)
+
+- cancelButton = wxButton(panel, -1, 'Cancel')
++ cancelButton = wx.Button(panel, -1, 'Cancel')
+ # cancelButton.SetFont(self.default_font)
+- savesizer.Add(cancelButton, 0, wxALIGN_CENTER)
++ savesizer.Add(cancelButton, 0, wx.ALIGN_CENTER)
+
+- defaultsButton = wxButton(panel, -1, 'Revert to Defaults')
++ defaultsButton = wx.Button(panel, -1, 'Revert to Defaults')
+ # defaultsButton.SetFont(self.default_font)
+- savesizer.Add(defaultsButton, 0, wxALIGN_CENTER)
++ savesizer.Add(defaultsButton, 0, wx.ALIGN_CENTER)
+
+- advancedButton = wxButton(panel, -1, 'Advanced...')
++ advancedButton = wx.Button(panel, -1, 'Advanced...')
+ # advancedButton.SetFont(self.default_font)
+- savesizer.Add(advancedButton, 0, wxALIGN_CENTER)
+- colsizer.Add(savesizer, 1, wxALIGN_CENTER)
++ savesizer.Add(advancedButton, 0, wx.ALIGN_CENTER)
++ colsizer.Add(savesizer, 1, wx.ALIGN_CENTER)
+
+ resizewarningtext=StaticText('* These settings will not take effect until the next time you start BitTorrent', self.FONT-2)
+- colsizer.Add(resizewarningtext, 1, wxALIGN_CENTER)
++ colsizer.Add(resizewarningtext, 1, wx.ALIGN_CENTER)
+
+- border = wxBoxSizer(wxHORIZONTAL)
+- border.Add(colsizer, 1, wxEXPAND | wxALL, 4)
++ border = wx.BoxSizer(wx.HORIZONTAL)
++ border.Add(colsizer, 1, wx.EXPAND | wx.ALL, 4)
+
+ panel.SetSizer(border)
+ panel.SetAutoLayout(True)
+@@ -578,9 +573,9 @@
+ d = self.gui_default_savedir_ctrl.GetValue()
+ if d == '':
+ d = self.config['last_saved']
+- dl = wxDirDialog(self.panel, 'Choose a default directory to save to',
+- d, style = wxDD_DEFAULT_STYLE | wxDD_NEW_DIR_BUTTON)
+- if dl.ShowModal() == wxID_OK:
++ dl = wx.DirDialog(self.panel, 'Choose a default directory to save to',
++ d, style = wx.DD_DEFAULT_STYLE | wx.DD_NEW_DIR_BUTTON)
++ if dl.ShowModal() == wx.ID_OK:
+ self.gui_default_savedir_ctrl.SetValue(dl.GetPath())
+ except:
+ self.parent.exception()
+@@ -609,15 +604,15 @@
+ except:
+ self.parent.exception()
+
+- EVT_BUTTON(self.configMenuBox, saveButton.GetId(), saveConfigs)
+- EVT_BUTTON(self.configMenuBox, cancelButton.GetId(), cancelConfigs)
+- EVT_BUTTON(self.configMenuBox, defaultsButton.GetId(), setDefaults)
+- EVT_BUTTON(self.configMenuBox, advancedButton.GetId(), self.advancedMenu)
+- EVT_BUTTON(self.configMenuBox, cryptoButton.GetId(), self.cryptoMenu)
+- EVT_BUTTON(self.configMenuBox, savepathButton.GetId(), savepath_set)
+- EVT_LEFT_DOWN(self.checkingcolor_iconptr, checkingcoloricon_set)
+- EVT_LEFT_DOWN(self.downloadcolor_iconptr, downloadcoloricon_set)
+- EVT_LEFT_DOWN(self.seedingcolor_iconptr, seedingcoloricon_set)
++ wx.EVT_BUTTON(self.configMenuBox, saveButton.GetId(), saveConfigs)
++ wx.EVT_BUTTON(self.configMenuBox, cancelButton.GetId(), cancelConfigs)
++ wx.EVT_BUTTON(self.configMenuBox, defaultsButton.GetId(), setDefaults)
++ wx.EVT_BUTTON(self.configMenuBox, advancedButton.GetId(), self.advancedMenu)
++ wx.EVT_BUTTON(self.configMenuBox, cryptoButton.GetId(), self.cryptoMenu)
++ wx.EVT_BUTTON(self.configMenuBox, savepathButton.GetId(), savepath_set)
++ wx.EVT_LEFT_DOWN(self.checkingcolor_iconptr, checkingcoloricon_set)
++ wx.EVT_LEFT_DOWN(self.downloadcolor_iconptr, downloadcoloricon_set)
++ wx.EVT_LEFT_DOWN(self.seedingcolor_iconptr, seedingcoloricon_set)
+
+ self.configMenuBox.Show ()
+ border.Fit(panel)
+@@ -631,7 +626,7 @@
+ if self.configMenuBox is not None:
+ try:
+ self.configMenuBox.Close ()
+- except wxPyDeadObjectError, e:
++ except wx.PyDeadObjectError, e:
+ pass
+ self.configMenuBox = None
+
+@@ -647,65 +642,65 @@
+ if (self.advancedMenuBox is not None):
+ try:
+ self.advancedMenuBox.Close ()
+- except wxPyDeadObjectError, e:
++ except wx.PyDeadObjectError, e:
+ self.advancedMenuBox = None
+
+- self.advancedMenuBox = wxFrame(None, -1, 'BitTornado Advanced Preferences', size = (1,1),
+- style = wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE)
++ self.advancedMenuBox = wx.Frame(None, -1, 'BitTornado Advanced Preferences', size = (1,1),
++ style = wx.DEFAULT_FRAME_STYLE|wx.FULL_REPAINT_ON_RESIZE)
+ if (sys.platform == 'win32'):
+ self.advancedMenuBox.SetIcon(self.icon)
+
+- panel = wxPanel(self.advancedMenuBox, -1)
++ panel = wx.Panel(self.advancedMenuBox, -1)
+
+ def StaticText(text, font = self.FONT, underline = False, color = None, panel = panel):
+- x = wxStaticText(panel, -1, text, style = wxALIGN_LEFT)
+- x.SetFont(wxFont(font, wxDEFAULT, wxNORMAL, wxNORMAL, underline))
++ x = wx.StaticText(panel, -1, text, style = wx.ALIGN_LEFT)
++ x.SetFont(wx.Font(font, wx.DEFAULT, wx.NORMAL, wx.NORMAL, underline))
+ if color is not None:
+ x.SetForegroundColour(color)
+ return x
+
+- colsizer = wxFlexGridSizer(cols = 1, hgap = 13, vgap = 13)
++ colsizer = wx.FlexGridSizer(cols = 1, hgap = 13, vgap = 13)
+ warningtext = StaticText('CHANGE THESE SETTINGS AT YOUR OWN RISK', self.FONT+4, True, 'Red')
+- colsizer.Add(warningtext, 1, wxALIGN_CENTER)
++ colsizer.Add(warningtext, 1, wx.ALIGN_CENTER)
+
+- self.ip_data = wxTextCtrl(parent = panel, id = -1,
++ self.ip_data = wx.TextCtrl(parent = panel, id = -1,
+ value = self.advancedConfig['ip'],
+- size = (self.FONT*13, int(self.FONT*2.2)), style = wxTE_PROCESS_TAB)
++ size = (self.FONT*13, int(self.FONT*2.2)), style = wx.TE_PROCESS_TAB)
+ self.ip_data.SetFont(self.default_font)
+
+- self.bind_data = wxTextCtrl(parent = panel, id = -1,
++ self.bind_data = wx.TextCtrl(parent = panel, id = -1,
+ value = self.advancedConfig['bind'],
+- size = (self.FONT*13, int(self.FONT*2.2)), style = wxTE_PROCESS_TAB)
++ size = (self.FONT*13, int(self.FONT*2.2)), style = wx.TE_PROCESS_TAB)
+ self.bind_data.SetFont(self.default_font)
+
+ if sys.version_info >= (2,3) and socket.has_ipv6:
+- self.ipv6bindsv4_data=wxChoice(panel, -1,
++ self.ipv6bindsv4_data=wx.Choice(panel, -1,
+ choices = ['separate sockets', 'single socket'])
+ self.ipv6bindsv4_data.SetFont(self.default_font)
+ self.ipv6bindsv4_data.SetSelection(self.advancedConfig['ipv6_binds_v4'])
+
+- self.minpeers_data = wxSpinCtrl(panel, -1, '', (-1,-1), (self.FONT*7, -1))
++ self.minpeers_data = wx.SpinCtrl(panel, -1, '', (-1,-1), (self.FONT*7, -1))
+ self.minpeers_data.SetFont(self.default_font)
+ self.minpeers_data.SetRange(10,100)
+ self.minpeers_data.SetValue(self.advancedConfig['min_peers'])
+ # max_initiate = 2*minpeers
+
+- self.displayinterval_data = wxSpinCtrl(panel, -1, '', (-1,-1), (self.FONT*7, -1))
++ self.displayinterval_data = wx.SpinCtrl(panel, -1, '', (-1,-1), (self.FONT*7, -1))
+ self.displayinterval_data.SetFont(self.default_font)
+ self.displayinterval_data.SetRange(100,2000)
+ self.displayinterval_data.SetValue(int(self.advancedConfig['display_interval']*1000))
+
+- self.alloctype_data=wxChoice(panel, -1,
++ self.alloctype_data=wx.Choice(panel, -1,
+ choices = ['normal', 'background', 'pre-allocate', 'sparse'])
+ self.alloctype_data.SetFont(self.default_font)
+ self.alloctype_data.SetStringSelection(self.advancedConfig['alloc_type'])
+
+- self.allocrate_data = wxSpinCtrl(panel, -1, '', (-1,-1), (self.FONT*7,-1))
++ self.allocrate_data = wx.SpinCtrl(panel, -1, '', (-1,-1), (self.FONT*7,-1))
+ self.allocrate_data.SetFont(self.default_font)
+ self.allocrate_data.SetRange(1,100)
+ self.allocrate_data.SetValue(int(self.advancedConfig['alloc_rate']))
+
+- self.locking_data=wxChoice(panel, -1,
++ self.locking_data=wx.Choice(panel, -1,
+ choices = ['no locking', 'lock while writing', 'lock always'])
+ self.locking_data.SetFont(self.default_font)
+ if self.advancedConfig['lock_files']:
+@@ -716,7 +711,7 @@
+ else:
+ self.locking_data.SetSelection(0)
+
+- self.doublecheck_data=wxChoice(panel, -1,
++ self.doublecheck_data=wx.Choice(panel, -1,
+ choices = ['no extra checking', 'double-check', 'triple-check'])
+ self.doublecheck_data.SetFont(self.default_font)
+ if self.advancedConfig['double_check']:
+@@ -728,7 +723,7 @@
+ self.doublecheck_data.SetSelection(0)
+
+ self.maxfilesopen_choices = ['50', '100', '200', 'no limit ']
+- self.maxfilesopen_data=wxChoice(panel, -1, choices = self.maxfilesopen_choices)
++ self.maxfilesopen_data=wx.Choice(panel, -1, choices = self.maxfilesopen_choices)
+ self.maxfilesopen_data.SetFont(self.default_font)
+ setval = self.advancedConfig['max_files_open']
+ if setval == 0:
+@@ -740,7 +735,7 @@
+ self.maxfilesopen_data.SetStringSelection(setval)
+
+ self.maxconnections_choices = ['no limit ', '20', '30', '40', '50', '60', '100', '200']
+- self.maxconnections_data=wxChoice(panel, -1, choices = self.maxconnections_choices)
++ self.maxconnections_data=wx.Choice(panel, -1, choices = self.maxconnections_choices)
+ self.maxconnections_data.SetFont(self.default_font)
+ setval = self.advancedConfig['max_connections']
+ if setval == 0:
+@@ -751,13 +746,13 @@
+ setval = self.maxconnections_choices[0]
+ self.maxconnections_data.SetStringSelection(setval)
+
+- self.superseeder_data=wxChoice(panel, -1,
++ self.superseeder_data=wx.Choice(panel, -1,
+ choices = ['normal', 'super-seed'])
+ self.superseeder_data.SetFont(self.default_font)
+ self.superseeder_data.SetSelection(self.advancedConfig['super_seeder'])
+
+ self.expirecache_choices = ['never ', '3', '5', '7', '10', '15', '30', '60', '90']
+- self.expirecache_data=wxChoice(panel, -1, choices = self.expirecache_choices)
++ self.expirecache_data=wx.Choice(panel, -1, choices = self.expirecache_choices)
+ setval = self.advancedConfig['expire_cache_data']
+ if setval == 0:
+ setval = 'never '
+@@ -769,65 +764,65 @@
+ self.expirecache_data.SetStringSelection(setval)
+
+
+- twocolsizer = wxFlexGridSizer(cols = 2, hgap = 20)
+- datasizer = wxFlexGridSizer(cols = 2, vgap = 2)
+- datasizer.Add(StaticText('Local IP: '), 1, wxALIGN_CENTER_VERTICAL)
++ twocolsizer = wx.FlexGridSizer(cols = 2, hgap = 20)
++ datasizer = wx.FlexGridSizer(cols = 2, vgap = 2)
++ datasizer.Add(StaticText('Local IP: '), 1, wx.ALIGN_CENTER_VERTICAL)
+ datasizer.Add(self.ip_data)
+- datasizer.Add(StaticText('IP to bind to: '), 1, wxALIGN_CENTER_VERTICAL)
++ datasizer.Add(StaticText('IP to bind to: '), 1, wx.ALIGN_CENTER_VERTICAL)
+ datasizer.Add(self.bind_data)
+ if sys.version_info >= (2,3) and socket.has_ipv6:
+- datasizer.Add(StaticText('IPv6 socket handling: '), 1, wxALIGN_CENTER_VERTICAL)
++ datasizer.Add(StaticText('IPv6 socket handling: '), 1, wx.ALIGN_CENTER_VERTICAL)
+ datasizer.Add(self.ipv6bindsv4_data)
+- datasizer.Add(StaticText('Minimum number of peers: '), 1, wxALIGN_CENTER_VERTICAL)
++ datasizer.Add(StaticText('Minimum number of peers: '), 1, wx.ALIGN_CENTER_VERTICAL)
+ datasizer.Add(self.minpeers_data)
+- datasizer.Add(StaticText('Display interval (ms): '), 1, wxALIGN_CENTER_VERTICAL)
++ datasizer.Add(StaticText('Display interval (ms): '), 1, wx.ALIGN_CENTER_VERTICAL)
+ datasizer.Add(self.displayinterval_data)
+- datasizer.Add(StaticText('Disk allocation type:'), 1, wxALIGN_CENTER_VERTICAL)
++ datasizer.Add(StaticText('Disk allocation type:'), 1, wx.ALIGN_CENTER_VERTICAL)
+ datasizer.Add(self.alloctype_data)
+- datasizer.Add(StaticText('Allocation rate (MiB/s):'), 1, wxALIGN_CENTER_VERTICAL)
++ datasizer.Add(StaticText('Allocation rate (MiB/s):'), 1, wx.ALIGN_CENTER_VERTICAL)
+ datasizer.Add(self.allocrate_data)
+- datasizer.Add(StaticText('File locking:'), 1, wxALIGN_CENTER_VERTICAL)
++ datasizer.Add(StaticText('File locking:'), 1, wx.ALIGN_CENTER_VERTICAL)
+ datasizer.Add(self.locking_data)
+- datasizer.Add(StaticText('Extra data checking:'), 1, wxALIGN_CENTER_VERTICAL)
++ datasizer.Add(StaticText('Extra data checking:'), 1, wx.ALIGN_CENTER_VERTICAL)
+ datasizer.Add(self.doublecheck_data)
+- datasizer.Add(StaticText('Max files open:'), 1, wxALIGN_CENTER_VERTICAL)
++ datasizer.Add(StaticText('Max files open:'), 1, wx.ALIGN_CENTER_VERTICAL)
+ datasizer.Add(self.maxfilesopen_data)
+- datasizer.Add(StaticText('Max peer connections:'), 1, wxALIGN_CENTER_VERTICAL)
++ datasizer.Add(StaticText('Max peer connections:'), 1, wx.ALIGN_CENTER_VERTICAL)
+ datasizer.Add(self.maxconnections_data)
+- datasizer.Add(StaticText('Default seeding mode:'), 1, wxALIGN_CENTER_VERTICAL)
++ datasizer.Add(StaticText('Default seeding mode:'), 1, wx.ALIGN_CENTER_VERTICAL)
+ datasizer.Add(self.superseeder_data)
+- datasizer.Add(StaticText('Expire resume data(days):'), 1, wxALIGN_CENTER_VERTICAL)
++ datasizer.Add(StaticText('Expire resume data(days):'), 1, wx.ALIGN_CENTER_VERTICAL)
+ datasizer.Add(self.expirecache_data)
+
+ twocolsizer.Add(datasizer)
+
+- infosizer = wxFlexGridSizer(cols = 1)
++ infosizer = wx.FlexGridSizer(cols = 1)
+ self.hinttext = StaticText('', self.FONT, False, 'Blue')
+- infosizer.Add(self.hinttext, 1, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL)
++ infosizer.Add(self.hinttext, 1, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL)
+ infosizer.SetMinSize((180,100))
+- twocolsizer.Add(infosizer, 1, wxEXPAND)
++ twocolsizer.Add(infosizer, 1, wx.EXPAND)
+
+ colsizer.Add(twocolsizer)
+
+- savesizer = wxGridSizer(cols = 3, hgap = 20)
+- okButton = wxButton(panel, -1, 'OK')
++ savesizer = wx.GridSizer(cols = 3, hgap = 20)
++ okButton = wx.Button(panel, -1, 'OK')
+ # okButton.SetFont(self.default_font)
+- savesizer.Add(okButton, 0, wxALIGN_CENTER)
++ savesizer.Add(okButton, 0, wx.ALIGN_CENTER)
+
+- cancelButton = wxButton(panel, -1, 'Cancel')
++ cancelButton = wx.Button(panel, -1, 'Cancel')
+ # cancelButton.SetFont(self.default_font)
+- savesizer.Add(cancelButton, 0, wxALIGN_CENTER)
++ savesizer.Add(cancelButton, 0, wx.ALIGN_CENTER)
+
+- defaultsButton = wxButton(panel, -1, 'Revert to Defaults')
++ defaultsButton = wx.Button(panel, -1, 'Revert to Defaults')
+ # defaultsButton.SetFont(self.default_font)
+- savesizer.Add(defaultsButton, 0, wxALIGN_CENTER)
+- colsizer.Add(savesizer, 1, wxALIGN_CENTER)
++ savesizer.Add(defaultsButton, 0, wx.ALIGN_CENTER)
++ colsizer.Add(savesizer, 1, wx.ALIGN_CENTER)
+
+ resizewarningtext=StaticText('None of these settings will take effect until the next time you start BitTorrent', self.FONT-2)
+- colsizer.Add(resizewarningtext, 1, wxALIGN_CENTER)
++ colsizer.Add(resizewarningtext, 1, wx.ALIGN_CENTER)
+
+- border = wxBoxSizer(wxHORIZONTAL)
+- border.Add(colsizer, 1, wxEXPAND | wxALL, 4)
++ border = wx.BoxSizer(wx.HORIZONTAL)
++ border.Add(colsizer, 1, wx.EXPAND | wx.ALL, 4)
+
+ panel.SetSizer(border)
+ panel.SetAutoLayout(True)
+@@ -1024,23 +1019,23 @@
+ "client will keep this data before\n" +
+ "deleting it to free disk space.")
+
+- EVT_BUTTON(self.advancedMenuBox, okButton.GetId(), saveConfigs)
+- EVT_BUTTON(self.advancedMenuBox, cancelButton.GetId(), cancelConfigs)
+- EVT_BUTTON(self.advancedMenuBox, defaultsButton.GetId(), setDefaults)
+- EVT_ENTER_WINDOW(self.ip_data, ip_hint)
+- EVT_ENTER_WINDOW(self.bind_data, bind_hint)
++ wx.EVT_BUTTON(self.advancedMenuBox, okButton.GetId(), saveConfigs)
++ wx.EVT_BUTTON(self.advancedMenuBox, cancelButton.GetId(), cancelConfigs)
++ wx.EVT_BUTTON(self.advancedMenuBox, defaultsButton.GetId(), setDefaults)
++ wx.EVT_ENTER_WINDOW(self.ip_data, ip_hint)
++ wx.EVT_ENTER_WINDOW(self.bind_data, bind_hint)
+ if sys.version_info >= (2,3) and socket.has_ipv6:
+- EVT_ENTER_WINDOW(self.ipv6bindsv4_data, ipv6bindsv4_hint)
+- EVT_ENTER_WINDOW(self.minpeers_data, minpeers_hint)
+- EVT_ENTER_WINDOW(self.displayinterval_data, displayinterval_hint)
+- EVT_ENTER_WINDOW(self.alloctype_data, alloctype_hint)
+- EVT_ENTER_WINDOW(self.allocrate_data, allocrate_hint)
+- EVT_ENTER_WINDOW(self.locking_data, locking_hint)
+- EVT_ENTER_WINDOW(self.doublecheck_data, doublecheck_hint)
+- EVT_ENTER_WINDOW(self.maxfilesopen_data, maxfilesopen_hint)
+- EVT_ENTER_WINDOW(self.maxconnections_data, maxconnections_hint)
+- EVT_ENTER_WINDOW(self.superseeder_data, superseeder_hint)
+- EVT_ENTER_WINDOW(self.expirecache_data, expirecache_hint)
++ wx.EVT_ENTER_WINDOW(self.ipv6bindsv4_data, ipv6bindsv4_hint)
++ wx.EVT_ENTER_WINDOW(self.minpeers_data, minpeers_hint)
++ wx.EVT_ENTER_WINDOW(self.displayinterval_data, displayinterval_hint)
++ wx.EVT_ENTER_WINDOW(self.alloctype_data, alloctype_hint)
++ wx.EVT_ENTER_WINDOW(self.allocrate_data, allocrate_hint)
++ wx.EVT_ENTER_WINDOW(self.locking_data, locking_hint)
++ wx.EVT_ENTER_WINDOW(self.doublecheck_data, doublecheck_hint)
++ wx.EVT_ENTER_WINDOW(self.maxfilesopen_data, maxfilesopen_hint)
++ wx.EVT_ENTER_WINDOW(self.maxconnections_data, maxconnections_hint)
++ wx.EVT_ENTER_WINDOW(self.superseeder_data, superseeder_hint)
++ wx.EVT_ENTER_WINDOW(self.expirecache_data, expirecache_hint)
+
+ self.advancedMenuBox.Show ()
+ border.Fit(panel)
+@@ -1053,7 +1048,7 @@
+ if self.advancedMenuBox is not None:
+ try:
+ self.advancedMenuBox.Close()
+- except wxPyDeadObjectError, e:
++ except wx.PyDeadObjectError, e:
+ self.advancedMenuBox = None
+
+
+@@ -1067,28 +1062,28 @@
+ if (self.cryptoMenuBox is not None):
+ try:
+ self.cryptoMenuBox.Close ()
+- except wxPyDeadObjectError, e:
++ except wx.PyDeadObjectError, e:
+ self.cryptoMenuBox = None
+
+- self.cryptoMenuBox = wxFrame(None, -1, 'BitTornado Encryption/Security Preferences', size = (1,1),
+- style = wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE)
++ self.cryptoMenuBox = wx.Frame(None, -1, 'BitTornado Encryption/Security Preferences', size = (1,1),
++ style = wx.DEFAULT_FRAME_STYLE|wx.FULL_REPAINT_ON_RESIZE)
+ if (sys.platform == 'win32'):
+ self.cryptoMenuBox.SetIcon(self.icon)
+
+- panel = wxPanel(self.cryptoMenuBox, -1)
++ panel = wx.Panel(self.cryptoMenuBox, -1)
+ # self.panel = panel
+
+ def StaticText(text, font = self.FONT, underline = False, color = None, panel = panel):
+- x = wxStaticText(panel, -1, text, style = wxALIGN_LEFT)
+- x.SetFont(wxFont(font, wxDEFAULT, wxNORMAL, wxNORMAL, underline))
++ x = wx.StaticText(panel, -1, text, style = wx.ALIGN_LEFT)
++ x.SetFont(wx.Font(font, wx.DEFAULT, wx.NORMAL, wx.NORMAL, underline))
+ if color is not None:
+ x.SetForegroundColour(color)
+ return x
+
+- colsizer = wxFlexGridSizer(cols = 1, hgap = 13, vgap = 13)
++ colsizer = wx.FlexGridSizer(cols = 1, hgap = 13, vgap = 13)
+
+- self.cryptomode_data=wxRadioBox(panel, -1, 'Encryption',
+- style = wxRA_SPECIFY_COLS, majorDimension = 1,
++ self.cryptomode_data=wx.RadioBox(panel, -1, 'Encryption',
++ style = wx.RA_SPECIFY_COLS, majorDimension = 1,
+ choices = [
+ 'no encryption permitted',
+ 'encryption enabled (default)',
+@@ -1108,37 +1103,37 @@
+ if not CRYPTO_OK: # no crypto library in place
+ self.cryptomode_data.Enable(False)
+
+- self.security_checkbox = wxCheckBox(panel, -1, "Don't allow multiple connections from the same IP")
++ self.security_checkbox = wx.CheckBox(panel, -1, "Don't allow multiple connections from the same IP")
+ self.security_checkbox.SetFont(self.default_font)
+ self.security_checkbox.SetValue(self.cryptoConfig['security'])
+
+- self.autokick_checkbox = wxCheckBox(panel, -1, "Kick/ban clients that send you bad data")
++ self.autokick_checkbox = wx.CheckBox(panel, -1, "Kick/ban clients that send you bad data")
+ self.autokick_checkbox.SetFont(self.default_font)
+ self.autokick_checkbox.SetValue(self.cryptoConfig['auto_kick'])
+
+ colsizer.Add(self.cryptomode_data)
+
+- block2sizer = wxFlexGridSizer(cols = 1, vgap = 2)
++ block2sizer = wx.FlexGridSizer(cols = 1, vgap = 2)
+ block2sizer.Add(self.security_checkbox)
+ block2sizer.Add(self.autokick_checkbox)
+ colsizer.Add(block2sizer)
+
+- savesizer = wxGridSizer(cols = 3, hgap = 20)
+- okButton = wxButton(panel, -1, 'OK')
+- savesizer.Add(okButton, 0, wxALIGN_CENTER)
+-
+- cancelButton = wxButton(panel, -1, 'Cancel')
+- savesizer.Add(cancelButton, 0, wxALIGN_CENTER)
+-
+- defaultsButton = wxButton(panel, -1, 'Revert to Defaults')
+- savesizer.Add(defaultsButton, 0, wxALIGN_CENTER)
+- colsizer.Add(savesizer, 1, wxALIGN_CENTER)
++ savesizer = wx.GridSizer(cols = 3, hgap = 20)
++ okButton = wx.Button(panel, -1, 'OK')
++ savesizer.Add(okButton, 0, wx.ALIGN_CENTER)
++
++ cancelButton = wx.Button(panel, -1, 'Cancel')
++ savesizer.Add(cancelButton, 0, wx.ALIGN_CENTER)
++
++ defaultsButton = wx.Button(panel, -1, 'Revert to Defaults')
++ savesizer.Add(defaultsButton, 0, wx.ALIGN_CENTER)
++ colsizer.Add(savesizer, 1, wx.ALIGN_CENTER)
+
+ resizewarningtext=StaticText('None of these settings will take effect until the next time you start BitTorrent', self.FONT-2)
+- colsizer.Add(resizewarningtext, 1, wxALIGN_CENTER)
++ colsizer.Add(resizewarningtext, 1, wx.ALIGN_CENTER)
+
+- border = wxBoxSizer(wxHORIZONTAL)
+- border.Add(colsizer, 1, wxEXPAND | wxALL, 4)
++ border = wx.BoxSizer(wx.HORIZONTAL)
++ border.Add(colsizer, 1, wx.EXPAND | wx.ALL, 4)
+
+ panel.SetSizer(border)
+ panel.SetAutoLayout(True)
+@@ -1174,9 +1169,9 @@
+ def cancelConfigs(evt, self = self):
+ self.cryptoMenuBox.Close()
+
+- EVT_BUTTON(self.cryptoMenuBox, okButton.GetId(), saveConfigs)
+- EVT_BUTTON(self.cryptoMenuBox, cancelButton.GetId(), cancelConfigs)
+- EVT_BUTTON(self.cryptoMenuBox, defaultsButton.GetId(), setDefaults)
++ wx.EVT_BUTTON(self.cryptoMenuBox, okButton.GetId(), saveConfigs)
++ wx.EVT_BUTTON(self.cryptoMenuBox, cancelButton.GetId(), cancelConfigs)
++ wx.EVT_BUTTON(self.cryptoMenuBox, defaultsButton.GetId(), setDefaults)
+
+ self.cryptoMenuBox.Show ()
+ border.Fit(panel)
+@@ -1189,7 +1184,7 @@
+ if self.cryptMenuBox is not None:
+ try:
+ self.cryptMenuBox.Close()
+- except wxPyDeadObjectError, e:
++ except wx.PyDeadObjectError, e:
+ self.cryptMenuBox = None
+
+
+--- bittornado.orig/bt-t-make.py
++++ bittornado/bt-t-make.py
+@@ -23,7 +23,7 @@
+ from os.path import join, isdir
+ from traceback import print_exc
+ try:
+- from wxPython.wx import *
++ import wx
+ except:
+ print 'wxPython is either not installed or has not been installed properly.'
+ sys.exit(1)
+@@ -42,14 +42,14 @@
+ DROP_HERE = ''
+
+
+-wxEVT_INVOKE = wxNewEventType()
++wxEVT_INVOKE = wx.NewEventType()
+
+ def EVT_INVOKE(win, func):
+ win.Connect(-1, -1, wxEVT_INVOKE, func)
+
+-class InvokeEvent(wxPyEvent):
++class InvokeEvent(wx.PyEvent):
+ def __init__(self, func, args, kwargs):
+- wxPyEvent.__init__(self)
++ wx.PyEvent.__init__(self)
+ self.SetEventType(wxEVT_INVOKE)
+ self.func = func
+ self.args = args
+@@ -66,7 +66,7 @@
+ self.switchlock = Lock()
+ self.working = False
+ self.queue = []
+- wxInitAllImageHandlers()
++ wx.InitAllImageHandlers()
+ self.thostselection = self.calls['getCurrentTHost']()
+ self.thostselectnum = 0
+ self.choices = None
+@@ -74,76 +74,76 @@
+ self.announce = ''
+ self.announce_list = None
+
+- self.windowStyle = wxSYSTEM_MENU|wxCAPTION|wxMINIMIZE_BOX
++ self.windowStyle = wx.SYSTEM_MENU|wx.CAPTION|wx.MINIMIZE_BOX
+ if self.config['stayontop']:
+- self.windowStyle |= wxSTAY_ON_TOP
+- frame = wxFrame(None, -1, 'T-Make',
+- size = wxSize(-1, -1),
++ self.windowStyle |= wx.STAY_ON_TOP
++ frame = wx.Frame(None, -1, 'T-Make',
++ size = wx.Size(-1, -1),
+ style = self.windowStyle)
+ self.frame = frame
+- panel = wxPanel(frame, -1)
+- mainSizer = wxBoxSizer(wxVERTICAL)
+- groupSizer = wxFlexGridSizer(cols = 1, vgap = 0, hgap = 0)
++ panel = wx.Panel(frame, -1)
++ mainSizer = wx.BoxSizer(wx.VERTICAL)
++ groupSizer = wx.FlexGridSizer(cols = 1, vgap = 0, hgap = 0)
+ # self.dropTarget = self.calls['newDropTarget']((200,200))
+ self.dropTarget = self.calls['newDropTarget']()
+- self.dropTargetPtr = wxStaticBitmap(panel, -1, self.dropTarget)
++ self.dropTargetPtr = wx.StaticBitmap(panel, -1, self.dropTarget)
+ self.calls['setDropTargetRefresh'](self.dropTargetPtr.Refresh)
+ self.dropTargetWidth = self.dropTarget.GetWidth()
+- EVT_LEFT_DOWN(self.dropTargetPtr,self.dropTargetClick)
+- EVT_ENTER_WINDOW(self.dropTargetPtr,self.calls['dropTargetHovered'])
+- EVT_LEAVE_WINDOW(self.dropTargetPtr,self.calls['dropTargetUnhovered'])
+- groupSizer.Add(self.dropTargetPtr,0,wxALIGN_CENTER)
+- lowerSizer1 = wxGridSizer(cols = 6)
+- dirlink = wxStaticText(panel, -1, 'dir')
+- dirlink.SetFont(wxFont(7, wxDEFAULT, wxNORMAL, wxNORMAL, True))
++ wx.EVT_LEFT_DOWN(self.dropTargetPtr,self.dropTargetClick)
++ wx.EVT_ENTER_WINDOW(self.dropTargetPtr,self.calls['dropTargetHovered'])
++ wx.EVT_LEAVE_WINDOW(self.dropTargetPtr,self.calls['dropTargetUnhovered'])
++ groupSizer.Add(self.dropTargetPtr,0,wx.ALIGN_CENTER)
++ lowerSizer1 = wx.GridSizer(cols = 6)
++ dirlink = wx.StaticText(panel, -1, 'dir')
++ dirlink.SetFont(wx.Font(7, wx.DEFAULT, wx.NORMAL, wx.NORMAL, True))
+ dirlink.SetForegroundColour('blue')
+- EVT_LEFT_UP(dirlink,self.selectdir)
+- lowerSizer1.Add(dirlink, -1, wxALIGN_LEFT)
+- lowerSizer1.Add(wxStaticText(panel, -1, ''), -1, wxALIGN_CENTER)
+- lowerSizer1.Add(wxStaticText(panel, -1, ''), -1, wxALIGN_CENTER)
+- lowerSizer1.Add(wxStaticText(panel, -1, ''), -1, wxALIGN_CENTER)
+- lowerSizer1.Add(wxStaticText(panel, -1, ''), -1, wxALIGN_CENTER)
+- filelink = wxStaticText(panel, -1, 'file')
+- filelink.SetFont(wxFont(7, wxDEFAULT, wxNORMAL, wxNORMAL, True))
++ wx.EVT_LEFT_UP(dirlink,self.selectdir)
++ lowerSizer1.Add(dirlink, -1, wx.ALIGN_LEFT)
++ lowerSizer1.Add(wx.StaticText(panel, -1, ''), -1, wx.ALIGN_CENTER)
++ lowerSizer1.Add(wx.StaticText(panel, -1, ''), -1, wx.ALIGN_CENTER)
++ lowerSizer1.Add(wx.StaticText(panel, -1, ''), -1, wx.ALIGN_CENTER)
++ lowerSizer1.Add(wx.StaticText(panel, -1, ''), -1, wx.ALIGN_CENTER)
++ filelink = wx.StaticText(panel, -1, 'file')
++ filelink.SetFont(wx.Font(7, wx.DEFAULT, wx.NORMAL, wx.NORMAL, True))
+ filelink.SetForegroundColour('blue')
+- EVT_LEFT_UP(filelink,self.selectfile)
+- lowerSizer1.Add(filelink, -1, wxALIGN_RIGHT)
++ wx.EVT_LEFT_UP(filelink,self.selectfile)
++ lowerSizer1.Add(filelink, -1, wx.ALIGN_RIGHT)
+
+- groupSizer.Add(lowerSizer1, -1, wxALIGN_CENTER)
++ groupSizer.Add(lowerSizer1, -1, wx.ALIGN_CENTER)
+
+- self.gauge = wxGauge(panel, -1, range = 1000,
+- style = wxGA_HORIZONTAL, size = (-1,15))
+- groupSizer.Add(self.gauge, 0, wxEXPAND)
+- self.statustext = wxStaticText(panel, -1, 'ready',
+- style = wxALIGN_CENTER|wxST_NO_AUTORESIZE)
+- self.statustext.SetFont(wxFont(7, wxDEFAULT, wxNORMAL, wxBOLD, False))
+- groupSizer.Add(self.statustext, -1, wxEXPAND)
+- self.choices = wxChoice(panel, -1, (-1, -1), (self.dropTargetWidth, -1),
++ self.gauge = wx.Gauge(panel, -1, range = 1000,
++ style = wx.GA_HORIZONTAL, size = (-1,15))
++ groupSizer.Add(self.gauge, 0, wx.EXPAND)
++ self.statustext = wx.StaticText(panel, -1, 'ready',
++ style = wx.ALIGN_CENTER|wx.ST_NO_AUTORESIZE)
++ self.statustext.SetFont(wx.Font(7, wx.DEFAULT, wx.NORMAL, wx.BOLD, False))
++ groupSizer.Add(self.statustext, -1, wx.EXPAND)
++ self.choices = wx.Choice(panel, -1, (-1, -1), (self.dropTargetWidth, -1),
+ choices = [])
+- self.choices.SetFont(wxFont(7, wxDEFAULT, wxNORMAL, wxNORMAL, False))
+- EVT_CHOICE(self.choices, -1, self.set_thost)
+- groupSizer.Add(self.choices, 0, wxEXPAND)
+- cancellink = wxStaticText(panel, -1, 'cancel')
+- cancellink.SetFont(wxFont(7, wxDEFAULT, wxNORMAL, wxNORMAL, True))
++ self.choices.SetFont(wx.Font(7, wx.DEFAULT, wx.NORMAL, wx.NORMAL, False))
++ wx.EVT_CHOICE(self.choices, -1, self.set_thost)
++ groupSizer.Add(self.choices, 0, wx.EXPAND)
++ cancellink = wx.StaticText(panel, -1, 'cancel')
++ cancellink.SetFont(wx.Font(7, wx.DEFAULT, wx.NORMAL, wx.NORMAL, True))
+ cancellink.SetForegroundColour('red')
+- EVT_LEFT_UP(cancellink,self.cancel)
+- groupSizer.Add(cancellink, -1, wxALIGN_CENTER)
+- advlink = wxStaticText(panel, -1, 'advanced')
+- advlink.SetFont(wxFont(7, wxDEFAULT, wxNORMAL, wxNORMAL, True))
++ wx.EVT_LEFT_UP(cancellink,self.cancel)
++ groupSizer.Add(cancellink, -1, wx.ALIGN_CENTER)
++ advlink = wx.StaticText(panel, -1, 'advanced')
++ advlink.SetFont(wx.Font(7, wx.DEFAULT, wx.NORMAL, wx.NORMAL, True))
+ advlink.SetForegroundColour('blue')
+- EVT_LEFT_UP(advlink,self.calls['switchToAdvanced'])
+- groupSizer.Add(advlink, -1, wxALIGN_CENTER)
+- mainSizer.Add(groupSizer, 0, wxALIGN_CENTER)
++ wx.EVT_LEFT_UP(advlink,self.calls['switchToAdvanced'])
++ groupSizer.Add(advlink, -1, wx.ALIGN_CENTER)
++ mainSizer.Add(groupSizer, 0, wx.ALIGN_CENTER)
+
+ self.refresh_thostlist()
+ self._set_thost()
+
+ if platform == 'win32':
+ self.dropTargetPtr.DragAcceptFiles(True)
+- EVT_DROP_FILES(self.dropTargetPtr, self.selectdrop)
++ wx.EVT_DROP_FILES(self.dropTargetPtr, self.selectdrop)
+
+-# border = wxBoxSizer(wxHORIZONTAL)
+-# border.Add(mainSizer, 1, wxEXPAND | wxALL, 0)
++# border = wx.BoxSizer(wx.HORIZONTAL)
++# border.Add(mainSizer, 1, wx.EXPAND | wx.ALL, 0)
+ panel.SetSizer(mainSizer)
+ panel.SetAutoLayout(True)
+ # border.Fit(panel)
+@@ -152,13 +152,13 @@
+ frame.Show(True)
+
+ EVT_INVOKE(frame, self.onInvoke)
+- EVT_CLOSE(frame, self._close)
++ wx.EVT_CLOSE(frame, self._close)
+
+
+ def selectdir(self, x = None):
+ self.calls['dropTargetHovered']()
+- dl = wxDirDialog(self.frame, style = wxDD_DEFAULT_STYLE | wxDD_NEW_DIR_BUTTON)
+- if dl.ShowModal() == wxID_OK:
++ dl = wx.DirDialog(self.frame, style = wx.DD_DEFAULT_STYLE | wx.DD_NEW_DIR_BUTTON)
++ if dl.ShowModal() == wx.ID_OK:
+ self.calls['dropTargetDropped']()
+ self.complete(dl.GetPath())
+ else:
+@@ -166,8 +166,8 @@
+
+ def selectfile(self, x = None):
+ self.calls['dropTargetHovered']()
+- dl = wxFileDialog (self.frame, 'Choose file to use', '', '', '', wxOPEN)
+- if dl.ShowModal() == wxID_OK:
++ dl = wx.FileDialog (self.frame, 'Choose file to use', '', '', '', wx.OPEN)
++ if dl.ShowModal() == wx.ID_OK:
+ self.calls['dropTargetDropped']()
+ self.complete(dl.GetPath())
+ else:
+@@ -266,7 +266,7 @@
+
+ def invokeLater(self, func, args = [], kwargs = {}):
+ if not self.uiflag.isSet():
+- wxPostEvent(self.frame, InvokeEvent(func, args, kwargs))
++ wx.PostEvent(self.frame, InvokeEvent(func, args, kwargs))
+
+ def build_setgauge(self, x):
+ self.invokeLater(self.on_setgauge, [x])
+@@ -319,219 +319,219 @@
+ self.switchlock = Lock()
+ self.working = False
+ self.queue = []
+- wxInitAllImageHandlers()
++ wx.InitAllImageHandlers()
+ self.thostselection = self.calls['getCurrentTHost']()
+ self.thostselectnum = 0
+ self.choices = None
+ self.choices1 = None
+
+- self.windowStyle = wxSYSTEM_MENU|wxCAPTION|wxMINIMIZE_BOX
++ self.windowStyle = wx.SYSTEM_MENU|wx.CAPTION|wx.MINIMIZE_BOX
+ if self.config['stayontop']:
+- self.windowStyle |= wxSTAY_ON_TOP
+- frame = wxFrame(None, -1, 'T-Make',
+- size = wxSize(-1, -1),
++ self.windowStyle |= wx.STAY_ON_TOP
++ frame = wx.Frame(None, -1, 'T-Make',
++ size = wx.Size(-1, -1),
+ style = self.windowStyle)
+ self.frame = frame
+- panel = wxPanel(frame, -1)
++ panel = wx.Panel(frame, -1)
+
+- fullSizer = wxFlexGridSizer(cols = 1, vgap = 0, hgap = 8)
++ fullSizer = wx.FlexGridSizer(cols = 1, vgap = 0, hgap = 8)
+
+- colSizer = wxFlexGridSizer(cols = 2, vgap = 0, hgap = 8)
+- leftSizer = wxFlexGridSizer(cols = 1, vgap = 3)
++ colSizer = wx.FlexGridSizer(cols = 2, vgap = 0, hgap = 8)
++ leftSizer = wx.FlexGridSizer(cols = 1, vgap = 3)
+
+- self.stayontop_checkbox = wxCheckBox(panel, -1, "stay on top")
++ self.stayontop_checkbox = wx.CheckBox(panel, -1, "stay on top")
+ self.stayontop_checkbox.SetValue(self.config['stayontop'])
+- EVT_CHECKBOX(frame, self.stayontop_checkbox.GetId(), self.setstayontop)
+- leftSizer.Add(self.stayontop_checkbox, -1, wxALIGN_CENTER)
+- leftSizer.Add(wxStaticText(panel, -1, ''))
+-
+- button = wxButton(panel, -1, 'use image...')
+- EVT_BUTTON(frame, button.GetId(), self.selectDropTarget)
+- leftSizer.Add(button, -1, wxALIGN_CENTER)
++ wx.EVT_CHECKBOX(frame, self.stayontop_checkbox.GetId(), self.setstayontop)
++ leftSizer.Add(self.stayontop_checkbox, -1, wx.ALIGN_CENTER)
++ leftSizer.Add(wx.StaticText(panel, -1, ''))
++
++ button = wx.Button(panel, -1, 'use image...')
++ wx.EVT_BUTTON(frame, button.GetId(), self.selectDropTarget)
++ leftSizer.Add(button, -1, wx.ALIGN_CENTER)
+
+- self.groupSizer1Box = wxStaticBox(panel, -1, '')
+- groupSizer1 = wxStaticBoxSizer(self.groupSizer1Box, wxHORIZONTAL)
+- groupSizer = wxFlexGridSizer(cols = 1, vgap = 0)
++ self.groupSizer1Box = wx.StaticBox(panel, -1, '')
++ groupSizer1 = wx.StaticBoxSizer(self.groupSizer1Box, wx.HORIZONTAL)
++ groupSizer = wx.FlexGridSizer(cols = 1, vgap = 0)
+ self.dropTarget = self.calls['newDropTarget']((200,200))
+ # self.dropTarget = self.calls['newDropTarget']()
+- self.dropTargetPtr = wxStaticBitmap(panel, -1, self.dropTarget)
++ self.dropTargetPtr = wx.StaticBitmap(panel, -1, self.dropTarget)
+ self.calls['setDropTargetRefresh'](self.dropTargetPtr.Refresh)
+ self.dropTargetWidth = self.dropTarget.GetWidth()
+- EVT_LEFT_DOWN(self.dropTargetPtr,self.dropTargetClick)
+- EVT_ENTER_WINDOW(self.dropTargetPtr,self.calls['dropTargetHovered'])
+- EVT_LEAVE_WINDOW(self.dropTargetPtr,self.calls['dropTargetUnhovered'])
+- groupSizer.Add(self.dropTargetPtr,0,wxALIGN_CENTER)
+- lowerSizer1 = wxGridSizer(cols = 3)
+- dirlink = wxStaticText(panel, -1, 'dir')
+- dirlink.SetFont(wxFont(7, wxDEFAULT, wxNORMAL, wxNORMAL, True))
++ wx.EVT_LEFT_DOWN(self.dropTargetPtr,self.dropTargetClick)
++ wx.EVT_ENTER_WINDOW(self.dropTargetPtr,self.calls['dropTargetHovered'])
++ wx.EVT_LEAVE_WINDOW(self.dropTargetPtr,self.calls['dropTargetUnhovered'])
++ groupSizer.Add(self.dropTargetPtr,0,wx.ALIGN_CENTER)
++ lowerSizer1 = wx.GridSizer(cols = 3)
++ dirlink = wx.StaticText(panel, -1, 'dir')
++ dirlink.SetFont(wx.Font(7, wx.DEFAULT, wx.NORMAL, wx.NORMAL, True))
+ dirlink.SetForegroundColour('blue')
+- EVT_LEFT_UP(dirlink,self.selectdir)
+- lowerSizer1.Add(dirlink, -1, wxALIGN_LEFT)
+- lowerSizer1.Add(wxStaticText(panel, -1, ''), -1, wxALIGN_CENTER)
+- filelink = wxStaticText(panel, -1, 'file')
+- filelink.SetFont(wxFont(7, wxDEFAULT, wxNORMAL, wxNORMAL, True))
++ wx.EVT_LEFT_UP(dirlink,self.selectdir)
++ lowerSizer1.Add(dirlink, -1, wx.ALIGN_LEFT)
++ lowerSizer1.Add(wx.StaticText(panel, -1, ''), -1, wx.ALIGN_CENTER)
++ filelink = wx.StaticText(panel, -1, 'file')
++ filelink.SetFont(wx.Font(7, wx.DEFAULT, wx.NORMAL, wx.NORMAL, True))
+ filelink.SetForegroundColour('blue')
+- EVT_LEFT_UP(filelink,self.selectfile)
+- lowerSizer1.Add(filelink, -1, wxALIGN_RIGHT)
++ wx.EVT_LEFT_UP(filelink,self.selectfile)
++ lowerSizer1.Add(filelink, -1, wx.ALIGN_RIGHT)
+
+- groupSizer.Add(lowerSizer1, -1, wxALIGN_CENTER)
++ groupSizer.Add(lowerSizer1, -1, wx.ALIGN_CENTER)
+
+- self.gauge = wxGauge(panel, -1, range = 1000,
+- style = wxGA_HORIZONTAL, size = (-1,15))
+- groupSizer.Add(self.gauge, 0, wxEXPAND)
+- self.statustext = wxStaticText(panel, -1, 'ready',
+- style = wxALIGN_CENTER|wxST_NO_AUTORESIZE)
+- self.statustext.SetFont(wxFont(7, wxDEFAULT, wxNORMAL, wxBOLD, False))
+- groupSizer.Add(self.statustext, -1, wxEXPAND)
+- self.choices = wxChoice(panel, -1, (-1, -1), (self.dropTargetWidth, -1),
++ self.gauge = wx.Gauge(panel, -1, range = 1000,
++ style = wx.GA_HORIZONTAL, size = (-1,15))
++ groupSizer.Add(self.gauge, 0, wx.EXPAND)
++ self.statustext = wx.StaticText(panel, -1, 'ready',
++ style = wx.ALIGN_CENTER|wx.ST_NO_AUTORESIZE)
++ self.statustext.SetFont(wx.Font(7, wx.DEFAULT, wx.NORMAL, wx.BOLD, False))
++ groupSizer.Add(self.statustext, -1, wx.EXPAND)
++ self.choices = wx.Choice(panel, -1, (-1, -1), (self.dropTargetWidth, -1),
+ choices = [])
+- self.choices.SetFont(wxFont(7, wxDEFAULT, wxNORMAL, wxNORMAL, False))
+- EVT_CHOICE(self.choices, -1, self.set_thost)
+- groupSizer.Add(self.choices, 0, wxEXPAND)
+- cancellink = wxStaticText(panel, -1, 'cancel')
+- cancellink.SetFont(wxFont(7, wxDEFAULT, wxNORMAL, wxNORMAL, True))
++ self.choices.SetFont(wx.Font(7, wx.DEFAULT, wx.NORMAL, wx.NORMAL, False))
++ wx.EVT_CHOICE(self.choices, -1, self.set_thost)
++ groupSizer.Add(self.choices, 0, wx.EXPAND)
++ cancellink = wx.StaticText(panel, -1, 'cancel')
++ cancellink.SetFont(wx.Font(7, wx.DEFAULT, wx.NORMAL, wx.NORMAL, True))
+ cancellink.SetForegroundColour('red')
+- EVT_LEFT_UP(cancellink,self.cancel)
+- groupSizer.Add(cancellink, -1, wxALIGN_CENTER)
+- dummyadvlink = wxStaticText(panel, -1, 'advanced')
+- dummyadvlink.SetFont(wxFont(7, wxDEFAULT, wxNORMAL, wxNORMAL, False))
++ wx.EVT_LEFT_UP(cancellink,self.cancel)
++ groupSizer.Add(cancellink, -1, wx.ALIGN_CENTER)
++ dummyadvlink = wx.StaticText(panel, -1, 'advanced')
++ dummyadvlink.SetFont(wx.Font(7, wx.DEFAULT, wx.NORMAL, wx.NORMAL, False))
+ dummyadvlink.SetForegroundColour('blue')
+- EVT_LEFT_UP(dirlink,self.selectdir)
+- groupSizer.Add(dummyadvlink, -1, wxALIGN_CENTER)
++ wx.EVT_LEFT_UP(dirlink,self.selectdir)
++ groupSizer.Add(dummyadvlink, -1, wx.ALIGN_CENTER)
+ groupSizer1.Add(groupSizer)
+- leftSizer.Add(groupSizer1, -1, wxALIGN_CENTER)
++ leftSizer.Add(groupSizer1, -1, wx.ALIGN_CENTER)
+
+- leftSizer.Add(wxStaticText(panel, -1, 'make torrent of:'),0,wxALIGN_CENTER)
++ leftSizer.Add(wx.StaticText(panel, -1, 'make torrent of:'),0,wx.ALIGN_CENTER)
+
+- self.dirCtl = wxTextCtrl(panel, -1, '', size = (250,-1))
+- leftSizer.Add(self.dirCtl, 1, wxEXPAND)
++ self.dirCtl = wx.TextCtrl(panel, -1, '', size = (250,-1))
++ leftSizer.Add(self.dirCtl, 1, wx.EXPAND)
+
+- b = wxBoxSizer(wxHORIZONTAL)
+- button = wxButton(panel, -1, 'dir')
+- EVT_BUTTON(frame, button.GetId(), self.selectdir)
++ b = wx.BoxSizer(wx.HORIZONTAL)
++ button = wx.Button(panel, -1, 'dir')
++ wx.EVT_BUTTON(frame, button.GetId(), self.selectdir)
+ b.Add(button, 0)
+
+- button2 = wxButton(panel, -1, 'file')
+- EVT_BUTTON(frame, button2.GetId(), self.selectfile)
++ button2 = wx.Button(panel, -1, 'file')
++ wx.EVT_BUTTON(frame, button2.GetId(), self.selectfile)
+ b.Add(button2, 0)
+
+- leftSizer.Add(b, 0, wxALIGN_CENTER)
++ leftSizer.Add(b, 0, wx.ALIGN_CENTER)
+
+- leftSizer.Add(wxStaticText(panel, -1, ''))
++ leftSizer.Add(wx.StaticText(panel, -1, ''))
+
+- simple_link = wxStaticText(panel, -1, 'back to basic mode')
+- simple_link.SetFont(wxFont(-1, wxDEFAULT, wxNORMAL, wxNORMAL, True))
++ simple_link = wx.StaticText(panel, -1, 'back to basic mode')
++ simple_link.SetFont(wx.Font(-1, wx.DEFAULT, wx.NORMAL, wx.NORMAL, True))
+ simple_link.SetForegroundColour('blue')
+- EVT_LEFT_UP(simple_link,self.calls['switchToBasic'])
+- leftSizer.Add(simple_link, -1, wxALIGN_CENTER)
++ wx.EVT_LEFT_UP(simple_link,self.calls['switchToBasic'])
++ leftSizer.Add(simple_link, -1, wx.ALIGN_CENTER)
+
+- colSizer.Add(leftSizer, -1, wxALIGN_CENTER_VERTICAL)
++ colSizer.Add(leftSizer, -1, wx.ALIGN_CENTER_VERTICAL)
+
+- gridSizer = wxFlexGridSizer(cols = 2, vgap = 6, hgap = 8)
++ gridSizer = wx.FlexGridSizer(cols = 2, vgap = 6, hgap = 8)
+
+- gridSizer.Add(wxStaticText(panel, -1, 'Torrent host:'), -1,
+- wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL)
++ gridSizer.Add(wx.StaticText(panel, -1, 'Torrent host:'), -1,
++ wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL)
+
+- self.choices1 = wxChoice(panel, -1, (-1, -1), (-1, -1),
++ self.choices1 = wx.Choice(panel, -1, (-1, -1), (-1, -1),
+ choices = [])
+- EVT_CHOICE(self.choices1, -1, self.set_thost1)
+- gridSizer.Add(self.choices1, 0, wxEXPAND)
++ wx.EVT_CHOICE(self.choices1, -1, self.set_thost1)
++ gridSizer.Add(self.choices1, 0, wx.EXPAND)
+
+- b = wxBoxSizer(wxHORIZONTAL)
+- button1 = wxButton(panel, -1, 'set default')
+- EVT_BUTTON(frame, button1.GetId(), self.set_default_thost)
++ b = wx.BoxSizer(wx.HORIZONTAL)
++ button1 = wx.Button(panel, -1, 'set default')
++ wx.EVT_BUTTON(frame, button1.GetId(), self.set_default_thost)
+ b.Add(button1, 0)
+- b.Add(wxStaticText(panel, -1, ' '))
+- button2 = wxButton(panel, -1, 'delete')
+- EVT_BUTTON(frame, button2.GetId(), self.delete_thost)
++ b.Add(wx.StaticText(panel, -1, ' '))
++ button2 = wx.Button(panel, -1, 'delete')
++ wx.EVT_BUTTON(frame, button2.GetId(), self.delete_thost)
+ b.Add(button2, 0)
+- b.Add(wxStaticText(panel, -1, ' '))
+- button3 = wxButton(panel, -1, 'save as...')
+- EVT_BUTTON(frame, button3.GetId(), self.save_thost)
++ b.Add(wx.StaticText(panel, -1, ' '))
++ button3 = wx.Button(panel, -1, 'save as...')
++ wx.EVT_BUTTON(frame, button3.GetId(), self.save_thost)
+ b.Add(button3, 0)
+
+- gridSizer.Add(wxStaticText(panel, -1, ''))
+- gridSizer.Add(b, 0, wxALIGN_CENTER)
++ gridSizer.Add(wx.StaticText(panel, -1, ''))
++ gridSizer.Add(b, 0, wx.ALIGN_CENTER)
+
+- gridSizer.Add(wxStaticText(panel, -1, ''))
+- gridSizer.Add(wxStaticText(panel, -1, ''))
++ gridSizer.Add(wx.StaticText(panel, -1, ''))
++ gridSizer.Add(wx.StaticText(panel, -1, ''))
+
+- gridSizer.Add(wxStaticText(panel, -1, 'single tracker url:'),0,
+- wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL)
+- self.annCtl = wxTextCtrl(panel, -1, 'http://my.tracker:6969/announce')
+- gridSizer.Add(self.annCtl, 0, wxEXPAND)
+-
+- a = wxFlexGridSizer(cols = 1, vgap = 3)
+- a.Add(wxStaticText(panel, -1, 'tracker list:'),0,wxALIGN_RIGHT)
+- a.Add(wxStaticText(panel, -1, ''))
+- abutton = wxButton(panel, -1, 'copy\nannounces\nfrom\ntorrent', size = (70,70))
+- EVT_BUTTON(frame, abutton.GetId(), self.announcecopy)
+- a.Add(abutton, -1, wxALIGN_CENTER)
+- a.Add(wxStaticText(panel, -1, DROP_HERE), -1, wxALIGN_CENTER)
+- gridSizer.Add(a, -1, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL)
+-
+-
+- self.annListCtl = wxTextCtrl(panel, -1, '\n\n\n\n\n', wxPoint(-1,-1), (300,120),
+- wxTE_MULTILINE|wxHSCROLL|wxTE_DONTWRAP)
+- gridSizer.Add(self.annListCtl, -1, wxEXPAND)
++ gridSizer.Add(wx.StaticText(panel, -1, 'single tracker url:'),0,
++ wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL)
++ self.annCtl = wx.TextCtrl(panel, -1, 'http://my.tracker:6969/announce')
++ gridSizer.Add(self.annCtl, 0, wx.EXPAND)
++
++ a = wx.FlexGridSizer(cols = 1, vgap = 3)
++ a.Add(wx.StaticText(panel, -1, 'tracker list:'),0,wx.ALIGN_RIGHT)
++ a.Add(wx.StaticText(panel, -1, ''))
++ abutton = wx.Button(panel, -1, 'copy\nannounces\nfrom\ntorrent', size = (70,70))
++ wx.EVT_BUTTON(frame, abutton.GetId(), self.announcecopy)
++ a.Add(abutton, -1, wx.ALIGN_CENTER)
++ a.Add(wx.StaticText(panel, -1, DROP_HERE), -1, wx.ALIGN_CENTER)
++ gridSizer.Add(a, -1, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL)
++
++
++ self.annListCtl = wx.TextCtrl(panel, -1, '\n\n\n\n\n', wx.Point(-1,-1), (300,120),
++ wx.TE_MULTILINE|wx.HSCROLL|wx.TE_DONTWRAP)
++ gridSizer.Add(self.annListCtl, -1, wx.EXPAND)
+
+- gridSizer.Add(wxStaticText(panel, -1, ''))
+- exptext = wxStaticText(panel, -1,
++ gridSizer.Add(wx.StaticText(panel, -1, ''))
++ exptext = wx.StaticText(panel, -1,
+ "a list of tracker urls separated by commas or whitespace\n" +
+ "and on several lines -trackers on the same line will be\n" +
+ "tried randomly, and all the trackers on one line\n" +
+ "will be tried before the trackers on the next line.")
+- exptext.SetFont(wxFont(6, wxDEFAULT, wxNORMAL, wxNORMAL, False))
+- gridSizer.Add(exptext, -1, wxALIGN_CENTER)
++ exptext.SetFont(wx.Font(6, wx.DEFAULT, wx.NORMAL, wx.NORMAL, False))
++ gridSizer.Add(exptext, -1, wx.ALIGN_CENTER)
+
+ self.refresh_thostlist()
+ self._set_thost()
+
+ if platform == 'win32':
+ self.dropTargetPtr.DragAcceptFiles(True)
+- EVT_DROP_FILES(self.dropTargetPtr, self.selectdrop)
++ wx.EVT_DROP_FILES(self.dropTargetPtr, self.selectdrop)
+ self.groupSizer1Box.DragAcceptFiles(True)
+- EVT_DROP_FILES(self.groupSizer1Box, self.selectdrop)
++ wx.EVT_DROP_FILES(self.groupSizer1Box, self.selectdrop)
+ abutton.DragAcceptFiles(True)
+- EVT_DROP_FILES(abutton, self.announcedrop)
++ wx.EVT_DROP_FILES(abutton, self.announcedrop)
+ self.annCtl.DragAcceptFiles(True)
+- EVT_DROP_FILES(self.annCtl, self.announcedrop)
++ wx.EVT_DROP_FILES(self.annCtl, self.announcedrop)
+ self.annListCtl.DragAcceptFiles(True)
+- EVT_DROP_FILES(self.annListCtl, self.announcedrop)
++ wx.EVT_DROP_FILES(self.annListCtl, self.announcedrop)
+
+- gridSizer.Add(wxStaticText(panel, -1, ''))
+- gridSizer.Add(wxStaticText(panel, -1, ''))
++ gridSizer.Add(wx.StaticText(panel, -1, ''))
++ gridSizer.Add(wx.StaticText(panel, -1, ''))
+
+- gridSizer.Add(wxStaticText(panel, -1, 'piece size:'),0,
+- wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL)
+- self.piece_length = wxChoice(panel, -1,
++ gridSizer.Add(wx.StaticText(panel, -1, 'piece size:'),0,
++ wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL)
++ self.piece_length = wx.Choice(panel, -1,
+ choices = ['automatic', '2MiB', '1MiB', '512KiB', '256KiB', '128KiB', '64KiB', '32KiB'])
+ self.piece_length_list = [0, 21, 20, 19, 18, 17, 16, 15]
+ self.piece_length.SetSelection(0)
+ gridSizer.Add(self.piece_length)
+
+- gridSizer.Add(wxStaticText(panel, -1, 'comment:'),0,
+- wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL)
+- self.commentCtl = wxTextCtrl(panel, -1, '')
+- gridSizer.Add(self.commentCtl, 0, wxEXPAND)
+-
+- gridSizer.Add(wxStaticText(panel, -1, ''))
+- gridSizer.Add(wxStaticText(panel, -1, ''))
+-
+- b1 = wxButton(panel, -1, 'Cancel', size = (-1, 30))
+- EVT_BUTTON(frame, b1.GetId(), self.cancel)
+- gridSizer.Add(b1, 0, wxEXPAND)
+- b2 = wxButton(panel, -1, 'MAKE TORRENT', size = (-1, 30))
+- EVT_BUTTON(frame, b2.GetId(), self.complete)
+- gridSizer.Add(b2, 0, wxEXPAND)
++ gridSizer.Add(wx.StaticText(panel, -1, 'comment:'),0,
++ wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL)
++ self.commentCtl = wx.TextCtrl(panel, -1, '')
++ gridSizer.Add(self.commentCtl, 0, wx.EXPAND)
++
++ gridSizer.Add(wx.StaticText(panel, -1, ''))
++ gridSizer.Add(wx.StaticText(panel, -1, ''))
++
++ b1 = wx.Button(panel, -1, 'Cancel', size = (-1, 30))
++ wx.EVT_BUTTON(frame, b1.GetId(), self.cancel)
++ gridSizer.Add(b1, 0, wx.EXPAND)
++ b2 = wx.Button(panel, -1, 'MAKE TORRENT', size = (-1, 30))
++ wx.EVT_BUTTON(frame, b2.GetId(), self.complete)
++ gridSizer.Add(b2, 0, wx.EXPAND)
+
+ gridSizer.AddGrowableCol(1)
+- colSizer.Add(gridSizer, -1, wxALIGN_CENTER_VERTICAL)
++ colSizer.Add(gridSizer, -1, wx.ALIGN_CENTER_VERTICAL)
+ fullSizer.Add(colSizer)
+
+
+- border = wxBoxSizer(wxHORIZONTAL)
+- border.Add(fullSizer, 1, wxEXPAND | wxALL, 15)
++ border = wx.BoxSizer(wx.HORIZONTAL)
++ border.Add(fullSizer, 1, wx.EXPAND | wx.ALL, 15)
+ panel.SetSizer(border)
+ panel.SetAutoLayout(True)
+ border.Fit(panel)
+@@ -539,20 +539,20 @@
+ frame.Show(True)
+
+ EVT_INVOKE(frame, self.onInvoke)
+- EVT_CLOSE(frame, self._close)
++ wx.EVT_CLOSE(frame, self._close)
+
+ def setstayontop(self, x):
+ if self.stayontop_checkbox.GetValue():
+- self.windowStyle |= wxSTAY_ON_TOP
++ self.windowStyle |= wx.STAY_ON_TOP
+ else:
+- self.windowStyle &= ~wxSTAY_ON_TOP
++ self.windowStyle &= ~wx.STAY_ON_TOP
+ self.frame.SetWindowStyle(self.windowStyle)
+ self.config['stayontop'] = self.stayontop_checkbox.GetValue()
+
+ def selectdir(self, x = None):
+ self.calls['dropTargetHovered']()
+- dl = wxDirDialog(self.frame, style = wxDD_DEFAULT_STYLE | wxDD_NEW_DIR_BUTTON)
+- if dl.ShowModal() == wxID_OK:
++ dl = wx.DirDialog(self.frame, style = wx.DD_DEFAULT_STYLE | wx.DD_NEW_DIR_BUTTON)
++ if dl.ShowModal() == wx.ID_OK:
+ self.dirCtl.SetValue(dl.GetPath())
+ self.calls['dropTargetDropped']()
+ else:
+@@ -560,8 +560,8 @@
+
+ def selectfile(self, x = None):
+ self.calls['dropTargetHovered']()
+- dl = wxFileDialog (self.frame, 'Choose file to use', '', '', '', wxOPEN)
+- if dl.ShowModal() == wxID_OK:
++ dl = wx.FileDialog (self.frame, 'Choose file to use', '', '', '', wx.OPEN)
++ if dl.ShowModal() == wx.ID_OK:
+ self.dirCtl.SetValue(dl.GetPath())
+ self.calls['dropTargetDropped']()
+ else:
+@@ -573,8 +573,8 @@
+ self.complete(f)
+
+ def announcecopy(self, x):
+- dl = wxFileDialog (self.frame, 'Choose .torrent file to use', '', '', '*.torrent', wxOPEN)
+- if dl.ShowModal() == wxID_OK:
++ dl = wx.FileDialog (self.frame, 'Choose .torrent file to use', '', '', '*.torrent', wx.OPEN)
++ if dl.ShowModal() == wx.ID_OK:
+ self._announcecopy(dl.GetPath(), True)
+
+ def announcedrop(self, dat):
+@@ -619,14 +619,14 @@
+
+ def complete(self, x):
+ if not self.dirCtl.GetValue():
+- dlg = wxMessageDialog(self.frame, message = 'You must select a\nfile or directory',
+- caption = 'Error', style = wxOK | wxICON_ERROR)
++ dlg = wx.MessageDialog(self.frame, message = 'You must select a\nfile or directory',
++ caption = 'Error', style = wx.OK | wx.ICON_ERROR)
+ dlg.ShowModal()
+ dlg.Destroy()
+ return
+ if not self.annCtl.GetValue():
+- dlg = wxMessageDialog(self.frame, message = 'You must specify a\nsingle tracker url',
+- caption = 'Error', style = wxOK | wxICON_ERROR)
++ dlg = wx.MessageDialog(self.frame, message = 'You must specify a\nsingle tracker url',
++ caption = 'Error', style = wx.OK | wx.ICON_ERROR)
+ dlg.ShowModal()
+ dlg.Destroy()
+ return
+@@ -649,10 +649,10 @@
+ if warnings:
+ warnings += ('Are you sure you wish to produce a .torrent\n' +
+ 'with these parameters?')
+- dlg = wxMessageDialog(self.frame,
++ dlg = wx.MessageDialog(self.frame,
+ message = warnings,
+- caption = 'Warning', style = wxYES_NO | wxICON_QUESTION)
+- if dlg.ShowModal() != wxID_YES:
++ caption = 'Warning', style = wx.YES_NO | wx.ICON_QUESTION)
++ if dlg.ShowModal() != wx.ID_YES:
+ dlg.Destroy()
+ return
+ params['real_announce_list'] = annlist
+@@ -684,10 +684,10 @@
+ self.switchlock.release()
+
+ def selectDropTarget(self, x):
+- dl = wxFileDialog (self.frame, 'Choose image to use', join(basepath,'targets'),
++ dl = wx.FileDialog (self.frame, 'Choose image to use', join(basepath,'targets'),
+ join(join(basepath,'targets'), self.config['target']),
+- 'Supported images (*.bmp,*.gif)|*.*', wxOPEN|wxHIDE_READONLY)
+- if dl.ShowModal() == wxID_OK:
++ 'Supported images (*.bmp,*.gif)|*.*', wx.OPEN|wx.HIDE_READONLY)
++ if dl.ShowModal() == wx.ID_OK:
+ try:
+ self.calls['changeDropTarget'](dl.GetPath())
+ self.config['target'] = dl.GetPath()
+@@ -760,8 +760,8 @@
+
+ def save_thost(self, x):
+ if not self.annCtl.GetValue():
+- dlg = wxMessageDialog(self.frame, message = 'You must specify a\nsingle tracker url',
+- caption = 'Error', style = wxOK | wxICON_ERROR)
++ dlg = wx.MessageDialog(self.frame, message = 'You must specify a\nsingle tracker url',
++ caption = 'Error', style = wx.OK | wx.ICON_ERROR)
+ dlg.ShowModal()
+ dlg.Destroy()
+ return
+@@ -786,10 +786,10 @@
+ if warnings:
+ warnings += ('Are you sure you wish to save a torrent host\n' +
+ 'with these parameters?')
+- dlg = wxMessageDialog(self.frame,
++ dlg = wx.MessageDialog(self.frame,
+ message = warnings,
+- caption = 'Warning', style = wxYES_NO | wxICON_QUESTION)
+- if dlg.ShowModal() != wxID_YES:
++ caption = 'Warning', style = wx.YES_NO | wx.ICON_QUESTION)
++ if dlg.ShowModal() != wx.ID_YES:
+ dlg.Destroy()
+ return
+ metainfo['announce-list'] = annlist
+@@ -801,10 +801,10 @@
+ d = self.thostselection
+ else:
+ d = '.thost'
+- dl = wxFileDialog (self.frame, 'Save tracker data as',
++ dl = wx.FileDialog (self.frame, 'Save tracker data as',
+ join(basepath,'thosts'), d, '*.thost',
+- wxSAVE|wxOVERWRITE_PROMPT)
+- if dl.ShowModal() != wxID_OK:
++ wx.SAVE|wx.OVERWRITE_PROMPT)
++ if dl.ShowModal() != wx.ID_OK:
+ return
+ d = dl.GetPath()
+
+@@ -818,10 +818,10 @@
+ self.refresh_thostlist()
+
+ def delete_thost(self, x):
+- dlg = wxMessageDialog(self.frame,
++ dlg = wx.MessageDialog(self.frame,
+ message = 'Are you sure you want to delete\n'+self.thostselection[:-6]+'?',
+- caption = 'Warning', style = wxYES_NO | wxICON_EXCLAMATION)
+- if dlg.ShowModal() != wxID_YES:
++ caption = 'Warning', style = wx.YES_NO | wx.ICON_EXCLAMATION)
++ if dlg.ShowModal() != wx.ID_YES:
+ dlg.Destroy()
+ return
+ dlg.Destroy()
+@@ -835,7 +835,7 @@
+
+ def invokeLater(self, func, args = [], kwargs = {}):
+ if not self.uiflag.isSet():
+- wxPostEvent(self.frame, InvokeEvent(func, args, kwargs))
++ wx.PostEvent(self.frame, InvokeEvent(func, args, kwargs))
+
+ def build_setgauge(self, x):
+ self.invokeLater(self.on_setgauge, [x])
+@@ -904,15 +904,15 @@
+ def failed(self, e):
+ e = str(e)
+ self.call.build_failed(e)
+- dlg = wxMessageDialog(self.frame, message = 'Error - ' + e,
+- caption = 'Error', style = wxOK | wxICON_ERROR)
++ dlg = wx.MessageDialog(self.frame, message = 'Error - ' + e,
++ caption = 'Error', style = wx.OK | wx.ICON_ERROR)
+ dlg.ShowModal()
+ dlg.Destroy()
+
+
+ class T_make:
+ def __init__(self):
+- self.configobj = wxConfig('BitTorrent_T-make',style=wxCONFIG_USE_LOCAL_FILE)
++ self.configobj = wx.Config('BitTorrent_T-make',style=wx.CONFIG_USE_LOCAL_FILE)
+ self.getConfig()
+ self.currentTHost = self.config['thost']
+ # self.d = AdvancedDownloadInfo(self.config, self.getCalls())
+@@ -969,7 +969,7 @@
+
+ def newDropTarget(self, wh = None):
+ if wh:
+- self.dropTarget = wxEmptyBitmap(wh[0],wh[1])
++ self.dropTarget = wx.EmptyBitmap(wh[0],wh[1])
+ try:
+ self.changeDropTarget(self.config['target'])
+ except:
+@@ -983,7 +983,7 @@
+ self.config['target'] = 'default.gif'
+ self.saveConfig()
+ except:
+- self.dropTarget = wxEmptyBitmap(100,100)
++ self.dropTarget = wx.EmptyBitmap(100,100)
+ return self.dropTarget
+
+ def setDropTargetRefresh(self, refreshfunc):
+@@ -994,13 +994,13 @@
+ w1,h1 = self.dropTarget.GetWidth(),self.dropTarget.GetHeight()
+ w,h = bmp.GetWidth(),bmp.GetHeight()
+ x1,y1 = int((w1-w)/2.0),int((h1-h)/2.0)
+- bbdata = wxMemoryDC()
++ bbdata = wx.MemoryDC()
+ bbdata.SelectObject(self.dropTarget)
+- bbdata.SetPen(wxTRANSPARENT_PEN)
+- bbdata.SetBrush(wxBrush(wx.wxSystemSettings_GetColour(wxSYS_COLOUR_MENU),wxSOLID))
++ bbdata.SetPen(wx.TRANSPARENT_PEN)
++ bbdata.SetBrush(wx.Brush(wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENU),wx.SOLID))
+ bbdata.DrawRectangle(0,0,w1,h1)
+- bbdata.SetPen(wxBLACK_PEN)
+- bbdata.SetBrush(wxTRANSPARENT_BRUSH)
++ bbdata.SetPen(wx.BLACK_PEN)
++ bbdata.SetBrush(wx.TRANSPARENT_BRUSH)
+ bbdata.DrawRectangle(x1-1,y1-1,w+2,h+2)
+ bbdata.DrawBitmap(bmp,x1,y1,True)
+ try:
+@@ -1022,9 +1022,9 @@
+ name = join(join(basepath,'targets'),new)
+ garbage, e = os.path.splitext(new.lower())
+ if e == '.gif':
+- bmp = wxBitmap(name, wxBITMAP_TYPE_GIF)
++ bmp = wx.Bitmap(name, wx.BITMAP_TYPE_GIF)
+ elif e == '.bmp':
+- bmp = wxBitmap(name, wxBITMAP_TYPE_BMP)
++ bmp = wx.Bitmap(name, wx.BITMAP_TYPE_BMP)
+ else:
+ assert False
+ return bmp
+@@ -1054,7 +1054,7 @@
+
+
+
+-class btWxApp(wxApp):
++class btWxApp(wx.App):
+ def OnInit(self):
+ self.APP = T_make()
+ return True
+--- bittornado.orig/btdownloadgui.py
++++ bittornado/btdownloadgui.py
+@@ -17,7 +17,7 @@
+ assert version >= '2', "Install Python 2.0 or greater"
+
+ try:
+- from wxPython.wx import *
++ import wx
+ except:
+ print 'wxPython is either not installed or has not been installed properly.'
+ exit(1)
+@@ -51,11 +51,6 @@
+ PROFILER = False
+ WXPROFILER = False
+
+-try:
+- wxFULL_REPAINT_ON_RESIZE
+-except:
+- wxFULL_REPAINT_ON_RESIZE = 0 # fix for wx pre-2.5
+-
+ # Note to packagers: edit OLDICONPATH in BitTornado/ConfigDir.py
+
+ def hours(n):
+@@ -104,14 +99,14 @@
+ r.append(hexmap[ord(c)])
+ return ''.join(r)
+
+-wxEVT_INVOKE = wxNewEventType()
++wxEVT_INVOKE = wx.NewEventType()
+
+ def EVT_INVOKE(win, func):
+ win.Connect(-1, -1, wxEVT_INVOKE, func)
+
+-class InvokeEvent(wxPyEvent):
++class InvokeEvent(wx.PyEvent):
+ def __init__(self, func = None, args = None, kwargs = None):
+- wxPyEvent.__init__(self)
++ wx.PyEvent.__init__(self)
+ self.SetEventType(wxEVT_INVOKE)
+ self.func = func
+ self.args = args
+@@ -124,9 +119,9 @@
+ self._errorwindow = None
+ try:
+ self.FONT = configfile.config['gui_font']
+- self.default_font = wxFont(self.FONT, wxDEFAULT, wxNORMAL, wxNORMAL, False)
+- frame = wxFrame(None, -1, 'BitTorrent ' + version + ' download',
+- style = wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE)
++ self.default_font = wx.Font(self.FONT, wx.DEFAULT, wx.NORMAL, wx.NORMAL, False)
++ frame = wx.Frame(None, -1, 'BitTorrent ' + version + ' download',
++ style = wx.DEFAULT_FRAME_STYLE|wx.FULL_REPAINT_ON_RESIZE)
+ self.flag = flag
+ self.configfile = configfile
+ self.configfileargs = configfile.config
+@@ -172,10 +167,10 @@
+ self.invokeLaterEvent = InvokeEvent()
+ self.invokeLaterList = []
+
+- wxInitAllImageHandlers()
++ wx.InitAllImageHandlers()
+ self.basepath = self.configfile.getIconDir()
+- self.icon = wxIcon(os.path.join(self.basepath,'icon_bt.ico'), wxBITMAP_TYPE_ICO)
+- self.finicon = wxIcon(os.path.join(self.basepath,'icon_done.ico'), wxBITMAP_TYPE_ICO)
++ self.icon = wx.Icon(os.path.join(self.basepath,'icon_bt.ico'), wx.BITMAP_TYPE_ICO)
++ self.finicon = wx.Icon(os.path.join(self.basepath,'icon_done.ico'), wx.BITMAP_TYPE_ICO)
+ self.statusIconFiles={
+ 'startup':os.path.join(self.basepath,'white.ico'),
+ 'disconnected':os.path.join(self.basepath,'black.ico'),
+@@ -185,12 +180,12 @@
+ 'allgood':os.path.join(self.basepath,'green.ico'),
+ }
+ self.statusIcons={}
+- self.filestatusIcons = wxImageList(16, 16)
+- self.filestatusIcons.Add(wxBitmap(os.path.join(self.basepath,'black1.ico'),wxBITMAP_TYPE_ICO))
+- self.filestatusIcons.Add(wxBitmap(os.path.join(self.basepath,'yellow1.ico'), wxBITMAP_TYPE_ICO))
+- self.filestatusIcons.Add(wxBitmap(os.path.join(self.basepath,'green1.ico'), wxBITMAP_TYPE_ICO))
++ self.filestatusIcons = wx.ImageList(16, 16)
++ self.filestatusIcons.Add(wx.Bitmap(os.path.join(self.basepath,'black1.ico'),wx.BITMAP_TYPE_ICO))
++ self.filestatusIcons.Add(wx.Bitmap(os.path.join(self.basepath,'yellow1.ico'), wx.BITMAP_TYPE_ICO))
++ self.filestatusIcons.Add(wx.Bitmap(os.path.join(self.basepath,'green1.ico'), wx.BITMAP_TYPE_ICO))
+
+- self.allocbuttonBitmap = wxBitmap(os.path.join(self.basepath,'alloc.gif'), wxBITMAP_TYPE_GIF)
++ self.allocbuttonBitmap = wx.Bitmap(os.path.join(self.basepath,'alloc.gif'), wx.BITMAP_TYPE_GIF)
+
+ self.starttime = clock()
+
+@@ -200,239 +195,239 @@
+ except:
+ pass
+
+- panel = wxPanel(frame, -1)
++ panel = wx.Panel(frame, -1)
+ self.bgcolor = panel.GetBackgroundColour()
+
+ def StaticText(text, font = self.FONT-1, underline = False, color = None, panel = panel):
+- x = wxStaticText(panel, -1, text, style = wxALIGN_LEFT)
+- x.SetFont(wxFont(font, wxDEFAULT, wxNORMAL, wxNORMAL, underline))
++ x = wx.StaticText(panel, -1, text, style = wx.ALIGN_LEFT)
++ x.SetFont(wx.Font(font, wx.DEFAULT, wx.NORMAL, wx.NORMAL, underline))
+ if color is not None:
+ x.SetForegroundColour(color)
+ return x
+
+- colSizer = wxFlexGridSizer(cols = 1, vgap = 3)
++ colSizer = wx.FlexGridSizer(cols = 1, vgap = 3)
+
+- border = wxBoxSizer(wxHORIZONTAL)
+- border.Add(colSizer, 1, wxEXPAND | wxALL, 4)
++ border = wx.BoxSizer(wx.HORIZONTAL)
++ border.Add(colSizer, 1, wx.EXPAND | wx.ALL, 4)
+ panel.SetSizer(border)
+ panel.SetAutoLayout(True)
+
+- topboxsizer = wxFlexGridSizer(cols = 3, vgap = 0)
++ topboxsizer = wx.FlexGridSizer(cols = 3, vgap = 0)
+ topboxsizer.AddGrowableCol (0)
+
+- fnsizer = wxFlexGridSizer(cols = 1, vgap = 0)
++ fnsizer = wx.FlexGridSizer(cols = 1, vgap = 0)
+ fnsizer.AddGrowableCol (0)
+ fnsizer.AddGrowableRow (1)
+
+ fileNameText = StaticText('', self.FONT+4)
+- fnsizer.Add(fileNameText, 1, wxALIGN_BOTTOM|wxEXPAND)
++ fnsizer.Add(fileNameText, 1, wx.ALIGN_BOTTOM|wx.EXPAND)
+ self.fileNameText = fileNameText
+
+- fnsizer2 = wxFlexGridSizer(cols = 8, vgap = 0)
++ fnsizer2 = wx.FlexGridSizer(cols = 8, vgap = 0)
+ fnsizer2.AddGrowableCol (0)
+
+ fileSizeText = StaticText('')
+- fnsizer2.Add(fileSizeText, 1, wxALIGN_BOTTOM|wxEXPAND)
++ fnsizer2.Add(fileSizeText, 1, wx.ALIGN_BOTTOM|wx.EXPAND)
+ self.fileSizeText = fileSizeText
+
+ fileDetails = StaticText('Details', self.FONT, True, 'Blue')
+- fnsizer2.Add(fileDetails, 0, wxALIGN_BOTTOM)
++ fnsizer2.Add(fileDetails, 0, wx.ALIGN_BOTTOM)
+
+ fnsizer2.Add(StaticText(' '))
+
+ advText = StaticText('Advanced', self.FONT, True, 'Blue')
+- fnsizer2.Add(advText, 0, wxALIGN_BOTTOM)
++ fnsizer2.Add(advText, 0, wx.ALIGN_BOTTOM)
+ fnsizer2.Add(StaticText(' '))
+
+ prefsText = StaticText('Prefs', self.FONT, True, 'Blue')
+- fnsizer2.Add(prefsText, 0, wxALIGN_BOTTOM)
++ fnsizer2.Add(prefsText, 0, wx.ALIGN_BOTTOM)
+ fnsizer2.Add(StaticText(' '))
+
+ aboutText = StaticText('About', self.FONT, True, 'Blue')
+- fnsizer2.Add(aboutText, 0, wxALIGN_BOTTOM)
++ fnsizer2.Add(aboutText, 0, wx.ALIGN_BOTTOM)
+
+ fnsizer2.Add(StaticText(' '))
+- fnsizer.Add(fnsizer2,0,wxEXPAND)
+- topboxsizer.Add(fnsizer,0,wxEXPAND)
++ fnsizer.Add(fnsizer2,0,wx.EXPAND)
++ topboxsizer.Add(fnsizer,0,wx.EXPAND)
+ topboxsizer.Add(StaticText(' '))
+
+- self.statusIcon = wxEmptyBitmap(32,32)
+- statidata = wxMemoryDC()
++ self.statusIcon = wx.EmptyBitmap(32,32)
++ statidata = wx.MemoryDC()
+ statidata.SelectObject(self.statusIcon)
+- statidata.SetPen(wxTRANSPARENT_PEN)
+- statidata.SetBrush(wxBrush(self.bgcolor,wxSOLID))
++ statidata.SetPen(wx.TRANSPARENT_PEN)
++ statidata.SetBrush(wx.Brush(self.bgcolor,wx.SOLID))
+ statidata.DrawRectangle(0,0,32,32)
+- self.statusIconPtr = wxStaticBitmap(panel, -1, self.statusIcon)
++ self.statusIconPtr = wx.StaticBitmap(panel, -1, self.statusIcon)
+ topboxsizer.Add(self.statusIconPtr)
+
+ self.fnsizer = fnsizer
+ self.fnsizer2 = fnsizer2
+ self.topboxsizer = topboxsizer
+- colSizer.Add(topboxsizer, 0, wxEXPAND)
++ colSizer.Add(topboxsizer, 0, wx.EXPAND)
+
+- self.gauge = wxGauge(panel, -1, range = 1000, style = wxGA_SMOOTH)
+- colSizer.Add(self.gauge, 0, wxEXPAND)
++ self.gauge = wx.Gauge(panel, -1, range = 1000, style = wx.GA_SMOOTH)
++ colSizer.Add(self.gauge, 0, wx.EXPAND)
+
+- timeSizer = wxFlexGridSizer(cols = 2)
++ timeSizer = wx.FlexGridSizer(cols = 2)
+ timeSizer.Add(StaticText('Time elapsed / estimated : '))
+ self.timeText = StaticText(self.activity+' ')
+ timeSizer.Add(self.timeText)
+ timeSizer.AddGrowableCol(1)
+ colSizer.Add(timeSizer)
+
+- destSizer = wxFlexGridSizer(cols = 2, hgap = 8)
++ destSizer = wx.FlexGridSizer(cols = 2, hgap = 8)
+ self.fileDestLabel = StaticText('Download to:')
+ destSizer.Add(self.fileDestLabel)
+ self.fileDestText = StaticText('')
+- destSizer.Add(self.fileDestText, flag = wxEXPAND)
++ destSizer.Add(self.fileDestText, flag = wx.EXPAND)
+ destSizer.AddGrowableCol(1)
+- colSizer.Add(destSizer, flag = wxEXPAND)
++ colSizer.Add(destSizer, flag = wx.EXPAND)
+ self.destSizer = destSizer
+
+- statSizer = wxFlexGridSizer(cols = 3, hgap = 8)
++ statSizer = wx.FlexGridSizer(cols = 3, hgap = 8)
+
+- self.ratesSizer = wxFlexGridSizer(cols = 2)
+- self.infoSizer = wxFlexGridSizer(cols = 2)
++ self.ratesSizer = wx.FlexGridSizer(cols = 2)
++ self.infoSizer = wx.FlexGridSizer(cols = 2)
+
+ self.ratesSizer.Add(StaticText(' Download rate: '))
+ self.downRateText = StaticText('0 kB/s ')
+- self.ratesSizer.Add(self.downRateText, flag = wxEXPAND)
++ self.ratesSizer.Add(self.downRateText, flag = wx.EXPAND)
+
+ self.downTextLabel = StaticText('Downloaded: ')
+ self.infoSizer.Add(self.downTextLabel)
+ self.downText = StaticText('0.00 MiB ')
+- self.infoSizer.Add(self.downText, flag = wxEXPAND)
++ self.infoSizer.Add(self.downText, flag = wx.EXPAND)
+
+ self.ratesSizer.Add(StaticText(' Upload rate: '))
+ self.upRateText = StaticText('0 kB/s ')
+- self.ratesSizer.Add(self.upRateText, flag = wxEXPAND)
++ self.ratesSizer.Add(self.upRateText, flag = wx.EXPAND)
+
+ self.upTextLabel = StaticText('Uploaded: ')
+ self.infoSizer.Add(self.upTextLabel)
+ self.upText = StaticText('0.00 MiB ')
+- self.infoSizer.Add(self.upText, flag = wxEXPAND)
++ self.infoSizer.Add(self.upText, flag = wx.EXPAND)
+
+- shareSizer = wxFlexGridSizer(cols = 2, hgap = 8)
++ shareSizer = wx.FlexGridSizer(cols = 2, hgap = 8)
+ shareSizer.Add(StaticText('Share rating:'))
+ self.shareRatingText = StaticText('')
+ shareSizer.AddGrowableCol(1)
+- shareSizer.Add(self.shareRatingText, flag = wxEXPAND)
++ shareSizer.Add(self.shareRatingText, flag = wx.EXPAND)
+
+ statSizer.Add(self.ratesSizer)
+ statSizer.Add(self.infoSizer)
+- statSizer.Add(shareSizer, flag = wxALIGN_CENTER_VERTICAL)
++ statSizer.Add(shareSizer, flag = wx.ALIGN_CENTER_VERTICAL)
+ colSizer.Add (statSizer)
+
+- torrentSizer = wxFlexGridSizer(cols = 1)
++ torrentSizer = wx.FlexGridSizer(cols = 1)
+ self.peerStatusText = StaticText('')
+- torrentSizer.Add(self.peerStatusText, 0, wxEXPAND)
++ torrentSizer.Add(self.peerStatusText, 0, wx.EXPAND)
+ self.seedStatusText = StaticText('')
+- torrentSizer.Add(self.seedStatusText, 0, wxEXPAND)
++ torrentSizer.Add(self.seedStatusText, 0, wx.EXPAND)
+ torrentSizer.AddGrowableCol(0)
+- colSizer.Add(torrentSizer, 0, wxEXPAND)
++ colSizer.Add(torrentSizer, 0, wx.EXPAND)
+ self.torrentSizer = torrentSizer
+
+- self.errorTextSizer = wxFlexGridSizer(cols = 1)
++ self.errorTextSizer = wx.FlexGridSizer(cols = 1)
+ self.errorText = StaticText('', self.FONT, False, 'Red')
+- self.errorTextSizer.Add(self.errorText, 0, wxEXPAND)
+- colSizer.Add(self.errorTextSizer, 0, wxEXPAND)
++ self.errorTextSizer.Add(self.errorText, 0, wx.EXPAND)
++ colSizer.Add(self.errorTextSizer, 0, wx.EXPAND)
+
+- cancelSizer=wxGridSizer(cols = 2, hgap = 40)
+- self.pauseButton = wxButton(panel, -1, 'Pause')
+- cancelSizer.Add(self.pauseButton, 0, wxALIGN_CENTER)
+-
+- self.cancelButton = wxButton(panel, -1, 'Cancel')
+- cancelSizer.Add(self.cancelButton, 0, wxALIGN_CENTER)
+- colSizer.Add(cancelSizer, 0, wxALIGN_CENTER)
++ cancelSizer=wx.GridSizer(cols = 2, hgap = 40)
++ self.pauseButton = wx.Button(panel, -1, 'Pause')
++ cancelSizer.Add(self.pauseButton, 0, wx.ALIGN_CENTER)
++
++ self.cancelButton = wx.Button(panel, -1, 'Cancel')
++ cancelSizer.Add(self.cancelButton, 0, wx.ALIGN_CENTER)
++ colSizer.Add(cancelSizer, 0, wx.ALIGN_CENTER)
+
+ # Setting options
+
+- slideSizer = wxFlexGridSizer(cols = 7, hgap = 0, vgap = 5)
++ slideSizer = wx.FlexGridSizer(cols = 7, hgap = 0, vgap = 5)
+
+ # dropdown
+
+ self.connChoiceLabel = StaticText('Settings for ')
+- slideSizer.Add (self.connChoiceLabel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL)
+- self.connChoice = wxChoice (panel, -1, (-1, -1), (self.FONT*12, -1),
++ slideSizer.Add (self.connChoiceLabel, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL)
++ self.connChoice = wx.Choice (panel, -1, (-1, -1), (self.FONT*12, -1),
+ choices = connChoiceList)
+ self.connChoice.SetFont(self.default_font)
+ self.connChoice.SetSelection(0)
+- slideSizer.Add (self.connChoice, 0, wxALIGN_CENTER)
++ slideSizer.Add (self.connChoice, 0, wx.ALIGN_CENTER)
+ self.rateSpinnerLabel = StaticText(' Upload rate (kB/s) ')
+- slideSizer.Add (self.rateSpinnerLabel, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL)
++ slideSizer.Add (self.rateSpinnerLabel, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL)
+
+ # max upload rate
+
+- self.rateSpinner = wxSpinCtrl (panel, -1, "", (-1,-1), (50, -1))
++ self.rateSpinner = wx.SpinCtrl (panel, -1, "", (-1,-1), (50, -1))
+ self.rateSpinner.SetFont(self.default_font)
+ self.rateSpinner.SetRange(0,5000)
+ self.rateSpinner.SetValue(0)
+- slideSizer.Add (self.rateSpinner, 0, wxALIGN_CENTER|wxALIGN_CENTER_VERTICAL)
++ slideSizer.Add (self.rateSpinner, 0, wx.ALIGN_CENTER|wx.ALIGN_CENTER_VERTICAL)
+
+ self.rateLowerText = StaticText(' %5d' % (0))
+ self.rateUpperText = StaticText('%5d' % (5000))
+- self.rateslider = wxSlider(panel, -1, 0, 0, 5000, (-1, -1), (80, -1))
++ self.rateslider = wx.Slider(panel, -1, 0, 0, 5000, (-1, -1), (80, -1))
+
+- slideSizer.Add(self.rateLowerText, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL)
+- slideSizer.Add(self.rateslider, 0, wxALIGN_CENTER|wxALIGN_CENTER_VERTICAL)
+- slideSizer.Add(self.rateUpperText, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL)
++ slideSizer.Add(self.rateLowerText, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL)
++ slideSizer.Add(self.rateslider, 0, wx.ALIGN_CENTER|wx.ALIGN_CENTER_VERTICAL)
++ slideSizer.Add(self.rateUpperText, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL)
+
+- slideSizer.Add(StaticText(''), 0, wxALIGN_LEFT)
++ slideSizer.Add(StaticText(''), 0, wx.ALIGN_LEFT)
+
+ self.bgallocText = StaticText('', self.FONT+2, False, 'Red')
+- slideSizer.Add(self.bgallocText, 0, wxALIGN_LEFT)
++ slideSizer.Add(self.bgallocText, 0, wx.ALIGN_LEFT)
+
+ # max uploads
+
+ self.connSpinnerLabel = StaticText(' Max uploads ')
+- slideSizer.Add (self.connSpinnerLabel, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL)
+- self.connSpinner = wxSpinCtrl (panel, -1, "", (-1,-1), (50, -1))
++ slideSizer.Add (self.connSpinnerLabel, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL)
++ self.connSpinner = wx.SpinCtrl (panel, -1, "", (-1,-1), (50, -1))
+ self.connSpinner.SetFont(self.default_font)
+ self.connSpinner.SetRange(4,100)
+ self.connSpinner.SetValue(4)
+- slideSizer.Add (self.connSpinner, 0, wxALIGN_CENTER|wxALIGN_CENTER_VERTICAL)
++ slideSizer.Add (self.connSpinner, 0, wx.ALIGN_CENTER|wx.ALIGN_CENTER_VERTICAL)
+
+ self.connLowerText = StaticText(' %5d' % (4))
+ self.connUpperText = StaticText('%5d' % (100))
+- self.connslider = wxSlider(panel, -1, 4, 4, 100, (-1, -1), (80, -1))
++ self.connslider = wx.Slider(panel, -1, 4, 4, 100, (-1, -1), (80, -1))
+
+- slideSizer.Add(self.connLowerText, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL)
+- slideSizer.Add(self.connslider, 0, wxALIGN_CENTER|wxALIGN_CENTER_VERTICAL)
+- slideSizer.Add(self.connUpperText, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL)
++ slideSizer.Add(self.connLowerText, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL)
++ slideSizer.Add(self.connslider, 0, wx.ALIGN_CENTER|wx.ALIGN_CENTER_VERTICAL)
++ slideSizer.Add(self.connUpperText, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL)
+
+- colSizer.Add(slideSizer, 1, wxALL|wxALIGN_CENTER|wxEXPAND, 0)
++ colSizer.Add(slideSizer, 1, wx.ALL|wx.ALIGN_CENTER|wx.EXPAND, 0)
+
+ self.unlimitedLabel = StaticText('0 kB/s means unlimited. Tip: your download rate is proportional to your upload rate', self.FONT-2)
+- colSizer.Add(self.unlimitedLabel, 0, wxALIGN_CENTER)
++ colSizer.Add(self.unlimitedLabel, 0, wx.ALIGN_CENTER)
+
+- self.priorityIDs = [wxNewId(),wxNewId(),wxNewId(),wxNewId()]
+- self.prioritycolors = [ wxColour(160,160,160),
+- wxColour(255,64,0),
+- wxColour(0,0,0),
+- wxColour(64,64,255) ]
+-
+-
+- EVT_LEFT_DOWN(aboutText, self.about)
+- EVT_LEFT_DOWN(fileDetails, self.details)
+- EVT_LEFT_DOWN(self.statusIconPtr,self.statusIconHelp)
+- EVT_LEFT_DOWN(advText, self.advanced)
+- EVT_LEFT_DOWN(prefsText, self.openConfigMenu)
+- EVT_CLOSE(frame, self.done)
+- EVT_BUTTON(frame, self.pauseButton.GetId(), self.pause)
+- EVT_BUTTON(frame, self.cancelButton.GetId(), self.done)
++ self.priorityIDs = [wx.NewId(),wx.NewId(),wx.NewId(),wx.NewId()]
++ self.prioritycolors = [ wx.Colour(160,160,160),
++ wx.Colour(255,64,0),
++ wx.Colour(0,0,0),
++ wx.Colour(64,64,255) ]
++
++
++ wx.EVT_LEFT_DOWN(aboutText, self.about)
++ wx.EVT_LEFT_DOWN(fileDetails, self.details)
++ wx.EVT_LEFT_DOWN(self.statusIconPtr,self.statusIconHelp)
++ wx.EVT_LEFT_DOWN(advText, self.advanced)
++ wx.EVT_LEFT_DOWN(prefsText, self.openConfigMenu)
++ wx.EVT_CLOSE(frame, self.done)
++ wx.EVT_BUTTON(frame, self.pauseButton.GetId(), self.pause)
++ wx.EVT_BUTTON(frame, self.cancelButton.GetId(), self.done)
+ EVT_INVOKE(frame, self.onInvoke)
+- EVT_SCROLL(self.rateslider, self.onRateScroll)
+- EVT_SCROLL(self.connslider, self.onConnScroll)
+- EVT_CHOICE(self.connChoice, -1, self.onConnChoice)
+- EVT_SPINCTRL(self.connSpinner, -1, self.onConnSpinner)
+- EVT_SPINCTRL(self.rateSpinner, -1, self.onRateSpinner)
++ wx.EVT_SCROLL(self.rateslider, self.onRateScroll)
++ wx.EVT_SCROLL(self.connslider, self.onConnScroll)
++ wx.EVT_CHOICE(self.connChoice, -1, self.onConnChoice)
++ wx.EVT_SPINCTRL(self.connSpinner, -1, self.onConnSpinner)
++ wx.EVT_SPINCTRL(self.rateSpinner, -1, self.onRateSpinner)
+ if (sys.platform == 'win32'):
+- self.frame.tbicon = wxTaskBarIcon()
+- EVT_ICONIZE(self.frame, self.onIconify)
+- EVT_TASKBAR_LEFT_DCLICK(self.frame.tbicon, self.onTaskBarActivate)
+- EVT_TASKBAR_RIGHT_UP(self.frame.tbicon, self.onTaskBarMenu)
+- EVT_MENU(self.frame.tbicon, self.TBMENU_RESTORE, self.onTaskBarActivate)
+- EVT_MENU(self.frame.tbicon, self.TBMENU_CLOSE, self.done)
++ self.frame.tbicon = wx.TaskBarIcon()
++ wx.EVT_ICONIZE(self.frame, self.onIconify)
++ wx.EVT_TASKBAR_LEFT_DCLICK(self.frame.tbicon, self.onTaskBarActivate)
++ wx.EVT_TASKBAR_RIGHT_UP(self.frame.tbicon, self.onTaskBarMenu)
++ wx.EVT_MENU(self.frame.tbicon, self.TBMENU_RESTORE, self.onTaskBarActivate)
++ wx.EVT_MENU(self.frame.tbicon, self.TBMENU_CLOSE, self.done)
+ colSizer.AddGrowableCol (0)
+ colSizer.AddGrowableRow (6)
+ self.frame.Show()
+@@ -468,7 +463,7 @@
+ if not self.uiflag.isSet():
+ self.invokeLaterList.append((func,args,kwargs))
+ if len(self.invokeLaterList) == 1:
+- wxPostEvent(self.frame, self.invokeLaterEvent)
++ wx.PostEvent(self.frame, self.invokeLaterEvent)
+ else:
+ def onInvoke(self, event):
+ if not self.uiflag.isSet():
+@@ -479,7 +474,7 @@
+
+ def invokeLater(self, func, args = [], kwargs = {}):
+ if not self.uiflag.isSet():
+- wxPostEvent(self.frame, InvokeEvent(func, args, kwargs))
++ wx.PostEvent(self.frame, InvokeEvent(func, args, kwargs))
+
+
+ def getStatusIcon(self, name, bitmap=False):
+@@ -488,9 +483,9 @@
+ if type(i) == type(self.icon) and not bitmap:
+ return i
+ if bitmap:
+- i = wxBitmap(self.statusIconFiles[name], wxBITMAP_TYPE_ICO)
++ i = wx.Bitmap(self.statusIconFiles[name], wx.BITMAP_TYPE_ICO)
+ else:
+- i = wxIcon(self.statusIconFiles[name], wxBITMAP_TYPE_ICO)
++ i = wx.Icon(self.statusIconFiles[name], wx.BITMAP_TYPE_ICO)
+ self.statusIcons[name] = i
+ return i
+
+@@ -499,7 +494,7 @@
+ if name == self.statusIconValue:
+ return
+ self.statusIconValue = name
+- statidata = wxMemoryDC()
++ statidata = wx.MemoryDC()
+ statidata.SelectObject(self.statusIcon)
+ statidata.BeginDrawing()
+ try:
+@@ -507,16 +502,16 @@
+ except:
+ statidata.DrawBitmap(self.getStatusIcon(name,True),0,0,True)
+ statidata.EndDrawing()
+- statidata.SelectObject(wxNullBitmap)
++ statidata.SelectObject(wx.NullBitmap)
+ self.statusIconPtr.Refresh()
+
+
+ def createStatusIcon(self, name):
+- iconbuffer = wxEmptyBitmap(32,32)
+- bbdata = wxMemoryDC()
++ iconbuffer = wx.EmptyBitmap(32,32)
++ bbdata = wx.MemoryDC()
+ bbdata.SelectObject(iconbuffer)
+- bbdata.SetPen(wxTRANSPARENT_PEN)
+- bbdata.SetBrush(wxBrush(self.bgcolor,wxSOLID))
++ bbdata.SetPen(wx.TRANSPARENT_PEN)
++ bbdata.SetBrush(wx.Brush(self.bgcolor,wx.SOLID))
+ bbdata.DrawRectangle(0,0,32,32)
+ try:
+ bbdata.DrawIcon(self.getStatusIcon(name),0,0)
+@@ -534,10 +529,10 @@
+ self.gaugemode = selection
+ if selection < 0:
+ self.gauge.SetForegroundColour(self.configfile.getcheckingcolor())
+- self.gauge.SetBackgroundColour(wxSystemSettings_GetColour(wxSYS_COLOUR_MENU))
++ self.gauge.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENU))
+ elif selection == 0:
+ self.gauge.SetForegroundColour(self.configfile.getdownloadcolor())
+- self.gauge.SetBackgroundColour(wxSystemSettings_GetColour(wxSYS_COLOUR_MENU))
++ self.gauge.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENU))
+ else:
+ self.gauge.SetForegroundColour(self.configfile.getseedingcolor())
+ self.gauge.SetBackgroundColour(self.configfile.getdownloadcolor())
+@@ -567,7 +562,7 @@
+ self.frame.Raise()
+ self.frame.tbicon.RemoveIcon()
+ self.taskbaricon = False
+- except wxPyDeadObjectError:
++ except wx.PyDeadObjectError:
+ pass
+ except:
+ self.exception()
+@@ -576,7 +571,7 @@
+ TBMENU_CLOSE = 1001
+
+ def onTaskBarMenu(self, evt):
+- menu = wxMenu()
++ menu = wx.Menu()
+ menu.Append(self.TBMENU_RESTORE, "Restore BitTorrent")
+ menu.Append(self.TBMENU_CLOSE, "Close")
+ self.frame.tbicon.PopupMenu(menu)
+@@ -721,33 +716,33 @@
+ if (self.aboutBox is not None):
+ try:
+ self.aboutBox.Close ()
+- except wxPyDeadObjectError, e:
++ except wx.PyDeadObjectError, e:
+ self.aboutBox = None
+
+- self.aboutBox = wxFrame(None, -1, 'About BitTorrent', size = (1,1),
+- style = wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE)
++ self.aboutBox = wx.Frame(None, -1, 'About BitTorrent', size = (1,1),
++ style = wx.DEFAULT_FRAME_STYLE|wx.FULL_REPAINT_ON_RESIZE)
+ try:
+ self.aboutBox.SetIcon(self.icon)
+ except:
+ pass
+
+- panel = wxPanel(self.aboutBox, -1)
++ panel = wx.Panel(self.aboutBox, -1)
+
+ def StaticText(text, font = self.FONT, underline = False, color = None, panel = panel):
+- x = wxStaticText(panel, -1, text, style = wxALIGN_LEFT)
+- x.SetFont(wxFont(font, wxDEFAULT, wxNORMAL, wxNORMAL, underline))
++ x = wx.StaticText(panel, -1, text, style = wx.ALIGN_LEFT)
++ x.SetFont(wx.Font(font, wx.DEFAULT, wx.NORMAL, wx.NORMAL, underline))
+ if color is not None:
+ x.SetForegroundColour(color)
+ return x
+
+- colSizer = wxFlexGridSizer(cols = 1, vgap = 3)
++ colSizer = wx.FlexGridSizer(cols = 1, vgap = 3)
+
+- titleSizer = wxBoxSizer(wxHORIZONTAL)
++ titleSizer = wx.BoxSizer(wx.HORIZONTAL)
+ aboutTitle = StaticText('BitTorrent ' + version + ' ', self.FONT+4)
+ titleSizer.Add (aboutTitle)
+ linkDonate = StaticText('Donate to Bram', self.FONT, True, 'Blue')
+- titleSizer.Add (linkDonate, 1, wxALIGN_BOTTOM&wxEXPAND)
+- colSizer.Add(titleSizer, 0, wxEXPAND)
++ titleSizer.Add (linkDonate, 1, wx.ALIGN_BOTTOM&wx.EXPAND)
++ colSizer.Add(titleSizer, 0, wx.EXPAND)
+
+ colSizer.Add(StaticText('created by Bram Cohen, Copyright 2001-2003,'))
+ colSizer.Add(StaticText('experimental version maintained by John Hoffman 2003'))
+@@ -757,7 +752,7 @@
+
+ si = ( 'exact Version String: ' + version + '\n' +
+ 'Python version: ' + sys.version + '\n' +
+- 'wxPython version: ' + wxVERSION_STRING + '\n' )
++ 'wxPython version: ' + wx.VERSION_STRING + '\n' )
+ try:
+ si += 'Psyco version: ' + hex(psyco.__version__)[2:] + '\n'
+ except:
+@@ -777,36 +772,36 @@
+ colSizer.Add (babble4)
+ colSizer.Add (babble6)
+
+- okButton = wxButton(panel, -1, 'Ok')
+- colSizer.Add(okButton, 0, wxALIGN_RIGHT)
++ okButton = wx.Button(panel, -1, 'Ok')
++ colSizer.Add(okButton, 0, wx.ALIGN_RIGHT)
+ colSizer.AddGrowableCol(0)
+
+- border = wxBoxSizer(wxHORIZONTAL)
+- border.Add(colSizer, 1, wxEXPAND | wxALL, 4)
++ border = wx.BoxSizer(wx.HORIZONTAL)
++ border.Add(colSizer, 1, wx.EXPAND | wx.ALL, 4)
+ panel.SetSizer(border)
+ panel.SetAutoLayout(True)
+
+ def donatelink(self):
+ Thread(target = open_new('https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=bram@bitconjurer.org&item_name=BitTorrent&amount=5.00&submit=donate')).start()
+- EVT_LEFT_DOWN(linkDonate, donatelink)
++ wx.EVT_LEFT_DOWN(linkDonate, donatelink)
+ def aboutlink(self):
+ Thread(target = open_new('http://bitconjurer.org/BitTorrent/')).start()
+- EVT_LEFT_DOWN(babble2, aboutlink)
++ wx.EVT_LEFT_DOWN(babble2, aboutlink)
+ def shadlink(self):
+ Thread(target = open_new('http://www.bittornado.com/')).start()
+- EVT_LEFT_DOWN(babble3, shadlink)
++ wx.EVT_LEFT_DOWN(babble3, shadlink)
+ def explink(self):
+ Thread(target = open_new('http://ei.kefro.st/projects/btclient/')).start()
+- EVT_LEFT_DOWN(babble4, explink)
++ wx.EVT_LEFT_DOWN(babble4, explink)
+ def licenselink(self):
+ Thread(target = open_new('http://ei.kefro.st/projects/btclient/LICENSE.TXT')).start()
+- EVT_LEFT_DOWN(babble6, licenselink)
+- EVT_LEFT_DOWN(credits, self.credits)
++ wx.EVT_LEFT_DOWN(babble6, licenselink)
++ wx.EVT_LEFT_DOWN(credits, self.credits)
+
+ def closeAbout(e, self = self):
+ if self.aboutBox:
+ self.aboutBox.Close()
+- EVT_BUTTON(self.aboutBox, okButton.GetId(), closeAbout)
++ wx.EVT_BUTTON(self.aboutBox, okButton.GetId(), closeAbout)
+ def kill(e, self = self):
+ try:
+ self.aboutBox.RemoveIcon()
+@@ -814,7 +809,7 @@
+ pass
+ self.aboutBox.Destroy()
+ self.aboutBox = None
+- EVT_CLOSE(self.aboutBox, kill)
++ wx.EVT_CLOSE(self.aboutBox, kill)
+
+ self.aboutBox.Show()
+ border.Fit(panel)
+@@ -846,35 +841,35 @@
+ if (self.detailBox is not None):
+ try:
+ self.detailBox.Close()
+- except wxPyDeadObjectError, e:
++ except wx.PyDeadObjectError, e:
+ self.detailBox = None
+
+- self.detailBox = wxFrame(None, -1, 'Torrent Details ', size = wxSize(405,230),
+- style = wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE)
++ self.detailBox = wx.Frame(None, -1, 'Torrent Details ', size = wx.Size(405,230),
++ style = wx.DEFAULT_FRAME_STYLE|wx.FULL_REPAINT_ON_RESIZE)
+ try:
+ self.detailBox.SetIcon(self.icon)
+ except:
+ pass
+
+- panel = wxPanel(self.detailBox, -1, size = wxSize (400,220))
++ panel = wx.Panel(self.detailBox, -1, size = wx.Size (400,220))
+
+ def StaticText(text, font = self.FONT-1, underline = False, color = None, panel = panel):
+- x = wxStaticText(panel, -1, text, style = wxALIGN_CENTER_VERTICAL)
+- x.SetFont(wxFont(font, wxDEFAULT, wxNORMAL, wxNORMAL, underline))
++ x = wx.StaticText(panel, -1, text, style = wx.ALIGN_CENTER_VERTICAL)
++ x.SetFont(wx.Font(font, wx.DEFAULT, wx.NORMAL, wx.NORMAL, underline))
+ if color is not None:
+ x.SetForegroundColour(color)
+ return x
+
+- colSizer = wxFlexGridSizer(cols = 1, vgap = 3)
++ colSizer = wx.FlexGridSizer(cols = 1, vgap = 3)
+ colSizer.AddGrowableCol(0)
+
+- titleSizer = wxBoxSizer(wxHORIZONTAL)
++ titleSizer = wx.BoxSizer(wx.HORIZONTAL)
+ aboutTitle = StaticText('Details about ' + self.filename, self.FONT+4)
+
+ titleSizer.Add (aboutTitle)
+ colSizer.Add (titleSizer)
+
+- detailSizer = wxFlexGridSizer(cols = 2, vgap = 6)
++ detailSizer = wx.FlexGridSizer(cols = 2, vgap = 6)
+
+ if info.has_key('length'):
+ fileListID = None
+@@ -886,37 +881,37 @@
+ file_length = info['length']
+ name = "file size"
+ else:
+- detail1Sizer = wxFlexGridSizer(cols = 1, vgap = 6)
++ detail1Sizer = wx.FlexGridSizer(cols = 1, vgap = 6)
+ detail1Sizer.Add(StaticText('directory name : ' + info['name']))
+ colSizer.Add (detail1Sizer)
+- bgallocButton = wxBitmapButton(panel, -1, self.allocbuttonBitmap, size = (52,20))
++ bgallocButton = wx.BitmapButton(panel, -1, self.allocbuttonBitmap, size = (52,20))
+ def bgalloc(self, frame = self):
+ if frame.dow.storagewrapper is not None:
+ frame.dow.storagewrapper.bgalloc()
+- EVT_BUTTON(self.detailBox, bgallocButton.GetId(), bgalloc)
++ wx.EVT_BUTTON(self.detailBox, bgallocButton.GetId(), bgalloc)
+
+- bgallocbuttonSizer = wxFlexGridSizer(cols = 4, hgap = 4, vgap = 0)
+- bgallocbuttonSizer.Add(StaticText('(right-click to set priority)',self.FONT-1),0,wxALIGN_BOTTOM)
+- bgallocbuttonSizer.Add(StaticText('(finish allocation)'), -1, wxALIGN_CENTER_VERTICAL)
+- bgallocbuttonSizer.Add(bgallocButton, -1, wxALIGN_CENTER)
++ bgallocbuttonSizer = wx.FlexGridSizer(cols = 4, hgap = 4, vgap = 0)
++ bgallocbuttonSizer.Add(StaticText('(right-click to set priority)',self.FONT-1),0,wx.ALIGN_BOTTOM)
++ bgallocbuttonSizer.Add(StaticText('(finish allocation)'), -1, wx.ALIGN_CENTER_VERTICAL)
++ bgallocbuttonSizer.Add(bgallocButton, -1, wx.ALIGN_CENTER)
+ bgallocbuttonSizer.AddGrowableCol(0)
+- colSizer.Add(bgallocbuttonSizer, -1, wxEXPAND)
++ colSizer.Add(bgallocbuttonSizer, -1, wx.EXPAND)
+
+ file_length = 0
+
+- fileListID = wxNewId()
+- fileList = wxListCtrl(panel, fileListID,
+- wxPoint(-1,-1), (325,100), wxLC_REPORT)
++ fileListID = wx.NewId()
++ fileList = wx.ListCtrl(panel, fileListID,
++ wx.Point(-1,-1), (325,100), wx.LC_REPORT)
+ self.fileList = fileList
+- fileList.SetImageList(self.filestatusIcons, wxIMAGE_LIST_SMALL)
++ fileList.SetImageList(self.filestatusIcons, wx.IMAGE_LIST_SMALL)
+
+ fileList.SetAutoLayout (True)
+ fileList.InsertColumn(0, "file")
+- fileList.InsertColumn(1, "", format=wxLIST_FORMAT_RIGHT, width=55)
++ fileList.InsertColumn(1, "", format=wx.LIST_FORMAT_RIGHT, width=55)
+ fileList.InsertColumn(2, "")
+
+ for i in range(len(info['files'])):
+- x = wxListItem()
++ x = wx.ListItem()
+ fileList.InsertItem(x)
+
+ x = 0
+@@ -937,15 +932,15 @@
+ fileList.SetItem(item)
+ x += 1
+ file_length += file['length']
+- fileList.SetColumnWidth(0,wxLIST_AUTOSIZE)
+- fileList.SetColumnWidth(2,wxLIST_AUTOSIZE)
++ fileList.SetColumnWidth(0,wx.LIST_AUTOSIZE)
++ fileList.SetColumnWidth(2,wx.LIST_AUTOSIZE)
+
+ name = 'archive size'
+- colSizer.Add(fileList, 1, wxEXPAND)
++ colSizer.Add(fileList, 1, wx.EXPAND)
+ colSizer.AddGrowableRow(3)
+
+- detailSizer.Add(StaticText('info_hash :'),0,wxALIGN_CENTER_VERTICAL)
+- detailSizer.Add(wxTextCtrl(panel, -1, tohex(info_hash), size = (325, -1), style = wxTE_READONLY))
++ detailSizer.Add(StaticText('info_hash :'),0,wx.ALIGN_CENTER_VERTICAL)
++ detailSizer.Add(wx.TextCtrl(panel, -1, tohex(info_hash), size = (325, -1), style = wx.TE_READONLY))
+ num_pieces = int((file_length+piece_length-1)/piece_length)
+ detailSizer.Add(StaticText(name + ' : '))
+ detailSizer.Add(StaticText('%s (%s bytes)' % (size_format(file_length), comma_format(file_length))))
+@@ -956,22 +951,22 @@
+ detailSizer.Add(StaticText('1'))
+
+ if announce_list is None:
+- detailSizer.Add(StaticText('announce url : '),0,wxALIGN_CENTER_VERTICAL)
+- detailSizer.Add(wxTextCtrl(panel, -1, announce, size = (325, -1), style = wxTE_READONLY))
++ detailSizer.Add(StaticText('announce url : '),0,wx.ALIGN_CENTER_VERTICAL)
++ detailSizer.Add(wx.TextCtrl(panel, -1, announce, size = (325, -1), style = wx.TE_READONLY))
+ else:
+ detailSizer.Add(StaticText(''))
+- trackerList = wxListCtrl(panel, -1, wxPoint(-1,-1), (325,75), wxLC_REPORT)
++ trackerList = wx.ListCtrl(panel, -1, wx.Point(-1,-1), (325,75), wx.LC_REPORT)
+ trackerList.SetAutoLayout (True)
+ trackerList.InsertColumn(0, "")
+ trackerList.InsertColumn(1, "announce urls")
+
+ for tier in range(len(announce_list)):
+ for t in range(len(announce_list[tier])):
+- i = wxListItem()
++ i = wx.ListItem()
+ trackerList.InsertItem(i)
+ if announce is not None:
+ for l in [1,2]:
+- i = wxListItem()
++ i = wx.ListItem()
+ trackerList.InsertItem(i)
+
+ x = 0
+@@ -984,8 +979,8 @@
+ if announce is not None:
+ trackerList.SetStringItem(x+1, 0, 'single:')
+ trackerList.SetStringItem(x+1, 1, announce)
+- trackerList.SetColumnWidth(0,wxLIST_AUTOSIZE)
+- trackerList.SetColumnWidth(1,wxLIST_AUTOSIZE)
++ trackerList.SetColumnWidth(0,wx.LIST_AUTOSIZE)
++ trackerList.SetColumnWidth(1,wx.LIST_AUTOSIZE)
+ detailSizer.Add(trackerList)
+
+ if announce is None and announce_list is not None:
+@@ -1011,10 +1006,10 @@
+ detailSizer.Add(StaticText(''))
+
+ detailSizer.AddGrowableCol(1)
+- colSizer.Add (detailSizer, 1, wxEXPAND)
++ colSizer.Add (detailSizer, 1, wx.EXPAND)
+
+- okButton = wxButton(panel, -1, 'Ok')
+- colSizer.Add(okButton, 0, wxALIGN_RIGHT)
++ okButton = wx.Button(panel, -1, 'Ok')
++ colSizer.Add(okButton, 0, wx.ALIGN_RIGHT)
+ colSizer.AddGrowableCol(0)
+
+ if not self.configfileargs['gui_stretchwindow']:
+@@ -1022,8 +1017,8 @@
+ else:
+ panel.SetAutoLayout(True)
+
+- border = wxBoxSizer(wxHORIZONTAL)
+- border.Add(colSizer, 1, wxEXPAND | wxALL, 4)
++ border = wx.BoxSizer(wx.HORIZONTAL)
++ border.Add(colSizer, 1, wx.EXPAND | wx.ALL, 4)
+ panel.SetSizer(border)
+ panel.SetAutoLayout(True)
+
+@@ -1032,20 +1027,20 @@
+ s = []
+ i = -1
+ while True:
+- i = self.fileList.GetNextItem(i,state=wxLIST_STATE_SELECTED)
++ i = self.fileList.GetNextItem(i,state=wx.LIST_STATE_SELECTED)
+ if i == -1:
+ break
+ s.append(i)
+ if not s: # just in case
+ return
+ oldstate = self.dow.fileselector[s[0]]
+- kind=wxITEM_RADIO
++ kind=wx.ITEM_RADIO
+ for i in s[1:]:
+ if self.dow.fileselector[i] != oldstate:
+ oldstate = None
+- kind = wxITEM_NORMAL
++ kind = wx.ITEM_NORMAL
+ break
+- menu = wxMenu()
++ menu = wx.Menu()
+ menu.Append(self.priorityIDs[1], "download first", kind=kind)
+ menu.Append(self.priorityIDs[2], "download normally", kind=kind)
+ menu.Append(self.priorityIDs[3], "download later", kind=kind)
+@@ -1069,16 +1064,16 @@
+ break
+
+ for id in self.priorityIDs:
+- EVT_MENU(self.detailBox, id, onSelection)
++ wx.EVT_MENU(self.detailBox, id, onSelection)
+
+ self.detailBox.PopupMenu(menu, evt.GetPoint())
+
+- EVT_LIST_ITEM_RIGHT_CLICK(self.detailBox, fileListID, onRightClick)
++ wx.EVT_LIST_ITEM_RIGHT_CLICK(self.detailBox, fileListID, onRightClick)
+
+ def closeDetail(evt, self = self):
+ if self.detailBox:
+ self.detailBox.Close()
+- EVT_BUTTON(self.detailBox, okButton.GetId(), closeDetail)
++ wx.EVT_BUTTON(self.detailBox, okButton.GetId(), closeDetail)
+ def kill(evt, self = self):
+ try:
+ self.detailBox.RemoveIcon()
+@@ -1088,14 +1083,14 @@
+ self.detailBox = None
+ self.fileList = None
+ self.dow.filedatflag.clear()
+- EVT_CLOSE(self.detailBox, kill)
++ wx.EVT_CLOSE(self.detailBox, kill)
+
+ def trackerurl(self, turl = turl):
+ try:
+ Thread(target = open_new(turl)).start()
+ except:
+ pass
+- EVT_LEFT_DOWN(trackerUrl, trackerurl)
++ wx.EVT_LEFT_DOWN(trackerUrl, trackerurl)
+
+ self.detailBox.Show ()
+ border.Fit(panel)
+@@ -1112,35 +1107,35 @@
+ if (self.creditsBox is not None):
+ try:
+ self.creditsBox.Close()
+- except wxPyDeadObjectError, e:
++ except wx.PyDeadObjectError, e:
+ self.creditsBox = None
+
+- self.creditsBox = wxFrame(None, -1, 'Credits', size = (1,1),
+- style = wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE)
++ self.creditsBox = wx.Frame(None, -1, 'Credits', size = (1,1),
++ style = wx.DEFAULT_FRAME_STYLE|wx.FULL_REPAINT_ON_RESIZE)
+ try:
+ self.creditsBox.SetIcon(self.icon)
+ except:
+ pass
+
+- panel = wxPanel(self.creditsBox, -1)
++ panel = wx.Panel(self.creditsBox, -1)
+
+ def StaticText(text, font = self.FONT, underline = False, color = None, panel = panel):
+- x = wxStaticText(panel, -1, text, style = wxALIGN_LEFT)
+- x.SetFont(wxFont(font, wxDEFAULT, wxNORMAL, wxNORMAL, underline))
++ x = wx.StaticText(panel, -1, text, style = wx.ALIGN_LEFT)
++ x.SetFont(wx.Font(font, wx.DEFAULT, wx.NORMAL, wx.NORMAL, underline))
+ if color is not None:
+ x.SetForegroundColour(color)
+ return x
+
+- colSizer = wxFlexGridSizer(cols = 1, vgap = 3)
++ colSizer = wx.FlexGridSizer(cols = 1, vgap = 3)
+
+- titleSizer = wxBoxSizer(wxHORIZONTAL)
++ titleSizer = wx.BoxSizer(wx.HORIZONTAL)
+ aboutTitle = StaticText('Credits', self.FONT+4)
+ titleSizer.Add (aboutTitle)
+ colSizer.Add (titleSizer)
+ colSizer.Add (StaticText(
+ 'The following people have all helped with this\n' +
+ 'version of BitTorrent in some way (in no particular order) -\n'));
+- creditSizer = wxFlexGridSizer(cols = 3)
++ creditSizer = wx.FlexGridSizer(cols = 3)
+ creditSizer.Add(StaticText(
+ 'Bill Bumgarner\n' +
+ 'David Creswick\n' +
+@@ -1178,20 +1173,20 @@
+ 'Jon Wolf\n' +
+ 'Christoph Hohmann\n' +
+ 'Micah Anderson'))
+- colSizer.Add (creditSizer, flag = wxALIGN_CENTER_HORIZONTAL)
+- okButton = wxButton(panel, -1, 'Ok')
+- colSizer.Add(okButton, 0, wxALIGN_RIGHT)
++ colSizer.Add (creditSizer, flag = wx.ALIGN_CENTER_HORIZONTAL)
++ okButton = wx.Button(panel, -1, 'Ok')
++ colSizer.Add(okButton, 0, wx.ALIGN_RIGHT)
+ colSizer.AddGrowableCol(0)
+
+- border = wxBoxSizer(wxHORIZONTAL)
+- border.Add(colSizer, 1, wxEXPAND | wxALL, 4)
++ border = wx.BoxSizer(wx.HORIZONTAL)
++ border.Add(colSizer, 1, wx.EXPAND | wx.ALL, 4)
+ panel.SetSizer(border)
+ panel.SetAutoLayout(True)
+
+ def closeCredits(e, self = self):
+ if self.creditsBox:
+ self.creditsBox.Close()
+- EVT_BUTTON(self.creditsBox, okButton.GetId(), closeCredits)
++ wx.EVT_BUTTON(self.creditsBox, okButton.GetId(), closeCredits)
+ def kill(e, self = self):
+ try:
+ self.creditsBox.RemoveIcon()
+@@ -1199,7 +1194,7 @@
+ pass
+ self.creditsBox.Destroy()
+ self.creditsBox = None
+- EVT_CLOSE(self.creditsBox, kill)
++ wx.EVT_CLOSE(self.creditsBox, kill)
+
+ self.creditsBox.Show()
+ border.Fit(panel)
+@@ -1213,86 +1208,86 @@
+ if (self.statusIconHelpBox is not None):
+ try:
+ self.statusIconHelpBox.Close()
+- except wxPyDeadObjectError, e:
++ except wx.PyDeadObjectError, e:
+ self.statusIconHelpBox = None
+
+- self.statusIconHelpBox = wxFrame(None, -1, 'Help with the BitTorrent Status Light', size = (1,1),
+- style = wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE)
++ self.statusIconHelpBox = wx.Frame(None, -1, 'Help with the BitTorrent Status Light', size = (1,1),
++ style = wx.DEFAULT_FRAME_STYLE|wx.FULL_REPAINT_ON_RESIZE)
+ try:
+ self.statusIconHelpBox.SetIcon(self.icon)
+ except:
+ pass
+
+- panel = wxPanel(self.statusIconHelpBox, -1)
++ panel = wx.Panel(self.statusIconHelpBox, -1)
+
+ def StaticText(text, font = self.FONT, underline = False, color = None, panel = panel):
+- x = wxStaticText(panel, -1, text, style = wxALIGN_LEFT)
+- x.SetFont(wxFont(font, wxDEFAULT, wxNORMAL, wxNORMAL, underline))
++ x = wx.StaticText(panel, -1, text, style = wx.ALIGN_LEFT)
++ x.SetFont(wx.Font(font, wx.DEFAULT, wx.NORMAL, wx.NORMAL, underline))
+ if color is not None:
+ x.SetForegroundColour(color)
+ return x
+
+- fullsizer = wxFlexGridSizer(cols = 1, vgap = 13)
+- colsizer = wxFlexGridSizer(cols = 2, hgap = 13, vgap = 13)
++ fullsizer = wx.FlexGridSizer(cols = 1, vgap = 13)
++ colsizer = wx.FlexGridSizer(cols = 2, hgap = 13, vgap = 13)
+
+ disconnectedicon=self.createStatusIcon('disconnected')
+- colsizer.Add(wxStaticBitmap(panel, -1, disconnectedicon))
++ colsizer.Add(wx.StaticBitmap(panel, -1, disconnectedicon))
+ colsizer.Add(StaticText(
+ 'Waiting to connect to the tracker.\n' +
+ 'If the status light stays black for a long time the tracker\n' +
+ 'you are trying to connect to may not be working. Unless you\n' +
+ 'are receiving a message telling you otherwise, please wait,\n' +
+- 'and BitTorrent will automatically try to reconnect for you.'), 1, wxALIGN_CENTER_VERTICAL)
++ 'and BitTorrent will automatically try to reconnect for you.'), 1, wx.ALIGN_CENTER_VERTICAL)
+
+ noconnectionsicon=self.createStatusIcon('noconnections')
+- colsizer.Add(wxStaticBitmap(panel, -1, noconnectionsicon))
++ colsizer.Add(wx.StaticBitmap(panel, -1, noconnectionsicon))
+ colsizer.Add(StaticText(
+ 'You have no connections with other clients.\n' +
+ 'Please be patient. If after several minutes the status\n' +
+- 'light remains red, this torrent may be old and abandoned.'), 1, wxALIGN_CENTER_VERTICAL)
++ 'light remains red, this torrent may be old and abandoned.'), 1, wx.ALIGN_CENTER_VERTICAL)
+
+ noincomingicon=self.createStatusIcon('noincoming')
+- colsizer.Add(wxStaticBitmap(panel, -1, noincomingicon))
++ colsizer.Add(wx.StaticBitmap(panel, -1, noincomingicon))
+ colsizer.Add(StaticText(
+ 'You have not received any incoming connections from others.\n' +
+ 'It may only be because no one has tried. If you never see\n' +
+ 'the status light turn green, it may indicate your system\n' +
+ 'is behind a firewall or proxy server. Please look into\n' +
+ 'routing BitTorrent through your firewall in order to receive\n' +
+- 'the best possible download rate.'), 1, wxALIGN_CENTER_VERTICAL)
++ 'the best possible download rate.'), 1, wx.ALIGN_CENTER_VERTICAL)
+
+ nocompletesicon=self.createStatusIcon('nocompletes')
+- colsizer.Add(wxStaticBitmap(panel, -1, nocompletesicon))
++ colsizer.Add(wx.StaticBitmap(panel, -1, nocompletesicon))
+ colsizer.Add(StaticText(
+ 'There are no complete copies among the clients you are\n' +
+ 'connected to. Don\'t panic, other clients in the torrent\n' +
+ "you can't see may have the missing data.\n" +
+ 'If the status light remains blue, you may have problems\n' +
+- 'completing your download.'), 1, wxALIGN_CENTER_VERTICAL)
++ 'completing your download.'), 1, wx.ALIGN_CENTER_VERTICAL)
+
+ allgoodicon=self.createStatusIcon('allgood')
+- colsizer.Add(wxStaticBitmap(panel, -1, allgoodicon))
++ colsizer.Add(wx.StaticBitmap(panel, -1, allgoodicon))
+ colsizer.Add(StaticText(
+- 'The torrent is operating properly.'), 1, wxALIGN_CENTER_VERTICAL)
++ 'The torrent is operating properly.'), 1, wx.ALIGN_CENTER_VERTICAL)
+
+- fullsizer.Add(colsizer, 0, wxALIGN_CENTER)
+- colsizer2 = wxFlexGridSizer(cols = 1, hgap = 13)
++ fullsizer.Add(colsizer, 0, wx.ALIGN_CENTER)
++ colsizer2 = wx.FlexGridSizer(cols = 1, hgap = 13)
+
+ colsizer2.Add(StaticText(
+ 'Please note that the status light is not omniscient, and that it may\n' +
+ 'be wrong in many instances. A torrent with a blue light may complete\n' +
+ "normally, and an occasional yellow light doesn't mean your computer\n" +
+- 'has suddenly become firewalled.'), 1, wxALIGN_CENTER_VERTICAL)
++ 'has suddenly become firewalled.'), 1, wx.ALIGN_CENTER_VERTICAL)
+
+ colspacer = StaticText(' ')
+ colsizer2.Add(colspacer)
+
+- okButton = wxButton(panel, -1, 'Ok')
+- colsizer2.Add(okButton, 0, wxALIGN_CENTER)
+- fullsizer.Add(colsizer2, 0, wxALIGN_CENTER)
++ okButton = wx.Button(panel, -1, 'Ok')
++ colsizer2.Add(okButton, 0, wx.ALIGN_CENTER)
++ fullsizer.Add(colsizer2, 0, wx.ALIGN_CENTER)
+
+- border = wxBoxSizer(wxHORIZONTAL)
+- border.Add(fullsizer, 1, wxEXPAND | wxALL, 4)
++ border = wx.BoxSizer(wx.HORIZONTAL)
++ border.Add(fullsizer, 1, wx.EXPAND | wx.ALL, 4)
+
+ panel.SetSizer(border)
+ panel.SetAutoLayout(True)
+@@ -1300,7 +1295,7 @@
+
+ def closeHelp(self, frame = self):
+ frame.statusIconHelpBox.Close()
+- EVT_BUTTON(self.statusIconHelpBox, okButton.GetId(), closeHelp)
++ wx.EVT_BUTTON(self.statusIconHelpBox, okButton.GetId(), closeHelp)
+
+ self.statusIconHelpBox.Show ()
+ border.Fit(panel)
+@@ -1323,150 +1318,150 @@
+ if (self.advBox is not None):
+ try:
+ self.advBox.Close ()
+- except wxPyDeadObjectError, e:
++ except wx.PyDeadObjectError, e:
+ self.advBox = None
+
+- self.advBox = wxFrame(None, -1, 'BitTorrent Advanced', size = wxSize(200,200),
+- style = wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE)
++ self.advBox = wx.Frame(None, -1, 'BitTorrent Advanced', size = wx.Size(200,200),
++ style = wx.DEFAULT_FRAME_STYLE|wx.FULL_REPAINT_ON_RESIZE)
+ try:
+ self.advBox.SetIcon(self.icon)
+ except:
+ pass
+
+- panel = wxPanel(self.advBox, -1, size = wxSize (200,200))
++ panel = wx.Panel(self.advBox, -1, size = wx.Size (200,200))
+
+ def StaticText(text, font = self.FONT-1, underline = False, color = None, panel = panel):
+- x = wxStaticText(panel, -1, text, style = wxALIGN_LEFT)
+- x.SetFont(wxFont(font, wxDEFAULT, wxNORMAL, wxNORMAL, underline))
++ x = wx.StaticText(panel, -1, text, style = wx.ALIGN_LEFT)
++ x.SetFont(wx.Font(font, wx.DEFAULT, wx.NORMAL, wx.NORMAL, underline))
+ if color is not None:
+ x.SetForegroundColour(color)
+ return x
+
+- colSizer = wxFlexGridSizer (cols = 1, vgap = 1)
++ colSizer = wx.FlexGridSizer (cols = 1, vgap = 1)
+ colSizer.Add (StaticText('Advanced Info for ' + self.filename, self.FONT+4))
+
+ try: # get system font width
+- fw = wxSystemSettings_GetFont(wxSYS_DEFAULT_GUI_FONT).GetPointSize()+1
++ fw = wx.SystemSettings_GetFont(wx.SYS_DEFAULT_GUI_FONT).GetPointSize()+1
+ except:
+- fw = wxSystemSettings_GetFont(wxSYS_SYSTEM_FONT).GetPointSize()+1
++ fw = wx.SystemSettings_GetFont(wx.SYS_SYSTEM_FONT).GetPointSize()+1
+
+- spewList = wxListCtrl(panel, -1, wxPoint(-1,-1), (fw*66,350), wxLC_REPORT|wxLC_HRULES|wxLC_VRULES)
++ spewList = wx.ListCtrl(panel, -1, wx.Point(-1,-1), (fw*66,350), wx.LC_REPORT|wx.LC_HRULES|wx.LC_VRULES)
+ self.spewList = spewList
+ spewList.SetAutoLayout (True)
+
+- colSizer.Add(spewList, -1, wxEXPAND)
++ colSizer.Add(spewList, -1, wx.EXPAND)
+
+ colSizer.Add(StaticText(''))
+ self.storagestats1 = StaticText('')
+ self.storagestats2 = StaticText('')
+- colSizer.Add(self.storagestats1, -1, wxEXPAND)
+- colSizer.Add(self.storagestats2, -1, wxEXPAND)
+- spinnerSizer = wxFlexGridSizer(cols=4,vgap=0,hgap=0)
++ colSizer.Add(self.storagestats1, -1, wx.EXPAND)
++ colSizer.Add(self.storagestats2, -1, wx.EXPAND)
++ spinnerSizer = wx.FlexGridSizer(cols=4,vgap=0,hgap=0)
+ cstats = ' Listening on '
+ if self.connection_stats['interfaces']:
+ cstats += ', '.join(self.connection_stats['interfaces']) + ' on '
+ cstats += 'port ' + str(self.connection_stats['port'])
+ if self.connection_stats['upnp']:
+ cstats += ', UPnP port forwarded'
+- spinnerSizer.Add(StaticText(cstats), -1, wxEXPAND)
++ spinnerSizer.Add(StaticText(cstats), -1, wx.EXPAND)
+ spinnerSizer.AddGrowableCol(0)
+- spinnerSizer.Add(StaticText('Max download rate (kB/s) '),0,wxALIGN_CENTER_VERTICAL)
+- self.downrateSpinner = wxSpinCtrl (panel, -1, "", (-1,-1), (50, -1))
++ spinnerSizer.Add(StaticText('Max download rate (kB/s) '),0,wx.ALIGN_CENTER_VERTICAL)
++ self.downrateSpinner = wx.SpinCtrl (panel, -1, "", (-1,-1), (50, -1))
+ self.downrateSpinner.SetFont(self.default_font)
+ self.downrateSpinner.SetRange(0,5000)
+ self.downrateSpinner.SetValue(self.config['max_download_rate'])
+ spinnerSizer.Add (self.downrateSpinner, 0)
+- EVT_SPINCTRL(self.downrateSpinner, -1, self.onDownRateSpinner)
+- spinnerSizer.Add(StaticText(' (0 = unlimited) '),0,wxALIGN_CENTER_VERTICAL)
+- colSizer.Add(spinnerSizer,0,wxEXPAND)
++ wx.EVT_SPINCTRL(self.downrateSpinner, -1, self.onDownRateSpinner)
++ spinnerSizer.Add(StaticText(' (0 = unlimited) '),0,wx.ALIGN_CENTER_VERTICAL)
++ colSizer.Add(spinnerSizer,0,wx.EXPAND)
+
+ colSizer.Add(StaticText(''))
+
+- buttonSizer = wxFlexGridSizer (cols = 5, hgap = 20)
++ buttonSizer = wx.FlexGridSizer (cols = 5, hgap = 20)
+
+- reannounceButton = wxButton(panel, -1, 'Manual Announce')
++ reannounceButton = wx.Button(panel, -1, 'Manual Announce')
+ buttonSizer.Add (reannounceButton)
+
+- extannounceButton = wxButton(panel, -1, 'External Announce')
++ extannounceButton = wx.Button(panel, -1, 'External Announce')
+ buttonSizer.Add (extannounceButton)
+
+- bgallocButton = wxButton(panel, -1, 'Finish Allocation')
++ bgallocButton = wx.Button(panel, -1, 'Finish Allocation')
+ buttonSizer.Add (bgallocButton)
+
+ buttonSizer.Add(StaticText(''))
+
+- okButton = wxButton(panel, -1, 'Ok')
++ okButton = wx.Button(panel, -1, 'Ok')
+ buttonSizer.Add (okButton)
+
+- colSizer.Add (buttonSizer, 0, wxALIGN_CENTER)
++ colSizer.Add (buttonSizer, 0, wx.ALIGN_CENTER)
+ colSizer.AddGrowableCol(0)
+ colSizer.AddGrowableRow(1)
+
+ panel.SetSizer(colSizer)
+ panel.SetAutoLayout(True)
+
+- spewList.InsertColumn(0, "Optimistic Unchoke", format=wxLIST_FORMAT_CENTER, width=fw*2)
++ spewList.InsertColumn(0, "Optimistic Unchoke", format=wx.LIST_FORMAT_CENTER, width=fw*2)
+ spewList.InsertColumn(1, "Peer ID", width=0)
+ spewList.InsertColumn(2, "IP", width=fw*11)
+- spewList.InsertColumn(3, "Local/Remote", format=wxLIST_FORMAT_CENTER, width=fw*3)
+- spewList.InsertColumn(4, "Up", format=wxLIST_FORMAT_RIGHT, width=fw*6)
+- spewList.InsertColumn(5, "Interested", format=wxLIST_FORMAT_CENTER, width=fw*2)
+- spewList.InsertColumn(6, "Choking", format=wxLIST_FORMAT_CENTER, width=fw*2)
+- spewList.InsertColumn(7, "Down", format=wxLIST_FORMAT_RIGHT, width=fw*6)
+- spewList.InsertColumn(8, "Interesting", format=wxLIST_FORMAT_CENTER, width=fw*2)
+- spewList.InsertColumn(9, "Choked", format=wxLIST_FORMAT_CENTER, width=fw*2)
+- spewList.InsertColumn(10, "Snubbed", format=wxLIST_FORMAT_CENTER, width=fw*2)
+- spewList.InsertColumn(11, "Downloaded", format=wxLIST_FORMAT_RIGHT, width=fw*7)
+- spewList.InsertColumn(12, "Uploaded", format=wxLIST_FORMAT_RIGHT, width=fw*7)
+- spewList.InsertColumn(13, "Completed", format=wxLIST_FORMAT_RIGHT, width=fw*6)
+- spewList.InsertColumn(14, "Peer Download Speed", format=wxLIST_FORMAT_RIGHT, width=fw*6)
++ spewList.InsertColumn(3, "Local/Remote", format=wx.LIST_FORMAT_CENTER, width=fw*3)
++ spewList.InsertColumn(4, "Up", format=wx.LIST_FORMAT_RIGHT, width=fw*6)
++ spewList.InsertColumn(5, "Interested", format=wx.LIST_FORMAT_CENTER, width=fw*2)
++ spewList.InsertColumn(6, "Choking", format=wx.LIST_FORMAT_CENTER, width=fw*2)
++ spewList.InsertColumn(7, "Down", format=wx.LIST_FORMAT_RIGHT, width=fw*6)
++ spewList.InsertColumn(8, "Interesting", format=wx.LIST_FORMAT_CENTER, width=fw*2)
++ spewList.InsertColumn(9, "Choked", format=wx.LIST_FORMAT_CENTER, width=fw*2)
++ spewList.InsertColumn(10, "Snubbed", format=wx.LIST_FORMAT_CENTER, width=fw*2)
++ spewList.InsertColumn(11, "Downloaded", format=wx.LIST_FORMAT_RIGHT, width=fw*7)
++ spewList.InsertColumn(12, "Uploaded", format=wx.LIST_FORMAT_RIGHT, width=fw*7)
++ spewList.InsertColumn(13, "Completed", format=wx.LIST_FORMAT_RIGHT, width=fw*6)
++ spewList.InsertColumn(14, "Peer Download Speed", format=wx.LIST_FORMAT_RIGHT, width=fw*6)
+
+ def reannounce(self, frame = self):
+ if (clock() - frame.reannouncelast > 60):
+ frame.reannouncelast = clock()
+ frame.dow.reannounce()
+- EVT_BUTTON(self.advBox, reannounceButton.GetId(), reannounce)
++ wx.EVT_BUTTON(self.advBox, reannounceButton.GetId(), reannounce)
+
+ self.advextannouncebox = None
+ def reannounce_external(self, frame = self):
+ if (frame.advextannouncebox is not None):
+ try:
+ frame.advextannouncebox.Close ()
+- except wxPyDeadObjectError, e:
++ except wx.PyDeadObjectError, e:
+ frame.advextannouncebox = None
+
+- frame.advextannouncebox = wxFrame(None, -1, 'External Announce', size = (1,1),
+- style = wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE)
++ frame.advextannouncebox = wx.Frame(None, -1, 'External Announce', size = (1,1),
++ style = wx.DEFAULT_FRAME_STYLE|wx.FULL_REPAINT_ON_RESIZE)
+ try:
+ frame.advextannouncebox.SetIcon(frame.icon)
+ except:
+ pass
+
+- panel = wxPanel(frame.advextannouncebox, -1)
++ panel = wx.Panel(frame.advextannouncebox, -1)
+
+- fullsizer = wxFlexGridSizer(cols = 1, vgap = 13)
+- msg = wxStaticText(panel, -1, "Enter tracker anounce URL:")
++ fullsizer = wx.FlexGridSizer(cols = 1, vgap = 13)
++ msg = wx.StaticText(panel, -1, "Enter tracker anounce URL:")
+ msg.SetFont(frame.default_font)
+ fullsizer.Add(msg)
+
+- frame.advexturl = wxTextCtrl(parent = panel, id = -1, value = '',
+- size = (255, 20), style = wxTE_PROCESS_TAB)
++ frame.advexturl = wx.TextCtrl(parent = panel, id = -1, value = '',
++ size = (255, 20), style = wx.TE_PROCESS_TAB)
+ frame.advexturl.SetFont(frame.default_font)
+ frame.advexturl.SetValue(frame.lastexternalannounce)
+ fullsizer.Add(frame.advexturl)
+
+- buttonSizer = wxFlexGridSizer (cols = 2, hgap = 10)
++ buttonSizer = wx.FlexGridSizer (cols = 2, hgap = 10)
+
+- okButton = wxButton(panel, -1, 'OK')
++ okButton = wx.Button(panel, -1, 'OK')
+ buttonSizer.Add (okButton)
+
+- cancelButton = wxButton(panel, -1, 'Cancel')
++ cancelButton = wx.Button(panel, -1, 'Cancel')
+ buttonSizer.Add (cancelButton)
+
+- fullsizer.Add (buttonSizer, 0, wxALIGN_CENTER)
++ fullsizer.Add (buttonSizer, 0, wx.ALIGN_CENTER)
+
+- border = wxBoxSizer(wxHORIZONTAL)
+- border.Add(fullsizer, 1, wxEXPAND | wxALL, 4)
++ border = wx.BoxSizer(wx.HORIZONTAL)
++ border.Add(fullsizer, 1, wx.EXPAND | wx.ALL, 4)
+
+ panel.SetSizer(border)
+ panel.SetAutoLayout(True)
+@@ -1479,22 +1474,22 @@
+ frame.reannouncelast = clock()
+ frame.dow.reannounce(special)
+ frame.advextannouncebox.Close()
+- EVT_BUTTON(frame.advextannouncebox, okButton.GetId(), ok)
++ wx.EVT_BUTTON(frame.advextannouncebox, okButton.GetId(), ok)
+
+ def cancel(self, frame = frame):
+ frame.advextannouncebox.Close()
+- EVT_BUTTON(frame.advextannouncebox, cancelButton.GetId(), cancel)
++ wx.EVT_BUTTON(frame.advextannouncebox, cancelButton.GetId(), cancel)
+
+ frame.advextannouncebox.Show ()
+ fullsizer.Fit(panel)
+ frame.advextannouncebox.Fit()
+
+- EVT_BUTTON(self.advBox, extannounceButton.GetId(), reannounce_external)
++ wx.EVT_BUTTON(self.advBox, extannounceButton.GetId(), reannounce_external)
+
+ def bgalloc(self, frame = self):
+ if frame.dow.storagewrapper is not None:
+ frame.dow.storagewrapper.bgalloc()
+- EVT_BUTTON(self.advBox, bgallocButton.GetId(), bgalloc)
++ wx.EVT_BUTTON(self.advBox, bgallocButton.GetId(), bgalloc)
+
+ def closeAdv(evt, self = self):
+ self.advBox.Close()
+@@ -1510,11 +1505,11 @@
+ if (self.advextannouncebox is not None):
+ try:
+ self.advextannouncebox.Close()
+- except wxPyDeadObjectError, e:
++ except wx.PyDeadObjectError, e:
+ pass
+ self.advextannouncebox = None
+- EVT_BUTTON(self.advBox, okButton.GetId(), closeAdv)
+- EVT_CLOSE(self.advBox, killAdv)
++ wx.EVT_BUTTON(self.advBox, okButton.GetId(), closeAdv)
++ wx.EVT_CLOSE(self.advBox, killAdv)
+
+ self.advBox.Show ()
+ colSizer.Fit(panel)
+@@ -1531,25 +1526,25 @@
+ def onDisplayUsage(self, text):
+ try:
+ self.done(None)
+- w = wxFrame(None, -1, 'BITTORRENT USAGE',
+- style = wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE)
+- panel = wxPanel(w, -1)
+- sizer = wxFlexGridSizer(cols = 1)
+- sizer.Add(wxTextCtrl(panel, -1, text,
+- size = (500,300), style = wxTE_READONLY|wxTE_MULTILINE))
+- okButton = wxButton(panel, -1, 'Ok')
++ w = wx.Frame(None, -1, 'BITTORRENT USAGE',
++ style = wx.DEFAULT_FRAME_STYLE|wx.FULL_REPAINT_ON_RESIZE)
++ panel = wx.Panel(w, -1)
++ sizer = wx.FlexGridSizer(cols = 1)
++ sizer.Add(wx.TextCtrl(panel, -1, text,
++ size = (500,300), style = wx.TE_READONLY|wx.TE_MULTILINE))
++ okButton = wx.Button(panel, -1, 'Ok')
+
+ def closeUsage(self, frame = self):
+ frame.usageBox.Close()
+- EVT_BUTTON(w, okButton.GetId(), closeUsage)
++ wx.EVT_BUTTON(w, okButton.GetId(), closeUsage)
+ def kill(self, frame = self):
+ frame.usageBox.Destroy()
+ frame.usageBox = None
+- EVT_CLOSE(w, kill)
++ wx.EVT_CLOSE(w, kill)
+
+- sizer.Add(okButton, 0, wxALIGN_RIGHT)
+- border = wxBoxSizer(wxHORIZONTAL)
+- border.Add(sizer, 1, wxEXPAND | wxALL, 4)
++ sizer.Add(okButton, 0, wx.ALIGN_RIGHT)
++ border = wx.BoxSizer(wx.HORIZONTAL)
++ border.Add(sizer, 1, wx.EXPAND | wx.ALL, 4)
+
+ panel.SetSizer(border)
+ panel.SetAutoLayout(True)
+@@ -1745,7 +1740,7 @@
+ else:
+ kickbanlen = 0
+ for x in range(spewlen-spewList.GetItemCount()):
+- i = wxListItem()
++ i = wx.ListItem()
+ spewList.InsertItem(i)
+ for x in range(spewlen,spewList.GetItemCount()):
+ spewList.DeleteItem(len(spew)+1)
+@@ -1996,16 +1991,16 @@
+ start_dir1 = start_dir
+ if isdir(join(start_dir,default)):
+ start_dir = join(start_dir,default)
+- dl = wxDirDialog(self.frame,
++ dl = wx.DirDialog(self.frame,
+ 'Choose a directory to save to, pick a partial download to resume',
+- defaultPath = start_dir, style = wxDD_DEFAULT_STYLE | wxDD_NEW_DIR_BUTTON)
++ defaultPath = start_dir, style = wx.DD_DEFAULT_STYLE | wx.DD_NEW_DIR_BUTTON)
+ else:
+- dl = wxFileDialog(self.frame,
++ dl = wx.FileDialog(self.frame,
+ 'Choose file to save as, pick a partial download to resume',
+ defaultDir = start_dir, defaultFile = default, wildcard = '*',
+- style = wxSAVE)
++ style = wx.SAVE)
+
+- if dl.ShowModal() != wxID_OK:
++ if dl.ShowModal() != wx.ID_OK:
+ f.set()
+ self.done(None)
+ return
+@@ -2135,15 +2130,15 @@
+
+ def on_errorwindow(self, err):
+ if self._errorwindow is None:
+- w = wxFrame(None, -1, 'BITTORRENT ERROR', size = (1,1),
+- style = wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE)
+- panel = wxPanel(w, -1)
++ w = wx.Frame(None, -1, 'BITTORRENT ERROR', size = (1,1),
++ style = wx.DEFAULT_FRAME_STYLE|wx.FULL_REPAINT_ON_RESIZE)
++ panel = wx.Panel(w, -1)
+
+- sizer = wxFlexGridSizer(cols = 1)
++ sizer = wx.FlexGridSizer(cols = 1)
+ t = ( 'BitTorrent ' + version + '\n' +
+ 'OS: ' + sys.platform + '\n' +
+ 'Python version: ' + sys.version + '\n' +
+- 'wxWindows version: ' + wxVERSION_STRING + '\n' )
++ 'wx.Windows version: ' + wx.VERSION_STRING + '\n' )
+ try:
+ t += 'Psyco version: ' + hex(psyco.__version__)[2:] + '\n'
+ except:
+@@ -2155,24 +2150,24 @@
+ t += '\n'
+ except:
+ pass
+- sizer.Add(wxTextCtrl(panel, -1, t + '\n' + err,
+- size = (500,300), style = wxTE_READONLY|wxTE_MULTILINE))
++ sizer.Add(wx.TextCtrl(panel, -1, t + '\n' + err,
++ size = (500,300), style = wx.TE_READONLY|wx.TE_MULTILINE))
+
+- sizer.Add(wxStaticText(panel, -1,
++ sizer.Add(wx.StaticText(panel, -1,
+ '\nHelp us iron out the bugs in the engine!'))
+- linkMail = wxStaticText(panel, -1,
++ linkMail = wx.StaticText(panel, -1,
+ 'Please report this error to '+report_email)
+- linkMail.SetFont(wxFont(self.FONT, wxDEFAULT, wxNORMAL, wxNORMAL, True))
++ linkMail.SetFont(wx.Font(self.FONT, wx.DEFAULT, wx.NORMAL, wx.NORMAL, True))
+ linkMail.SetForegroundColour('Blue')
+ sizer.Add(linkMail)
+
+ def maillink(self):
+ Thread(target = open_new("mailto:" + report_email
+ + "?subject=autobugreport")).start()
+- EVT_LEFT_DOWN(linkMail, maillink)
++ wx.EVT_LEFT_DOWN(linkMail, maillink)
+
+- border = wxBoxSizer(wxHORIZONTAL)
+- border.Add(sizer, 1, wxEXPAND | wxALL, 4)
++ border = wx.BoxSizer(wx.HORIZONTAL)
++ border.Add(sizer, 1, wx.EXPAND | wx.ALL, 4)
+
+ panel.SetSizer(border)
+ panel.SetAutoLayout(True)
+@@ -2183,10 +2178,10 @@
+ self._errorwindow = w
+
+
+-class btWxApp(wxApp):
++class btWxApp(wx.App):
+ def __init__(self, x, params):
+ self.params = params
+- wxApp.__init__(self, x)
++ wx.App.__init__(self, x)
+
+ def OnInit(self):
+ doneflag = Event()
+@@ -2194,11 +2189,11 @@
+ d = DownloadInfoFrame(doneflag, self.configfile)
+ self.SetTopWindow(d.frame)
+ if len(self.params) == 0:
+- b = wxFileDialog (d.frame, 'Choose .torrent file to use',
++ b = wx.FileDialog (d.frame, 'Choose .torrent file to use',
+ defaultDir = '', defaultFile = '', wildcard = '*.torrent',
+- style = wxOPEN)
++ style = wx.OPEN)
+
+- if b.ShowModal() == wxID_OK:
++ if b.ShowModal() == wx.ID_OK:
+ self.params.append (b.GetPath())
+
+ thread = Thread(target = next, args = [self.params, d, doneflag, self.configfile])
+--- bittornado.orig/btcompletedirgui.py
++++ bittornado/btcompletedirgui.py
+@@ -20,7 +20,7 @@
+ from os import getcwd
+ from os.path import join
+ try:
+- from wxPython.wx import *
++ import wx
+ except:
+ print 'wxPython is either not installed or has not been installed properly.'
+ sys.exit(1)
+@@ -31,14 +31,14 @@
+ True = 1
+ False = 0
+
+-wxEVT_INVOKE = wxNewEventType()
++wxEVT_INVOKE = wx.NewEventType()
+
+ def EVT_INVOKE(win, func):
+ win.Connect(-1, -1, wxEVT_INVOKE, func)
+
+-class InvokeEvent(wxPyEvent):
++class InvokeEvent(wx.PyEvent):
+ def __init__(self, func, args, kwargs):
+- wxPyEvent.__init__(self)
++ wx.PyEvent.__init__(self)
+ self.SetEventType(wxEVT_INVOKE)
+ self.func = func
+ self.args = args
+@@ -46,55 +46,55 @@
+
+ class DownloadInfo:
+ def __init__(self):
+- frame = wxFrame(None, -1, 'BitTorrent complete dir 1.0.1', size = wxSize(550, 250))
++ frame = wx.Frame(None, -1, 'BitTorrent complete dir 1.0.1', size = wx.Size(550, 250))
+ self.frame = frame
+
+- panel = wxPanel(frame, -1)
++ panel = wx.Panel(frame, -1)
+
+- gridSizer = wxFlexGridSizer(cols = 2, rows = 2, vgap = 15, hgap = 8)
++ gridSizer = wx.FlexGridSizer(cols = 2, rows = 2, vgap = 15, hgap = 8)
+
+- gridSizer.Add(wxStaticText(panel, -1, 'directory to build:'))
+- self.dirCtl = wxTextCtrl(panel, -1, '')
++ gridSizer.Add(wx.StaticText(panel, -1, 'directory to build:'))
++ self.dirCtl = wx.TextCtrl(panel, -1, '')
+
+- b = wxBoxSizer(wxHORIZONTAL)
+- b.Add(self.dirCtl, 1, wxEXPAND)
+- b.Add((10, 10), 0, wxEXPAND)
+- button = wxButton(panel, -1, 'select')
+- b.Add(button, 0, wxEXPAND)
+- EVT_BUTTON(frame, button.GetId(), self.select)
+-
+- gridSizer.Add(b, 0, wxEXPAND)
+-
+- gridSizer.Add(wxStaticText(panel, -1, 'announce url:'))
+- self.annCtl = wxTextCtrl(panel, -1, 'http://my.tracker:6969/announce')
+- gridSizer.Add(self.annCtl, 0, wxEXPAND)
++ b = wx.BoxSizer(wx.HORIZONTAL)
++ b.Add(self.dirCtl, 1, wx.EXPAND)
++ b.Add((10, 10), 0, wx.EXPAND)
++ button = wx.Button(panel, -1, 'select')
++ b.Add(button, 0, wx.EXPAND)
++ wx.EVT_BUTTON(frame, button.GetId(), self.select)
++
++ gridSizer.Add(b, 0, wx.EXPAND)
++
++ gridSizer.Add(wx.StaticText(panel, -1, 'announce url:'))
++ self.annCtl = wx.TextCtrl(panel, -1, 'http://my.tracker:6969/announce')
++ gridSizer.Add(self.annCtl, 0, wx.EXPAND)
+
+- gridSizer.Add(wxStaticText(panel, -1, 'piece size:'))
+- self.piece_length = wxChoice(panel, -1, choices = ['2 ** 21', '2 ** 20', '2 ** 19',
++ gridSizer.Add(wx.StaticText(panel, -1, 'piece size:'))
++ self.piece_length = wx.Choice(panel, -1, choices = ['2 ** 21', '2 ** 20', '2 ** 19',
+ '2 ** 18', '2 ** 17', '2 ** 16', '2 ** 15'])
+ self.piece_length.SetSelection(3)
+ gridSizer.Add(self.piece_length)
+
+ gridSizer.AddGrowableCol(1)
+
+- border = wxBoxSizer(wxVERTICAL)
+- border.Add(gridSizer, 0, wxEXPAND | wxNORTH | wxEAST | wxWEST, 25)
+- b2 = wxButton(panel, -1, 'make')
+- border.Add((10, 10), 1, wxEXPAND)
+- border.Add(b2, 0, wxALIGN_CENTER | wxSOUTH, 20)
+- EVT_BUTTON(frame, b2.GetId(), self.complete)
++ border = wx.BoxSizer(wx.VERTICAL)
++ border.Add(gridSizer, 0, wx.EXPAND | wx.NORTH | wx.EAST | wx.WEST, 25)
++ b2 = wx.Button(panel, -1, 'make')
++ border.Add((10, 10), 1, wx.EXPAND)
++ border.Add(b2, 0, wx.ALIGN_CENTER | wx.SOUTH, 20)
++ wx.EVT_BUTTON(frame, b2.GetId(), self.complete)
+ panel.SetSizer(border)
+ panel.SetAutoLayout(True)
+
+ def select(self, x):
+- dl = wxDirDialog(self.frame, style = wxDD_DEFAULT_STYLE | wxDD_NEW_DIR_BUTTON)
+- if dl.ShowModal() == wxID_OK:
++ dl = wx.DirDialog(self.frame, style = wx.DD_DEFAULT_STYLE | wx.DD_NEW_DIR_BUTTON)
++ if dl.ShowModal() == wx.ID_OK:
+ self.dirCtl.SetValue(dl.GetPath())
+
+ def complete(self, x):
+ if self.dirCtl.GetValue() == '':
+- dlg = wxMessageDialog(self.frame, message = 'You must select a directory',
+- caption = 'Error', style = wxOK | wxICON_ERROR)
++ dlg = wx.MessageDialog(self.frame, message = 'You must select a directory',
++ caption = 'Error', style = wx.OK | wx.ICON_ERROR)
+ dlg.ShowModal()
+ dlg.Destroy()
+ return
+@@ -112,31 +112,31 @@
+ self.a = a
+ self.pl = pl
+ self.flag = Event()
+- frame = wxFrame(None, -1, 'BitTorrent make directory', size = wxSize(550, 250))
++ frame = wx.Frame(None, -1, 'BitTorrent make directory', size = wx.Size(550, 250))
+ self.frame = frame
+
+- panel = wxPanel(frame, -1)
++ panel = wx.Panel(frame, -1)
+
+- gridSizer = wxFlexGridSizer(cols = 1, vgap = 15, hgap = 8)
++ gridSizer = wx.FlexGridSizer(cols = 1, vgap = 15, hgap = 8)
+
+- self.currentLabel = wxStaticText(panel, -1, 'checking file sizes')
+- gridSizer.Add(self.currentLabel, 0, wxEXPAND)
+- self.gauge = wxGauge(panel, -1, range = 1000, style = wxGA_SMOOTH)
+- gridSizer.Add(self.gauge, 0, wxEXPAND)
+- gridSizer.Add((10, 10), 1, wxEXPAND)
+- self.button = wxButton(panel, -1, 'cancel')
+- gridSizer.Add(self.button, 0, wxALIGN_CENTER)
++ self.currentLabel = wx.StaticText(panel, -1, 'checking file sizes')
++ gridSizer.Add(self.currentLabel, 0, wx.EXPAND)
++ self.gauge = wx.Gauge(panel, -1, range = 1000, style = wx.GA_SMOOTH)
++ gridSizer.Add(self.gauge, 0, wx.EXPAND)
++ gridSizer.Add((10, 10), 1, wx.EXPAND)
++ self.button = wx.Button(panel, -1, 'cancel')
++ gridSizer.Add(self.button, 0, wx.ALIGN_CENTER)
+ gridSizer.AddGrowableRow(2)
+ gridSizer.AddGrowableCol(0)
+
+- g2 = wxFlexGridSizer(cols = 1, vgap = 15, hgap = 8)
+- g2.Add(gridSizer, 1, wxEXPAND | wxALL, 25)
++ g2 = wx.FlexGridSizer(cols = 1, vgap = 15, hgap = 8)
++ g2.Add(gridSizer, 1, wx.EXPAND | wx.ALL, 25)
+ g2.AddGrowableRow(0)
+ g2.AddGrowableCol(0)
+ panel.SetSizer(g2)
+ panel.SetAutoLayout(True)
+- EVT_BUTTON(frame, self.button.GetId(), self.done)
+- EVT_CLOSE(frame, self.done)
++ wx.EVT_BUTTON(frame, self.button.GetId(), self.done)
++ wx.EVT_CLOSE(frame, self.done)
+ EVT_INVOKE(frame, self.onInvoke)
+ frame.Show(True)
+ Thread(target = self.complete).start()
+@@ -152,8 +152,8 @@
+ except (OSError, IOError), e:
+ self.currentLabel.SetLabel('Error!')
+ self.button.SetLabel('Close')
+- dlg = wxMessageDialog(self.frame, message = 'Error - ' + str(e),
+- caption = 'Error', style = wxOK | wxICON_ERROR)
++ dlg = wx.MessageDialog(self.frame, message = 'Error - ' + str(e),
++ caption = 'Error', style = wx.OK | wx.ICON_ERROR)
+ dlg.ShowModal()
+ dlg.Destroy()
+
+@@ -175,13 +175,13 @@
+
+ def invokeLater(self, func, args = [], kwargs = {}):
+ if not self.flag.isSet():
+- wxPostEvent(self.frame, InvokeEvent(func, args, kwargs))
++ wx.PostEvent(self.frame, InvokeEvent(func, args, kwargs))
+
+ def done(self, event):
+ self.flag.set()
+ self.frame.Destroy()
+
+-class btWxApp(wxApp):
++class btWxApp(wx.App):
+ def OnInit(self):
+ d = DownloadInfo()
+ d.frame.Show(True)
+--- bittornado.orig/btmaketorrentgui.py
++++ bittornado/btmaketorrentgui.py
+@@ -22,7 +22,7 @@
+ from os import getcwd
+ from os.path import join, isdir
+ try:
+- from wxPython.wx import *
++ import wx
+ except:
+ print 'wxPython is either not installed or has not been installed properly.'
+ sys.exit(1)
+@@ -33,14 +33,14 @@
+ True = 1
+ False = 0
+
+-wxEVT_INVOKE = wxNewEventType()
++wxEVT_INVOKE = wx.NewEventType()
+
+ def EVT_INVOKE(win, func):
+ win.Connect(-1, -1, wxEVT_INVOKE, func)
+
+-class InvokeEvent(wxPyEvent):
++class InvokeEvent(wx.PyEvent):
+ def __init__(self, func, args, kwargs):
+- wxPyEvent.__init__(self)
++ wx.PyEvent.__init__(self)
+ self.SetEventType(wxEVT_INVOKE)
+ self.func = func
+ self.args = args
+@@ -48,99 +48,99 @@
+
+ class DownloadInfo:
+ def __init__(self):
+- frame = wxFrame(None, -1, 'BitTorrent Torrent File Maker', size = wxSize(550, 410))
++ frame = wx.Frame(None, -1, 'BitTorrent Torrent File Maker', size = wx.Size(550, 410))
+ self.frame = frame
+
+- panel = wxPanel(frame, -1)
++ panel = wx.Panel(frame, -1)
+
+- gridSizer = wxFlexGridSizer(cols = 2, rows = 2, vgap = 0, hgap = 8)
++ gridSizer = wx.FlexGridSizer(cols = 2, rows = 2, vgap = 0, hgap = 8)
+
+- gridSizer.Add(wxStaticText(panel, -1, 'make torrent of:'))
++ gridSizer.Add(wx.StaticText(panel, -1, 'make torrent of:'))
+
+- b = wxBoxSizer(wxHORIZONTAL)
+- self.dirCtl = wxTextCtrl(panel, -1, '')
+- b.Add(self.dirCtl, 1, wxEXPAND)
+- b.Add((10, 10), 0, wxEXPAND)
++ b = wx.BoxSizer(wx.HORIZONTAL)
++ self.dirCtl = wx.TextCtrl(panel, -1, '')
++ b.Add(self.dirCtl, 1, wx.EXPAND)
++ b.Add((10, 10), 0, wx.EXPAND)
+
+- button = wxButton(panel, -1, 'dir', size = (30,20))
+- EVT_BUTTON(frame, button.GetId(), self.selectdir)
++ button = wx.Button(panel, -1, 'dir', size = (30,20))
++ wx.EVT_BUTTON(frame, button.GetId(), self.selectdir)
+ b.Add(button, 0)
+
+- button2 = wxButton(panel, -1, 'file', size = (30,20))
+- EVT_BUTTON(frame, button2.GetId(), self.selectfile)
++ button2 = wx.Button(panel, -1, 'file', size = (30,20))
++ wx.EVT_BUTTON(frame, button2.GetId(), self.selectfile)
+ b.Add(button2, 0)
+
+- gridSizer.Add(b, 0, wxEXPAND)
+- gridSizer.Add(wxStaticText(panel, -1, ''))
+- gridSizer.Add(wxStaticText(panel, -1, ''))
+-
+- gridSizer.Add(wxStaticText(panel, -1, 'announce url:'))
+- self.annCtl = wxTextCtrl(panel, -1, 'http://my.tracker:6969/announce')
+- gridSizer.Add(self.annCtl, 0, wxEXPAND)
+- gridSizer.Add(wxStaticText(panel, -1, ''))
+- gridSizer.Add(wxStaticText(panel, -1, ''))
+-
+- a = wxFlexGridSizer(cols = 1)
+- a.Add(wxStaticText(panel, -1, 'announce list:'))
+- a.Add(wxStaticText(panel, -1, ''))
+- abutton = wxButton(panel, -1, 'copy\nannounces\nfrom\ntorrent', size = (50,70))
+- EVT_BUTTON(frame, abutton.GetId(), self.announcecopy)
+- a.Add(abutton, 0, wxEXPAND)
+- gridSizer.Add(a, 0, wxEXPAND)
++ gridSizer.Add(b, 0, wx.EXPAND)
++ gridSizer.Add(wx.StaticText(panel, -1, ''))
++ gridSizer.Add(wx.StaticText(panel, -1, ''))
++
++ gridSizer.Add(wx.StaticText(panel, -1, 'announce url:'))
++ self.annCtl = wx.TextCtrl(panel, -1, 'http://my.tracker:6969/announce')
++ gridSizer.Add(self.annCtl, 0, wx.EXPAND)
++ gridSizer.Add(wx.StaticText(panel, -1, ''))
++ gridSizer.Add(wx.StaticText(panel, -1, ''))
++
++ a = wx.FlexGridSizer(cols = 1)
++ a.Add(wx.StaticText(panel, -1, 'announce list:'))
++ a.Add(wx.StaticText(panel, -1, ''))
++ abutton = wx.Button(panel, -1, 'copy\nannounces\nfrom\ntorrent', size = (50,70))
++ wx.EVT_BUTTON(frame, abutton.GetId(), self.announcecopy)
++ a.Add(abutton, 0, wx.EXPAND)
++ gridSizer.Add(a, 0, wx.EXPAND)
+
+- self.annListCtl = wxTextCtrl(panel, -1, '\n\n\n\n\n', wxPoint(-1,-1), (400,120),
+- wxTE_MULTILINE|wxHSCROLL|wxTE_DONTWRAP)
+- gridSizer.Add(self.annListCtl, -1, wxEXPAND)
++ self.annListCtl = wx.TextCtrl(panel, -1, '\n\n\n\n\n', wx.Point(-1,-1), (400,120),
++ wx.TE_MULTILINE|wx.HSCROLL|wx.TE_DONTWRAP)
++ gridSizer.Add(self.annListCtl, -1, wx.EXPAND)
+
+- gridSizer.Add(wxStaticText(panel, -1, ''))
+- exptext = wxStaticText(panel, -1,
++ gridSizer.Add(wx.StaticText(panel, -1, ''))
++ exptext = wx.StaticText(panel, -1,
+ "a list of announces separated by commas " +
+ "or whitespace and on several lines -\n" +
+ "trackers on the same line will be tried randomly," +
+ "and all the trackers on one line\n" +
+ "will be tried before the trackers on the next line.")
+- exptext.SetFont(wxFont(6, wxDEFAULT, wxNORMAL, wxNORMAL, False))
++ exptext.SetFont(wx.Font(6, wx.DEFAULT, wx.NORMAL, wx.NORMAL, False))
+ gridSizer.Add(exptext)
+
+- gridSizer.Add(wxStaticText(panel, -1, ''))
+- gridSizer.Add(wxStaticText(panel, -1, ''))
++ gridSizer.Add(wx.StaticText(panel, -1, ''))
++ gridSizer.Add(wx.StaticText(panel, -1, ''))
+
+- gridSizer.Add(wxStaticText(panel, -1, 'piece size:'))
+- self.piece_length = wxChoice(panel, -1,
++ gridSizer.Add(wx.StaticText(panel, -1, 'piece size:'))
++ self.piece_length = wx.Choice(panel, -1,
+ choices = ['automatic', '2MiB', '1MiB', '512KiB', '256KiB', '128KiB', '64KiB', '32KiB'])
+ self.piece_length_list = [0, 21, 20, 19, 18, 17, 16, 15]
+ self.piece_length.SetSelection(0)
+ gridSizer.Add(self.piece_length)
+
+- gridSizer.Add(wxStaticText(panel, -1, ''))
+- gridSizer.Add(wxStaticText(panel, -1, ''))
++ gridSizer.Add(wx.StaticText(panel, -1, ''))
++ gridSizer.Add(wx.StaticText(panel, -1, ''))
+
+- gridSizer.Add(wxStaticText(panel, -1, 'comment:'))
+- self.commentCtl = wxTextCtrl(panel, -1, '')
+- gridSizer.Add(self.commentCtl, 0, wxEXPAND)
++ gridSizer.Add(wx.StaticText(panel, -1, 'comment:'))
++ self.commentCtl = wx.TextCtrl(panel, -1, '')
++ gridSizer.Add(self.commentCtl, 0, wx.EXPAND)
+
+ gridSizer.AddGrowableCol(1)
+
+- border = wxBoxSizer(wxVERTICAL)
+- border.Add(gridSizer, 0, wxEXPAND | wxNORTH | wxEAST | wxWEST, 25)
+- b2 = wxButton(panel, -1, 'make')
+- border.Add((10, 10), 1, wxEXPAND)
+- border.Add(b2, 0, wxALIGN_CENTER | wxSOUTH, 20)
+- EVT_BUTTON(frame, b2.GetId(), self.complete)
++ border = wx.BoxSizer(wx.VERTICAL)
++ border.Add(gridSizer, 0, wx.EXPAND | wx.NORTH | wx.EAST | wx.WEST, 25)
++ b2 = wx.Button(panel, -1, 'make')
++ border.Add((10, 10), 1, wx.EXPAND)
++ border.Add(b2, 0, wx.ALIGN_CENTER | wx.SOUTH, 20)
++ wx.EVT_BUTTON(frame, b2.GetId(), self.complete)
+ panel.SetSizer(border)
+ panel.SetAutoLayout(True)
+
+ panel.DragAcceptFiles(True)
+- EVT_DROP_FILES(panel, self.selectdrop)
++ wx.EVT_DROP_FILES(panel, self.selectdrop)
+
+ def selectdir(self, x):
+- dl = wxDirDialog(self.frame, style = wxDD_DEFAULT_STYLE | wxDD_NEW_DIR_BUTTON)
+- if dl.ShowModal() == wxID_OK:
++ dl = wx.DirDialog(self.frame, style = wx.DD_DEFAULT_STYLE | wx.DD_NEW_DIR_BUTTON)
++ if dl.ShowModal() == wx.ID_OK:
+ self.dirCtl.SetValue(dl.GetPath())
+
+ def selectfile(self, x):
+- dl = wxFileDialog (self.frame, 'Choose file or directory to use', style = wxOPEN)
+- if dl.ShowModal() == wxID_OK:
++ dl = wx.FileDialog (self.frame, 'Choose file or directory to use', style = wx.OPEN)
++ if dl.ShowModal() == wx.ID_OK:
+ self.dirCtl.SetValue(dl.GetPath())
+
+ def selectdrop(self, x):
+@@ -150,8 +150,8 @@
+ self.dirCtl.SetValue(x[0])
+
+ def announcecopy(self, x):
+- dl = wxFileDialog (self.frame, 'Choose .torrent file to use', '', '', '*.torrent', wxOPEN)
+- if dl.ShowModal() == wxID_OK:
++ dl = wx.FileDialog (self.frame, 'Choose .torrent file to use', '', '', '*.torrent', wx.OPEN)
++ if dl.ShowModal() == wx.ID_OK:
+ try:
+ h = open(dl.GetPath(), 'rb')
+ metainfo = bdecode(h.read())
+@@ -187,8 +187,8 @@
+
+ def complete(self, x):
+ if self.dirCtl.GetValue() == '':
+- dlg = wxMessageDialog(self.frame, message = 'You must select a\n file or directory',
+- caption = 'Error', style = wxOK | wxICON_ERROR)
++ dlg = wx.MessageDialog(self.frame, message = 'You must select a\n file or directory',
++ caption = 'Error', style = wx.OK | wx.ICON_ERROR)
+ dlg.ShowModal()
+ dlg.Destroy()
+ return
+@@ -217,41 +217,41 @@
+
+ if isdir(d):
+ self.choicemade = Event()
+- frame = wxFrame(None, -1, 'BitTorrent make torrent', size = (1,1))
++ frame = wx.Frame(None, -1, 'BitTorrent make torrent', size = (1,1))
+ self.frame = frame
+- panel = wxPanel(frame, -1)
+- gridSizer = wxFlexGridSizer(cols = 1, vgap = 8, hgap = 8)
++ panel = wx.Panel(frame, -1)
++ gridSizer = wx.FlexGridSizer(cols = 1, vgap = 8, hgap = 8)
+ gridSizer.AddGrowableRow(1)
+- gridSizer.Add(wxStaticText(panel, -1,
+- 'Do you want to make a separate .torrent'),0,wxALIGN_CENTER)
+- gridSizer.Add(wxStaticText(panel, -1,
+- 'for every item in this directory?'),0,wxALIGN_CENTER)
+- gridSizer.Add(wxStaticText(panel, -1, ''))
++ gridSizer.Add(wx.StaticText(panel, -1,
++ 'Do you want to make a separate .torrent'),0,wx.ALIGN_CENTER)
++ gridSizer.Add(wx.StaticText(panel, -1,
++ 'for every item in this directory?'),0,wx.ALIGN_CENTER)
++ gridSizer.Add(wx.StaticText(panel, -1, ''))
+
+- b = wxFlexGridSizer(cols = 3, hgap = 10)
+- yesbut = wxButton(panel, -1, 'Yes')
++ b = wx.FlexGridSizer(cols = 3, hgap = 10)
++ yesbut = wx.Button(panel, -1, 'Yes')
+ def saidyes(e, self = self):
+ self.frame.Destroy()
+ self.separatetorrents = True
+ self.begin()
+- EVT_BUTTON(frame, yesbut.GetId(), saidyes)
++ wx.EVT_BUTTON(frame, yesbut.GetId(), saidyes)
+ b.Add(yesbut, 0)
+
+- nobut = wxButton(panel, -1, 'No')
++ nobut = wx.Button(panel, -1, 'No')
+ def saidno(e, self = self):
+ self.frame.Destroy()
+ self.begin()
+- EVT_BUTTON(frame, nobut.GetId(), saidno)
++ wx.EVT_BUTTON(frame, nobut.GetId(), saidno)
+ b.Add(nobut, 0)
+
+- cancelbut = wxButton(panel, -1, 'Cancel')
++ cancelbut = wx.Button(panel, -1, 'Cancel')
+ def canceled(e, self = self):
+ self.frame.Destroy()
+- EVT_BUTTON(frame, cancelbut.GetId(), canceled)
++ wx.EVT_BUTTON(frame, cancelbut.GetId(), canceled)
+ b.Add(cancelbut, 0)
+- gridSizer.Add(b, 0, wxALIGN_CENTER)
+- border = wxBoxSizer(wxHORIZONTAL)
+- border.Add(gridSizer, 1, wxEXPAND | wxALL, 4)
++ gridSizer.Add(b, 0, wx.ALIGN_CENTER)
++ border = wx.BoxSizer(wx.HORIZONTAL)
++ border.Add(gridSizer, 1, wx.EXPAND | wx.ALL, 4)
+
+ panel.SetSizer(border)
+ panel.SetAutoLayout(True)
+@@ -264,35 +264,35 @@
+
+ def begin(self):
+ if self.separatetorrents:
+- frame = wxFrame(None, -1, 'BitTorrent make directory', size = wxSize(550, 250))
++ frame = wx.Frame(None, -1, 'BitTorrent make directory', size = wx.Size(550, 250))
+ else:
+- frame = wxFrame(None, -1, 'BitTorrent make torrent', size = wxSize(550, 250))
++ frame = wx.Frame(None, -1, 'BitTorrent make torrent', size = wx.Size(550, 250))
+ self.frame = frame
+
+- panel = wxPanel(frame, -1)
+- gridSizer = wxFlexGridSizer(cols = 1, vgap = 15, hgap = 8)
++ panel = wx.Panel(frame, -1)
++ gridSizer = wx.FlexGridSizer(cols = 1, vgap = 15, hgap = 8)
+
+ if self.separatetorrents:
+- self.currentLabel = wxStaticText(panel, -1, 'checking file sizes')
++ self.currentLabel = wx.StaticText(panel, -1, 'checking file sizes')
+ else:
+- self.currentLabel = wxStaticText(panel, -1, 'building ' + self.d + '.torrent')
+- gridSizer.Add(self.currentLabel, 0, wxEXPAND)
+- self.gauge = wxGauge(panel, -1, range = 1000, style = wxGA_SMOOTH)
+- gridSizer.Add(self.gauge, 0, wxEXPAND)
+- gridSizer.Add((10, 10), 1, wxEXPAND)
+- self.button = wxButton(panel, -1, 'cancel')
+- gridSizer.Add(self.button, 0, wxALIGN_CENTER)
++ self.currentLabel = wx.StaticText(panel, -1, 'building ' + self.d + '.torrent')
++ gridSizer.Add(self.currentLabel, 0, wx.EXPAND)
++ self.gauge = wx.Gauge(panel, -1, range = 1000, style = wx.GA_SMOOTH)
++ gridSizer.Add(self.gauge, 0, wx.EXPAND)
++ gridSizer.Add((10, 10), 1, wx.EXPAND)
++ self.button = wx.Button(panel, -1, 'cancel')
++ gridSizer.Add(self.button, 0, wx.ALIGN_CENTER)
+ gridSizer.AddGrowableRow(2)
+ gridSizer.AddGrowableCol(0)
+
+- g2 = wxFlexGridSizer(cols = 1, vgap = 15, hgap = 8)
+- g2.Add(gridSizer, 1, wxEXPAND | wxALL, 25)
++ g2 = wx.FlexGridSizer(cols = 1, vgap = 15, hgap = 8)
++ g2.Add(gridSizer, 1, wx.EXPAND | wx.ALL, 25)
+ g2.AddGrowableRow(0)
+ g2.AddGrowableCol(0)
+ panel.SetSizer(g2)
+ panel.SetAutoLayout(True)
+- EVT_BUTTON(frame, self.button.GetId(), self.done)
+- EVT_CLOSE(frame, self.done)
++ wx.EVT_BUTTON(frame, self.button.GetId(), self.done)
++ wx.EVT_CLOSE(frame, self.done)
+ EVT_INVOKE(frame, self.onInvoke)
+ frame.Show(True)
+ Thread(target = self.complete).start()
+@@ -313,8 +313,8 @@
+ except (OSError, IOError), e:
+ self.currentLabel.SetLabel('Error!')
+ self.button.SetLabel('Close')
+- dlg = wxMessageDialog(self.frame, message = 'Error - ' + str(e),
+- caption = 'Error', style = wxOK | wxICON_ERROR)
++ dlg = wx.MessageDialog(self.frame, message = 'Error - ' + str(e),
++ caption = 'Error', style = wx.OK | wx.ICON_ERROR)
+ dlg.ShowModal()
+ dlg.Destroy()
+
+@@ -336,13 +336,13 @@
+
+ def invokeLater(self, func, args = [], kwargs = {}):
+ if not self.flag.isSet():
+- wxPostEvent(self.frame, InvokeEvent(func, args, kwargs))
++ wx.PostEvent(self.frame, InvokeEvent(func, args, kwargs))
+
+ def done(self, event):
+ self.flag.set()
+ self.frame.Destroy()
+
+-class btWxApp(wxApp):
++class btWxApp(wx.App):
+ def OnInit(self):
+ d = DownloadInfo()
+ d.frame.Show(True)
--- bittornado-0.3.18.orig/debian/patches/04_btlaunchmany.py_transpose_transfer_totals.dpatch
+++ bittornado-0.3.18/debian/patches/04_btlaunchmany.py_transpose_transfer_totals.dpatch
@@ -0,0 +1,37 @@
+#! /bin/sh -e
+## 04_btlaunchmany.py_transpose_transfer_totals.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+if [ $# -lt 1 ]; then
+ echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+ -patch) patch -p1 ${patch_opts} < $0;;
+ -unpatch) patch -R -p1 ${patch_opts} < $0;;
+ *)
+ echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad bittornado-0.3.7/btlaunchmany.py /tmp/dpep.gIk9Al/bittornado-0.3.7/btlaunchmany.py
+--- bittornado-0.3.7/btlaunchmany.py 2004-11-18 21:44:13.000000000 -0600
++++ /tmp/dpep.gIk9Al/bittornado-0.3.7/btlaunchmany.py 2004-11-18 21:44:58.000000000 -0600
+@@ -53,7 +53,7 @@
+ self.message('no torrents')
+ for x in data:
+ ( name, status, progress, peers, seeds, seedsmsg, dist,
+- uprate, dnrate, upamt, dnamt, size, t, msg ) = x
++ uprate, dnrate, dnamt, upamt, size, t, msg ) = x
+ print '"%s": "%s" (%s) - %sP%s%s%.3fD u%0.1fK/s-d%0.1fK/s u%dK-d%dK "%s"' % (
+ name, status, progress, peers, seeds, seedsmsg, dist,
+ uprate/1000, dnrate/1000, upamt/1024, dnamt/1024, msg)
--- bittornado-0.3.18.orig/debian/patches/14_enable_gui_commandline.dpatch
+++ bittornado-0.3.18/debian/patches/14_enable_gui_commandline.dpatch
@@ -0,0 +1,52 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 14_enable_gui_commandline.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Enable the gui commandline parameters for btdownloadgui.
+
+@DPATCH@
+diff -urNad trunk~/BitTornado/download_bt1.py trunk/BitTornado/download_bt1.py
+--- trunk~/BitTornado/download_bt1.py 2007-01-04 14:26:36.000000000 -0800
++++ trunk/BitTornado/download_bt1.py 2007-01-04 14:26:36.000000000 -0800
+@@ -264,6 +264,16 @@
+ return config
+
+
++def parse_params_gui(params, presets = {}):
++ config, args = parseargs(params, defaults, 0, 1, presets = presets)
++ if args:
++ if config['responsefile'] or config['url']:
++ raise ValueError,'must have responsefile or url as arg or parameter, not both'
++ elif (config['responsefile'] and config['url']):
++ raise ValueError, 'cannot have both responsefile and url'
++ return config
++
++
+ def get_usage(defaults = defaults, cols = 100, presets = {}):
+ return (argslistheader + formatDefinitions(defaults, cols, presets))
+
+diff -urNad trunk~/btdownloadgui.py trunk/btdownloadgui.py
+--- trunk~/btdownloadgui.py 2007-01-04 14:26:23.000000000 -0800
++++ trunk/btdownloadgui.py 2007-01-04 14:26:36.000000000 -0800
+@@ -21,7 +21,7 @@
+ except:
+ print 'wxPython is either not installed or has not been installed properly.'
+ exit(1)
+-from BitTornado.download_bt1 import BT1Download, defaults, parse_params, get_usage, get_response
++from BitTornado.download_bt1 import BT1Download, defaults, parse_params, parse_params_gui, get_usage, get_response
+ from BitTornado.RawServer import RawServer, UPnP_ERROR
+ from random import seed
+ from socket import error as socketerror
+@@ -2191,6 +2191,12 @@
+ def OnInit(self):
+ doneflag = Event()
+ self.configfile = configReader()
++ try:
++ self.configfile.config = parse_params_gui(self.params, self.configfile.config)
++ except ValueError, e:
++ print 'error: ' + str(e) + '\nrun with no args and cancel the open dialog for parameter explanations'
++ exit(1)
++
+ d = DownloadInfoFrame(doneflag, self.configfile)
+ self.SetTopWindow(d.frame)
+ if len(self.params) == 0:
--- bittornado-0.3.18.orig/debian/patches/23_remove_UPnP_options.dpatch
+++ bittornado-0.3.18/debian/patches/23_remove_UPnP_options.dpatch
@@ -0,0 +1,72 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 23_remove_UPnP_options.dpatch by Cameron Dale
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Remove the UPnP options which only work on Windows.
+
+@DPATCH@
+--- bittornado.orig/BitTornado/download_bt1.py
++++ bittornado/BitTornado/download_bt1.py
+@@ -95,9 +95,6 @@
+ 'allow the client to connect to peers via IPv6'),
+ ('ipv6_binds_v4', autodetect_socket_style(),
+ "set if an IPv6 server socket won't also field IPv4 connections"),
+- ('upnp_nat_access', 1,
+- 'attempt to autoconfigure a UPnP router to forward a server port ' +
+- '(0 = disabled, 1 = mode 1 [fast], 2 = mode 2 [slow])'),
+ ('upload_rate_fudge', 5.0,
+ 'time equivalent of writing to kernel-level TCP buffer, for rate adjustment'),
+ ('tcp_ack_fudge', 0.03,
+@@ -194,7 +191,7 @@
+ config['timeout'], ipv6_enable = config['ipv6_enabled'],
+ failfunc = failed, errorfunc = exchandler)
+
+- upnp_type = UPnP_test(config['upnp_nat_access'])
++ upnp_type = 0
+ try:
+ listen_port = rawserver.find_and_bind(config['minport'], config['maxport'],
+ config['bind'], ipv6_socket_style = config['ipv6_binds_v4'],
+--- bittornado.orig/BitTornado/launchmanycore.py
++++ bittornado/BitTornado/launchmanycore.py
+@@ -169,7 +169,7 @@
+ self.rawserver = RawServer(self.doneflag, config['timeout_check_interval'],
+ config['timeout'], ipv6_enable = config['ipv6_enabled'],
+ failfunc = self.failed, errorfunc = self.exchandler)
+- upnp_type = UPnP_test(config['upnp_nat_access'])
++ upnp_type = 0
+ while True:
+ try:
+ self.listen_port = self.rawserver.find_and_bind(
+--- bittornado.orig/btdownloadcurses.py
++++ bittornado/btdownloadcurses.py
+@@ -334,7 +334,7 @@
+ config['timeout'], ipv6_enable = config['ipv6_enabled'],
+ failfunc = d.failed, errorfunc = d.error)
+
+- upnp_type = UPnP_test(config['upnp_nat_access'])
++ upnp_type = 0
+ while True:
+ try:
+ listen_port = rawserver.find_and_bind(config['minport'], config['maxport'],
+--- bittornado.orig/btdownloadgui.py
++++ bittornado/btdownloadgui.py
+@@ -2253,7 +2253,7 @@
+ config['timeout'], ipv6_enable = config['ipv6_enabled'],
+ failfunc = d.error, errorfunc = d.errorwindow)
+
+- upnp_type = UPnP_test(config['upnp_nat_access'])
++ upnp_type = 0
+ while True:
+ try:
+ listen_port = rawserver.find_and_bind(config['minport'], config['maxport'],
+--- bittornado.orig/btdownloadheadless.py
++++ bittornado/btdownloadheadless.py
+@@ -175,7 +175,7 @@
+ rawserver = RawServer(doneflag, config['timeout_check_interval'],
+ config['timeout'], ipv6_enable = config['ipv6_enabled'],
+ failfunc = h.failed, errorfunc = disp_exception)
+- upnp_type = UPnP_test(config['upnp_nat_access'])
++ upnp_type = 0
+ while True:
+ try:
+ listen_port = rawserver.find_and_bind(config['minport'], config['maxport'],
--- bittornado-0.3.18.orig/debian/patches/12_fix_guis_for_2.6.dpatch
+++ bittornado-0.3.18/debian/patches/12_fix_guis_for_2.6.dpatch
@@ -0,0 +1,74 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 12_make_guis_use_2.4.dpatch by Jérémy Bobbio
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix GUIs to work on python-wxgtk2.6.
+
+@DPATCH@
+--- bittornado.orig/btcompletedirgui.py
++++ bittornado/btcompletedirgui.py
+@@ -58,7 +58,7 @@
+
+ b = wxBoxSizer(wxHORIZONTAL)
+ b.Add(self.dirCtl, 1, wxEXPAND)
+-# b.Add(10, 10, 0, wxEXPAND)
++ b.Add((10, 10), 0, wxEXPAND)
+ button = wxButton(panel, -1, 'select')
+ b.Add(button, 0, wxEXPAND)
+ EVT_BUTTON(frame, button.GetId(), self.select)
+@@ -80,7 +80,7 @@
+ border = wxBoxSizer(wxVERTICAL)
+ border.Add(gridSizer, 0, wxEXPAND | wxNORTH | wxEAST | wxWEST, 25)
+ b2 = wxButton(panel, -1, 'make')
+-# border.Add(10, 10, 1, wxEXPAND)
++ border.Add((10, 10), 1, wxEXPAND)
+ border.Add(b2, 0, wxALIGN_CENTER | wxSOUTH, 20)
+ EVT_BUTTON(frame, b2.GetId(), self.complete)
+ panel.SetSizer(border)
+@@ -123,7 +123,7 @@
+ gridSizer.Add(self.currentLabel, 0, wxEXPAND)
+ self.gauge = wxGauge(panel, -1, range = 1000, style = wxGA_SMOOTH)
+ gridSizer.Add(self.gauge, 0, wxEXPAND)
+- gridSizer.Add(10, 10, 1, wxEXPAND)
++ gridSizer.Add((10, 10), 1, wxEXPAND)
+ self.button = wxButton(panel, -1, 'cancel')
+ gridSizer.Add(self.button, 0, wxALIGN_CENTER)
+ gridSizer.AddGrowableRow(2)
+--- bittornado.orig/btmaketorrentgui.py
++++ bittornado/btmaketorrentgui.py
+@@ -60,7 +60,7 @@
+ b = wxBoxSizer(wxHORIZONTAL)
+ self.dirCtl = wxTextCtrl(panel, -1, '')
+ b.Add(self.dirCtl, 1, wxEXPAND)
+-# b.Add(10, 10, 0, wxEXPAND)
++ b.Add((10, 10), 0, wxEXPAND)
+
+ button = wxButton(panel, -1, 'dir', size = (30,20))
+ EVT_BUTTON(frame, button.GetId(), self.selectdir)
+@@ -124,14 +124,14 @@
+ border = wxBoxSizer(wxVERTICAL)
+ border.Add(gridSizer, 0, wxEXPAND | wxNORTH | wxEAST | wxWEST, 25)
+ b2 = wxButton(panel, -1, 'make')
+-# border.Add(10, 10, 1, wxEXPAND)
++ border.Add((10, 10), 1, wxEXPAND)
+ border.Add(b2, 0, wxALIGN_CENTER | wxSOUTH, 20)
+ EVT_BUTTON(frame, b2.GetId(), self.complete)
+ panel.SetSizer(border)
+ panel.SetAutoLayout(True)
+
+-# panel.DragAcceptFiles(True)
+-# EVT_DROP_FILES(panel, self.selectdrop)
++ panel.DragAcceptFiles(True)
++ EVT_DROP_FILES(panel, self.selectdrop)
+
+ def selectdir(self, x):
+ dl = wxDirDialog(self.frame, style = wxDD_DEFAULT_STYLE | wxDD_NEW_DIR_BUTTON)
+@@ -139,7 +139,7 @@
+ self.dirCtl.SetValue(dl.GetPath())
+
+ def selectfile(self, x):
+- dl = wxFileDialog (self.frame, 'Choose file or directory to use', '', '', '', wxOPEN)
++ dl = wxFileDialog (self.frame, 'Choose file or directory to use', style = wxOPEN)
+ if dl.ShowModal() == wxID_OK:
+ self.dirCtl.SetValue(dl.GetPath())
+
--- bittornado-0.3.18.orig/debian/patches/22_fix_makemetafile_error-handling.dpatch
+++ bittornado-0.3.18/debian/patches/22_fix_makemetafile_error-handling.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 22_fix_makemetafile_error-handling.dpatch by Cameron Dale
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix the error-handling in makemetafile to properly join a list.
+
+@DPATCH@
+--- bittornado.orig/BitTornado/BT1/makemetafile.py
++++ bittornado/BitTornado/BT1/makemetafile.py
+@@ -140,7 +140,7 @@
+ for s in l:
+ r.append(uniconvert(s, e))
+ except UnicodeError:
+- raise UnicodeError('bad filename: '+join(l))
++ raise UnicodeError('bad filename: '+join(*l))
+ return r
+
+ def uniconvert(s, e):
--- bittornado-0.3.18.orig/debian/patches/03_btlaunchmanycurses.py_transpose_transfer_totals.dpatch
+++ bittornado-0.3.18/debian/patches/03_btlaunchmanycurses.py_transpose_transfer_totals.dpatch
@@ -0,0 +1,59 @@
+#! /bin/sh -e
+## 03_btlaunchmanycurses.py_transpose_transfer_totals.dpatch by Micah Anderson
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Transposes the order in which transfer totals are presented in
+## btlaunchmanycurses so that they correspond with the ordering used for
+## data rates, making it easier to scan as the column headings are no
+## longer misleading
+
+if [ $# -lt 1 ]; then
+ echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+ -patch) patch -p1 ${patch_opts} < $0;;
+ -unpatch) patch -R -p1 ${patch_opts} < $0;;
+ *)
+ echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad trunk~/BitTornado/launchmanycore.py trunk/BitTornado/launchmanycore.py
+--- trunk~/BitTornado/launchmanycore.py 2006-03-30 14:26:45.000000000 -0800
++++ trunk/BitTornado/launchmanycore.py 2006-03-30 14:31:14.000000000 -0800
+@@ -287,7 +287,7 @@
+ msg = ''
+
+ data.append(( name, status, progress, peers, seeds, seedsmsg, dist,
+- uprate, dnrate, upamt, dnamt, size, t, msg ))
++ uprate, dnrate, dnamt, upamt, size, t, msg ))
+ stop = self.Output.display(data)
+ if stop:
+ self.doneflag.set()
+diff -urNad trunk~/btlaunchmanycurses.py trunk/btlaunchmanycurses.py
+--- trunk~/btlaunchmanycurses.py 2006-03-30 14:26:45.000000000 -0800
++++ trunk/btlaunchmanycurses.py 2006-03-30 14:31:14.000000000 -0800
+@@ -205,7 +205,7 @@
+ line = "%3d %s%s%s%s" % (ii+1, name, size, dnrate, uprate)
+ self._display_line(line, True)
+ if peers + seeds:
+- datastr = ' (%s) %s - %s peers %s seeds %.3f dist copies - %s up %s dn' % (
++ datastr = ' (%s) %s - %s peers %s seeds %.3f dist copies - %s dn %s up' % (
+ progress, status, peers, seeds, dist,
+ fmtsize(upamt), fmtsize(dnamt) )
+ else:
+@@ -314,4 +314,4 @@
+ if Exceptions:
+ print '\nEXCEPTION:'
+ print Exceptions[0]
+- print 'please report this to '+report_email
+\ No newline at end of file
++ print 'please report this to '+report_email
--- bittornado-0.3.18.orig/debian/patches/06_README_portchange.dpatch
+++ bittornado-0.3.18/debian/patches/06_README_portchange.dpatch
@@ -0,0 +1,22 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 06_README_portchange.dpatch by Micah Anderson
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+--- bittornado.orig/README.txt
++++ bittornado/README.txt
+@@ -87,9 +87,9 @@
+ the tracker, give a --ip parameter to the complete downloader. The --ip
+ parameter can be either an IP address or DNS name.
+
+-BitTorrent defaults to port 6881. If it can't use 6881, (probably because
+-another download is happening) it tries 6882, then 6883, etc. It gives up
+-after 6889.
++BitTorrent defaults to port 10000. If it can't use 10000, (probably because
++another download is happening) it tries 10002, then 10003, etc. It gives up
++after 60000.
+
+ 7) you're done!
+
--- bittornado-0.3.18.orig/debian/patches/17_fix_NatCheck_bufferlen_error.dpatch
+++ bittornado-0.3.18/debian/patches/17_fix_NatCheck_bufferlen_error.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 17_fix_NatCheck_bufferlen_error.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix a syntax error, see http://forums.degreez.net/viewtopic.php?p=28164
+
+@DPATCH@
+--- bittornado.orig/BitTornado/BT1/NatCheck.py
++++ bittornado/BitTornado/BT1/NatCheck.py
+@@ -206,9 +206,6 @@
+ self.next_len, self.next_func = x
+ if self.next_len < 0: # already checked buffer
+ return # wait for additional data
+- if self.bufferlen is not None:
+- self._read2('')
+- return
+
+ def connection_lost(self, connection):
+ if not self.closed:
--- bittornado-0.3.18.orig/debian/patches/18_fix_launchmany_encrypter.dpatch
+++ bittornado-0.3.18/debian/patches/18_fix_launchmany_encrypter.dpatch
@@ -0,0 +1,22 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 18_fix_launchmany_encrypter.dpatch by Cameron Dale
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix a bug in the Encrypter that dropped all launchmany handled
+## DP: connections due to not sending the headers properly.
+## DP: Debian Bug #422098, fix found in BitTornado CVS.
+
+@DPATCH@
+--- bittornado.orig/BitTornado/BT1/Encrypter.py
++++ bittornado/BitTornado/BT1/Encrypter.py
+@@ -91,7 +91,9 @@
+ else:
+ self.encrypted = False
+ self.options = options
+- self.write(self.Encoder.my_id)
++ self.write(chr(len(protocol_name)) + protocol_name +
++ option_pattern +
++ self.Encoder.download_id + self.Encoder.my_id )
+ self.next_len, self.next_func = 20, self.read_peer_id
+ else:
+ self.encrypted = None # don't know yet
--- bittornado-0.3.18.orig/debian/patches/27_remove_btdownloadheadless_curses_dependency.dpatch
+++ bittornado-0.3.18/debian/patches/27_remove_btdownloadheadless_curses_dependency.dpatch
@@ -0,0 +1,25 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 27_remove_btdownloadheadless_curses_dependency.dpatch by Cameron Dale
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: removed btdownloadheadless curses dependency; display width need is deprecated anyway.
+## DP: Taken from upstream's CVS.
+
+@DPATCH@
+--- bittornado.orig/btdownloadheadless.py
++++ bittornado/btdownloadheadless.py
+@@ -139,14 +139,6 @@
+ self.downloadTo = path
+
+ def run(params):
+- try:
+- import curses
+- curses.initscr()
+- cols = curses.COLS
+- curses.endwin()
+- except:
+- cols = 80
+-
+ h = HeadlessDisplayer()
+ while 1:
+ configdir = ConfigDir('downloadheadless')
--- bittornado-0.3.18.orig/debian/patches/15_fix_unicode_in_makemetafile.py.dpatch
+++ bittornado-0.3.18/debian/patches/15_fix_unicode_in_makemetafile.py.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 14_fix_unicode_in_makemetafile.py.dpatch by Jérémy Bobbio
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Don't try to decode a string which is already unicode!
+
+@DPATCH@
+--- bittornado.orig/BitTornado/BT1/makemetafile.py
++++ bittornado/BitTornado/BT1/makemetafile.py
+@@ -145,7 +145,8 @@
+
+ def uniconvert(s, e):
+ try:
+- s = unicode(s,e)
++ if s.__class__.__name__ != 'unicode':
++ s = unicode(s,e)
+ except UnicodeError:
+ raise UnicodeError('bad filename: '+s)
+ return s.encode('utf-8')
--- bittornado-0.3.18.orig/debian/patches/07_change_report_address.dpatch
+++ bittornado-0.3.18/debian/patches/07_change_report_address.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 06_change_report_address.dpatch by Micah Anderson
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+--- bittornado.orig/BitTornado/__init__.py
++++ bittornado/BitTornado/__init__.py
+@@ -2,7 +2,7 @@
+ version_short = 'T-0.3.18'
+
+ version = version_short+' ('+product_name+')'
+-report_email = version_short+'@degreez.net'
++report_email = 'http://www.debian.org/Bugs/Reporting'
+
+ from types import StringType
+ from sha import sha
--- bittornado-0.3.18.orig/debian/patches/05_bttrack_connerr_fix.dpatch
+++ bittornado-0.3.18/debian/patches/05_bttrack_connerr_fix.dpatch
@@ -0,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 05_bttrack_connerr_fix.dpatch by Micah Anderson
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Connections to bttrack fail (log shows AttributeError stack trace)
+## DP: http://forums.degreez.net/viewtopic.php?t=3848
+## DP: Bug#294803
+
+@DPATCH@
+--- bittornado.orig/BitTornado/BT1/track.py
++++ bittornado/BitTornado/BT1/track.py
+@@ -190,7 +190,7 @@
+
+ def get_forwarded_ip(headers):
+ x = _get_forwarded_ip(headers)
+- if not is_valid_ip(x) or local_IPs.includes(x):
++ if x is None or not is_valid_ip(x) or local_IPs.includes(x):
+ return None
+ return x
+
--- bittornado-0.3.18.orig/debian/patches/01_MANIFEST.in_remove_broken_cruft.dpatch
+++ bittornado-0.3.18/debian/patches/01_MANIFEST.in_remove_broken_cruft.dpatch
@@ -0,0 +1,34 @@
+#! /bin/sh -e
+## 01_MANIFEST.in_remove_broken_cruft.dpatch by Micah Anderson
+##
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Removes old broken programs that will never be fixed
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+exit 0
+@DPATCH@
+--- bittornado.orig/setup.py
++++ bittornado/setup.py
+@@ -22,7 +22,6 @@
+ "bttrack.py", "btmakemetafile.py", "btlaunchmany.py", "btcompletedir.py",
+ "btdownloadcurses.py", "btcompletedirgui.py", "btlaunchmanycurses.py",
+ "btmakemetafile.py", "btreannounce.py", "btrename.py", "btshowmetainfo.py",
+- 'btmaketorrentgui.py', 'btcopyannounce.py', 'btsethttpseeds.py',
+- 'bt-t-make.py',
++ 'btmaketorrentgui.py', 'btcopyannounce.py', 'btsethttpseeds.py'
+ ]
+ )
--- bittornado-0.3.18.orig/debian/patches/24_clarify_ip_parameter.dpatch
+++ bittornado-0.3.18/debian/patches/24_clarify_ip_parameter.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 24_clarify_ip_parameter.dpatch by Cameron Dale
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Clarify the use of the --ip parameter (can not use DNS names).
+
+@DPATCH@
+--- bittornado.orig/README.txt
++++ bittornado/README.txt
+@@ -85,7 +85,7 @@
+
+ If you're running the complete downloader on the same machine or LAN as
+ the tracker, give a --ip parameter to the complete downloader. The --ip
+-parameter can be either an IP address or DNS name.
++parameter must be an IP address.
+
+ BitTorrent defaults to port 10000. If it can't use 10000, (probably because
+ another download is happening) it tries 10002, then 10003, etc. It gives up
--- bittornado-0.3.18.orig/debian/patches/02_btdownloadcurses_increase_significant_digit.dpatch
+++ bittornado-0.3.18/debian/patches/02_btdownloadcurses_increase_significant_digit.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_btdownloadcurses_increase_significant_digit.dpatch by Micah Anderson
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+--- bittornado.orig/btdownloadcurses.py
++++ bittornado/btdownloadcurses.py
+@@ -79,7 +79,7 @@
+ i += 1
+ n >>= 10
+ n = float(n) / (1 << 10)
+- size = '%s (%.0f %s)' % (size, n, unit[i])
++ size = '%s (%.2f %s)' % (size, n, unit[i])
+ return size
+
+
--- bittornado-0.3.18.orig/debian/patches/11_sorthashcheck.dpatch
+++ bittornado-0.3.18/debian/patches/11_sorthashcheck.dpatch
@@ -0,0 +1,17 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10_sorthashcheck.dpatch by Micah Anderson
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+--- bittornado.orig/BitTornado/launchmanycore.py
++++ bittornado/BitTornado/launchmanycore.py
+@@ -354,6 +354,7 @@
+ def hashchecksched(self, hash = None):
+ if hash:
+ self.hashcheck_queue.append(hash)
++ self.hashcheck_queue.sort(lambda x, y: cmp(self.downloads[x].d.datalength, self.downloads[y].d.datalength))
+ if not self.hashcheck_current:
+ self._hashcheck_start()
+
--- bittornado-0.3.18.orig/debian/patches/series
+++ bittornado-0.3.18/debian/patches/series
@@ -0,0 +1,25 @@
+01_MANIFEST.in_remove_broken_cruft.dpatch
+02_btdownloadcurses_increase_significant_digit.dpatch
+05_bttrack_connerr_fix.dpatch
+06_README_portchange.dpatch
+07_change_report_address.dpatch
+08_btdownloadcurses_indent.dpatch
+09_timtuckerfixes.dpatch
+10_removeCVScrud.dpatch
+11_sorthashcheck.dpatch
+12_fix_guis_for_2.6.dpatch
+13_fix_btcompletedirgui_bug.dpatch
+# 14_enable_gui_commandline.dpatch
+15_fix_unicode_in_makemetafile.py.dpatch
+16_fix_ipv6_in_SocketHandler.dpatch
+17_fix_NatCheck_bufferlen_error.dpatch
+18_fix_launchmany_encrypter.dpatch
+19_fix_tracker_return_all.dpatch
+20_tracker_cache_minor_fix.dpatch
+21_remove_deprecated_wxPython_usage.dpatch
+22_fix_makemetafile_error-handling.dpatch
+23_remove_UPnP_options.dpatch
+24_clarify_ip_parameter.dpatch
+25_errors_in_error_handling.dpatch
+# 26_set_SO_REUSEADDR_on_sockets.dpatch
+27_remove_btdownloadheadless_curses_dependency.dpatch
--- bittornado-0.3.18.orig/debian/patches/20_tracker_cache_minor_fix.dpatch
+++ bittornado-0.3.18/debian/patches/20_tracker_cache_minor_fix.dpatch
@@ -0,0 +1,44 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 20_tracker_cache_minor_fix.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix a minor bug in the tracker's new cache structure.
+## DP: Fix is taken from upstream CVS.
+
+@DPATCH@
+--- bittornado.orig/BitTornado/BT1/track.py
++++ bittornado/BitTornado/BT1/track.py
+@@ -688,15 +688,19 @@
+ self.seedcount[infohash] += 1
+ if not peer.get('nat', -1):
+ for bc in self.becache[infohash]:
+- bc[1][myid] = bc[0][myid]
+- del bc[0][myid]
++ x = bc[0].get(myid)
++ if x:
++ bc[1][myid] = x
++ del bc[0][myid]
+ elif left and not peer['left']:
+ self.completed[infohash] -= 1
+ self.seedcount[infohash] -= 1
+ if not peer.get('nat', -1):
+ for bc in self.becache[infohash]:
+- bc[0][myid] = bc[1][myid]
+- del bc[1][myid]
++ x = bc[1].get(myid)
++ if x:
++ bc[0][myid] = x
++ del bc[1][myid]
+ peer['left'] = left
+
+ if port:
+@@ -717,7 +721,8 @@
+ l = self.becache[infohash]
+ y = not peer['left']
+ for x in l:
+- del x[y][myid]
++ if x[y].has_key(myid):
++ del x[y][myid]
+ if natted >= 0:
+ del peer['nat'] # restart NAT testing
+ if natted and natted < self.natcheck:
--- bittornado-0.3.18.orig/debian/patches/16_fix_ipv6_in_SocketHandler.dpatch
+++ bittornado-0.3.18/debian/patches/16_fix_ipv6_in_SocketHandler.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 16_fix_ipv6_in_SocketHandler.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix the logic in the SocketHandler.py bind implemenation for ipv6.
+
+@DPATCH@
+--- bittornado.orig/BitTornado/SocketHandler.py
++++ bittornado/BitTornado/SocketHandler.py
+@@ -166,7 +166,7 @@
+ else:
+ if self.ipv6_enable:
+ addrinfos.append([socket.AF_INET6, None, None, None, ('', port)])
+- if not addrinfos or ipv6_socket_style != 0:
++ if not addrinfos or ipv6_socket_style == 0:
+ addrinfos.append([socket.AF_INET, None, None, None, ('', port)])
+ for addrinfo in addrinfos:
+ try:
--- bittornado-0.3.18.orig/debian/patches/09_timtuckerfixes.dpatch
+++ bittornado-0.3.18/debian/patches/09_timtuckerfixes.dpatch
@@ -0,0 +1,259 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10_timtuckerfixes.dpatch by Micah Anderson
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+--- bittornado.orig/BitTornado/BT1/Connecter.py
++++ bittornado/BitTornado/BT1/Connecter.py
+@@ -46,6 +46,7 @@
+ self.outqueue = []
+ self.partial_message = None
+ self.download = None
++ self.upload = None
+ self.send_choke_queued = False
+ self.just_unchoked = None
+
+--- bittornado.orig/BitTornado/BT1/Encrypter.py
++++ bittornado/BitTornado/BT1/Encrypter.py
+@@ -28,22 +28,11 @@
+ def tobinary16(i):
+ return chr((i >> 8) & 0xFF) + chr(i & 0xFF)
+
+-hexchars = '0123456789ABCDEF'
+-hexmap = []
+-for i in xrange(256):
+- hexmap.append(hexchars[(i&0xF0)/16]+hexchars[i&0x0F])
+-
+-def tohex(s):
+- r = []
+- for c in s:
+- r.append(hexmap[ord(c)])
+- return ''.join(r)
+-
+ def make_readable(s):
+ if not s:
+ return ''
+ if quote(s).find('%') >= 0:
+- return tohex(s)
++ return b2a_hex(s).upper()
+ return '"'+s+'"'
+
+
+--- bittornado.orig/BitTornado/BT1/Storage.py
++++ bittornado/BitTornado/BT1/Storage.py
+@@ -285,20 +285,24 @@
+ for file, pos, end in self._intervals(pos, amount):
+ if DEBUG:
+ print 'reading '+file+' from '+str(pos)+' to '+str(end)
+- self.lock.acquire()
+- h = self._get_file_handle(file, False)
+- if flush_first and self.whandles.has_key(file):
+- h.flush()
+- fsync(h)
+- h.seek(pos)
+- while pos < end:
+- length = min(end-pos, MAXREADSIZE)
+- data = h.read(length)
+- if len(data) != length:
+- raise IOError('error reading data from '+file)
+- r.append(data)
+- pos += length
+- self.lock.release()
++ try:
++ self.lock.acquire()
++ h = self._get_file_handle(file, False)
++ if flush_first and self.whandles.has_key(file):
++ h.flush()
++ fsync(h)
++ h.seek(pos)
++ while pos < end:
++ length = min(end-pos, MAXREADSIZE)
++ data = h.read(length)
++ if len(data) != length:
++ raise IOError('error reading data from '+file)
++ r.append(data)
++ pos += length
++ self.lock.release()
++ except:
++ self.lock.release()
++ raise IOError('error reading data from '+ file)
+ return r
+
+ def write(self, pos, s):
+--- bittornado.orig/BitTornado/BT1/StreamCheck.py
++++ bittornado/BitTornado/BT1/StreamCheck.py
+@@ -22,20 +22,8 @@
+ def toint(s):
+ return long(b2a_hex(s), 16)
+
+-def tobinary(i):
+- return (chr(i >> 24) + chr((i >> 16) & 0xFF) +
+- chr((i >> 8) & 0xFF) + chr(i & 0xFF))
+-
+-hexchars = '0123456789ABCDEF'
+-hexmap = []
+-for i in xrange(256):
+- hexmap.append(hexchars[(i&0xF0)/16]+hexchars[i&0x0F])
+-
+ def tohex(s):
+- r = []
+- for c in s:
+- r.append(hexmap[ord(c)])
+- return ''.join(r)
++ return b2a_hex(s).upper()
+
+ def make_readable(s):
+ if not s:
+@@ -44,9 +32,6 @@
+ return tohex(s)
+ return '"'+s+'"'
+
+-def toint(s):
+- return long(b2a_hex(s), 16)
+-
+ # header, reserved, download id, my id, [length, message]
+
+ streamno = 0
+--- bittornado.orig/BitTornado/ConfigDir.py
++++ bittornado/BitTornado/ConfigDir.py
+@@ -9,6 +9,8 @@
+ import sys,os
+ from time import time, strftime
+
++from binascii import b2a_hex as tohex, a2b_hex as unhex
++
+ try:
+ True
+ except:
+@@ -23,23 +25,6 @@
+
+ DIRNAME = '.'+product_name
+
+-hexchars = '0123456789abcdef'
+-hexmap = []
+-revmap = {}
+-for i in xrange(256):
+- x = hexchars[(i&0xF0)/16]+hexchars[i&0x0F]
+- hexmap.append(x)
+- revmap[x] = chr(i)
+-
+-def tohex(s):
+- r = []
+- for c in s:
+- r.append(hexmap[ord(c)])
+- return ''.join(r)
+-
+-def unhex(s):
+- r = [ revmap[s[x:x+2]] for x in xrange(0, len(s), 2) ]
+- return ''.join(r)
+
+ def copyfile(oldpath, newpath): # simple file copy, all in RAM
+ try:
+--- bittornado.orig/BitTornado/RawServer.py
++++ bittornado/BitTornado/RawServer.py
+@@ -71,11 +71,13 @@
+ return self.excflag
+
+ def _add_task(self, func, delay, id = None):
+- assert float(delay) >= 0
++ if delay < 0:
++ delay = 0
+ insort(self.funcs, (clock() + delay, func, id))
+
+ def add_task(self, func, delay = 0, id = None):
+- assert float(delay) >= 0
++ if delay < 0:
++ delay = 0
+ self.externally_added.append((func, delay, id))
+
+ def scan_for_timeouts(self):
+--- bittornado.orig/BitTornado/clock.py
++++ bittornado/BitTornado/clock.py
+@@ -1,9 +1,10 @@
+ # Written by John Hoffman
+ # see LICENSE.txt for license information
+
+-from time import *
+ import sys
+
++from time import time
++
+ _MAXFORWARD = 100
+ _FUDGE = 1
+
+@@ -24,4 +25,6 @@
+ if sys.platform != 'win32':
+ _RTIME = RelativeTime()
+ def clock():
+- return _RTIME.get_time()
+\ No newline at end of file
++ return _RTIME.get_time()
++else:
++ from time import clock
+--- bittornado.orig/BitTornado/download_bt1.py
++++ bittornado/BitTornado/download_bt1.py
+@@ -846,17 +846,11 @@
+ self.rerequest.announce(3) # rerequest automatically if paused for >60 seconds
+
+ def set_super_seed(self):
+- try:
+- self.superseedflag.set()
+- def s(self = self):
+- if self.finflag.isSet():
+- self._set_super_seed()
+- self.rawserver.add_task(s)
+- except AttributeError:
+- pass
++ self.superseedflag.set()
++ self.rawserver.add_task(self._set_super_seed)
+
+ def _set_super_seed(self):
+- if not self.super_seeding_active:
++ if not self.super_seeding_active and self.finflag.isSet():
+ self.super_seeding_active = True
+ self.errorfunc(' ** SUPER-SEED OPERATION ACTIVE **\n' +
+ ' please set Max uploads so each peer gets 6-8 kB/s')
+--- bittornado.orig/BitTornado/launchmanycore.py
++++ bittornado/BitTornado/launchmanycore.py
+@@ -194,20 +194,27 @@
+ self.rawserver.add_task(self.scan, 0)
+ self.rawserver.add_task(self.stats, 0)
+
++ self.start()
++ except:
++ data = StringIO()
++ print_exc(file = data)
++ Output.exception(data.getvalue())
++
++ def start(self):
++ try:
+ self.handler.listen_forever()
+
+- self.Output.message('shutting down')
+ self.hashcheck_queue = []
+ for hash in self.torrent_list:
+ self.Output.message('dropped "'+self.torrent_cache[hash]['path']+'"')
+ self.downloads[hash].shutdown()
+- self.rawserver.shutdown()
+
+ except:
+ data = StringIO()
+- print_exc(file = data)
+- Output.exception(data.getvalue())
++ print_exc(file=data)
++ self.Output.exception(data.getvalue())
+
++ self.rawserver.shutdown()
+
+ def scan(self):
+ self.rawserver.add_task(self.scan, self.scan_period)
+@@ -309,6 +316,7 @@
+ self.torrent_list.append(hash)
+ self.downloads[hash] = d
+ d.start()
++ return d
+
+
+ def saveAs(self, hash, name, saveas, isdir):
--- bittornado-0.3.18.orig/debian/patches/08_btdownloadcurses_indent.dpatch
+++ bittornado-0.3.18/debian/patches/08_btdownloadcurses_indent.dpatch
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 08_btdownloadcurses_indent.dpatch by Micah Anderson
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+--- bittornado.orig/btdownloadcurses.py
++++ bittornado/btdownloadcurses.py
+@@ -402,6 +402,7 @@
+ curses_wrapper(run, errlist, argv[1:])
+
+ if errlist:
+- print "These errors occurred during execution:"
+- for error in errlist:
+- print error
+\ No newline at end of file
++ print "These errors occurred during execution:"
++ for error in errlist:
++ print error
++
--- bittornado-0.3.18.orig/debian/patches/26_set_SO_REUSEADDR_on_sockets.dpatch
+++ bittornado-0.3.18/debian/patches/26_set_SO_REUSEADDR_on_sockets.dpatch
@@ -0,0 +1,52 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 26_set_SO_REUSEADDR_on_sockets.dpatch by Cameron Dale
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Set the socket's SO_REUSEADDR option.
+
+@DPATCH@
+--- bittornado.orig/BitTornado/RawServer.py
++++ bittornado/BitTornado/RawServer.py
+@@ -84,11 +84,11 @@
+ self.add_task(self.scan_for_timeouts, self.timeout_check_interval)
+ self.sockethandler.scan_for_timeouts()
+
+- def bind(self, port, bind = '', reuse = False,
++ def bind(self, port, bind = '', reuse = True,
+ ipv6_socket_style = 1, upnp = False):
+ self.sockethandler.bind(port, bind, reuse, ipv6_socket_style, upnp)
+
+- def find_and_bind(self, minport, maxport, bind = '', reuse = False,
++ def find_and_bind(self, minport, maxport, bind = '', reuse = True,
+ ipv6_socket_style = 1, upnp = 0, randomizer = False):
+ return self.sockethandler.find_and_bind(minport, maxport, bind, reuse,
+ ipv6_socket_style, upnp, randomizer)
+--- bittornado.orig/BitTornado/SocketHandler.py
++++ bittornado/BitTornado/SocketHandler.py
+@@ -143,7 +143,7 @@
+ if k.socket is not None:
+ self._close_socket(k)
+
+- def bind(self, port, bind = '', reuse = False, ipv6_socket_style = 1, upnp = 0):
++ def bind(self, port, bind = '', reuse = True, ipv6_socket_style = 1, upnp = 0):
+ port = int(port)
+ addrinfos = []
+ self.servers = {}
+@@ -204,7 +204,7 @@
+ self.port_forwarded = port
+ self.port = port
+
+- def find_and_bind(self, minport, maxport, bind = '', reuse = False,
++ def find_and_bind(self, minport, maxport, bind = '', reuse = True,
+ ipv6_socket_style = 1, upnp = 0, randomizer = False):
+ e = 'maxport less than minport - no ports to check'
+ if maxport-minport < 50 or not randomizer:
+@@ -220,7 +220,7 @@
+ portrange.append(listen_port)
+ for listen_port in portrange:
+ try:
+- self.bind(listen_port, bind,
++ self.bind(listen_port, bind, reuse,
+ ipv6_socket_style = ipv6_socket_style, upnp = upnp)
+ return listen_port
+ except socket.error, e:
--- bittornado-0.3.18.orig/debian/patches/19_fix_tracker_return_all.dpatch
+++ bittornado-0.3.18/debian/patches/19_fix_tracker_return_all.dpatch
@@ -0,0 +1,58 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 19_fix_tracker_return_all.dpatch by Cameron Dale
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Stop the tracker from returning all torrents' peers in every request.
+
+@DPATCH@
+--- bittornado.orig/BitTornado/BT1/track.py
++++ bittornado/BitTornado/BT1/track.py
+@@ -267,10 +267,9 @@
+ l4,l4 = [ip,port] nopeerid
+ '''
+ if config['compact_reqd']:
+- x = 3
++ self.cache_default_len = 3
+ else:
+- x = 5
+- self.cache_default = [({},{}) for i in xrange(x)]
++ self.cache_default_len = 5
+ for infohash, ds in self.downloads.items():
+ self.seedcount[infohash] = 0
+ for x,y in ds.items():
+@@ -590,6 +589,8 @@
+
+ return None
+
++ def cache_default(self):
++ return [({},{}) for i in xrange(self.cache_default_len)]
+
+ def add_data(self, infohash, event, ip, paramslist):
+ peers = self.downloads.setdefault(infohash, {})
+@@ -751,7 +752,7 @@
+ cache = self.cached_t.setdefault(infohash, None)
+ if ( not cache or len(cache[1]) < rsize
+ or cache[0] + self.config['min_time_between_cache_refreshes'] < clock() ):
+- bc = self.becache.setdefault(infohash,self.cache_default)
++ bc = self.becache.setdefault(infohash,self.cache_default())
+ cache = [ clock(), bc[0][0].values() + bc[0][1].values() ]
+ self.cached_t[infohash] = cache
+ shuffle(cache[1])
+@@ -766,7 +767,7 @@
+ data['peers'] = []
+ return data
+
+- bc = self.becache.setdefault(infohash,self.cache_default)
++ bc = self.becache.setdefault(infohash,self.cache_default())
+ len_l = len(bc[2][0])
+ len_s = len(bc[2][1])
+ if not (len_l+len_s): # caches are empty!
+@@ -958,7 +959,7 @@
+
+ def natcheckOK(self, infohash, peerid, ip, port, peer):
+ seed = not peer['left']
+- bc = self.becache.setdefault(infohash,self.cache_default)
++ bc = self.becache.setdefault(infohash,self.cache_default())
+ cp = compact_peer_info(ip, port)
+ reqc = peer['requirecrypto']
+ bc[2][seed][peerid] = (cp,chr(reqc))
--- bittornado-0.3.18.orig/debian/patches/12_make_guis_use_2.4.dpatch
+++ bittornado-0.3.18/debian/patches/12_make_guis_use_2.4.dpatch
@@ -0,0 +1,43 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 12_make_guis_use_2.4.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Change 2 guis to use wxPython 2.4, as they don't seem to work with 2.6.
+
+@DPATCH@
+diff -urNad trunk~/btcompletedirgui.py trunk/btcompletedirgui.py
+--- trunk~/btcompletedirgui.py 2006-04-17 16:55:34.000000000 -0700
++++ trunk/btcompletedirgui.py 2006-04-17 16:56:31.000000000 -0700
+@@ -19,6 +19,14 @@
+ import sys
+ from os import getcwd
+ from os.path import join
++
++try:
++ import wxversion
++ wxversion.select('2.4')
++except:
++ print 'This program requires wxPython version 2.4 (python-wxgtk2.4 in Debian) be installed in order to run.'
++ sys.exit(1)
++
+ try:
+ from wxPython.wx import *
+ except:
+diff -urNad trunk~/btmaketorrentgui.py trunk/btmaketorrentgui.py
+--- trunk~/btmaketorrentgui.py 2006-04-17 16:55:34.000000000 -0700
++++ trunk/btmaketorrentgui.py 2006-04-17 16:56:31.000000000 -0700
+@@ -21,6 +21,14 @@
+ import sys
+ from os import getcwd
+ from os.path import join, isdir
++
++try:
++ import wxversion
++ wxversion.select('2.4')
++except:
++ print 'This program requires wxPython version 2.4 (python-wxgtk2.4 in Debian) be installed in order to run.'
++ sys.exit(1)
++
+ try:
+ from wxPython.wx import *
+ except: