Diffstat (limited to 'noncore/net/opieirc/ircsettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircsettings.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/noncore/net/opieirc/ircsettings.cpp b/noncore/net/opieirc/ircsettings.cpp index 13fcc24..1fba030 100644 --- a/noncore/net/opieirc/ircsettings.cpp +++ b/noncore/net/opieirc/ircsettings.cpp | |||
@@ -1,13 +1,15 @@ | |||
1 | 1 | ||
2 | #include "ircsettings.h" | 2 | #include "ircsettings.h" |
3 | #include "irctab.h" | 3 | #include "irctab.h" |
4 | #include "ircmisc.h" | ||
4 | 5 | ||
5 | /* OPIE */ | 6 | /* OPIE */ |
6 | #include <opie2/ocolorbutton.h> | 7 | #include <opie2/ocolorbutton.h> |
7 | #include <opie2/otabwidget.h> | 8 | #include <opie2/otabwidget.h> |
9 | #include <opie2/okeyconfigwidget.h> | ||
8 | #include <qpe/qpeapplication.h> | 10 | #include <qpe/qpeapplication.h> |
9 | 11 | ||
10 | /* QT */ | 12 | /* QT */ |
11 | #include <qvalidator.h> | 13 | #include <qvalidator.h> |
12 | #include <qwhatsthis.h> | 14 | #include <qwhatsthis.h> |
13 | 15 | ||
@@ -75,14 +77,25 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags) | |||
75 | label = new QLabel(tr("Notifications :"), widget); | 77 | label = new QLabel(tr("Notifications :"), widget); |
76 | layout->addWidget(label, 6, 0); | 78 | layout->addWidget(label, 6, 0); |
77 | m_notification = new OColorButton(widget, m_config->readEntry("NotificationColor", "#AAE300")); | 79 | m_notification = new OColorButton(widget, m_config->readEntry("NotificationColor", "#AAE300")); |
78 | QWhatsThis::add(m_notification, tr("Text color to be used to display notifications")); | 80 | QWhatsThis::add(m_notification, tr("Text color to be used to display notifications")); |
79 | layout->addWidget(m_notification, 6, 1); | 81 | layout->addWidget(m_notification, 6, 1); |
80 | tw->addTab(view, "opieirc/colors", tr("Colors")); | 82 | tw->addTab(view, "opieirc/colors", tr("Colors")); |
81 | tw->setCurrentTab( genwidget ); | ||
82 | 83 | ||
84 | |||
85 | /* | ||
86 | * IRC EditLine KeyConfiguration | ||
87 | */ | ||
88 | m_keyConf = new Opie::Ui::OKeyConfigWidget(tw, "KEyConfig GUI" ); | ||
89 | m_keyConf->setChangeMode( OKeyConfigWidget::Queue ); | ||
90 | m_keyConf->insert( tr("Keyboard Shortcuts"), | ||
91 | IRCHistoryLineEdit::keyConfigInstance() ); | ||
92 | m_keyConf->load(); | ||
93 | tw->addTab(m_keyConf, "SettingsIcon", tr("Keyboard Shortcuts") ); | ||
94 | |||
95 | tw->setCurrentTab( genwidget ); | ||
83 | QPEApplication::showDialog( this ); | 96 | QPEApplication::showDialog( this ); |
84 | } | 97 | } |
85 | 98 | ||
86 | void IRCSettings::accept() | 99 | void IRCSettings::accept() |
87 | { | 100 | { |
88 | IRCTab::m_backgroundColor = m_background->color().name(); | 101 | IRCTab::m_backgroundColor = m_background->color().name(); |
@@ -90,20 +103,25 @@ void IRCSettings::accept() | |||
90 | IRCTab::m_errorColor = m_error->color().name(); | 103 | IRCTab::m_errorColor = m_error->color().name(); |
91 | IRCTab::m_selfColor = m_self->color().name(); | 104 | IRCTab::m_selfColor = m_self->color().name(); |
92 | IRCTab::m_otherColor = m_other->color().name(); | 105 | IRCTab::m_otherColor = m_other->color().name(); |
93 | IRCTab::m_serverColor = m_server->color().name(); | 106 | IRCTab::m_serverColor = m_server->color().name(); |
94 | IRCTab::m_notificationColor = m_notification->color().name(); | 107 | IRCTab::m_notificationColor = m_notification->color().name(); |
95 | IRCTab::m_maxLines = m_lines->text().toInt(); | 108 | IRCTab::m_maxLines = m_lines->text().toInt(); |
109 | m_keyConf->save(); | ||
110 | |||
111 | |||
96 | m_config->writeEntry("BackgroundColor", IRCTab::m_backgroundColor); | 112 | m_config->writeEntry("BackgroundColor", IRCTab::m_backgroundColor); |
97 | m_config->writeEntry("TextColor", IRCTab::m_textColor); | 113 | m_config->writeEntry("TextColor", IRCTab::m_textColor); |
98 | m_config->writeEntry("ErrorColor", IRCTab::m_errorColor); | 114 | m_config->writeEntry("ErrorColor", IRCTab::m_errorColor); |
99 | m_config->writeEntry("SelfColor", IRCTab::m_selfColor); | 115 | m_config->writeEntry("SelfColor", IRCTab::m_selfColor); |
100 | m_config->writeEntry("OtherColor", IRCTab::m_otherColor); | 116 | m_config->writeEntry("OtherColor", IRCTab::m_otherColor); |
101 | m_config->writeEntry("ServerColor", IRCTab::m_serverColor); | 117 | m_config->writeEntry("ServerColor", IRCTab::m_serverColor); |
102 | m_config->writeEntry("NotificationColor", IRCTab::m_notificationColor); | 118 | m_config->writeEntry("NotificationColor", IRCTab::m_notificationColor); |
103 | m_config->writeEntry("Lines", m_lines->text()); | 119 | m_config->writeEntry("Lines", m_lines->text()); |
120 | IRCHistoryLineEdit::keyConfigInstance()->save(); | ||
121 | |||
104 | QDialog::accept(); | 122 | QDialog::accept(); |
105 | } | 123 | } |
106 | 124 | ||
107 | IRCSettings::~IRCSettings() | 125 | IRCSettings::~IRCSettings() |
108 | { | 126 | { |
109 | delete m_config; | 127 | delete m_config; |