summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/opieirc/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opieirc/mainwindow.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/noncore/net/opieirc/mainwindow.cpp b/noncore/net/opieirc/mainwindow.cpp
index 1811a0c..3d60107 100644
--- a/noncore/net/opieirc/mainwindow.cpp
+++ b/noncore/net/opieirc/mainwindow.cpp
@@ -9,2 +9,3 @@
#include "ircservertab.h"
+#include "dcctransfertab.h"
#include "ircserverlist.h"
@@ -12,2 +13,5 @@
+#include <stdio.h>
+
+
QString MainWindow::appCaption() {
@@ -35,2 +39,3 @@ MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(
a->addTo(irc);
+ m_dccTab = 0;
loadSettings();
@@ -79,2 +84,5 @@ void MainWindow::changeEvent(IRCTab *tab) {
void MainWindow::killTab(IRCTab *tab, bool imediate) {
+ if (tab == m_dccTab)
+ m_dccTab = 0;
+
m_toDelete.append( tab );
@@ -139 +147,13 @@ void MainWindow::slotPing( const QString& /*channel*/ ) {
+void MainWindow::addDCC(DCCTransfer::Type type, Q_UINT32 ip4Addr, Q_UINT16 port,
+ const QString &filename, const QString &nickname, unsigned int size) {
+
+ if (!m_dccTab) {
+ m_dccTab = new DCCTransferTab(this);
+ addTab(m_dccTab);
+ m_dccTab->show();
+ }
+
+ m_dccTab->addTransfer(type, ip4Addr, port, filename, nickname, size);
+}
+