summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc
authoralwin <alwin>2004-03-02 12:21:11 (UTC)
committer alwin <alwin>2004-03-02 12:21:11 (UTC)
commitb6b1c97559c0ed9f2e33632272426bf98f289232 (patch) (unidiff)
treed3a9987704770cdf5eb14e1136f6e3ecb2f36a04 /noncore/net/opieirc
parent0d59c780513da78033f4d9040475dee9db0256d4 (diff)
downloadopie-b6b1c97559c0ed9f2e33632272426bf98f289232.zip
opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.gz
opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.bz2
applied the patch generated by the optimize_connect script from
TT.
Diffstat (limited to 'noncore/net/opieirc') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircchanneltab.cpp2
-rw-r--r--noncore/net/opieirc/ircsession.cpp2
-rw-r--r--noncore/net/opieirc/mainwindow.cpp4
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
@@ -19,25 +19,25 @@ IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainW
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();
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,21 +1,21 @@
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
5IRCSession::IRCSession(IRCServer *server) { 5IRCSession::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
14IRCSession::~IRCSession() { 14IRCSession::~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}
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
@@ -2,25 +2,25 @@
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
10MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { 10MainWindow::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()));
@@ -42,25 +42,25 @@ void MainWindow::loadSettings() {
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
48void MainWindow::selected(QWidget *) { 48void 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
53void MainWindow::addTab(IRCTab *tab) { 53void 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
61void MainWindow::changeEvent(IRCTab *tab) { 61void 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
66void MainWindow::killTab(IRCTab *tab) { 66void MainWindow::killTab(IRCTab *tab) {