author | zecke <zecke> | 2004-09-06 23:51:20 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-06 23:51:20 (UTC) |
commit | e6798d7ec0a3b86e412bd67faad24a737a67aa5f (patch) (side-by-side diff) | |
tree | ff10e927aff440d8dca2e0fe8976aadb3ff011d2 /noncore/net/opieirc/ircsettings.cpp | |
parent | 8f18e8b46dfaaa7e03b9ed1f3faed12da5b30cd5 (diff) | |
download | opie-e6798d7ec0a3b86e412bd67faad24a737a67aa5f.zip opie-e6798d7ec0a3b86e412bd67faad24a737a67aa5f.tar.gz opie-e6798d7ec0a3b86e412bd67faad24a737a67aa5f.tar.bz2 |
Use OKeyConfigWidget/Manager for managing next and prev tab
keyboard shortcuts
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 @@ #include "ircsettings.h" #include "irctab.h" +#include "ircmisc.h" /* OPIE */ #include <opie2/ocolorbutton.h> #include <opie2/otabwidget.h> +#include <opie2/okeyconfigwidget.h> #include <qpe/qpeapplication.h> /* QT */ #include <qvalidator.h> #include <qwhatsthis.h> @@ -75,14 +77,25 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags) label = new QLabel(tr("Notifications :"), widget); layout->addWidget(label, 6, 0); m_notification = new OColorButton(widget, m_config->readEntry("NotificationColor", "#AAE300")); QWhatsThis::add(m_notification, tr("Text color to be used to display notifications")); layout->addWidget(m_notification, 6, 1); tw->addTab(view, "opieirc/colors", tr("Colors")); - tw->setCurrentTab( genwidget ); + + /* + * IRC EditLine KeyConfiguration + */ + m_keyConf = new Opie::Ui::OKeyConfigWidget(tw, "KEyConfig GUI" ); + m_keyConf->setChangeMode( OKeyConfigWidget::Queue ); + m_keyConf->insert( tr("Keyboard Shortcuts"), + IRCHistoryLineEdit::keyConfigInstance() ); + m_keyConf->load(); + tw->addTab(m_keyConf, "SettingsIcon", tr("Keyboard Shortcuts") ); + + tw->setCurrentTab( genwidget ); QPEApplication::showDialog( this ); } void IRCSettings::accept() { IRCTab::m_backgroundColor = m_background->color().name(); @@ -90,20 +103,25 @@ void IRCSettings::accept() IRCTab::m_errorColor = m_error->color().name(); IRCTab::m_selfColor = m_self->color().name(); IRCTab::m_otherColor = m_other->color().name(); IRCTab::m_serverColor = m_server->color().name(); IRCTab::m_notificationColor = m_notification->color().name(); IRCTab::m_maxLines = m_lines->text().toInt(); + m_keyConf->save(); + + m_config->writeEntry("BackgroundColor", IRCTab::m_backgroundColor); m_config->writeEntry("TextColor", IRCTab::m_textColor); m_config->writeEntry("ErrorColor", IRCTab::m_errorColor); m_config->writeEntry("SelfColor", IRCTab::m_selfColor); m_config->writeEntry("OtherColor", IRCTab::m_otherColor); m_config->writeEntry("ServerColor", IRCTab::m_serverColor); m_config->writeEntry("NotificationColor", IRCTab::m_notificationColor); m_config->writeEntry("Lines", m_lines->text()); + IRCHistoryLineEdit::keyConfigInstance()->save(); + QDialog::accept(); } IRCSettings::~IRCSettings() { delete m_config; |