Diffstat (limited to 'noncore/net/opieirc/ircsettings.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircsettings.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/noncore/net/opieirc/ircsettings.cpp b/noncore/net/opieirc/ircsettings.cpp index 1fba030..7a1dd6c 100644 --- a/noncore/net/opieirc/ircsettings.cpp +++ b/noncore/net/opieirc/ircsettings.cpp | |||
@@ -12,6 +12,7 @@ | |||
12 | /* QT */ | 12 | /* QT */ |
13 | #include <qvalidator.h> | 13 | #include <qvalidator.h> |
14 | #include <qwhatsthis.h> | 14 | #include <qwhatsthis.h> |
15 | #include <qcheckbox.h> | ||
15 | 16 | ||
16 | using namespace Opie; | 17 | using namespace Opie; |
17 | using namespace Opie::Ui; | 18 | using namespace Opie::Ui; |
@@ -25,7 +26,7 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags) | |||
25 | l->addWidget(tw); | 26 | l->addWidget(tw); |
26 | /* General Configuration */ | 27 | /* General Configuration */ |
27 | QWidget *genwidget = new QWidget(tw); | 28 | QWidget *genwidget = new QWidget(tw); |
28 | QGridLayout *layout = new QGridLayout(genwidget, 1, 2, 5, 0); | 29 | QGridLayout *layout = new QGridLayout(genwidget, 1, 4, 5, 0); |
29 | QLabel *label = new QLabel(tr("Lines displayed :"), genwidget); | 30 | QLabel *label = new QLabel(tr("Lines displayed :"), genwidget); |
30 | layout->addWidget(label, 0, 0); | 31 | layout->addWidget(label, 0, 0); |
31 | m_lines = new QLineEdit(m_config->readEntry("Lines", "100"), genwidget); | 32 | m_lines = new QLineEdit(m_config->readEntry("Lines", "100"), genwidget); |
@@ -35,6 +36,19 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags) | |||
35 | validator->setBottom(0); | 36 | validator->setBottom(0); |
36 | m_lines->setValidator(validator); | 37 | m_lines->setValidator(validator); |
37 | layout->addWidget(m_lines, 0, 1); | 38 | layout->addWidget(m_lines, 0, 1); |
39 | |||
40 | /* | ||
41 | * include timestamp | ||
42 | */ | ||
43 | m_displayTime = new QCheckBox( tr("Display time in chat log"), genwidget ); | ||
44 | m_displayTime->setChecked( m_config->readBoolEntry("DisplayTime", false) ); | ||
45 | layout->addMultiCellWidget(m_displayTime, 1, 1, 0, 4 ); | ||
46 | |||
47 | // add a spacer | ||
48 | layout->addItem( new QSpacerItem(1,1, QSizePolicy::Minimum, | ||
49 | QSizePolicy::MinimumExpanding), | ||
50 | 2, 0 ); | ||
51 | |||
38 | tw->addTab(genwidget, "opieirc/settings", tr("General")); | 52 | tw->addTab(genwidget, "opieirc/settings", tr("General")); |
39 | 53 | ||
40 | /* Color configuration */ | 54 | /* Color configuration */ |
@@ -117,6 +131,8 @@ void IRCSettings::accept() | |||
117 | m_config->writeEntry("ServerColor", IRCTab::m_serverColor); | 131 | m_config->writeEntry("ServerColor", IRCTab::m_serverColor); |
118 | m_config->writeEntry("NotificationColor", IRCTab::m_notificationColor); | 132 | m_config->writeEntry("NotificationColor", IRCTab::m_notificationColor); |
119 | m_config->writeEntry("Lines", m_lines->text()); | 133 | m_config->writeEntry("Lines", m_lines->text()); |
134 | m_config->writeEntry("DisplayTime", m_displayTime->isChecked() ); | ||
135 | IRCTab::setUseTimeStamps(m_displayTime->isChecked()); | ||
120 | IRCHistoryLineEdit::keyConfigInstance()->save(); | 136 | IRCHistoryLineEdit::keyConfigInstance()->save(); |
121 | 137 | ||
122 | QDialog::accept(); | 138 | QDialog::accept(); |