Commit 40db1cd7 authored by Cristian Greco's avatar Cristian Greco

Imported Upstream version 2.1.0~rc7

parent 60908cbe
...@@ -12,6 +12,10 @@ Code from other projects: ...@@ -12,6 +12,10 @@ Code from other projects:
copyright: Malte Starostik <malte@kde.org> copyright: Malte Starostik <malte@kde.org>
license: LGPL license: LGPL
* files src/search_engine/socks.py
copyright: Dan Haim <negativeiq@users.sourceforge.net>
license: BSD
Images Authors: Images Authors:
* files: src/Icons/*.png * files: src/Icons/*.png
copyright: Gnome Icon Theme copyright: Gnome Icon Theme
......
* Mon Jan 11 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.7 * Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.1.0
- BUGFIX: Fix 'Add in pause' setting in torrent addition dialog - FEATURE: Graphical User Interface can be disabled at compilation time (headless running)
- BUGFIX: Update RSS feed as soon as feed downloader is enabled - FEATURE: Torrents can be labeled/categorized
- BUGFIX: RSS Feed downloader ignores articles above maximum number of articles - FEATURE: Labeled torrent can be downloaded corresponding subfolders
- BUGFIX: Fix possible bug when deleting a RSS folder - FEATURE: Disk cache size can be set from preferences
- BUGFIX: Remove persistant data when a RSS feed is deleted - FEATURE: Peer Exchange (PeX) can be disabled from preferences
- BUGFIX: RSS filters are now alphabetically sorted - FEATURE: Append !.qB extension to incomplete files option (libtorrent >= v0.15 only)
- BUGFIX: Fix crash when renaming currently displayed RSS filter - FEATURE: Torrent files/folders can be renamed (torrent addition dialog or files properties)
- BUGFIX: Remove overwriting confirmation when exporting RSS filters since Qt takes care of it - FEATURE: uTorrent compatible tracker list support (use torrentz.com url as a default)
- FEATURE: Better proxy support and preferences remodeling
* Tue Jan 5 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.6 - FEATURE: qBittorrent can identify itself as uTorrent, Vuze or KTorrent (Any stable version)
- BUGFIX: Fix detection of invalid torrent files - FEATURE: Torrents can be renamed in transfer list
- BUGFIX: Stop catching signals once one has been caught to avoid possible infinite loop - FEATURE: Display torrent addition dialog for magnet links too
- BUGFIX: Force data recheck whenever a torrent is moved - FEATURE: Files contained in a torrent are opened on double click (files panel)
- BUGFIX: Detect existing torrent data even if incomplete torrents are saved to a different folder - FEATURE: Added support for magnet links in search engine
- COSMETIC: Improve torrent deletion confirmation dialog so that the text that not get truncated - FEATURE: Added vertor.com and torrentdownloads.net search plugins
- FEATURE: Search engine can now use a SOCKS5 proxy
* Thu Dec 31 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.5 - BUGFIX: Search engine loads new proxy settings without program restart
- BUGFIX: Fix crash with downloaded/availability bars when the torrent has too many pieces - BUGFIX: Use XDG folders (.cache, .local) instead of .qbittorrent
- BUGFIX: Added legal notice on startup that the user must accept
* Wed Dec 30 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.4 - BUGFIX: Protect Web UI authentication against brute forcing
- BUGFIX: Fix PeerGuardian .p2b binary filter support - COSMETIC: Use checkboxes to filter torrent content instead of comboboxes
- BUGFIX: Fix possible crash when closing a search engine tab - COSMETIC: Use alternating row colors in transfer list (set in program preferences)
- BUGFIX: Make sure service port does not change - COSMETIC: Added a spin box to speed limiting dialog for manual input
- BUGFIX: Fix possible DHT port saving issue
- BUGFIX: Fix communication between qBittorrent and Web UI (Qt 4.6)
- BUGFIX: Use Wildcard matching instead of full regex in RSS feed downloader
- BUGFIX: Fix code for listening on a random port whenever it failed to listen on the one defined
- BUGFIX: Use global maximum transfer rates as maximum values in per-torrent speed limiting dialogs
- BUGFIX: Fix global download rate limiting from Web UI
- COSMETIC: Display a disconnected icon in status bar whenever qBittorrent failed to listen on the port defined
* Wed Dec 23 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.3
- BUGFIX: Minor cosmetic fix to program preferences
- BUGFIX: Fix "Temp path" button in program preferences
- BUGFIX: Handle paths with [~, ., ..] properly
- BUGFIX: Trackers are now displayed for torrents without metadata
- BUGFIX: Fix issue with speed limiting (unlimited was not handled properly)
- BUGFIX: Use the save path set in program preferences as a default in torrent addition dialog
* Fri Dec 18 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.2
- BUGFIX: Fix .qbittorrent folder not being created (critical bug introduced in v2.0.1 that makes qBittorrent unusuable for new users)
- BUGFIX: Fix RSS Feed downloader for some feeds
- BUGFIX: Do not use home folder as a fallback when the save path is not accessible
- BUGFIX: Fix Mininova, ThePirateBay search engine plugins
- BUGFIX: Read RSS articles are remembered on restart for feeds with no torrents attached
* Sun Dec 13 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.1
- BUGFIX: µTorrent user-agent is now spoofed correctly
- BUGFIX: Fix column hiding behavior when queueing system is disabled
- BUGFIX: Fix link to plugins.qbittorrent.org in plugins dialog
- BUGFIX: ~/qBT_dir is created only when it is actually used
- BUGFIX: Fix possible missing slot message (toggleSelectedTorrentsSuperSeeding)
- BUGFIX: Fix possible crash in torrent properties (files)
- BUGFIX: Added Hex Magnet Links support (Thanks Haypo)
* Thu Dec 10 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.0 * Thu Dec 10 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.0
- FEATURE: Added program option to disable splash screen - FEATURE: Added program option to disable splash screen
......
qBittorrent - A BitTorrent client in C++ / Qt4 qBittorrent - A BitTorrent client in C++ / Qt4
------------------------------------------ ------------------------------------------
./configure 1) Compile and install qBittorrent with Qt4 Graphical Interface
make && make install
qbittorrent
will install and execute qBittorrent hopefully without any problems. $ ./configure
$ make && make install
$ qbittorrent
Dependencies: will install and execute qBittorrent hopefully without any problems.
- Qt >= 4.4.0 (libqt-devel, libqtgui, libqtcore, libqtnetwork, libqtxml)
- libtorrent-rasterbar by Arvid Norberg (>= 0.14.0 REQUIRED, >= v0.15.0 ADVISED) Dependencies:
-> http://www.qbittorrent.org/download.php (advised) - Qt >= 4.4.0 (libqt-devel, libqtgui, libqtcore, libqtnetwork, libqtxml)
-> http://www.libtorrent.net
Be careful: another library (the one used by rTorrent) uses a similar name.
- libboost: libboost-filesystem, libboost-date-time, libboost-thread, libboost-serialization - libtorrent-rasterbar by Arvid Norberg (>= 0.14.4 REQUIRED, >= v0.15.0 ADVISED)
-> http://www.libtorrent.net
Be careful: another library (the one used by rTorrent) uses a similar name.
- python >= 2.3 (needed by search engine) - libboost: libboost-filesystem, libboost-date-time, libboost-thread, libboost-serialization
* Run time only dependency
- libnotify >= 0.4.2, glib-2.0 (optional) - python >= 2.3 (needed by search engine)
* Can be used for system notifications to replace standard Qt notifications * Run time only dependency
so that it integrates better into the Desktop
- libnotify >= 0.4.2, glib-2.0 (optional)
* Can be used for system notifications to replace standard Qt notifications
so that it integrates better into the Desktop
- geoip-database (optional)
* If qBittorrent cannot find this database, it will try to resolve countries using the Internet but it will be a lot slower.
* Run time only dependency
2) Compile and install qBittorrent without Qt4 Graphical interface
$ ./configure --disable-gui
$ make && make install
$ qbittorrent
will install and execute qBittorrent hopefully without any problems.
Dependencies:
- Qt >= 4.4.0 (libqt-devel, libqtcore, libqtnetwork, libqtxml)
- libtorrent-rasterbar by Arvid Norberg (>= 0.14.0 REQUIRED, >= v0.15.0 ADVISED)
-> http://www.libtorrent.net
Be careful: another library (the one used by rTorrent) uses a similar name.
- libboost: libboost-filesystem, libboost-date-time, libboost-thread, libboost-serialization
- geoip-database (optional)
* If qBittorrent cannot find this database, it will try to resolve countries using the Internet but it will be a lot slower.
* Run time only dependency
DOCUMENTATION: DOCUMENTATION:
Please note that there is a documentation with a "compiling howto" at http://wiki.qbittorrent.org. Please note that there is a documentation with a "compiling howto" at http://wiki.qbittorrent.org.
......
...@@ -18,6 +18,8 @@ Main options: ...@@ -18,6 +18,8 @@ Main options:
--help This help text. --help This help text.
Dependency options: Dependency options:
--disable-gui Disable qBittorrent Graphical user
interface for headless running
--with-libboost-inc=[path] Path to libboost include files --with-libboost-inc=[path] Path to libboost include files
--disable-libnotify Disable use of libnotify --disable-libnotify Disable use of libnotify
--disable-geoip-database Disable use of geoip-database --disable-geoip-database Disable use of geoip-database
...@@ -140,6 +142,11 @@ while [ $# -gt 0 ]; do ...@@ -140,6 +142,11 @@ while [ $# -gt 0 ]; do
shift shift
;; ;;
--disable-gui)
QC_DISABLE_GUI="Y"
shift
;;
--with-libboost-inc=*) --with-libboost-inc=*)
QC_WITH_LIBBOOST_INC=$optarg QC_WITH_LIBBOOST_INC=$optarg
shift shift
...@@ -181,6 +188,7 @@ echo PREFIX=$PREFIX ...@@ -181,6 +188,7 @@ echo PREFIX=$PREFIX
echo BINDIR=$BINDIR echo BINDIR=$BINDIR
echo DATADIR=$DATADIR echo DATADIR=$DATADIR
echo EX_QTDIR=$EX_QTDIR echo EX_QTDIR=$EX_QTDIR
echo QC_DISABLE_GUI=$QC_DISABLE_GUI
echo QC_WITH_LIBBOOST_INC=$QC_WITH_LIBBOOST_INC echo QC_WITH_LIBBOOST_INC=$QC_WITH_LIBBOOST_INC
echo QC_DISABLE_libnotify=$QC_DISABLE_libnotify echo QC_DISABLE_libnotify=$QC_DISABLE_libnotify
echo QC_DISABLE_geoip_database=$QC_DISABLE_geoip_database echo QC_DISABLE_geoip_database=$QC_DISABLE_geoip_database
...@@ -290,6 +298,7 @@ cat >$1/modules.cpp <<EOT ...@@ -290,6 +298,7 @@ cat >$1/modules.cpp <<EOT
/* /*
-----BEGIN QCMOD----- -----BEGIN QCMOD-----
name: Qt >= 4.4 name: Qt >= 4.4
arg: disable-gui, Disable qBittorrent Graphical user interface for headless running
-----END QCMOD----- -----END QCMOD-----
*/ */
class qc_qt4 : public ConfObj class qc_qt4 : public ConfObj
...@@ -300,6 +309,9 @@ public: ...@@ -300,6 +309,9 @@ public:
QString shortname() const { return "Qt 4.4"; } QString shortname() const { return "Qt 4.4"; }
bool exec() bool exec()
{ {
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
conf->addDefine("DISABLE_GUI");
}
if(QT_VERSION >= 0x040500) { if(QT_VERSION >= 0x040500) {
conf->addDefine("QT_4_5"); conf->addDefine("QT_4_5");
} }
...@@ -410,6 +422,10 @@ public: ...@@ -410,6 +422,10 @@ public:
QString name() const { return "libnotify >= 0.4.2 (optional)"; } QString name() const { return "libnotify >= 0.4.2 (optional)"; }
QString shortname() const { return "libnotify"; } QString shortname() const { return "libnotify"; }
bool exec(){ bool exec(){
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
printf("\nNot Required");
return true;
}
QStringList incs; QStringList incs;
QString req_ver = "0.4.2"; QString req_ver = "0.4.2";
QString version, libs, other; QString version, libs, other;
...@@ -453,6 +469,10 @@ public: ...@@ -453,6 +469,10 @@ public:
QString name() const { return "GeoIP Database (optional)"; } QString name() const { return "GeoIP Database (optional)"; }
QString shortname() const { return "GeoIP Database"; } QString shortname() const { return "GeoIP Database"; }
bool exec() { bool exec() {
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
printf("\nNot Required");
return true;
}
#ifdef Q_WS_X11 #ifdef Q_WS_X11
if(!conf->getenv("QC_WITH_GEOIP_DATABASE_EMBEDDED").isEmpty()) { if(!conf->getenv("QC_WITH_GEOIP_DATABASE_EMBEDDED").isEmpty()) {
#endif #endif
...@@ -1431,6 +1451,7 @@ export PREFIX ...@@ -1431,6 +1451,7 @@ export PREFIX
export BINDIR export BINDIR
export DATADIR export DATADIR
export EX_QTDIR export EX_QTDIR
export QC_DISABLE_GUI
export QC_WITH_LIBBOOST_INC export QC_WITH_LIBBOOST_INC
export QC_DISABLE_libnotify export QC_DISABLE_libnotify
export QC_DISABLE_geoip_database export QC_DISABLE_geoip_database
......
.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>.
.TH "QBITTORRENT\-NOX" "1" "January 4th 2009" "Command line Bittorrent client written in C++ / Qt4" ""
.SH "NAME"
qBittorrent\-nox \- a command line Bittorrent client written in C++ / Qt4
.SH "SYNOPSIS"
\fBqbittorrent\-nox\fR [\-\-webui-port=x] [TORRENT_FILE | URL]...
\fBqbittorrent\-nox\fR \-\-help
\fBqbittorrent\-nox\fR \-\-version
.PP
.SH "DESCRIPTION"
\fBqBittorrent-nox\fR is an advanced command-line Bittorrent client written in C++ / Qt4,
using the \fBlibtorrent-rasterbar\fR library by Arvid Norberg. qBittorrent\-nox aims
to be a good alternative to other command line bittorrent clients and provides features similar to popular graphical clients.
qBittorrent\-nox is fast, stable, light and it supports unicode.
It also comes with UPnP port forwarding / NAT-PMP, encryption (Vuze compatible),
FAST extension (mainline) and PeX support (utorrent compatible).
qBittorrent\-nox is meant to be controlled via its feature-rich Web UI which is accessible as a default on http://localhost:8080. The Web UI access is secured and the default account user name is "admin" with "adminadmin" as a password.
.SH "OPTIONS"
\fB--help\fR Prints the command line options.
\fB--version\fR Prints qbittorrent program version number.
\fB--webui-port=x\fR Changes Web UI port to x (default: 8080).
.SH "BUGS"
If you find a bug, please report it at http://bugs.qbittorrent.org
.SH "AUTHOR"
Christophe Dumez <chris@qbittorrent.org>
.\" This manpage has been automatically generated by docbook2man .\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at: .\" from a DocBook document. This tool can be found at:
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>. .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>.
.TH "QBITTORRENT" "1" "September 30th 2009" "Bittorrent client written in C++ / Qt4" "" .TH "QBITTORRENT" "1" "January 4th 2009" "Bittorrent client written in C++ / Qt4" ""
.SH "NAME" .SH "NAME"
qBittorrent \- a Bittorrent client written in C++ / Qt4 qBittorrent \- a Bittorrent client written in C++ / Qt4
.SH "SYNOPSIS" .SH "SYNOPSIS"
\fBqbittorrent\fR [\-\-no-splash] [TORRENT_FILE | URL]... \fBqbittorrent\fR [\-\-no-splash] [\-\-webui-port=x] [TORRENT_FILE | URL]...
\fBqbittorrent\fR \-\-help \fBqbittorrent\fR \-\-help
...@@ -18,10 +18,9 @@ qBittorrent \- a Bittorrent client written in C++ / Qt4 ...@@ -18,10 +18,9 @@ qBittorrent \- a Bittorrent client written in C++ / Qt4
.SH "DESCRIPTION" .SH "DESCRIPTION"
\fBqBittorrent\fR is an advanced Bittorrent client written in C++ / Qt4, \fBqBittorrent\fR is an advanced Bittorrent client written in C++ / Qt4,
using the \fBrblibtorrent\fR library by Arvid Norberg. qBittorrent aims using the \fBlibtorrent-rasterbar\fR library by Arvid Norberg. qBittorrent is similar to uTorrent. qBittorrent
to be a good alternative to all other bittorrent clients out there. qBittorrent
is fast, stable, light, it supports unicode and it provides a good integrated search engine. is fast, stable, light, it supports unicode and it provides a good integrated search engine.
It also comes with UPnP port forwarding / NAT-PMP, encryption (Azureus compatible), It also comes with UPnP port forwarding / NAT-PMP, encryption (Vuze compatible),
FAST extension (mainline) and PeX support (utorrent compatible). FAST extension (mainline) and PeX support (utorrent compatible).
.SH "OPTIONS" .SH "OPTIONS"
...@@ -32,6 +31,8 @@ FAST extension (mainline) and PeX support (utorrent compatible). ...@@ -32,6 +31,8 @@ FAST extension (mainline) and PeX support (utorrent compatible).
\fB--no-splash\fR Disables splash screen on startup. \fB--no-splash\fR Disables splash screen on startup.
\fB--webui-port=x\fR Changes Web UI port to x (default: 8080).
.SH "BUGS" .SH "BUGS"
If you find a bug, please report it at http://bugs.qbittorrent.org If you find a bug, please report it at http://bugs.qbittorrent.org
......
...@@ -12,6 +12,10 @@ public: ...@@ -12,6 +12,10 @@ public:
QString name() const { return "GeoIP Database (optional)"; } QString name() const { return "GeoIP Database (optional)"; }
QString shortname() const { return "GeoIP Database"; } QString shortname() const { return "GeoIP Database"; }
bool exec() { bool exec() {
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
printf("\nNot Required");
return true;
}
#ifdef Q_WS_X11 #ifdef Q_WS_X11
if(!conf->getenv("QC_WITH_GEOIP_DATABASE_EMBEDDED").isEmpty()) { if(!conf->getenv("QC_WITH_GEOIP_DATABASE_EMBEDDED").isEmpty()) {
#endif #endif
......
...@@ -11,6 +11,10 @@ public: ...@@ -11,6 +11,10 @@ public:
QString name() const { return "libnotify >= 0.4.2 (optional)"; } QString name() const { return "libnotify >= 0.4.2 (optional)"; }
QString shortname() const { return "libnotify"; } QString shortname() const { return "libnotify"; }
bool exec(){ bool exec(){
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
printf("\nNot Required");
return true;
}
QStringList incs; QStringList incs;
QString req_ver = "0.4.2"; QString req_ver = "0.4.2";
QString version, libs, other; QString version, libs, other;
......
/* /*
-----BEGIN QCMOD----- -----BEGIN QCMOD-----
name: Qt >= 4.4 name: Qt >= 4.4
arg: disable-gui, Disable qBittorrent Graphical user interface for headless running
-----END QCMOD----- -----END QCMOD-----
*/ */
class qc_qt4 : public ConfObj class qc_qt4 : public ConfObj
...@@ -11,6 +12,9 @@ public: ...@@ -11,6 +12,9 @@ public:
QString shortname() const { return "Qt 4.4"; } QString shortname() const { return "Qt 4.4"; }
bool exec() bool exec()
{ {
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
conf->addDefine("DISABLE_GUI");
}
if(QT_VERSION >= 0x040500) { if(QT_VERSION >= 0x040500) {
conf->addDefine("QT_4_5"); conf->addDefine("QT_4_5");
} }
......
...@@ -60,6 +60,8 @@ ...@@ -60,6 +60,8 @@
#include "speedlimitdlg.h" #include "speedlimitdlg.h"
#include "preferences.h" #include "preferences.h"
#include "console_imp.h" #include "console_imp.h"
#include "trackerlist.h"
#include "peerlistwidget.h"
#include "torrentpersistentdata.h" #include "torrentpersistentdata.h"
#include "transferlistfilterswidget.h" #include "transferlistfilterswidget.h"
#include "propertieswidget.h" #include "propertieswidget.h"
...@@ -78,6 +80,7 @@ using namespace libtorrent; ...@@ -78,6 +80,7 @@ using namespace libtorrent;
// Constructor // Constructor
GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), displaySpeedInTitle(false), force_exit(false) { GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), displaySpeedInTitle(false), force_exit(false) {
setupUi(this); setupUi(this);
setWindowTitle(tr("qBittorrent %1", "e.g: qBittorrent v0.x").arg(QString::fromUtf8(VERSION))); setWindowTitle(tr("qBittorrent %1", "e.g: qBittorrent v0.x").arg(QString::fromUtf8(VERSION)));
// Setting icons // Setting icons
this->setWindowIcon(QIcon(QString::fromUtf8(":/Icons/skin/qbittorrent32.png"))); this->setWindowIcon(QIcon(QString::fromUtf8(":/Icons/skin/qbittorrent32.png")));
...@@ -650,8 +653,12 @@ void GUI::processParams(const QStringList& params) { ...@@ -650,8 +653,12 @@ void GUI::processParams(const QStringList& params) {
BTSession->downloadFromUrl(param); BTSession->downloadFromUrl(param);
}else{ }else{
if(param.startsWith("magnet:", Qt::CaseInsensitive)) { if(param.startsWith("magnet:", Qt::CaseInsensitive)) {
// FIXME: Possibily skipped torrent addition dialog if(useTorrentAdditionDialog) {
BTSession->addMagnetUri(param); torrentAdditionDialog *dialog = new torrentAdditionDialog(this, BTSession);
dialog->showLoadMagnetURI(param);
} else {
BTSession->addMagnetUri(param);
}
} else { } else {
if(useTorrentAdditionDialog) { if(useTorrentAdditionDialog) {
torrentAdditionDialog *dialog = new torrentAdditionDialog(this, BTSession); torrentAdditionDialog *dialog = new torrentAdditionDialog(this, BTSession);
...@@ -724,7 +731,10 @@ void GUI::loadPreferences(bool configure_session) { ...@@ -724,7 +731,10 @@ void GUI::loadPreferences(bool configure_session) {
} }
unsigned int new_refreshInterval = Preferences::getRefreshInterval(); unsigned int new_refreshInterval = Preferences::getRefreshInterval();
transferList->setRefreshInterval(new_refreshInterval); transferList->setRefreshInterval(new_refreshInterval);
transferList->setAlternatingRowColors(Preferences::useAlternatingRowColors());
properties->getFilesList()->setAlternatingRowColors(Preferences::useAlternatingRowColors());
properties->getTrackerList()->setAlternatingRowColors(Preferences::useAlternatingRowColors());
properties->getPeerList()->setAlternatingRowColors(Preferences::useAlternatingRowColors());
// Queueing System // Queueing System
if(Preferences::isQueueingSystemEnabled()) { if(Preferences::isQueueingSystemEnabled()) {
if(!configure_session || !BTSession->isQueueingEnabled()) { if(!configure_session || !BTSession->isQueueingEnabled()) {
...@@ -832,9 +842,16 @@ void GUI::showNotificationBaloon(QString title, QString msg) const { ...@@ -832,9 +842,16 @@ void GUI::showNotificationBaloon(QString title, QString msg) const {
*****************************************************/ *****************************************************/
void GUI::downloadFromURLList(const QStringList& url_list) { void GUI::downloadFromURLList(const QStringList& url_list) {
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool();
foreach(const QString url, url_list) { foreach(const QString url, url_list) {
if(url.startsWith("magnet:", Qt::CaseInsensitive)) { if(url.startsWith("magnet:", Qt::CaseInsensitive)) {
BTSession->addMagnetUri(url); if(useTorrentAdditionDialog) {
torrentAdditionDialog *dialog = new torrentAdditionDialog(this, BTSession);
dialog->showLoadMagnetURI(url);
} else {
BTSession->addMagnetUri(url);
}
} else { } else {
BTSession->downloadFromUrl(url); BTSession->downloadFromUrl(url);
} }
......
...@@ -59,104 +59,104 @@ class StatusBar; ...@@ -59,104 +59,104 @@ class StatusBar;
class GUI : public QMainWindow, private Ui::MainWindow{ class GUI : public QMainWindow, private Ui::MainWindow{
Q_OBJECT Q_OBJECT
private: private:
// Bittorrent // Bittorrent
Bittorrent *BTSession; Bittorrent *BTSession;
QList<QPair<QTorrentHandle,QString> > unauthenticated_trackers; // Still needed? QList<QPair<QTorrentHandle,QString> > unauthenticated_trackers; // Still needed?
// GUI related // GUI related
QTimer *guiUpdater; QTimer *guiUpdater;
QTabWidget *tabs; QTabWidget *tabs;
StatusBar *status_bar; StatusBar *status_bar;
QPointer<options_imp> options; QPointer<options_imp> options;
QPointer<QSystemTrayIcon> systrayIcon; QPointer<QSystemTrayIcon> systrayIcon;
QPointer<QTimer> systrayCreator; QPointer<QTimer> systrayCreator;
QMenu *myTrayIconMenu; QMenu *myTrayIconMenu;
TransferListWidget *transferList; TransferListWidget *transferList;
TransferListFiltersWidget *transferListFilters; TransferListFiltersWidget *transferListFilters;
PropertiesWidget *properties; PropertiesWidget *properties;
bool displaySpeedInTitle; bool displaySpeedInTitle;
bool force_exit; bool force_exit;
// Keyboard shortcuts // Keyboard shortcuts
QShortcut *switchSearchShortcut; QShortcut *switchSearchShortcut;
QShortcut *switchSearchShortcut2; QShortcut *switchSearchShortcut2;
QShortcut *switchTransferShortcut; QShortcut *switchTransferShortcut;
QShortcut *switchRSSShortcut; QShortcut *switchRSSShortcut;
// Widgets // Widgets
QAction *prioSeparator; QAction *prioSeparator;
QAction *prioSeparator2; QAction *prioSeparator2;
QSplitter *hSplitter; QSplitter *hSplitter;
QSplitter *vSplitter; QSplitter *vSplitter;
// Search // Search
SearchEngine *searchEngine; SearchEngine *searchEngine;
// RSS // RSS
QPointer<RSSImp> rssWidget; QPointer<RSSImp> rssWidget;
// Misc // Misc
QLocalServer *localServer; QLocalServer *localServer;
protected slots: protected slots:
// GUI related slots // GUI related slots
void dropEvent(QDropEvent *event); void dropEvent(QDropEvent *event);
void dragEnterEvent(QDragEnterEvent *event); void dragEnterEvent(QDragEnterEvent *event);
void toggleVisibility(QSystemTrayIcon::ActivationReason e); void toggleVisibility(QSystemTrayIcon::ActivationReason e);
void on_actionAbout_triggered(); void on_actionAbout_triggered();
void on_actionCreate_torrent_triggered(); void on_actionCreate_torrent_triggered();
void on_actionWebsite_triggered() const; void on_actionWebsite_triggered() const;
void on_actionBugReport_triggered() const; void on_actionBugReport_triggered() const;
void on_actionShow_console_triggered(); void on_actionShow_console_triggered();
void readParamsOnSocket(); void readParamsOnSocket();
void acceptConnection(); void acceptConnection();
void balloonClicked(); void balloonClicked();
void writeSettings(); void writeSettings();
void readSettings(); void readSettings();
void on_actionExit_triggered(); void on_actionExit_triggered();
void createTrayIcon(); void createTrayIcon();
void fullDiskError(QTorrentHandle& h, QString msg) const; void fullDiskError(QTorrentHandle& h, QString msg) const;
void handleDownloadFromUrlFailure(QString, QString) const; void handleDownloadFromUrlFailure(QString, QString) const;
void createSystrayDelayed(); void createSystrayDelayed();
void tab_changed(int); void tab_changed(int);
// Keyboard shortcuts // Keyboard shortcuts
void createKeyboardShortcuts(); void createKeyboardShortcuts();
void displayTransferTab() const; void displayTransferTab() const;
void displaySearchTab() const; void displaySearchTab() const;
void displayRSSTab() const; void displayRSSTab() const;
// Torrent actions // Torrent actions
void on_actionSet_global_upload_limit_triggered(); void on_actionSet_global_upload_limit_triggered();
void on_actionSet_global_download_limit_triggered(); void on_actionSet_global_download_limit_triggered();
void on_actionDocumentation_triggered() const; void on_actionDocumentation_triggered() const;
void on_actionOpen_triggered(); void on_actionOpen_triggered();
void updateGUI(); void updateGUI();
void loadPreferences(bool configure_session=true); void loadPreferences(bool configure_session=true);
void processParams(const QStringList& params); void processParams(const QStringList& params);
void addTorrent(QString path); void addTorrent(QString path);
void addUnauthenticatedTracker(QPair<QTorrentHandle,QString> tracker); void addUnauthenticatedTracker(QPair<QTorrentHandle,QString> tracker);
void processDownloadedFiles(QString path, QString url); void processDownloadedFiles(QString path, QString url);
void downloadFromURLList(const QStringList& urls); void finishedTorrent(QTorrentHandle& h) const;
void finishedTorrent(QTorrentHandle& h) const; // Options slots
// Options slots void on_actionOptions_triggered();
void on_actionOptions_triggered(); void optionsSaved();
void optionsSaved(); // HTTP slots
// HTTP slots void on_actionDownload_from_URL_triggered();
void on_actionDownload_from_URL_triggered();
public slots: public slots:
void trackerAuthenticationRequired(QTorrentHandle& h); void trackerAuthenticationRequired(QTorrentHandle& h);
void setTabText(int index, QString text) const; void setTabText(int index, QString text) const;
void showNotificationBaloon(QString title, QString msg) const; void showNotificationBaloon(QString title, QString msg) const;
void downloadFromURLList(const QStringList& urls);
protected: protected:
void closeEvent(QCloseEvent *); void closeEvent(QCloseEvent *);
void showEvent(QShowEvent *); void showEvent(QShowEvent *);
bool event(QEvent * event); bool event(QEvent * event);
void displayRSSTab(bool enable); void displayRSSTab(bool enable);
public: public:
// Construct / Destruct // Construct / Destruct
GUI(QWidget *parent=0, QStringList torrentCmdLine=QStringList()); GUI(QWidget *parent=0, QStringList torrentCmdLine=QStringList());
~GUI(); ~GUI();
// Methods // Methods
int getCurrentTabIndex() const; int getCurrentTabIndex() const;
QPoint screenCenter() const; QPoint screenCenter() const;
TransferListWidget* getTransferList() const { return transferList; }