summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opieirc/ircmisc.cpp29
-rw-r--r--noncore/net/opieirc/ircmisc.h21
-rw-r--r--noncore/net/opieirc/ircsettings.cpp71
-rw-r--r--noncore/net/opieirc/ircsettings.h17
-rw-r--r--noncore/net/opieirc/mainwindow.cpp2
-rw-r--r--noncore/net/opieirc/opie-irc.control2
6 files changed, 45 insertions, 97 deletions
diff --git a/noncore/net/opieirc/ircmisc.cpp b/noncore/net/opieirc/ircmisc.cpp
index f94cf1b..a15a790 100644
--- a/noncore/net/opieirc/ircmisc.cpp
+++ b/noncore/net/opieirc/ircmisc.cpp
@@ -1,57 +1,28 @@
1#include <opie/colordialog.h>
2#include <qlayout.h> 1#include <qlayout.h>
3#include <stdio.h> 2#include <stdio.h>
4#include "ircmisc.h" 3#include "ircmisc.h"
5 4
6IRCColorLabel::IRCColorLabel(QColor color, QWidget *parent, const char *name, WFlags f) : QLabel(parent, name, f) {
7 m_color = color;
8 setAlignment(AlignVCenter | AlignCenter);
9 setFrameStyle(QFrame::StyledPanel);
10 setFrameShadow(QFrame::Sunken);
11 setBackgroundColor(m_color);
12}
13
14void IRCColorLabel::mousePressEvent(QMouseEvent *) {
15 m_color = OColorDialog::getColor(m_color);
16 setBackgroundColor(m_color);
17}
18
19QColor IRCColorLabel::color() {
20 return m_color;
21}
22
23IRCFramedColorLabel::IRCFramedColorLabel(QColor color, QWidget *parent, const char *name, WFlags f) : QWidget(parent, name, f) {
24 QVBoxLayout *layout = new QVBoxLayout(this, 10, 0);
25 m_label = new IRCColorLabel(color, this);
26 layout->addWidget(m_label);
27}
28
29QColor IRCFramedColorLabel::color() {
30 return m_label->color();
31}
32
33
34IRCTabBar::IRCTabBar(QWidget *parent, const char *name) : QTabBar(parent, name) { 5IRCTabBar::IRCTabBar(QWidget *parent, const char *name) : QTabBar(parent, name) {
35} 6}
36 7
37int IRCTabBar::insertTab(QTab *tab, int index) { 8int IRCTabBar::insertTab(QTab *tab, int index) {
38 /* FIXME: find some nicer way to do this */ 9 /* FIXME: find some nicer way to do this */
39 QExtTab *ext = new QExtTab(); 10 QExtTab *ext = new QExtTab();
40 ext->color = black; 11 ext->color = black;
41 ext->label = tab->text(); 12 ext->label = tab->text();
42 ext->r = tab->rect(); 13 ext->r = tab->rect();
43 ext->enabled = tab->isEnabled(); 14 ext->enabled = tab->isEnabled();
44 ext->iconset = tab->iconSet(); 15 ext->iconset = tab->iconSet();
45 delete tab; 16 delete tab;
46 return QTabBar::insertTab(ext, index); 17 return QTabBar::insertTab(ext, index);
47} 18}
48 19
49void IRCTabBar::setTabColor(int index, QColor color) { 20void IRCTabBar::setTabColor(int index, QColor color) {
50 ((QExtTab *)tab(index))->color = color; 21 ((QExtTab *)tab(index))->color = color;
51 update(); 22 update();
52} 23}
53 24
54void IRCTabBar::paintLabel(QPainter* p, const QRect& br, QTab* t, bool focus) const { 25void IRCTabBar::paintLabel(QPainter* p, const QRect& br, QTab* t, bool focus) const {
55 QRect r = br; 26 QRect r = br;
56 QTabBar::paintLabel(p, br, t, focus); 27 QTabBar::paintLabel(p, br, t, focus);
57 if (t->id == currentTab()) 28 if (t->id == currentTab())
diff --git a/noncore/net/opieirc/ircmisc.h b/noncore/net/opieirc/ircmisc.h
index 6a8db50..b4a5b06 100644
--- a/noncore/net/opieirc/ircmisc.h
+++ b/noncore/net/opieirc/ircmisc.h
@@ -7,69 +7,48 @@
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 18
19*/ 19*/
20 20
21#ifndef __IRCMISC_H 21#ifndef __IRCMISC_H
22#define __IRCMISC_H 22#define __IRCMISC_H
23 23
24#include <qtabwidget.h> 24#include <qtabwidget.h>
25#include <qlineedit.h> 25#include <qlineedit.h>
26#include <qtabbar.h> 26#include <qtabbar.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qcolor.h> 28#include <qcolor.h>
29#include <qarray.h> 29#include <qarray.h>
30 30
31/* IRCFramedColorLabel is used to display a color */
32
33class IRCColorLabel : public QLabel {
34 Q_OBJECT
35public:
36 IRCColorLabel(QColor color, QWidget *parent = 0, const char *name = 0, WFlags f = 0);
37 QColor color();
38 void mousePressEvent(QMouseEvent *event);
39protected:
40 QColor m_color;
41};
42
43class IRCFramedColorLabel : public QWidget {
44 Q_OBJECT
45public:
46 IRCFramedColorLabel(QColor color, QWidget *parent = 0, const char *name = 0, WFlags f = 0);
47 QColor color();
48protected:
49 IRCColorLabel *m_label;
50};
51
52/* Custom colored QTabWidget */ 31/* Custom colored QTabWidget */
53 32
54class QExtTab : public QTab { 33class QExtTab : public QTab {
55public: 34public:
56 QColor color; 35 QColor color;
57}; 36};
58 37
59class IRCTabWidget : public QTabWidget { 38class IRCTabWidget : public QTabWidget {
60 Q_OBJECT 39 Q_OBJECT
61public: 40public:
62 IRCTabWidget(QWidget *parent = 0, const char *name = 0); 41 IRCTabWidget(QWidget *parent = 0, const char *name = 0);
63 void setTabColor(int index, QColor color); 42 void setTabColor(int index, QColor color);
64}; 43};
65 44
66class IRCTabBar : public QTabBar { 45class IRCTabBar : public QTabBar {
67 Q_OBJECT 46 Q_OBJECT
68public: 47public:
69 IRCTabBar(QWidget *parent = 0, const char *name = 0); 48 IRCTabBar(QWidget *parent = 0, const char *name = 0);
70 void setTabColor(int index, QColor color); 49 void setTabColor(int index, QColor color);
71protected: 50protected:
72 void paintLabel(QPainter*, const QRect&, QTab*, bool) const; 51 void paintLabel(QPainter*, const QRect&, QTab*, bool) const;
73 int insertTab(QTab *, int index = -1); 52 int insertTab(QTab *, int index = -1);
74protected: 53protected:
75 QArray<QColor> m_colors; 54 QArray<QColor> m_colors;
diff --git a/noncore/net/opieirc/ircsettings.cpp b/noncore/net/opieirc/ircsettings.cpp
index 78eaed3..b110a5b 100644
--- a/noncore/net/opieirc/ircsettings.cpp
+++ b/noncore/net/opieirc/ircsettings.cpp
@@ -1,104 +1,101 @@
1#include <opie/ocolorbutton.h>
2#include <opie/otabwidget.h>
1#include <qlayout.h> 3#include <qlayout.h>
2#include <qvalidator.h> 4#include <qvalidator.h>
3#include <qscrollview.h> 5#include <qscrollview.h>
4#include <qwhatsthis.h> 6#include <qwhatsthis.h>
5#include "ircsettings.h" 7#include "ircsettings.h"
6#include "irctab.h" 8#include "irctab.h"
7#include "ircmisc.h" 9#include "ircmisc.h"
8 10
9IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp) { 11IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp) {
10 setCaption("Settings"); 12 setCaption("Settings");
11 m_config = new Config("OpieIRC"); 13 m_config = new Config("OpieIRC");
12 m_config->setGroup("OpieIRC"); 14 m_config->setGroup("OpieIRC");
13 QHBoxLayout *l = new QHBoxLayout(this, 2, 2); 15 QHBoxLayout *l = new QHBoxLayout(this, 2, 2);
14 QTabWidget *tw = new QTabWidget(this); 16 OTabWidget *tw = new OTabWidget(this);
15 l->addWidget(tw); 17 l->addWidget(tw);
16 /* General Configuration */ 18 /* General Configuration */
17 QWidget *widget = new QWidget(tw); 19 QWidget *genwidget = new QWidget(tw);
18 QGridLayout *layout = new QGridLayout(widget, 1, 2, 5, 0); 20 QGridLayout *layout = new QGridLayout(genwidget, 1, 2, 5, 0);
19 QLabel *label = new QLabel(tr("Lines displayed :"), widget); 21 QLabel *label = new QLabel(tr("Lines displayed :"), genwidget);
20 layout->addWidget(label, 0, 0); 22 layout->addWidget(label, 0, 0);
21 m_lines = new QLineEdit(m_config->readEntry("Lines", "100"), widget); 23 m_lines = new QLineEdit(m_config->readEntry("Lines", "100"), genwidget);
22 QWhatsThis::add(m_lines, tr("Amount of lines to be displayed in chats before old lines get deleted - this is necessary to restrain memory consumption. Set to 0 if you don't need this")); 24 QWhatsThis::add(m_lines, tr("Amount of lines to be displayed in chats before old lines get deleted - this is necessary to restrain memory consumption. Set to 0 if you don't need this"));
23 QIntValidator *validator = new QIntValidator(this); 25 QIntValidator *validator = new QIntValidator(this);
24 validator->setTop(10000); 26 validator->setTop(10000);
25 validator->setBottom(0); 27 validator->setBottom(0);
26 m_lines->setValidator(validator); 28 m_lines->setValidator(validator);
27 layout->addWidget(m_lines, 0, 1); 29 layout->addWidget(m_lines, 0, 1);
28 tw->addTab(widget, tr("General")); 30 tw->addTab(genwidget, "opieirc/settings", tr("General"));
29 31
30 /* Color configuration */ 32 /* Color configuration */
31 QScrollView *view = new QScrollView(tw); 33 QScrollView *view = new QScrollView(this);
32 view->setResizePolicy(QScrollView::AutoOneFit); 34 view->setResizePolicy(QScrollView::AutoOneFit);
33 widget = new QWidget(view->viewport()); 35 view->setFrameStyle( QFrame::NoFrame );
36 QWidget *widget = new QWidget(view->viewport());
34 view->addChild(widget); 37 view->addChild(widget);
35 layout = new QGridLayout(widget, 7, 2, 5, 0); 38 layout = new QGridLayout(widget, 7, 2, 5, 0);
36 label = new QLabel(tr("Background color :"), widget); 39 label = new QLabel(tr("Background color :"), widget);
37 layout->addWidget(label, 0, 0); 40 layout->addWidget(label, 0, 0);
38 m_background = new IRCFramedColorLabel(QColor(m_config->readEntry("BackgroundColor", "#FFFFFF")), widget); 41 m_background = new OColorButton(widget, m_config->readEntry("BackgroundColor", "#FFFFFF"));
39 QWhatsThis::add(m_background, tr("Background color to be used in chats")); 42 QWhatsThis::add(m_background, tr("Background color to be used in chats"));
40 layout->addWidget(m_background, 0, 1); 43 layout->addWidget(m_background, 0, 1);
41 label = new QLabel(tr("Normal text color :"), widget); 44 label = new QLabel(tr("Normal text color :"), widget);
42 layout->addWidget(label, 1, 0); 45 layout->addWidget(label, 1, 0);
43 m_text = new IRCFramedColorLabel(m_config->readEntry("TextColor", "#000000"), widget); 46 m_text = new OColorButton(widget, m_config->readEntry("TextColor", "#000000"));
44 QWhatsThis::add(m_text, tr("Text color to be used in chats")); 47 QWhatsThis::add(m_text, tr("Text color to be used in chats"));
45 layout->addWidget(m_text, 1, 1); 48 layout->addWidget(m_text, 1, 1);
46 label = new QLabel(tr("Error color :"), widget); 49 label = new QLabel(tr("Error color :"), widget);
47 layout->addWidget(label, 2, 0); 50 layout->addWidget(label, 2, 0);
48 m_error = new IRCFramedColorLabel(m_config->readEntry("ErrorColor", "#FF0000"), widget); 51 m_error = new OColorButton(widget, m_config->readEntry("ErrorColor", "#FF0000"));
49 QWhatsThis::add(m_error, tr("Text color to be used to display errors")); 52 QWhatsThis::add(m_error, tr("Text color to be used to display errors"));
50 layout->addWidget(m_error, 2, 1); 53 layout->addWidget(m_error, 2, 1);
51 label = new QLabel(tr("Text written by yourself :"), widget); 54 label = new QLabel(tr("Text written by yourself :"), widget);
52 layout->addWidget(label, 3, 0); 55 layout->addWidget(label, 3, 0);
53 m_self = new IRCFramedColorLabel(m_config->readEntry("SelfColor", "#CC0000"), widget); 56 m_self = new OColorButton(widget, m_config->readEntry("SelfColor", "#CC0000"));
54 QWhatsThis::add(m_self, tr("Text color to be used to identify text written by yourself")); 57 QWhatsThis::add(m_self, tr("Text color to be used to identify text written by yourself"));
55 layout->addWidget(m_self, 3, 1); 58 layout->addWidget(m_self, 3, 1);
56 label = new QLabel(tr("Text written by others :"), widget); 59 label = new QLabel(tr("Text written by others :"), widget);
57 layout->addWidget(label, 4, 0); 60 layout->addWidget(label, 4, 0);
58 m_other = new IRCFramedColorLabel(m_config->readEntry("OtherColor", "#0000BB"), widget); 61 m_other = new OColorButton(widget, m_config->readEntry("OtherColor", "#0000BB"));
59 QWhatsThis::add(m_other, tr("Text color to be used to identify text written by others")); 62 QWhatsThis::add(m_other, tr("Text color to be used to identify text written by others"));
60 layout->addWidget(m_other, 4, 1); 63 layout->addWidget(m_other, 4, 1);
61 label = new QLabel(tr("Text written by the server :"), widget); 64 label = new QLabel(tr("Text written by the server :"), widget);
62 layout->addWidget(label, 5, 0); 65 layout->addWidget(label, 5, 0);
63 m_server = new IRCFramedColorLabel(m_config->readEntry("ServerColor", "#0000FF"), widget); 66 m_server = new OColorButton(widget, m_config->readEntry("ServerColor", "#0000FF"));
64 QWhatsThis::add(m_server, tr("Text color to be used to identify text written by the server")); 67 QWhatsThis::add(m_server, tr("Text color to be used to identify text written by the server"));
65 layout->addWidget(m_server, 5, 1); 68 layout->addWidget(m_server, 5, 1);
66 label = new QLabel(tr("Notifications :"), widget); 69 label = new QLabel(tr("Notifications :"), widget);
67 layout->addWidget(label, 6, 0); 70 layout->addWidget(label, 6, 0);
68 m_notification = new IRCFramedColorLabel(m_config->readEntry("NotificationColor", "#AAE300"), widget); 71 m_notification = new OColorButton(widget, m_config->readEntry("NotificationColor", "#AAE300"));
69 QWhatsThis::add(m_notification, tr("Text color to be used to display notifications")); 72 QWhatsThis::add(m_notification, tr("Text color to be used to display notifications"));
70 layout->addWidget(m_notification, 6, 1); 73 layout->addWidget(m_notification, 6, 1);
71 tw->addTab(view, tr("Colors")); 74 tw->addTab(view, "opieirc/colors", tr("Colors"));
75 tw->setCurrentTab( genwidget );
72 showMaximized(); 76 showMaximized();
73} 77}
74 78
75QString IRCSettings::getColorString(QWidget *widget) {
76 QColor color = ((IRCFramedColorLabel *)widget)->color();
77 QString temp;
78 temp.sprintf("#%02x%02x%02x", color.red(), color.green(), color.blue());
79 return temp;
80}
81
82void IRCSettings::accept() { 79void IRCSettings::accept() {
83 IRCTab::m_backgroundColor = getColorString(m_background); 80 IRCTab::m_backgroundColor = m_background->color().name();
84 IRCTab::m_textColor = getColorString(m_text); 81 IRCTab::m_textColor = m_text->color().name();
85 IRCTab::m_errorColor = getColorString(m_error); 82 IRCTab::m_errorColor = m_error->color().name();
86 IRCTab::m_selfColor = getColorString(m_self); 83 IRCTab::m_selfColor = m_self->color().name();
87 IRCTab::m_otherColor = getColorString(m_other); 84 IRCTab::m_otherColor = m_other->color().name();
88 IRCTab::m_serverColor = getColorString(m_server); 85 IRCTab::m_serverColor = m_server->color().name();
89 IRCTab::m_notificationColor = getColorString(m_notification); 86 IRCTab::m_notificationColor = m_notification->color().name();
90 IRCTab::m_maxLines = m_lines->text().toInt(); 87 IRCTab::m_maxLines = m_lines->text().toInt();
91 m_config->writeEntry("BackgroundColor", getColorString(m_background)); 88 m_config->writeEntry("BackgroundColor", IRCTab::m_backgroundColor);
92 m_config->writeEntry("TextColor", getColorString(m_text)); 89 m_config->writeEntry("TextColor", IRCTab::m_textColor);
93 m_config->writeEntry("ErrorColor", getColorString(m_error)); 90 m_config->writeEntry("ErrorColor", IRCTab::m_errorColor);
94 m_config->writeEntry("SelfColor", getColorString(m_self)); 91 m_config->writeEntry("SelfColor", IRCTab::m_selfColor);
95 m_config->writeEntry("OtherColor", getColorString(m_other)); 92 m_config->writeEntry("OtherColor", IRCTab::m_otherColor);
96 m_config->writeEntry("ServerColor", getColorString(m_server)); 93 m_config->writeEntry("ServerColor", IRCTab::m_serverColor);
97 m_config->writeEntry("NotificationColor", getColorString(m_notification)); 94 m_config->writeEntry("NotificationColor", IRCTab::m_notificationColor);
98 m_config->writeEntry("Lines", m_lines->text()); 95 m_config->writeEntry("Lines", m_lines->text());
99 QDialog::accept(); 96 QDialog::accept();
100} 97}
101 98
102IRCSettings::~IRCSettings() { 99IRCSettings::~IRCSettings() {
103 delete m_config; 100 delete m_config;
104} 101}
diff --git a/noncore/net/opieirc/ircsettings.h b/noncore/net/opieirc/ircsettings.h
index 190abaf..cb8d896 100644
--- a/noncore/net/opieirc/ircsettings.h
+++ b/noncore/net/opieirc/ircsettings.h
@@ -4,45 +4,46 @@
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 18
19*/ 19*/
20 20
21#ifndef __IRCSETTINGS_H 21#ifndef __IRCSETTINGS_H
22#define __IRCSETTINGS_H 22#define __IRCSETTINGS_H
23 23
24#include <qpe/config.h> 24#include <qpe/config.h>
25#include <qdialog.h> 25#include <qdialog.h>
26#include <qlineedit.h> 26#include <qlineedit.h>
27 27
28class OColorButton;
29
28class IRCSettings : public QDialog { 30class IRCSettings : public QDialog {
29 Q_OBJECT 31 Q_OBJECT
30public: 32public:
31 IRCSettings(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags f = 0); 33 IRCSettings(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags f = 0);
32 QString getColorString(QWidget *widget);
33 ~IRCSettings(); 34 ~IRCSettings();
34protected slots: 35protected slots:
35 void accept(); 36 void accept();
36protected: 37protected:
37 Config *m_config; 38 Config *m_config;
38 QWidget *m_background; 39 OColorButton *m_background;
39 QWidget *m_text; 40 OColorButton *m_text;
40 QWidget *m_error; 41 OColorButton *m_error;
41 QWidget *m_self; 42 OColorButton *m_self;
42 QWidget *m_server; 43 OColorButton *m_server;
43 QWidget *m_other; 44 OColorButton *m_other;
44 QWidget *m_notification; 45 OColorButton *m_notification;
45 QLineEdit *m_lines; 46 QLineEdit *m_lines;
46}; 47};
47 48
48#endif /* __IRCSETTINGS_H */ 49#endif /* __IRCSETTINGS_H */
diff --git a/noncore/net/opieirc/mainwindow.cpp b/noncore/net/opieirc/mainwindow.cpp
index 7928310..c0e2ff1 100644
--- a/noncore/net/opieirc/mainwindow.cpp
+++ b/noncore/net/opieirc/mainwindow.cpp
@@ -2,49 +2,49 @@
2#include <qpe/resource.h> 2#include <qpe/resource.h>
3#include <qpe/config.h> 3#include <qpe/config.h>
4#include <qpopupmenu.h> 4#include <qpopupmenu.h>
5#include <qwhatsthis.h> 5#include <qwhatsthis.h>
6 6
7#include "mainwindow.h" 7#include "mainwindow.h"
8#include "ircservertab.h" 8#include "ircservertab.h"
9#include "ircserverlist.h" 9#include "ircserverlist.h"
10#include "ircsettings.h" 10#include "ircsettings.h"
11 11
12MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { 12MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) {
13 setCaption(tr("IRC Client")); 13 setCaption(tr("IRC Client"));
14 m_tabWidget = new IRCTabWidget(this); 14 m_tabWidget = new IRCTabWidget(this);
15 QWhatsThis::add(m_tabWidget, tr("Server connections, channels, queries and other things will be placed here")); 15 QWhatsThis::add(m_tabWidget, tr("Server connections, channels, queries and other things will be placed here"));
16 connect(m_tabWidget, SIGNAL(currentChanged(QWidget *)), this, SLOT(selected(QWidget *))); 16 connect(m_tabWidget, SIGNAL(currentChanged(QWidget *)), this, SLOT(selected(QWidget *)));
17 setCentralWidget(m_tabWidget); 17 setCentralWidget(m_tabWidget);
18 setToolBarsMovable(FALSE); 18 setToolBarsMovable(FALSE);
19 QPEMenuBar *menuBar = new QPEMenuBar(this); 19 QPEMenuBar *menuBar = new QPEMenuBar(this);
20 QPopupMenu *irc = new QPopupMenu(this); 20 QPopupMenu *irc = new QPopupMenu(this);
21 menuBar->insertItem(tr("IRC"), irc); 21 menuBar->insertItem(tr("IRC"), irc);
22 QAction *a = new QAction(tr("New connection"), Resource::loadPixmap("pass"), QString::null, 0, this, 0); 22 QAction *a = new QAction(tr("New connection"), Resource::loadPixmap("pass"), QString::null, 0, this, 0);
23 connect(a, SIGNAL(activated()), this, SLOT(newConnection())); 23 connect(a, SIGNAL(activated()), this, SLOT(newConnection()));
24 a->setWhatsThis(tr("Create a new connection to an IRC server")); 24 a->setWhatsThis(tr("Create a new connection to an IRC server"));
25 a->addTo(irc); 25 a->addTo(irc);
26 a = new QAction(tr("Settings"), Resource::loadPixmap("SettingsIcon"), QString::null, 0, this, 0); 26 a = new QAction(tr("Settings"), Resource::loadPixmap("opieirc/settings"), QString::null, 0, this, 0);
27 a->setWhatsThis(tr("Configure OpieIRC's behavior and appearance")); 27 a->setWhatsThis(tr("Configure OpieIRC's behavior and appearance"));
28 connect(a, SIGNAL(activated()), this, SLOT(settings())); 28 connect(a, SIGNAL(activated()), this, SLOT(settings()));
29 a->addTo(irc); 29 a->addTo(irc);
30 loadSettings(); 30 loadSettings();
31} 31}
32 32
33void MainWindow::loadSettings() { 33void MainWindow::loadSettings() {
34 Config config("OpieIRC"); 34 Config config("OpieIRC");
35 config.setGroup("OpieIRC"); 35 config.setGroup("OpieIRC");
36 IRCTab::m_backgroundColor = config.readEntry("BackgroundColor", "#FFFFFF"); 36 IRCTab::m_backgroundColor = config.readEntry("BackgroundColor", "#FFFFFF");
37 IRCTab::m_textColor = config.readEntry("TextColor", "#000000"); 37 IRCTab::m_textColor = config.readEntry("TextColor", "#000000");
38 IRCTab::m_errorColor = config.readEntry("ErrorColor", "#FF0000"); 38 IRCTab::m_errorColor = config.readEntry("ErrorColor", "#FF0000");
39 IRCTab::m_selfColor = config.readEntry("SelfColor", "#CC0000"); 39 IRCTab::m_selfColor = config.readEntry("SelfColor", "#CC0000");
40 IRCTab::m_otherColor = config.readEntry("OtherColor", "#0000BB"); 40 IRCTab::m_otherColor = config.readEntry("OtherColor", "#0000BB");
41 IRCTab::m_serverColor = config.readEntry("ServerColor", "#0000FF"); 41 IRCTab::m_serverColor = config.readEntry("ServerColor", "#0000FF");
42 IRCTab::m_notificationColor = config.readEntry("NotificationColor", "#AA3300"); 42 IRCTab::m_notificationColor = config.readEntry("NotificationColor", "#AA3300");
43 IRCTab::m_maxLines = config.readNumEntry("Lines", 100); 43 IRCTab::m_maxLines = config.readNumEntry("Lines", 100);
44} 44}
45 45
46void MainWindow::selected(QWidget *) { 46void MainWindow::selected(QWidget *) {
47 m_tabWidget->setTabColor(m_tabWidget->currentPageIndex(), black); 47 m_tabWidget->setTabColor(m_tabWidget->currentPageIndex(), black);
48} 48}
49 49
50void MainWindow::addTab(IRCTab *tab) { 50void MainWindow::addTab(IRCTab *tab) {
diff --git a/noncore/net/opieirc/opie-irc.control b/noncore/net/opieirc/opie-irc.control
index 0bcdecd..b0cdfde 100644
--- a/noncore/net/opieirc/opie-irc.control
+++ b/noncore/net/opieirc/opie-irc.control
@@ -1,8 +1,8 @@
1Files: bin/opieirc pics/opieirc apps/Applications/opieirc.desktop help/en/html/opieirc.html help/en/html/opieirc 1Files: bin/opieirc pics/opieirc apps/Applications/opieirc.desktop help/en/html/opieirc.html help/en/html/opieirc
2Priority: optional 2Priority: optional
3Section: Communications 3Section: Communications
4Maintainer: Wenzel Jakob <root@wazlaf.de> 4Maintainer: Wenzel Jakob <root@wazlaf.de>
5Architecture: arm 5Architecture: arm
6Version: $QPE_VERSION-$SUB_VERSION 6Version: $QPE_VERSION-$SUB_VERSION
7Depends: opie-base ($QPE_VERSION) 7Depends: opie-base ($QPE_VERSION), libopie ($QPE_VERSION)
8Description: The Opie IRC client lets you chat on your favorite IRC server using your handheld computer 8Description: The Opie IRC client lets you chat on your favorite IRC server using your handheld computer