diff --git a/Changelog b/Changelog index 5dbdf257e..84d671212 100644 --- a/Changelog +++ b/Changelog @@ -8,7 +8,7 @@ - COSMETIC: Transfer speed, ratio, connection status and DHT nodes are displayed in status bar - COSMETIC: RSS Tab is now hidden as a default - COSMETIC: Allow to hide or display top toolbar - - COSMETIC: Top toolbar is now hidden as a default + - COSMETIC: Log is now in a separate dialog * Tue Aug 26 2008 - Christophe Dumez - v1.1.3 - BUGFIX: Fixed ratio saving for seeding torrents diff --git a/src/GUI.cpp b/src/GUI.cpp index 036496333..04ee99878 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -57,6 +57,7 @@ #include "previewSelect.h" #include "allocationDlg.h" #include "stdlib.h" +#include "console_imp.h" using namespace libtorrent; @@ -490,6 +491,10 @@ void GUI::on_actionSet_global_upload_limit_triggered() { new BandwidthAllocationDialog(this, true, BTSession, QStringList()); } +void GUI::on_actionShow_console_triggered() { + new consoleDlg(this, BTSession); +} + void GUI::on_actionSet_global_download_limit_triggered() { qDebug("actionSet_global_download_limit_triggered"); new BandwidthAllocationDialog(this, false, BTSession, QStringList()); diff --git a/src/GUI.h b/src/GUI.h index 6cbbcc78f..cd8286df8 100644 --- a/src/GUI.h +++ b/src/GUI.h @@ -116,6 +116,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{ void on_actionCreate_torrent_triggered(); void on_actionWebsite_triggered() const; void on_actionBugReport_triggered() const; + void on_actionShow_console_triggered(); void readParamsOnSocket(); void acceptConnection(); void togglePausedState(QString hash); diff --git a/src/MainWindow.ui b/src/MainWindow.ui index 2dc021a69..7c150440c 100644 --- a/src/MainWindow.ui +++ b/src/MainWindow.ui @@ -58,6 +58,7 @@ Options + @@ -255,6 +256,14 @@ false + + + :/Icons/log.png + + + Show console + + diff --git a/src/console.ui b/src/console.ui new file mode 100644 index 000000000..14afcc5fa --- /dev/null +++ b/src/console.ui @@ -0,0 +1,58 @@ + + ConsoleDlg + + + + 0 + 0 + 512 + 497 + + + + qBittorrent console + + + :/Icons/log.png + + + + + + 0 + + + + General + + + :/Icons/log.png + + + + + + + + + + Blocked IPs + + + :/Icons/filter.png + + + + + + + + + + + + + + + + diff --git a/src/console_imp.h b/src/console_imp.h new file mode 100644 index 000000000..3321d3a8e --- /dev/null +++ b/src/console_imp.h @@ -0,0 +1,50 @@ +/* + * Bittorrent Client using Qt4 and libtorrent. + * Copyright (C) 2006 Christophe Dumez + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contact : chris@qbittorrent.org + */ + +#ifndef CONSOLE_H +#define CONSOLE_H + +#include "bittorrent.h" +#include "ui_console.h" + +using namespace libtorrent; + +class consoleDlg : public QDialog, private Ui_ConsoleDlg{ + Q_OBJECT + + private: + bittorrent *BTSession; + + public: + consoleDlg(QWidget *parent, bittorrent* _BTSession) : QDialog(parent) { + setupUi(this); + setAttribute(Qt::WA_DeleteOnClose); + BTSession = _BTSession; + textConsole->setHtml(BTSession->getConsoleMessages().join("
")); + textBannedPeers->setHtml(BTSession->getPeerBanMessages().join("
")); + show(); + } + + ~consoleDlg() {} + +}; + +#endif diff --git a/src/seeding.ui b/src/seeding.ui index d2d8382b1..1f01969bb 100644 --- a/src/seeding.ui +++ b/src/seeding.ui @@ -28,13 +28,6 @@ 9 - - - - The following torrents are finished and shared: - - - diff --git a/src/src.pro b/src/src.pro index bdefd63fd..9a388619b 100644 --- a/src/src.pro +++ b/src/src.pro @@ -157,13 +157,13 @@ HEADERS += GUI.h misc.h options_imp.h about_imp.h \ httpserver.h httpconnection.h \ httprequestparser.h httpresponsegenerator.h \ json.h eventmanager.h filterParserThread.h \ - TrackersAdditionDlg.h searchTab.h + TrackersAdditionDlg.h searchTab.h console_imp.h FORMS += MainWindow.ui options.ui about.ui \ properties.ui createtorrent.ui preview.ui \ login.ui downloadFromURL.ui addTorrentDialog.ui \ search.ui rss.ui seeding.ui bandwidth_limit.ui \ download.ui engineSelect.ui pluginSource.ui \ - trackersAdd.ui + trackersAdd.ui console.ui SOURCES += GUI.cpp \ main.cpp \ options_imp.cpp \