Diffstat (limited to 'noncore/net/opieirc/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieirc/mainwindow.cpp | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/noncore/net/opieirc/mainwindow.cpp b/noncore/net/opieirc/mainwindow.cpp index bc0b0d1..3d13ee9 100644 --- a/noncore/net/opieirc/mainwindow.cpp +++ b/noncore/net/opieirc/mainwindow.cpp | |||
@@ -50,30 +50,19 @@ void MainWindow::addTab(IRCTab *tab) { | |||
50 | m_tabWidget->addTab(tab, tab->title()); | 50 | m_tabWidget->addTab(tab, tab->title()); |
51 | m_tabWidget->showPage(tab); | 51 | m_tabWidget->showPage(tab); |
52 | tabSelected(tab); | 52 | tabSelected(tab); |
53 | } | 53 | } |
54 | 54 | ||
55 | void MainWindow::killTab(IRCTab *tab) { | 55 | void MainWindow::killTab(IRCTab *tab) { |
56 | m_tabWidget->removePage(tab); | 56 | m_tabWidget->removePage(tab); |
57 | /* there might be nicer ways to do this .. */ | 57 | /* there might be nicer ways to do this .. */ |
58 | delete tab; | 58 | delete tab; |
59 | } | 59 | } |
60 | 60 | ||
61 | void MainWindow::newConnection() { | 61 | void MainWindow::newConnection() { |
62 | IRCServer *server = new IRCServer(); | 62 | IRCServerList list(this, "ServerList", TRUE); |
63 | server->setHostname("irc.openprojects.net"); | 63 | if (list.exec() == QDialog::Accepted && list.hasServer()) { |
64 | server->setPort(6667); | 64 | IRCServerTab *serverTab = new IRCServerTab(list.server(), this, m_tabWidget); |
65 | server->setDescription("OpenProjects"); | 65 | addTab(serverTab); |
66 | server->setNick("opie-irc"); | 66 | serverTab->doConnect(); |
67 | server->setUsername("opie-irc"); | 67 | } |
68 | server->setRealname("opie-irc"); | ||
69 | IRCServerTab *serverTab = new IRCServerTab(server, this, m_tabWidget); | ||
70 | addTab(serverTab); | ||
71 | serverTab->doConnect(); | ||
72 | |||
73 | /* | ||
74 | * Serverlist : not functional yet | ||
75 | IRCServerList *list = new IRCServerList(this, "ServerList", TRUE); | ||
76 | list->exec(); | ||
77 | delete list; | ||
78 | */ | ||
79 | } | 68 | } |