author | alwin <alwin> | 2004-03-02 12:21:11 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-02 12:21:11 (UTC) |
commit | b6b1c97559c0ed9f2e33632272426bf98f289232 (patch) (unidiff) | |
tree | d3a9987704770cdf5eb14e1136f6e3ecb2f36a04 /noncore/net/opieirc | |
parent | 0d59c780513da78033f4d9040475dee9db0256d4 (diff) | |
download | opie-b6b1c97559c0ed9f2e33632272426bf98f289232.zip opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.gz opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.bz2 |
applied the patch generated by the optimize_connect script from
TT.
-rw-r--r-- | noncore/net/opieirc/ircchanneltab.cpp | 2 | ||||
-rw-r--r-- | noncore/net/opieirc/ircsession.cpp | 2 | ||||
-rw-r--r-- | noncore/net/opieirc/mainwindow.cpp | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/noncore/net/opieirc/ircchanneltab.cpp b/noncore/net/opieirc/ircchanneltab.cpp index b0771f6..667e977 100644 --- a/noncore/net/opieirc/ircchanneltab.cpp +++ b/noncore/net/opieirc/ircchanneltab.cpp | |||
@@ -1,79 +1,79 @@ | |||
1 | #include <qpe/resource.h> | 1 | #include <qpe/resource.h> |
2 | #include <qwhatsthis.h> | 2 | #include <qwhatsthis.h> |
3 | #include <qhbox.h> | 3 | #include <qhbox.h> |
4 | #include "ircchanneltab.h" | 4 | #include "ircchanneltab.h" |
5 | #include "ircservertab.h" | 5 | #include "ircservertab.h" |
6 | 6 | ||
7 | IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { | 7 | IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { |
8 | m_mainWindow = mainWindow; | 8 | m_mainWindow = mainWindow; |
9 | m_parentTab = parentTab; | 9 | m_parentTab = parentTab; |
10 | m_channel = channel; | 10 | m_channel = channel; |
11 | m_description->setText(tr("Talking on channel") + " <b>" + channel->channelname() + "</b>"); | 11 | m_description->setText(tr("Talking on channel") + " <b>" + channel->channelname() + "</b>"); |
12 | QHBox *hbox = new QHBox(this); | 12 | QHBox *hbox = new QHBox(this); |
13 | m_textview = new QTextView(hbox); | 13 | m_textview = new QTextView(hbox); |
14 | m_textview->setHScrollBarMode(QScrollView::AlwaysOff); | 14 | m_textview->setHScrollBarMode(QScrollView::AlwaysOff); |
15 | m_textview->setVScrollBarMode(QScrollView::AlwaysOn); | 15 | m_textview->setVScrollBarMode(QScrollView::AlwaysOn); |
16 | m_listVisible = TRUE; | 16 | m_listVisible = TRUE; |
17 | m_listButton = new QPushButton(">", m_textview); | 17 | m_listButton = new QPushButton(">", m_textview); |
18 | m_textview->setCornerWidget(m_listButton); | 18 | m_textview->setCornerWidget(m_listButton); |
19 | m_textview->setTextFormat(RichText); | 19 | m_textview->setTextFormat(RichText); |
20 | QWhatsThis::add(m_textview, tr("Channel discussion")); | 20 | QWhatsThis::add(m_textview, tr("Channel discussion")); |
21 | connect(m_listButton, SIGNAL(clicked()), this, SLOT(toggleList())); | 21 | connect(m_listButton, SIGNAL(clicked()), this, SLOT(toggleList())); |
22 | m_list = new IRCChannelList(m_channel, hbox); | 22 | m_list = new IRCChannelList(m_channel, hbox); |
23 | m_list->update(); | 23 | m_list->update(); |
24 | m_list->setMaximumWidth(LISTWIDTH); | 24 | m_list->setMaximumWidth(LISTWIDTH); |
25 | m_field = new IRCHistoryLineEdit(this); | 25 | m_field = new IRCHistoryLineEdit(this); |
26 | QWhatsThis::add(m_field, tr("Type your message here to participate in the channel discussion")); | 26 | QWhatsThis::add(m_field, tr("Type your message here to participate in the channel discussion")); |
27 | m_popup = new QPopupMenu(m_list); | 27 | m_popup = new QPopupMenu(m_list); |
28 | m_lines = 0; | 28 | m_lines = 0; |
29 | /* Required so that embedded-style "right" clicks work */ | 29 | /* Required so that embedded-style "right" clicks work */ |
30 | QPEApplication::setStylusOperation(m_list->viewport(), QPEApplication::RightOnHold); | 30 | QPEApplication::setStylusOperation(m_list->viewport(), QPEApplication::RightOnHold); |
31 | connect(m_list, SIGNAL(mouseButtonPressed(int, QListBoxItem *, const QPoint&)), this, SLOT(mouseButtonPressed(int, QListBoxItem *, const QPoint &))); | 31 | connect(m_list, SIGNAL(mouseButtonPressed(int,QListBoxItem*,const QPoint&)), this, SLOT(mouseButtonPressed(int,QListBoxItem*,const QPoint&))); |
32 | /* Construct the popup menu */ | 32 | /* Construct the popup menu */ |
33 | QPopupMenu *ctcpMenu = new QPopupMenu(m_list); | 33 | QPopupMenu *ctcpMenu = new QPopupMenu(m_list); |
34 | m_popup->insertItem(Resource::loadPixmap("opieirc/ctcp"), tr("CTCP"), ctcpMenu); | 34 | m_popup->insertItem(Resource::loadPixmap("opieirc/ctcp"), tr("CTCP"), ctcpMenu); |
35 | m_popup->insertItem(Resource::loadPixmap("opieirc/query"), tr("Query"), this, SLOT(popupQuery())); | 35 | m_popup->insertItem(Resource::loadPixmap("opieirc/query"), tr("Query"), this, SLOT(popupQuery())); |
36 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/ping"), tr("Ping"), this, SLOT(popupPing())); | 36 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/ping"), tr("Ping"), this, SLOT(popupPing())); |
37 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/version"), tr("Version"), this, SLOT(popupVersion())); | 37 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/version"), tr("Version"), this, SLOT(popupVersion())); |
38 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/whois"), tr("Whois"), this, SLOT(popupWhois())); | 38 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/whois"), tr("Whois"), this, SLOT(popupWhois())); |
39 | connect(m_mainWindow, SIGNAL(updateScroll()), this, SLOT(scrolling())); | 39 | connect(m_mainWindow, SIGNAL(updateScroll()), this, SLOT(scrolling())); |
40 | m_layout->add(hbox); | 40 | m_layout->add(hbox); |
41 | hbox->show(); | 41 | hbox->show(); |
42 | m_layout->add(m_field); | 42 | m_layout->add(m_field); |
43 | m_field->setFocus(); | 43 | m_field->setFocus(); |
44 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); | 44 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); |
45 | settingsChanged(); | 45 | settingsChanged(); |
46 | } | 46 | } |
47 | 47 | ||
48 | void IRCChannelTab::scrolling(){ | 48 | void IRCChannelTab::scrolling(){ |
49 | m_textview->ensureVisible(0, m_textview->contentsHeight()); | 49 | m_textview->ensureVisible(0, m_textview->contentsHeight()); |
50 | } | 50 | } |
51 | 51 | ||
52 | void IRCChannelTab::appendText(QString text) { | 52 | void IRCChannelTab::appendText(QString text) { |
53 | /* not using append because it creates layout problems */ | 53 | /* not using append because it creates layout problems */ |
54 | QString txt = m_textview->text() + text + "\n"; | 54 | QString txt = m_textview->text() + text + "\n"; |
55 | if (m_maxLines > 0 && m_lines >= m_maxLines) { | 55 | if (m_maxLines > 0 && m_lines >= m_maxLines) { |
56 | int firstBreak = txt.find('\n'); | 56 | int firstBreak = txt.find('\n'); |
57 | if (firstBreak != -1) { | 57 | if (firstBreak != -1) { |
58 | txt = "<qt bgcolor=\"" + m_backgroundColor + "\"/>" + txt.right(txt.length() - (firstBreak + 1)); | 58 | txt = "<qt bgcolor=\"" + m_backgroundColor + "\"/>" + txt.right(txt.length() - (firstBreak + 1)); |
59 | } | 59 | } |
60 | } else { | 60 | } else { |
61 | m_lines++; | 61 | m_lines++; |
62 | } | 62 | } |
63 | m_textview->ensureVisible(0, m_textview->contentsHeight()); | 63 | m_textview->ensureVisible(0, m_textview->contentsHeight()); |
64 | m_textview->setText(txt); | 64 | m_textview->setText(txt); |
65 | m_textview->ensureVisible(0, m_textview->contentsHeight()); | 65 | m_textview->ensureVisible(0, m_textview->contentsHeight()); |
66 | emit changed(this); | 66 | emit changed(this); |
67 | } | 67 | } |
68 | 68 | ||
69 | IRCChannelTab::~IRCChannelTab() { | 69 | IRCChannelTab::~IRCChannelTab() { |
70 | m_parentTab->removeChannelTab(this); | 70 | m_parentTab->removeChannelTab(this); |
71 | } | 71 | } |
72 | 72 | ||
73 | void IRCChannelTab::processCommand() { | 73 | void IRCChannelTab::processCommand() { |
74 | QString text = m_field->text(); | 74 | QString text = m_field->text(); |
75 | if (text.length()>0) { | 75 | if (text.length()>0) { |
76 | if (session()->isSessionActive()) { | 76 | if (session()->isSessionActive()) { |
77 | if (text.startsWith("/") && !text.startsWith("//")) { | 77 | if (text.startsWith("/") && !text.startsWith("//")) { |
78 | /* Command mode */ | 78 | /* Command mode */ |
79 | m_parentTab->executeCommand(this, text);; | 79 | m_parentTab->executeCommand(this, text);; |
diff --git a/noncore/net/opieirc/ircsession.cpp b/noncore/net/opieirc/ircsession.cpp index 6404d71..3b176d0 100644 --- a/noncore/net/opieirc/ircsession.cpp +++ b/noncore/net/opieirc/ircsession.cpp | |||
@@ -1,57 +1,57 @@ | |||
1 | #include "ircsession.h" | 1 | #include "ircsession.h" |
2 | #include "ircmessageparser.h" | 2 | #include "ircmessageparser.h" |
3 | #include "ircversion.h" | 3 | #include "ircversion.h" |
4 | 4 | ||
5 | IRCSession::IRCSession(IRCServer *server) { | 5 | IRCSession::IRCSession(IRCServer *server) { |
6 | m_server = server; | 6 | m_server = server; |
7 | m_connection = new IRCConnection(m_server); | 7 | m_connection = new IRCConnection(m_server); |
8 | m_parser = new IRCMessageParser(this); | 8 | m_parser = new IRCMessageParser(this); |
9 | connect(m_connection, SIGNAL(messageArrived(IRCMessage *)), this, SLOT(handleMessage(IRCMessage *))); | 9 | connect(m_connection, SIGNAL(messageArrived(IRCMessage*)), this, SLOT(handleMessage(IRCMessage*))); |
10 | connect(m_parser, SIGNAL(outputReady(IRCOutput)), this, SIGNAL(outputReady(IRCOutput))); | 10 | connect(m_parser, SIGNAL(outputReady(IRCOutput)), this, SIGNAL(outputReady(IRCOutput))); |
11 | connect(m_connection, SIGNAL(outputReady(IRCOutput)), this, SIGNAL(outputReady(IRCOutput))); | 11 | connect(m_connection, SIGNAL(outputReady(IRCOutput)), this, SIGNAL(outputReady(IRCOutput))); |
12 | } | 12 | } |
13 | 13 | ||
14 | IRCSession::~IRCSession() { | 14 | IRCSession::~IRCSession() { |
15 | /* We want this to get deleted automatically */ | 15 | /* We want this to get deleted automatically */ |
16 | m_channels.setAutoDelete(TRUE); | 16 | m_channels.setAutoDelete(TRUE); |
17 | m_people.setAutoDelete(TRUE); | 17 | m_people.setAutoDelete(TRUE); |
18 | 18 | ||
19 | delete m_parser; | 19 | delete m_parser; |
20 | delete m_connection; | 20 | delete m_connection; |
21 | } | 21 | } |
22 | 22 | ||
23 | void IRCSession::beginSession() { | 23 | void IRCSession::beginSession() { |
24 | m_connection->doConnect(); | 24 | m_connection->doConnect(); |
25 | } | 25 | } |
26 | 26 | ||
27 | void IRCSession::join(QString channelname) { | 27 | void IRCSession::join(QString channelname) { |
28 | m_connection->sendLine("JOIN "+channelname); | 28 | m_connection->sendLine("JOIN "+channelname); |
29 | } | 29 | } |
30 | 30 | ||
31 | void IRCSession::quit(){ | 31 | void IRCSession::quit(){ |
32 | m_connection->sendLine("QUIT :[OI] I'm too good to need a reason"); | 32 | m_connection->sendLine("QUIT :[OI] I'm too good to need a reason"); |
33 | } | 33 | } |
34 | 34 | ||
35 | void IRCSession::quit(QString message){ | 35 | void IRCSession::quit(QString message){ |
36 | m_connection->sendLine("QUIT :" + message); | 36 | m_connection->sendLine("QUIT :" + message); |
37 | } | 37 | } |
38 | 38 | ||
39 | void IRCSession::topic(IRCChannel *channel, QString message){ | 39 | void IRCSession::topic(IRCChannel *channel, QString message){ |
40 | m_connection->sendLine("TOPIC :" + channel->channelname() + " " + message); | 40 | m_connection->sendLine("TOPIC :" + channel->channelname() + " " + message); |
41 | } | 41 | } |
42 | 42 | ||
43 | void IRCSession::mode(IRCChannel *channel, QString message){ | 43 | void IRCSession::mode(IRCChannel *channel, QString message){ |
44 | m_connection->sendLine("MODE " + channel->channelname() + " " + message); | 44 | m_connection->sendLine("MODE " + channel->channelname() + " " + message); |
45 | } | 45 | } |
46 | 46 | ||
47 | void IRCSession::mode(IRCPerson *person, QString message){ | 47 | void IRCSession::mode(IRCPerson *person, QString message){ |
48 | m_connection->sendLine("MODE " + person->nick() + " " + message); | 48 | m_connection->sendLine("MODE " + person->nick() + " " + message); |
49 | } | 49 | } |
50 | 50 | ||
51 | void IRCSession::mode(QString message){ | 51 | void IRCSession::mode(QString message){ |
52 | m_connection->sendLine("MODE " + message); | 52 | m_connection->sendLine("MODE " + message); |
53 | } | 53 | } |
54 | 54 | ||
55 | void IRCSession::raw(QString message){ | 55 | void IRCSession::raw(QString message){ |
56 | m_connection->sendLine(message); | 56 | m_connection->sendLine(message); |
57 | } | 57 | } |
diff --git a/noncore/net/opieirc/mainwindow.cpp b/noncore/net/opieirc/mainwindow.cpp index 7414154..0923a11 100644 --- a/noncore/net/opieirc/mainwindow.cpp +++ b/noncore/net/opieirc/mainwindow.cpp | |||
@@ -1,91 +1,91 @@ | |||
1 | #include <qmenubar.h> | 1 | #include <qmenubar.h> |
2 | #include <qpe/resource.h> | 2 | #include <qpe/resource.h> |
3 | #include <qwhatsthis.h> | 3 | #include <qwhatsthis.h> |
4 | 4 | ||
5 | #include "mainwindow.h" | 5 | #include "mainwindow.h" |
6 | #include "ircservertab.h" | 6 | #include "ircservertab.h" |
7 | #include "ircserverlist.h" | 7 | #include "ircserverlist.h" |
8 | #include "ircsettings.h" | 8 | #include "ircsettings.h" |
9 | 9 | ||
10 | MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { | 10 | MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { |
11 | setCaption(tr("IRC Client")); | 11 | setCaption(tr("IRC Client")); |
12 | m_tabWidget = new IRCTabWidget(this); | 12 | m_tabWidget = new IRCTabWidget(this); |
13 | QWhatsThis::add(m_tabWidget, tr("Server connections, channels, queries and other things will be placed here")); | 13 | QWhatsThis::add(m_tabWidget, tr("Server connections, channels, queries and other things will be placed here")); |
14 | connect(m_tabWidget, SIGNAL(currentChanged(QWidget *)), this, SLOT(selected(QWidget *))); | 14 | connect(m_tabWidget, SIGNAL(currentChanged(QWidget*)), this, SLOT(selected(QWidget*))); |
15 | setCentralWidget(m_tabWidget); | 15 | setCentralWidget(m_tabWidget); |
16 | setToolBarsMovable(FALSE); | 16 | setToolBarsMovable(FALSE); |
17 | QMenuBar *menuBar = new QMenuBar(this); | 17 | QMenuBar *menuBar = new QMenuBar(this); |
18 | QPopupMenu *irc = new QPopupMenu(this); | 18 | QPopupMenu *irc = new QPopupMenu(this); |
19 | menuBar->insertItem(tr("IRC"), irc); | 19 | menuBar->insertItem(tr("IRC"), irc); |
20 | QAction *a = new QAction(tr("New connection"), Resource::loadPixmap("pass"), QString::null, 0, this, 0); | 20 | QAction *a = new QAction(tr("New connection"), Resource::loadPixmap("pass"), QString::null, 0, this, 0); |
21 | connect(a, SIGNAL(activated()), this, SLOT(newConnection())); | 21 | connect(a, SIGNAL(activated()), this, SLOT(newConnection())); |
22 | a->setWhatsThis(tr("Create a new connection to an IRC server")); | 22 | a->setWhatsThis(tr("Create a new connection to an IRC server")); |
23 | a->addTo(irc); | 23 | a->addTo(irc); |
24 | a = new QAction(tr("Settings"), Resource::loadPixmap("SettingsIcon"), QString::null, 0, this, 0); | 24 | a = new QAction(tr("Settings"), Resource::loadPixmap("SettingsIcon"), QString::null, 0, this, 0); |
25 | a->setWhatsThis(tr("Configure OpieIRC's behavior and appearance")); | 25 | a->setWhatsThis(tr("Configure OpieIRC's behavior and appearance")); |
26 | connect(a, SIGNAL(activated()), this, SLOT(settings())); | 26 | connect(a, SIGNAL(activated()), this, SLOT(settings())); |
27 | a->addTo(irc); | 27 | a->addTo(irc); |
28 | loadSettings(); | 28 | loadSettings(); |
29 | } | 29 | } |
30 | 30 | ||
31 | /*IRCTabWidget MainWindow::getTabWidget(){ | 31 | /*IRCTabWidget MainWindow::getTabWidget(){ |
32 | return m_tabWidget; | 32 | return m_tabWidget; |
33 | } */ | 33 | } */ |
34 | 34 | ||
35 | void MainWindow::loadSettings() { | 35 | void MainWindow::loadSettings() { |
36 | Config config("OpieIRC"); | 36 | Config config("OpieIRC"); |
37 | config.setGroup("OpieIRC"); | 37 | config.setGroup("OpieIRC"); |
38 | IRCTab::m_backgroundColor = config.readEntry("BackgroundColor", "#FFFFFF"); | 38 | IRCTab::m_backgroundColor = config.readEntry("BackgroundColor", "#FFFFFF"); |
39 | IRCTab::m_textColor = config.readEntry("TextColor", "#000000"); | 39 | IRCTab::m_textColor = config.readEntry("TextColor", "#000000"); |
40 | IRCTab::m_errorColor = config.readEntry("ErrorColor", "#FF0000"); | 40 | IRCTab::m_errorColor = config.readEntry("ErrorColor", "#FF0000"); |
41 | IRCTab::m_selfColor = config.readEntry("SelfColor", "#CC0000"); | 41 | IRCTab::m_selfColor = config.readEntry("SelfColor", "#CC0000"); |
42 | IRCTab::m_otherColor = config.readEntry("OtherColor", "#0000BB"); | 42 | IRCTab::m_otherColor = config.readEntry("OtherColor", "#0000BB"); |
43 | IRCTab::m_serverColor = config.readEntry("ServerColor", "#0000FF"); | 43 | IRCTab::m_serverColor = config.readEntry("ServerColor", "#0000FF"); |
44 | IRCTab::m_notificationColor = config.readEntry("NotificationColor", "#AA3300"); | 44 | IRCTab::m_notificationColor = config.readEntry("NotificationColor", "#AA3300"); |
45 | IRCTab::m_maxLines = config.readNumEntry("Lines", 100); | 45 | IRCTab::m_maxLines = config.readNumEntry("Lines", 100); |
46 | } | 46 | } |
47 | 47 | ||
48 | void MainWindow::selected(QWidget *) { | 48 | void MainWindow::selected(QWidget *) { |
49 | m_tabWidget->setTabColor(m_tabWidget->currentPageIndex(), black); | 49 | m_tabWidget->setTabColor(m_tabWidget->currentPageIndex(), black); |
50 | emit updateScroll(); | 50 | emit updateScroll(); |
51 | } | 51 | } |
52 | 52 | ||
53 | void MainWindow::addTab(IRCTab *tab) { | 53 | void MainWindow::addTab(IRCTab *tab) { |
54 | connect(tab, SIGNAL(changed(IRCTab *)), this, SLOT(changeEvent(IRCTab *))); | 54 | connect(tab, SIGNAL(changed(IRCTab*)), this, SLOT(changeEvent(IRCTab*))); |
55 | m_tabWidget->addTab(tab, tab->title()); | 55 | m_tabWidget->addTab(tab, tab->title()); |
56 | m_tabWidget->showPage(tab); | 56 | m_tabWidget->showPage(tab); |
57 | tab->setID(m_tabWidget->currentPageIndex()); | 57 | tab->setID(m_tabWidget->currentPageIndex()); |
58 | m_tabs.append(tab); | 58 | m_tabs.append(tab); |
59 | } | 59 | } |
60 | 60 | ||
61 | void MainWindow::changeEvent(IRCTab *tab) { | 61 | void MainWindow::changeEvent(IRCTab *tab) { |
62 | if (tab->id() != m_tabWidget->currentPageIndex()) | 62 | if (tab->id() != m_tabWidget->currentPageIndex()) |
63 | m_tabWidget->setTabColor(tab->id(), blue); | 63 | m_tabWidget->setTabColor(tab->id(), blue); |
64 | } | 64 | } |
65 | 65 | ||
66 | void MainWindow::killTab(IRCTab *tab) { | 66 | void MainWindow::killTab(IRCTab *tab) { |
67 | m_tabWidget->removePage(tab); | 67 | m_tabWidget->removePage(tab); |
68 | m_tabs.remove(tab); | 68 | m_tabs.remove(tab); |
69 | /* there might be nicer ways to do this .. */ | 69 | /* there might be nicer ways to do this .. */ |
70 | delete tab; | 70 | delete tab; |
71 | } | 71 | } |
72 | 72 | ||
73 | void MainWindow::newConnection() { | 73 | void MainWindow::newConnection() { |
74 | IRCServerList list(this, "ServerList", TRUE); | 74 | IRCServerList list(this, "ServerList", TRUE); |
75 | if (list.exec() == QDialog::Accepted && list.hasServer()) { | 75 | if (list.exec() == QDialog::Accepted && list.hasServer()) { |
76 | IRCServerTab *serverTab = new IRCServerTab(list.server(), this, m_tabWidget); | 76 | IRCServerTab *serverTab = new IRCServerTab(list.server(), this, m_tabWidget); |
77 | addTab(serverTab); | 77 | addTab(serverTab); |
78 | serverTab->doConnect(); | 78 | serverTab->doConnect(); |
79 | } | 79 | } |
80 | } | 80 | } |
81 | 81 | ||
82 | void MainWindow::settings() { | 82 | void MainWindow::settings() { |
83 | IRCSettings settings(this, "Settings", TRUE); | 83 | IRCSettings settings(this, "Settings", TRUE); |
84 | if (settings.exec() == QDialog::Accepted) { | 84 | if (settings.exec() == QDialog::Accepted) { |
85 | QListIterator<IRCTab> it(m_tabs); | 85 | QListIterator<IRCTab> it(m_tabs); |
86 | for (; it.current(); ++it) { | 86 | for (; it.current(); ++it) { |
87 | /* Inform all tabs about the new settings */ | 87 | /* Inform all tabs about the new settings */ |
88 | it.current()->settingsChanged(); | 88 | it.current()->settingsChanged(); |
89 | } | 89 | } |
90 | } | 90 | } |
91 | } | 91 | } |