summaryrefslogtreecommitdiffstats
path: root/src/modules/options
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-24 02:13:59 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-24 02:13:59 +0000
commita6d58bb6052ac8cb01805a48c4ad2f129126116f (patch)
treedd867a099fcbb263a8009a9fb22695b87855dad6 /src/modules/options
downloadkvirc-a6d58bb6052ac8cb01805a48c4ad2f129126116f.tar.gz
kvirc-a6d58bb6052ac8cb01805a48c4ad2f129126116f.zip
Added KDE3 version of kvirc
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1095341 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/modules/options')
-rw-r--r--src/modules/options/Makefile.am157
-rw-r--r--src/modules/options/container.cpp123
-rw-r--r--src/modules/options/container.h53
-rw-r--r--src/modules/options/dialog.cpp675
-rw-r--r--src/modules/options/dialog.h104
-rw-r--r--src/modules/options/instances.cpp3590
-rw-r--r--src/modules/options/instances.h83
-rw-r--r--src/modules/options/libkvioptions.cpp324
-rwxr-xr-xsrc/modules/options/mkcreateinstanceproc.sh441
-rw-r--r--src/modules/options/optw_antispam.cpp64
-rw-r--r--src/modules/options/optw_antispam.h47
-rw-r--r--src/modules/options/optw_avatar.cpp131
-rw-r--r--src/modules/options/optw_avatar.h45
-rw-r--r--src/modules/options/optw_away.cpp71
-rw-r--r--src/modules/options/optw_away.h46
-rw-r--r--src/modules/options/optw_connection.cpp321
-rw-r--r--src/modules/options/optw_connection.h116
-rw-r--r--src/modules/options/optw_ctcp.cpp90
-rw-r--r--src/modules/options/optw_ctcp.h41
-rw-r--r--src/modules/options/optw_ctcpfloodprotection.cpp116
-rw-r--r--src/modules/options/optw_ctcpfloodprotection.h41
-rw-r--r--src/modules/options/optw_dcc.cpp393
-rw-r--r--src/modules/options/optw_dcc.h139
-rw-r--r--src/modules/options/optw_generalopt.cpp51
-rw-r--r--src/modules/options/optw_generalopt.h39
-rw-r--r--src/modules/options/optw_highlighting.cpp128
-rw-r--r--src/modules/options/optw_highlighting.h67
-rw-r--r--src/modules/options/optw_ident.cpp37
-rw-r--r--src/modules/options/optw_ident.h28
-rw-r--r--src/modules/options/optw_identity.cpp729
-rw-r--r--src/modules/options/optw_identity.h192
-rw-r--r--src/modules/options/optw_ignore.cpp62
-rw-r--r--src/modules/options/optw_ignore.h47
-rw-r--r--src/modules/options/optw_input.cpp156
-rw-r--r--src/modules/options/optw_input.h61
-rw-r--r--src/modules/options/optw_interfacefeatures.cpp88
-rw-r--r--src/modules/options/optw_interfacefeatures.h48
-rw-r--r--src/modules/options/optw_interfacelookglobal.cpp215
-rw-r--r--src/modules/options/optw_interfacelookglobal.h113
-rw-r--r--src/modules/options/optw_irc.cpp220
-rw-r--r--src/modules/options/optw_irc.h116
-rw-r--r--src/modules/options/optw_ircoutput.cpp94
-rw-r--r--src/modules/options/optw_ircoutput.h49
-rw-r--r--src/modules/options/optw_ircview.cpp168
-rw-r--r--src/modules/options/optw_ircview.h83
-rw-r--r--src/modules/options/optw_lag.cpp85
-rw-r--r--src/modules/options/optw_lag.h40
-rw-r--r--src/modules/options/optw_logging.cpp64
-rw-r--r--src/modules/options/optw_logging.h42
-rw-r--r--src/modules/options/optw_mediatypes.cpp262
-rw-r--r--src/modules/options/optw_mediatypes.h83
-rw-r--r--src/modules/options/optw_messages.cpp693
-rw-r--r--src/modules/options/optw_messages.h186
-rw-r--r--src/modules/options/optw_nickserv.cpp368
-rw-r--r--src/modules/options/optw_nickserv.h89
-rw-r--r--src/modules/options/optw_notify.cpp134
-rw-r--r--src/modules/options/optw_notify.h54
-rw-r--r--src/modules/options/optw_protection.cpp50
-rw-r--r--src/modules/options/optw_protection.h48
-rw-r--r--src/modules/options/optw_proxy.cpp367
-rw-r--r--src/modules/options/optw_proxy.h94
-rw-r--r--src/modules/options/optw_query.cpp115
-rw-r--r--src/modules/options/optw_query.h43
-rw-r--r--src/modules/options/optw_servers.cpp1712
-rw-r--r--src/modules/options/optw_servers.h210
-rw-r--r--src/modules/options/optw_sound.cpp310
-rw-r--r--src/modules/options/optw_sound.h94
-rw-r--r--src/modules/options/optw_ssl.cpp35
-rw-r--r--src/modules/options/optw_ssl.h29
-rw-r--r--src/modules/options/optw_taskbar.cpp255
-rw-r--r--src/modules/options/optw_taskbar.h125
-rw-r--r--src/modules/options/optw_textencoding.cpp139
-rw-r--r--src/modules/options/optw_textencoding.h50
-rw-r--r--src/modules/options/optw_texticons.cpp244
-rw-r--r--src/modules/options/optw_texticons.h105
-rw-r--r--src/modules/options/optw_theme.cpp26
-rw-r--r--src/modules/options/optw_theme.h30
-rw-r--r--src/modules/options/optw_tools.cpp50
-rw-r--r--src/modules/options/optw_tools.h46
-rw-r--r--src/modules/options/optw_topiclabel.cpp43
-rw-r--r--src/modules/options/optw_topiclabel.h41
-rw-r--r--src/modules/options/optw_transport.cpp33
-rw-r--r--src/modules/options/optw_transport.h29
-rw-r--r--src/modules/options/optw_tray.cpp91
-rw-r--r--src/modules/options/optw_tray.h50
-rw-r--r--src/modules/options/optw_uparser.cpp62
-rw-r--r--src/modules/options/optw_uparser.h40
-rw-r--r--src/modules/options/optw_urlhandlers.cpp127
-rw-r--r--src/modules/options/optw_urlhandlers.h52
-rw-r--r--src/modules/options/optw_userlist.cpp245
-rw-r--r--src/modules/options/optw_userlist.h114
91 files changed, 17206 insertions, 0 deletions
diff --git a/src/modules/options/Makefile.am b/src/modules/options/Makefile.am
new file mode 100644
index 00000000..53c0988c
--- /dev/null
+++ b/src/modules/options/Makefile.am
@@ -0,0 +1,157 @@
+###############################################################################
+# KVirc IRC client Makefile - 10.03.2000 Szymon Stefanek <[email protected]>
+###############################################################################
+
+AM_CPPFLAGS = -I$(SS_TOPSRCDIR)/src/kvilib/include/ -I$(SS_TOPSRCDIR)/src/kvirc/include/ \
+$(SS_INCDIRS) $(SS_CPPFLAGS) -DGLOBAL_KVIRC_DIR=\"$(globalkvircdir)\"
+
+EXTRA_DIST = mkcreateinstanceproc.sh
+
+pluglib_LTLIBRARIES = libkvioptions.la
+
+libkvioptions_la_LDFLAGS = -module -avoid-version $(SS_LDFLAGS) $(SS_LIBDIRS)
+
+libkvioptions_la_SOURCES = libkvioptions.cpp \
+ container.cpp \
+ dialog.cpp \
+ instances.cpp \
+ optw_antispam.cpp \
+ optw_avatar.cpp \
+ optw_connection.cpp \
+ optw_ctcp.cpp \
+ optw_ctcpfloodprotection.cpp \
+ optw_dcc.cpp \
+ optw_generalopt.cpp \
+ optw_highlighting.cpp \
+ optw_ident.cpp \
+ optw_identity.cpp \
+ optw_ignore.cpp \
+ optw_input.cpp \
+ optw_interfacefeatures.cpp \
+ optw_interfacelookglobal.cpp \
+ optw_irc.cpp \
+ optw_ircoutput.cpp \
+ optw_ircview.cpp \
+ optw_lag.cpp \
+ optw_logging.cpp \
+ optw_mediatypes.cpp \
+ optw_messages.cpp \
+ optw_nickserv.cpp \
+ optw_notify.cpp \
+ optw_protection.cpp \
+ optw_proxy.cpp \
+ optw_query.cpp \
+ optw_servers.cpp \
+ optw_sound.cpp \
+ optw_ssl.cpp \
+ optw_taskbar.cpp \
+ optw_textencoding.cpp \
+ optw_texticons.cpp \
+ optw_theme.cpp \
+ optw_tools.cpp \
+ optw_transport.cpp \
+ optw_topiclabel.cpp \
+ optw_away.cpp \
+ optw_uparser.cpp \
+ optw_urlhandlers.cpp \
+ optw_userlist.cpp \
+ optw_tray.cpp
+
+libkvioptions_la_LIBADD = $(SS_LIBLINK) ../../kvilib/build/libkvilib.la
+
+noinst_HEADERS= container.h \
+ dialog.h \
+ instances.h \
+ optw_antispam.h \
+ optw_avatar.h \
+ optw_connection.h \
+ optw_ctcp.h \
+ optw_ctcpfloodprotection.h \
+ optw_dcc.h \
+ optw_generalopt.h \
+ optw_highlighting.h \
+ optw_ident.h \
+ optw_identity.h \
+ optw_ignore.h \
+ optw_input.h \
+ optw_interfacefeatures.h \
+ optw_interfacelookglobal.h \
+ optw_irc.h \
+ optw_ircoutput.h \
+ optw_ircview.h \
+ optw_lag.h \
+ optw_logging.h \
+ optw_mediatypes.h \
+ optw_messages.h \
+ optw_nickserv.h \
+ optw_notify.h \
+ optw_protection.h \
+ optw_proxy.h \
+ optw_query.h \
+ optw_servers.h \
+ optw_sound.h \
+ optw_ssl.h \
+ optw_taskbar.h \
+ optw_textencoding.h \
+ optw_texticons.h \
+ optw_theme.h \
+ optw_tools.h \
+ optw_transport.h \
+ optw_topiclabel.h \
+ optw_away.h \
+ optw_uparser.h \
+ optw_urlhandlers.h \
+ optw_userlist.h \
+ optw_tray.h
+
+instances.h: optw_*.h mkcreateinstanceproc.sh
+ ./mkcreateinstanceproc.sh
+
+m_%.moc: %.h
+ $(SS_QT_MOC) $< -o $@
+
+container.cpp: m_container.moc
+dialog.cpp: m_dialog.moc
+instances.cpp: m_instances.moc
+optw_antispam.cpp: m_optw_antispam.moc
+optw_avatar.cpp: m_optw_avatar.moc
+optw_away.cpp: m_optw_away.moc
+optw_connection.cpp: m_optw_connection.moc
+optw_ctcp.cpp: m_optw_ctcp.moc
+optw_ctcpfloodprotection.cpp: m_optw_ctcpfloodprotection.moc
+optw_dcc.cpp: m_optw_dcc.moc
+optw_generalopt.cpp: m_optw_generalopt.moc
+optw_highlighting.cpp: m_optw_highlighting.moc
+optw_ident.cpp: m_optw_ident.moc
+optw_identity.cpp: m_optw_identity.moc
+optw_ignore.cpp: m_optw_ignore.moc
+optw_input.cpp: m_optw_input.moc
+optw_interfacefeatures.cpp: m_optw_interfacefeatures.moc
+optw_interfacelookglobal.cpp: m_optw_interfacelookglobal.moc
+optw_irc.cpp: m_optw_irc.moc
+optw_ircoutput.cpp: m_optw_ircoutput.moc
+optw_ircview.cpp: m_optw_ircview.moc
+optw_lag.cpp: m_optw_lag.moc
+optw_logging.cpp: m_optw_logging.moc
+optw_look.cpp: m_optw_look.moc
+optw_mediatypes.cpp: m_optw_mediatypes.moc
+optw_messages.cpp: m_optw_messages.moc
+optw_nickserv.cpp: m_optw_nickserv.moc
+optw_notify.cpp: m_optw_notify.moc
+optw_protection.cpp: m_optw_protection.moc
+optw_proxy.cpp: m_optw_proxy.moc
+optw_query.cpp: m_optw_query.moc
+optw_servers.cpp: m_optw_servers.moc
+optw_sound.cpp: m_optw_sound.moc
+optw_ssl.cpp: m_optw_ssl.moc
+optw_taskbar.cpp: m_optw_taskbar.moc
+optw_textencoding.cpp: m_optw_textencoding.moc
+optw_texticons.cpp: m_optw_texticons.moc
+optw_transport.cpp: m_optw_transport.moc
+optw_theme.cpp: m_optw_theme.moc
+optw_topiclabel.cpp: m_optw_topiclabel.moc
+optw_tools.cpp: m_optw_tools.moc
+optw_uparser.cpp: m_optw_uparser.moc
+optw_urlhandlers.cpp: m_optw_urlhandlers.moc
+optw_userlist.cpp: m_optw_userlist.moc
+optw_tray.cpp : m_optw_tray.moc
diff --git a/src/modules/options/container.cpp b/src/modules/options/container.cpp
new file mode 100644
index 00000000..7e2272c1
--- /dev/null
+++ b/src/modules/options/container.cpp
@@ -0,0 +1,123 @@
+//
+// File : container.cpp
+// Creation date : Wed Nov 21 17:09:49 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "container.h"
+#include "instances.h"
+
+#include "kvi_locale.h"
+#include "kvi_iconmanager.h"
+#include "kvi_app.h"
+
+#include <qlayout.h>
+#include <qpushbutton.h>
+#include "kvi_tal_tooltip.h"
+#include <qevent.h>
+
+#ifdef COMPILE_USE_QT4
+ #include <qdesktopwidget.h>
+#endif
+
+extern KviOptionsInstanceManager * g_pOptionsInstanceManager;
+
+KviOptionsWidgetContainer::KviOptionsWidgetContainer(QWidget * par,bool bModal)
+: QDialog(par,"container","options")
+{
+ m_pOptionsWidget = 0;
+ setModal(bModal);
+}
+
+KviOptionsWidgetContainer::~KviOptionsWidgetContainer()
+{
+ if(m_pOptionsWidget)delete m_pOptionsWidget;
+}
+
+void KviOptionsWidgetContainer::setup(KviOptionsWidget * w)
+{
+ QGridLayout * g = new QGridLayout(this,2,3,4,8);
+
+ g->addMultiCellWidget(w,0,0,0,2);
+
+
+ QPushButton * b = new QPushButton(__tr2qs_ctx("&OK","options"),this);
+ KviTalToolTip::add(b,__tr2qs_ctx("Close this dialog, accepting all changes.","options"));
+ //b->setMinimumWidth(m_pCancel->sizeHint().width());
+ g->addWidget(b,1,1);
+ b->setDefault(true);
+ connect(b,SIGNAL(clicked()),this,SLOT(okClicked()));
+ b->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT)));
+
+ m_pCancel = new QPushButton(__tr2qs_ctx("Cancel","options"),this);
+ KviTalToolTip::add(m_pCancel,__tr2qs_ctx("Close this dialog, discarding all changes.","options"));
+ g->addWidget(m_pCancel,1,2);
+ connect(m_pCancel,SIGNAL(clicked()),this,SLOT(cancelClicked()));
+ m_pCancel->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD)));
+
+
+ g->setRowStretch(0,1);
+ g->setColStretch(0,1);
+
+ KviOptionsWidgetInstanceEntry * e = g_pOptionsInstanceManager->findInstanceEntry(w->className());
+ if(e)
+ {
+ //KviStr caption(KviStr::Format,"%s - KVIrc",e->szName);
+ setIcon(*(g_pIconManager->getSmallIcon(e->iIcon)));
+ setCaption(e->szName);
+ }
+ m_pOptionsWidget = w;
+
+}
+
+void KviOptionsWidgetContainer::closeEvent(QCloseEvent *e)
+{
+ e->ignore();
+ cancelClicked();
+}
+
+void KviOptionsWidgetContainer::showEvent(QShowEvent *e)
+{
+ if(parent() == 0)
+ {
+ move((g_pApp->desktop()->width() - width()) / 2,
+ (g_pApp->desktop()->height() - height()) / 2);
+ }
+ QWidget::showEvent(e);
+ m_pCancel->setFocus();
+}
+
+void KviOptionsWidgetContainer::reject()
+{
+ cancelClicked();
+}
+
+void KviOptionsWidgetContainer::okClicked()
+{
+ if(m_pOptionsWidget)m_pOptionsWidget->commit();
+ g_pApp->saveOptions();
+ delete this;
+}
+
+void KviOptionsWidgetContainer::cancelClicked()
+{
+ deleteLater();
+}
+
+#include "m_container.moc"
diff --git a/src/modules/options/container.h b/src/modules/options/container.h
new file mode 100644
index 00000000..10ae69de
--- /dev/null
+++ b/src/modules/options/container.h
@@ -0,0 +1,53 @@
+#ifndef _CONTAINER_H_
+#define _CONTAINER_H_
+//
+// File : container.h
+// Creation date : Wed Nov 21 17:09:50 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+
+#include "kvi_optionswidget.h"
+#include <qdialog.h>
+
+class QPushButton;
+
+class KviOptionsWidgetContainer : public QDialog
+{
+ Q_OBJECT
+public:
+ KviOptionsWidgetContainer(QWidget * par,bool bModal = false);
+ ~KviOptionsWidgetContainer();
+protected:
+ KviOptionsWidget * m_pOptionsWidget;
+ QPushButton * m_pCancel;
+public:
+ void setup(KviOptionsWidget * w);
+protected:
+ virtual void closeEvent(QCloseEvent *e);
+ virtual void showEvent(QShowEvent *e);
+ virtual void reject();
+protected slots:
+ void okClicked();
+ void cancelClicked();
+};
+
+
+
+#endif //_CONTAINER_H_
diff --git a/src/modules/options/dialog.cpp b/src/modules/options/dialog.cpp
new file mode 100644
index 00000000..bebcae3e
--- /dev/null
+++ b/src/modules/options/dialog.cpp
@@ -0,0 +1,675 @@
+//=============================================================================
+//
+// File : dialog.cpp
+// Created on Fri 10 Feb 2006 18:52:18 by Szymon Stefanek
+// Based on dlg_options.cpp: Tue Jun 11 2000 02:39:12 by Szymon Stefanek
+//
+// This file is part of the KVIrc IRC Client distribution
+// Copyright (C) 2000-2006 Szymon Stefanek <pragma at kvirc dot net>
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+#include "dialog.h"
+
+#include "kvi_app.h"
+#include "kvi_options.h"
+#include "kvi_locale.h"
+#include "kvi_iconmanager.h"
+#include "kvi_module.h"
+#include "kvi_styled_controls.h"
+#include "kvi_pointerhashtable.h"
+#include <qlayout.h>
+#include "kvi_accel.h"
+#include <qlabel.h>
+#include "kvi_tal_vbox.h"
+#include <qsplitter.h>
+#include "kvi_tal_widgetstack.h"
+#include <qpushbutton.h>
+#include "kvi_tal_tooltip.h"
+
+#ifdef COMPILE_USE_QT4
+ #include <q3header.h>
+#else
+ #include <qheader.h>
+ #include <qobjectlist.h>
+#endif
+#include "kvi_tal_popupmenu.h"
+#include <qtoolbutton.h>
+#include <qcheckbox.h>
+#include <kvi_tal_groupbox.h>
+#include <qpainter.h>
+#include <qfont.h>
+#include <qevent.h>
+
+//extern KviModule * g_pOptionsModule;
+extern KviPointerHashTable<QString,KviOptionsDialog> * g_pOptionsDialogDict;
+
+extern KVIRC_API KviApp * g_pApp;
+extern KviOptionsInstanceManager * g_pOptionsInstanceManager;
+
+KviGeneralOptionsFrontWidget::KviGeneralOptionsFrontWidget(QWidget *parent,const QString &szText)
+:KviOptionsWidget(parent,"general_options_front_widget")
+{
+ createLayout(1,1);
+ QLabel * l = new QLabel(szText,this);
+#ifdef COMPILE_USE_QT4
+ l->setWordWrap(true);
+#endif
+ l->setAlignment(Qt::AlignTop);
+ layout()->addWidget(l,0,0);
+}
+
+KviGeneralOptionsFrontWidget::~KviGeneralOptionsFrontWidget()
+{
+}
+
+
+
+
+KviOptionsListViewItem::KviOptionsListViewItem(KviTalListView *parent,KviOptionsWidgetInstanceEntry * e)
+:KviTalListViewItem(parent,e->szName)
+{
+ m_pInstanceEntry = e;
+ m_pOptionsWidget = 0;
+ m_bHighlighted = false;
+ setPixmap(0,*(g_pIconManager->getSmallIcon(e->iIcon)));
+}
+
+KviOptionsListViewItem::KviOptionsListViewItem(KviTalListViewItem *parent,KviOptionsWidgetInstanceEntry * e)
+:KviTalListViewItem(parent,e->szName)
+{
+ m_pInstanceEntry = e;
+ m_pOptionsWidget = 0;
+ m_bHighlighted = false;
+ setPixmap(0,*(g_pIconManager->getSmallIcon(e->iIcon)));
+}
+
+KviOptionsListViewItem::~KviOptionsListViewItem()
+{
+}
+
+void KviOptionsListViewItem::paintCell(QPainter * p,const QColorGroup & cg,int column,int width,int align)
+{
+ if(m_bHighlighted)
+ {
+ QColorGroup tmp(cg);
+ tmp.setColor(QColorGroup::Base,Qt::red);
+ tmp.setColor(QColorGroup::Background,Qt::red);
+ tmp.setColor(QColorGroup::Text,Qt::yellow);
+ KviTalListViewItem::paintCell(p,tmp,column,width,align);
+ } else {
+ KviTalListViewItem::paintCell(p,cg,column,width,align);
+ }
+}
+
+
+KviOptionsDialog::KviOptionsDialog(QWidget * par,const QString &szGroup)
+: QDialog(par,"general_options_dialog")
+{
+ setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_KVIRC)));
+
+ m_szGroup = szGroup;
+
+ QString szDialogTitle;
+
+ if(szGroup.isEmpty() || KviQString::equalCI(szGroup,"general"))
+ {
+ szDialogTitle = __tr2qs_ctx("General Preferences","options");
+ } else if(KviQString::equalCI(szGroup,"theme"))
+ {
+ szDialogTitle = __tr2qs_ctx("Theme Preferences","options");
+ } else {
+ szDialogTitle = __tr2qs_ctx("KVIrc Preferences","options");
+ }
+
+ QString szDialog = __tr2qs_ctx("This dialog contains a set of KVIrc settings.<br> Use the icons " \
+ "on the left to navigate through the option pages. The text box in the " \
+ "bottom left corner is a small search engine. It will highlight the " \
+ "pages that contain options related to the search term you have entered.","options");
+
+
+ QString szInfoTips;
+#ifdef COMPILE_INFO_TIPS
+ szInfoTips = __tr2qs_ctx("Many settings have tooltips that can be shown by holding " \
+ "the cursor over their label for a few seconds.","options");
+#else
+ szInfoTips = "";
+#endif
+ QString szOkCancelButtons = __tr2qs_ctx("When you have finished, click \"<b>OK</b>\" to accept your changes " \
+ "or \"<b>Cancel</b>\" to discard them. Clicking \"<b>Apply</b>\" will commit your " \
+ "changes without closing the window.","options");
+
+
+ QString szFrontText = QString(
+ "<table width=\"100%\" height=\"100%\" valign=\"top\" align=\"center\" cellpadding=\"4\">" \
+ "<tr>" \
+ "<td bgcolor=\"#303030\" valign=\"top\">" \
+ "<center><h1><font color=\"#FFFFFF\">%1</font></h1></center>" \
+ "</td>" \
+ "</tr>" \
+ "<tr>" \
+ "<td valign=\"bottom\">" \
+ "<br>" \
+ "<br>" \
+ "<p>" \
+ "%2" \
+ "</p>" \
+ "<br>" \
+ "<p>" \
+ "%3" \
+ "</p>" \
+ "<br>" \
+ "<p>" \
+ "%4" \
+ "</p>" \
+ "</td>" \
+ "</tr>" \
+ "</table>"
+ ).arg(szDialogTitle).arg(szDialog).arg(szInfoTips).arg(szOkCancelButtons);
+
+ QString szCaption = szDialogTitle + " - KVIrc";
+ setCaption(szCaption);
+
+ QGridLayout * g1 = new QGridLayout(this,2,5,8,8);
+ QSplitter * spl = new QSplitter(Qt::Horizontal,this);
+
+ g1->addMultiCellWidget(spl,0,0,0,4);
+
+ KviTalVBox * vbox = new KviTalVBox(spl);
+ vbox->setSpacing(2);
+ vbox->setMargin(0);
+
+ // Controlling list view
+ m_pListView = new KviTalListView(vbox);
+ m_pListView->addColumn("");
+ m_pListView->header()->hide();
+ m_pListView->setRootIsDecorated(true);
+ m_pListView->setSorting(-1);
+ connect(m_pListView,SIGNAL(selectionChanged(KviTalListViewItem *)),this,SLOT(listViewItemSelectionChanged(KviTalListViewItem *)));
+
+ KviTalHBox * hbox = new KviTalHBox(vbox);
+ vbox->setSpacing(2);
+ vbox->setMargin(0);
+
+ m_pSearchLineEdit = new QLineEdit(hbox);
+ connect(m_pSearchLineEdit,SIGNAL(returnPressed()),this,SLOT(searchClicked()));
+ m_pSearchButton = new KviStyledToolButton(hbox);
+ m_pSearchButton->setUsesBigPixmap(false);
+ m_pSearchButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SEARCH)));
+ connect(m_pSearchButton,SIGNAL(clicked()),this,SLOT(searchClicked()));
+ connect(m_pSearchLineEdit,SIGNAL(textChanged(const QString &)),this,SLOT(searchLineEditTextChanged(const QString &)));
+
+#ifdef COMPILE_INFO_TIPS
+ QString szTip = __tr2qs_ctx("<p>This is the search tool for this options dialog.</p>" \
+ "<p>You can enter a search term either in your native " \
+ "language or in english and press the button on the right. " \
+ "The pages that contain some options related to the " \
+ "search term will be highlighted and you will be able " \
+ "to quickly find them.</p><p>Try \"nickname\" for example.</p>","options");
+ KviTalToolTip::add(m_pSearchLineEdit,szTip);
+ KviTalToolTip::add(m_pSearchButton,szTip);
+#endif
+
+ vbox = new KviTalVBox(spl);
+ vbox->setSpacing(2);
+ vbox->setMargin(0);
+
+ m_pCategoryLabel = new QLabel("<b>&nbsp;</b>",vbox,"labgeneraloptions");
+ //m_pCategoryLabel->setMargin(3);
+
+ QFrame * f = new QFrame(vbox);
+ f->setFrameStyle(QFrame::HLine | QFrame::Sunken);
+
+ // Widget stack
+ m_pWidgetStack = new KviTalWidgetStack(vbox);
+ vbox->setStretchFactor(m_pWidgetStack,1);
+
+ // First widget visible
+ m_pFrontWidget = new KviGeneralOptionsFrontWidget(m_pWidgetStack,szFrontText);
+ m_pWidgetStack->addWidget(m_pFrontWidget,0);
+ m_pWidgetStack->raiseWidget(m_pFrontWidget);
+
+// Ok,Cancel,Help
+
+ QPushButton * b = new QPushButton(__tr2qs_ctx("&OK","options"),this,"btnok");
+ KviTalToolTip::add(b,__tr2qs_ctx("Close this dialog, accepting all changes.","options"));
+ connect(b,SIGNAL(clicked()),this,SLOT(okClicked()));
+ //b->setMinimumWidth(whatIsThisWidth);
+ b->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT)));
+ g1->addWidget(b,1,2);
+
+ b = new QPushButton(__tr2qs_ctx("&Apply","options"),this,"btnapply");
+ KviTalToolTip::add(b,__tr2qs_ctx("Commit all changes immediately.","options"));
+ connect(b,SIGNAL(clicked()),this,SLOT(applyClicked()));
+ b->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT)));
+ g1->addWidget(b,1,3);
+
+ b = new QPushButton(__tr2qs_ctx("Cancel","options"),this,"btncancel");
+ KviTalToolTip::add(b,__tr2qs_ctx("Close this dialog, discarding all changes.","options"));
+ b->setDefault(true);
+ //b->setMinimumWidth(whatIsThisWidth);
+ connect(b,SIGNAL(clicked()),this,SLOT(cancelClicked()));
+ b->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD)));
+ g1->addWidget(b,1,4);
+
+ g1->setRowStretch(0,1);
+ g1->setColStretch(1,1);
+
+
+ fillListView(0,g_pOptionsInstanceManager->instanceEntryTree(),szGroup);
+
+ if(!parent())
+ {
+
+ if(KVI_OPTION_RECT(KviOption_rectGeneralOptionsDialogGeometry).y() < 5)
+ {
+ KVI_OPTION_RECT(KviOption_rectGeneralOptionsDialogGeometry).setY(5);
+ }
+ //setGeometry(KVI_OPTION_RECT(KviOption_rectGeneralOptionsDialogGeometry));
+ resize(KVI_OPTION_RECT(KviOption_rectGeneralOptionsDialogGeometry).width(),
+ KVI_OPTION_RECT(KviOption_rectGeneralOptionsDialogGeometry).height());
+ move(KVI_OPTION_RECT(KviOption_rectGeneralOptionsDialogGeometry).x(),
+ KVI_OPTION_RECT(KviOption_rectGeneralOptionsDialogGeometry).y());
+ }
+
+ KviAccel *a = new KviAccel( this );
+ a->connectItem( a->insertItem(Qt::Key_Escape), this,SLOT(close()) );
+
+}
+
+KviOptionsDialog::~KviOptionsDialog()
+{
+ if(!parent())KVI_OPTION_RECT(KviOption_rectGeneralOptionsDialogGeometry) = QRect(pos().x(),pos().y(),
+ size().width(),size().height());
+ if(g_pOptionsDialogDict)
+ g_pOptionsDialogDict->remove(m_szGroup);
+}
+
+
+void KviOptionsDialog::searchLineEditTextChanged(const QString &)
+{
+ QString txt = m_pSearchLineEdit->text().stripWhiteSpace();
+ m_pSearchButton->setEnabled(txt.length() > 0);
+}
+
+bool KviOptionsDialog::recursiveSearch(KviOptionsListViewItem * pItem,const QStringList &lKeywords)
+{
+ //debug("recursive search:");
+ if(!pItem)return false;
+
+ if(!pItem->m_pOptionsWidget)
+ {
+ pItem->m_pOptionsWidget = g_pOptionsInstanceManager->getInstance(pItem->m_pInstanceEntry,m_pWidgetStack);
+ m_pWidgetStack->addWidget(pItem->m_pOptionsWidget,0);
+ }
+
+ bool bFoundSomethingHere = false;
+ KviPointerHashTable<void *,bool> lOptionWidgetsToMark;
+ lOptionWidgetsToMark.setAutoDelete(true);
+ QTabWidget * pTabWidgetToMark = 0;
+
+ QObject * o;
+#ifdef COMPILE_USE_QT4
+ QObjectList ol = pItem->m_pOptionsWidget->queryList();
+ if(ol.count() > 0)
+ {
+ for(QObjectList::Iterator it = ol.begin();it != ol.end();++it)
+ {
+ o = *it;
+#else
+ QObjectList * ol = pItem->m_pOptionsWidget->queryList();
+ if(ol)
+ {
+ QObjectListIt it(*ol);
+ while((o = it.current())/* && (!bFoundSomethingHere)*/)
+ {
+#endif
+ QString szText;
+ if(o->inherits("QLabel"))szText = ((QLabel *)o)->text();
+ else if(o->inherits("QCheckBox"))szText = ((QCheckBox *)o)->text();
+ else if(o->inherits("KviTalGroupBox"))szText = ((KviTalGroupBox *)o)->title();
+#ifdef COMPILE_INFO_TIPS
+ if(o->inherits("QWidget"))
+#ifdef COMPILE_USE_QT4
+ szText.append(((QWidget *)o)->toolTip());
+#else
+ szText.append(QToolTip::textFor((QWidget*)o));
+#endif
+#endif
+ if(!szText.isEmpty())
+ {
+ bool bOk = true;
+ for(int j=0;j<lKeywords.count();j++)
+ {
+#ifdef COMPILE_USE_QT4
+ if(szText.find(lKeywords.at(j),0,false) == -1)
+#else
+ if(szText.find(*(lKeywords.at(j)),0,false) == -1)
+#endif
+ {
+ bOk = false;
+ break;
+ }
+ }
+ if(bOk)
+ {
+ bFoundSomethingHere = true;
+ }
+
+ if(o->inherits("QWidget"))
+ {
+ QWidget* pWidget=(QWidget*)o;
+ QFont font = pWidget->font();
+ font.setBold(bOk);
+ font.setUnderline(bOk);
+ pWidget->setFont(font);
+
+ // if there is a QTabWidget in the parent chain, signal it in the tab text
+ QObject * pParent = pWidget->parent();
+ while(pParent)
+ {
+ if(pParent->inherits("QTabWidget"))
+ {
+ pTabWidgetToMark = (QTabWidget *)pParent;
+ break;
+ }
+ pParent = pParent->parent();
+ }
+
+ if(pTabWidgetToMark)
+ {
+ // lookup the KviOptionsWidget parent
+ pParent = pWidget->parent();
+ while(pParent)
+ {
+ if(pParent->inherits("KviOptionsWidget"))
+ {
+ bool * pExistingBool = lOptionWidgetsToMark.find(pParent);
+ if(pExistingBool)
+ {
+ if(bOk)
+ *pExistingBool = true;
+ } else {
+ lOptionWidgetsToMark.insert(pParent,new bool(bOk));
+ }
+ break;
+ }
+ pParent = pParent->parent();
+ }
+ }
+ }
+ }
+
+#ifndef COMPILE_USE_QT4
+ ++it;
+#endif
+ }
+#ifndef COMPILE_USE_QT4
+ delete ol;
+#endif
+ }
+
+ if(pTabWidgetToMark)
+ {
+ KviPointerHashTableIterator<void *,bool> it(lOptionWidgetsToMark);
+ while(bool * pBool = it.current())
+ {
+ KviOptionsWidget * pOptionsWidget = (KviOptionsWidget *)it.currentKey();
+ QString szTxt = pTabWidgetToMark->tabLabel(pOptionsWidget);
+ if(KviQString::equalCIN(szTxt,">>> ",4))
+ {
+ szTxt.replace(">>> ","");
+ szTxt.replace(" <<<","");
+ }
+ if(*pBool)
+ {
+ szTxt.insert(0,">>> ");
+ szTxt += QString(" <<<");
+ }
+ pTabWidgetToMark->setTabLabel(pOptionsWidget,szTxt);
+ ++it;
+ }
+ }
+
+ pItem->setHighlighted(bFoundSomethingHere);
+
+ KviOptionsListViewItem * pChild = (KviOptionsListViewItem *)pItem->firstChild();
+ bool bFoundSomethingInside = false;
+ while(pChild)
+ {
+ bool bRet = recursiveSearch(pChild,lKeywords);
+ if(bRet)bFoundSomethingInside = true;
+ pChild = (KviOptionsListViewItem *)(pChild->nextSibling());
+ }
+ pItem->setSelected(false);
+ m_pListView->setOpen(pItem,bFoundSomethingInside);
+ return (bFoundSomethingInside || bFoundSomethingHere);
+}
+
+void KviOptionsDialog::search(const QStringList &lKeywords)
+{
+ m_pListView->setUpdatesEnabled(false);
+
+ KviOptionsListViewItem * pChild = (KviOptionsListViewItem *)(m_pListView->firstChild());
+ bool bFoundSomethingInside = false;
+ while(pChild)
+ {
+ bFoundSomethingInside = recursiveSearch(pChild,lKeywords);
+ pChild = (KviOptionsListViewItem *)(pChild->nextSibling());
+ }
+ m_pListView->setUpdatesEnabled(true);
+ m_pListView->triggerUpdate();
+}
+
+void KviOptionsDialog::search(const QString &szKeywords)
+{
+ QStringList lKeywords = QStringList::split(" ",szKeywords,false);
+ search(lKeywords);
+}
+
+void KviOptionsDialog::searchClicked()
+{
+ QString szTxt = m_pSearchLineEdit->text().stripWhiteSpace();
+ if(!szTxt.isEmpty())
+ search(szTxt);
+}
+
+void KviOptionsDialog::fillListView(KviTalListViewItem * p,KviPointerList<KviOptionsWidgetInstanceEntry> * l,const QString &szGroup,bool bNotContainedOnly)
+{
+ if(!l)return;
+
+ KviOptionsListViewItem * it;
+ KviOptionsWidgetInstanceEntry * e;
+
+ KviPointerList<KviOptionsWidgetInstanceEntry> tmp;
+ tmp.setAutoDelete(false);
+
+
+ for(e = l->first();e;e = l->next())
+ {
+ // must be in the correct group
+ // if we want only containers then well.. must be one
+ e->bDoInsert = KviQString::equalCI(szGroup,e->szGroup) && ((!bNotContainedOnly) || e->bIsContainer || e->bIsNotContained);
+ KviOptionsWidgetInstanceEntry * ee = tmp.first();
+ int idx = 0;
+ while(ee)
+ {
+ if(ee->iPriority >= e->iPriority)break;
+ idx++;
+ ee = tmp.next();
+ }
+ tmp.insert(idx,e);
+ }
+
+ for(e = tmp.first();e;e = tmp.next())
+ {
+ if(e->bDoInsert)
+ {
+ if(p)it = new KviOptionsListViewItem(p,e);
+ else it = new KviOptionsListViewItem(m_pListView,e);
+ if(!it->m_pOptionsWidget)
+ {
+ it->m_pOptionsWidget = g_pOptionsInstanceManager->getInstance(it->m_pInstanceEntry,m_pWidgetStack);
+ m_pWidgetStack->addWidget(it->m_pOptionsWidget,0);
+ }
+ } else {
+ it = (KviOptionsListViewItem *)p;
+ }
+
+ if(e->pChildList)
+ {
+ if(e->bIsContainer)
+ {
+ // it's a container: add only eventual not contained children (containers or explicitly marked as not contained)
+ fillListView(it,e->pChildList,szGroup,true);
+ } else {
+ // it's not a container, add any children
+ fillListView(it,e->pChildList,szGroup,false);
+ }
+ }
+ }
+}
+
+void KviOptionsDialog::listViewItemSelectionChanged(KviTalListViewItem *it)
+{
+ if(it)
+ {
+ QString str = it->text(0);
+ KviTalListViewItem * par = it->parent();
+
+ while(par)
+ {
+ str.prepend(" :: ");
+ str.prepend(par->text(0));
+ par = par->parent();
+ }
+ str.prepend("<b>");
+ str += "</b>";
+
+ KviOptionsListViewItem *i = (KviOptionsListViewItem *)it;
+ if(!i->m_pOptionsWidget)
+ {
+ i->m_pOptionsWidget = g_pOptionsInstanceManager->getInstance(i->m_pInstanceEntry,m_pWidgetStack);
+ m_pWidgetStack->addWidget(i->m_pOptionsWidget,0);
+ }
+
+ m_pWidgetStack->raiseWidget(i->m_pOptionsWidget);
+ m_pCategoryLabel->setText(str);
+ }
+}
+
+KviOptionsListViewItem * KviOptionsDialog::findItemByPage(KviOptionsListViewItem *it,KviOptionsWidget * pPage)
+{
+ if(!it)return 0;
+ if(it->m_pOptionsWidget == pPage)return it;
+
+ KviOptionsListViewItem *i;
+ // run through the children
+ i = (KviOptionsListViewItem *)(it->firstChild());
+ if(i)
+ {
+ i = findItemByPage(i,pPage);
+ if(i)return i;
+ }
+
+ // not found in the children tree.. look in the next sibling
+ i = (KviOptionsListViewItem *)(it->nextSibling());
+ if(i)
+ {
+ i = findItemByPage(i,pPage);
+ if(i)return i;
+ }
+ return 0;
+}
+
+
+void KviOptionsDialog::pageWantsToSwitchToAdvancedPage(KviOptionsWidget * pPage)
+{
+ // unused
+}
+
+void KviOptionsDialog::applyClicked()
+{
+ apply(false);
+}
+
+void KviOptionsDialog::apply(bool bDialogAboutToClose)
+{
+
+ KviOptionsListViewItem *it = (KviOptionsListViewItem *)m_pListView->firstChild();
+ while(it)
+ {
+ recursiveCommit(it);
+ it = (KviOptionsListViewItem *)it->nextSibling();
+ }
+
+ if(!bDialogAboutToClose)
+ {
+ // bring up the current widget again!
+ it = (KviOptionsListViewItem *)m_pListView->currentItem();
+ if(it)listViewItemSelectionChanged(it);
+ }
+
+ g_pApp->saveConfiguration();
+
+}
+
+void KviOptionsDialog::okClicked()
+{
+ apply(true);
+ delete this;
+}
+
+void KviOptionsDialog::cancelClicked()
+{
+ delete this;
+}
+
+void KviOptionsDialog::closeEvent(QCloseEvent *e)
+{
+ e->ignore();
+ delete this;
+}
+
+void KviOptionsDialog::recursiveCommit(KviOptionsListViewItem *it)
+{
+ // First commit the children
+ if(!it) return;
+ KviOptionsListViewItem *it2 = (KviOptionsListViewItem *)it->firstChild();
+ while(it2)
+ {
+ recursiveCommit(it2);
+ it2 = (KviOptionsListViewItem *)it2->nextSibling();
+ }
+ // then the parents
+ if(it->m_pOptionsWidget)
+ {
+ it->m_pOptionsWidget->commit();
+ delete it->m_pOptionsWidget;
+ it->m_pOptionsWidget = 0;
+ }
+ //refreshListView(); // <-- this tends to jump into infinite recursion
+}
+void KviOptionsDialog::keyPressEvent( QKeyEvent * e )
+{
+ if(e->key()==Qt::Key_Return)
+ e->accept();
+ else
+ e->ignore();
+}
+
+#include "m_dialog.moc"
diff --git a/src/modules/options/dialog.h b/src/modules/options/dialog.h
new file mode 100644
index 00000000..b342ca51
--- /dev/null
+++ b/src/modules/options/dialog.h
@@ -0,0 +1,104 @@
+#ifndef _DIALOG_H_
+#define _DIALOG_H_
+//=============================================================================
+//
+// File : dialog.h
+// Created on Fri 10 Feb 2006 18:52:18 by Szymon Stefanek
+// Based on dlg_options.h: Tue Jun 11 2000 02:39:12 by Szymon Stefanek
+//
+// This file is part of the KVIrc IRC Client distribution
+// Copyright (C) 2000-2006 Szymon Stefanek <pragma at kvirc dot net>
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+
+#include <qdialog.h>
+#include "kvi_tal_listview.h"
+#include <qstringlist.h>
+#include "kvi_optionswidget.h"
+
+#include "instances.h"
+
+class QLabel;
+class KviTalWidgetStack;
+class QPushButton;
+class QLineEdit;
+class QToolButton;
+
+class KviGeneralOptionsFrontWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviGeneralOptionsFrontWidget(QWidget *parent,const QString &szText);
+ ~KviGeneralOptionsFrontWidget();
+};
+
+class KviOptionsListViewItem : public KviTalListViewItem
+{
+public:
+ KviOptionsListViewItem(KviTalListView *parent,KviOptionsWidgetInstanceEntry * e);
+ KviOptionsListViewItem(KviTalListViewItem *parent,KviOptionsWidgetInstanceEntry * e);
+ ~KviOptionsListViewItem();
+public:
+ KviOptionsWidgetInstanceEntry * m_pInstanceEntry;
+ KviOptionsWidget * m_pOptionsWidget;
+ bool m_bHighlighted;
+public:
+ void setHighlighted(bool b){ m_bHighlighted = b; };
+protected:
+ virtual void paintCell(QPainter * p,const QColorGroup & cg,int column,int width,int align);
+};
+
+class KviOptionsDialog : public QDialog
+{
+ Q_OBJECT
+public:
+ KviOptionsDialog(QWidget * par,const QString &szGroup);
+ ~KviOptionsDialog();
+private:
+ KviTalListView * m_pListView;
+ QLabel * m_pCategoryLabel;
+ KviTalWidgetStack * m_pWidgetStack;
+ KviGeneralOptionsFrontWidget* m_pFrontWidget;
+ QString m_szGroup;
+ QLineEdit * m_pSearchLineEdit;
+ QToolButton * m_pSearchButton;
+private:
+ void recursiveCommit(KviOptionsListViewItem *it);
+ void fillListView(KviTalListViewItem * p,KviPointerList<KviOptionsWidgetInstanceEntry> * l,const QString &szGroup,bool bNotContainedOnly = false);
+ //KviOptionsListViewItem * showHiddenChildren(KviTalListViewItem * p,KviPointerList<KviOptionsWidgetInstanceEntry> * l);
+ KviOptionsListViewItem * findItemByPage(KviOptionsListViewItem *it,KviOptionsWidget * pPage);
+private slots:
+ void listViewItemSelectionChanged(KviTalListViewItem *it);
+ void applyClicked();
+ void okClicked();
+ void cancelClicked();
+ void pageWantsToSwitchToAdvancedPage(KviOptionsWidget * pPage);
+ void searchClicked();
+ void searchLineEditTextChanged(const QString &);
+protected:
+ void apply(bool bDialogAboutToClose);
+ virtual void closeEvent(QCloseEvent *e);
+ virtual void keyPressEvent( QKeyEvent * e );
+ bool recursiveSearch(KviOptionsListViewItem * pItem,const QStringList &lKeywords);
+public:
+ void search(const QString &szKeywords);
+ void search(const QStringList &lKeywords);
+};
+
+
+#endif //!_DIALOG_H_
diff --git a/src/modules/options/instances.cpp b/src/modules/options/instances.cpp
new file mode 100644
index 00000000..aa23e7be
--- /dev/null
+++ b/src/modules/options/instances.cpp
@@ -0,0 +1,3590 @@
+
+
+//
+// File : instances.cpp
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek ([email protected])
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+//
+// Instance creation routines for the KVIrc options module
+// DO NOT EDIT THIS FILE!! ALL CHANGES WILL BE LOST!!
+// This file is automatically generated by mkcreateinstanceproc.sh
+// so any change should go in that script
+//
+
+#include "optw_antispam.h"
+#include "optw_avatar.h"
+#include "optw_away.h"
+#include "optw_connection.h"
+#include "optw_ctcp.h"
+#include "optw_ctcpfloodprotection.h"
+#include "optw_dcc.h"
+#include "optw_generalopt.h"
+#include "optw_highlighting.h"
+#include "optw_ident.h"
+#include "optw_identity.h"
+#include "optw_ignore.h"
+#include "optw_input.h"
+#include "optw_interfacefeatures.h"
+#include "optw_interfacelookglobal.h"
+#include "optw_irc.h"
+#include "optw_ircoutput.h"
+#include "optw_ircview.h"
+#include "optw_lag.h"
+#include "optw_logging.h"
+#include "optw_mediatypes.h"
+#include "optw_messages.h"
+#include "optw_nickserv.h"
+#include "optw_notify.h"
+#include "optw_protection.h"
+#include "optw_proxy.h"
+#include "optw_query.h"
+#include "optw_servers.h"
+#include "optw_sound.h"
+#include "optw_ssl.h"
+#include "optw_taskbar.h"
+#include "optw_textencoding.h"
+#include "optw_texticons.h"
+#include "optw_theme.h"
+#include "optw_tools.h"
+#include "optw_topiclabel.h"
+#include "optw_transport.h"
+#include "optw_tray.h"
+#include "optw_uparser.h"
+#include "optw_urlhandlers.h"
+#include "optw_userlist.h"
+
+#include "kvi_locale.h"
+#include "kvi_iconmanager.h"
+#include "instances.h"
+
+int g_iOptionWidgetInstances = 0;
+
+KviOptionsWidget * classKviAntispamOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviAntispamOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviAvatarAdvancedOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviAvatarAdvancedOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviAwayOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviAwayOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviConnectionOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviConnectionOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviConnectionAdvancedOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviConnectionAdvancedOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviSSLOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviSSLOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviTransportOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviTransportOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviIdentOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviIdentOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviCtcpOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviCtcpOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviCtcpFloodProtectionOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviCtcpFloodProtectionOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviDccOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviDccOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviDccGeneralOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviDccGeneralOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviDccAdvancedOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviDccAdvancedOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviDccSendOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviDccSendOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviDccSendGeneralOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviDccSendGeneralOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviDccSendAdvancedOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviDccSendAdvancedOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviDccChatOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviDccChatOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviDccVoiceOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviDccVoiceOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviGeneralOptOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviGeneralOptOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviAlertHighlightingOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviAlertHighlightingOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviHighlightingOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviHighlightingOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviAlertOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviAlertOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviIdentityOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviIdentityOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviIdentityGeneralOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviIdentityGeneralOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviIdentityAvatarOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviIdentityAvatarOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviIdentityAdvancedOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviIdentityAdvancedOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviIgnoreOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviIgnoreOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviInputLookOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviInputLookOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviInputFeaturesOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviInputFeaturesOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviInterfaceFeaturesOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviInterfaceFeaturesOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviThemeGeneralOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviThemeGeneralOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviThemeTransparencyOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviThemeTransparencyOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviThemeMdiCaptionsOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviThemeMdiCaptionsOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviThemeMdiAreaOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviThemeMdiAreaOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviThemeToolBarAppletsOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviThemeToolBarAppletsOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviIrcOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviIrcOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviIrcGeneralOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviIrcGeneralOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviIrcAdvancedOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviIrcAdvancedOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviChannelOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviChannelOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviChannelGeneralOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviChannelGeneralOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviChannelAdvancedOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviChannelAdvancedOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviIrcOutputOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviIrcOutputOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviIrcViewThemeOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviIrcViewThemeOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviIrcViewLookOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviIrcViewLookOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviIrcViewFeaturesOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviIrcViewFeaturesOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviLagOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviLagOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviLoggingOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviLoggingOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviMediaTypesOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviMediaTypesOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviMessageOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviMessageOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviPrivmsgOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviPrivmsgOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviTimestampOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviTimestampOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviMessageColorsOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviMessageColorsOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviStandardColorsOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviStandardColorsOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviNickServOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviNickServOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviNotifyOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviNotifyOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviNotifierOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviNotifierOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviProtectionOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviProtectionOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviProxyOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviProxyOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviQueryOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviQueryOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviServerOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviServerOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviSoundOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviSoundOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviSoundGeneralOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviSoundGeneralOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviSoundsOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviSoundsOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviTaskBarOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviTaskBarOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviTreeTaskBarOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviTreeTaskBarOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviTreeTaskBarForegroundOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviTreeTaskBarForegroundOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviTreeTaskBarBackgroundOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviTreeTaskBarBackgroundOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviTreeTaskBarFeaturesOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviTreeTaskBarFeaturesOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviClassicTaskBarOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviClassicTaskBarOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviTextEncodingOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviTextEncodingOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviTextIconsOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviTextIconsOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviToolsOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviToolsOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviTopicLabelLookOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviTopicLabelLookOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviTrayOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviTrayOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviUParserOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviUParserOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviUrlHandlersOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviUrlHandlersOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviUserListLookOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviUserListLookOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviUserListLookBackgroundOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviUserListLookBackgroundOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviUserListLookForegroundOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviUserListLookForegroundOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviUserListGridOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviUserListGridOptionsWidget(parent);
+}
+
+KviOptionsWidget * classKviUserListFeaturesOptionsWidget_createInstanceProc(QWidget * parent)
+{
+ return new KviUserListFeaturesOptionsWidget(parent);
+}
+
+
+
+static const char * g_szName_KviAntispamOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviAntispamOptionsWidget;
+static const char * g_szClassName_KviAntispamOptionsWidget = "KviAntispamOptionsWidget";
+static const char * g_szName_KviAvatarAdvancedOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviAvatarAdvancedOptionsWidget;
+static const char * g_szClassName_KviAvatarAdvancedOptionsWidget = "KviAvatarAdvancedOptionsWidget";
+static const char * g_szName_KviAwayOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviAwayOptionsWidget;
+static const char * g_szClassName_KviAwayOptionsWidget = "KviAwayOptionsWidget";
+static const char * g_szName_KviConnectionOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviConnectionOptionsWidget;
+static const char * g_szClassName_KviConnectionOptionsWidget = "KviConnectionOptionsWidget";
+static const char * g_szName_KviConnectionAdvancedOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviConnectionAdvancedOptionsWidget;
+static const char * g_szClassName_KviConnectionAdvancedOptionsWidget = "KviConnectionAdvancedOptionsWidget";
+static const char * g_szName_KviSSLOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviSSLOptionsWidget;
+static const char * g_szClassName_KviSSLOptionsWidget = "KviSSLOptionsWidget";
+static const char * g_szName_KviTransportOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviTransportOptionsWidget;
+static const char * g_szClassName_KviTransportOptionsWidget = "KviTransportOptionsWidget";
+static const char * g_szName_KviIdentOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviIdentOptionsWidget;
+static const char * g_szClassName_KviIdentOptionsWidget = "KviIdentOptionsWidget";
+static const char * g_szName_KviCtcpOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviCtcpOptionsWidget;
+static const char * g_szClassName_KviCtcpOptionsWidget = "KviCtcpOptionsWidget";
+static const char * g_szName_KviCtcpFloodProtectionOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviCtcpFloodProtectionOptionsWidget;
+static const char * g_szClassName_KviCtcpFloodProtectionOptionsWidget = "KviCtcpFloodProtectionOptionsWidget";
+static const char * g_szName_KviDccOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviDccOptionsWidget;
+static const char * g_szClassName_KviDccOptionsWidget = "KviDccOptionsWidget";
+static const char * g_szName_KviDccGeneralOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviDccGeneralOptionsWidget;
+static const char * g_szClassName_KviDccGeneralOptionsWidget = "KviDccGeneralOptionsWidget";
+static const char * g_szName_KviDccAdvancedOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviDccAdvancedOptionsWidget;
+static const char * g_szClassName_KviDccAdvancedOptionsWidget = "KviDccAdvancedOptionsWidget";
+static const char * g_szName_KviDccSendOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviDccSendOptionsWidget;
+static const char * g_szClassName_KviDccSendOptionsWidget = "KviDccSendOptionsWidget";
+static const char * g_szName_KviDccSendGeneralOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviDccSendGeneralOptionsWidget;
+static const char * g_szClassName_KviDccSendGeneralOptionsWidget = "KviDccSendGeneralOptionsWidget";
+static const char * g_szName_KviDccSendAdvancedOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviDccSendAdvancedOptionsWidget;
+static const char * g_szClassName_KviDccSendAdvancedOptionsWidget = "KviDccSendAdvancedOptionsWidget";
+static const char * g_szName_KviDccChatOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviDccChatOptionsWidget;
+static const char * g_szClassName_KviDccChatOptionsWidget = "KviDccChatOptionsWidget";
+static const char * g_szName_KviDccVoiceOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviDccVoiceOptionsWidget;
+static const char * g_szClassName_KviDccVoiceOptionsWidget = "KviDccVoiceOptionsWidget";
+static const char * g_szName_KviGeneralOptOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviGeneralOptOptionsWidget;
+static const char * g_szClassName_KviGeneralOptOptionsWidget = "KviGeneralOptOptionsWidget";
+static const char * g_szName_KviAlertHighlightingOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviAlertHighlightingOptionsWidget;
+static const char * g_szClassName_KviAlertHighlightingOptionsWidget = "KviAlertHighlightingOptionsWidget";
+static const char * g_szName_KviHighlightingOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviHighlightingOptionsWidget;
+static const char * g_szClassName_KviHighlightingOptionsWidget = "KviHighlightingOptionsWidget";
+static const char * g_szName_KviAlertOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviAlertOptionsWidget;
+static const char * g_szClassName_KviAlertOptionsWidget = "KviAlertOptionsWidget";
+static const char * g_szName_KviIdentityOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviIdentityOptionsWidget;
+static const char * g_szClassName_KviIdentityOptionsWidget = "KviIdentityOptionsWidget";
+static const char * g_szName_KviIdentityGeneralOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviIdentityGeneralOptionsWidget;
+static const char * g_szClassName_KviIdentityGeneralOptionsWidget = "KviIdentityGeneralOptionsWidget";
+static const char * g_szName_KviIdentityAvatarOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviIdentityAvatarOptionsWidget;
+static const char * g_szClassName_KviIdentityAvatarOptionsWidget = "KviIdentityAvatarOptionsWidget";
+static const char * g_szName_KviIdentityAdvancedOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviIdentityAdvancedOptionsWidget;
+static const char * g_szClassName_KviIdentityAdvancedOptionsWidget = "KviIdentityAdvancedOptionsWidget";
+static const char * g_szName_KviIgnoreOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviIgnoreOptionsWidget;
+static const char * g_szClassName_KviIgnoreOptionsWidget = "KviIgnoreOptionsWidget";
+static const char * g_szName_KviInputLookOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviInputLookOptionsWidget;
+static const char * g_szClassName_KviInputLookOptionsWidget = "KviInputLookOptionsWidget";
+static const char * g_szName_KviInputFeaturesOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviInputFeaturesOptionsWidget;
+static const char * g_szClassName_KviInputFeaturesOptionsWidget = "KviInputFeaturesOptionsWidget";
+static const char * g_szName_KviInterfaceFeaturesOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviInterfaceFeaturesOptionsWidget;
+static const char * g_szClassName_KviInterfaceFeaturesOptionsWidget = "KviInterfaceFeaturesOptionsWidget";
+static const char * g_szName_KviThemeGeneralOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviThemeGeneralOptionsWidget;
+static const char * g_szClassName_KviThemeGeneralOptionsWidget = "KviThemeGeneralOptionsWidget";
+static const char * g_szName_KviThemeTransparencyOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviThemeTransparencyOptionsWidget;
+static const char * g_szClassName_KviThemeTransparencyOptionsWidget = "KviThemeTransparencyOptionsWidget";
+static const char * g_szName_KviThemeMdiCaptionsOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviThemeMdiCaptionsOptionsWidget;
+static const char * g_szClassName_KviThemeMdiCaptionsOptionsWidget = "KviThemeMdiCaptionsOptionsWidget";
+static const char * g_szName_KviThemeMdiAreaOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviThemeMdiAreaOptionsWidget;
+static const char * g_szClassName_KviThemeMdiAreaOptionsWidget = "KviThemeMdiAreaOptionsWidget";
+static const char * g_szName_KviThemeToolBarAppletsOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviThemeToolBarAppletsOptionsWidget;
+static const char * g_szClassName_KviThemeToolBarAppletsOptionsWidget = "KviThemeToolBarAppletsOptionsWidget";
+static const char * g_szName_KviIrcOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviIrcOptionsWidget;
+static const char * g_szClassName_KviIrcOptionsWidget = "KviIrcOptionsWidget";
+static const char * g_szName_KviIrcGeneralOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviIrcGeneralOptionsWidget;
+static const char * g_szClassName_KviIrcGeneralOptionsWidget = "KviIrcGeneralOptionsWidget";
+static const char * g_szName_KviIrcAdvancedOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviIrcAdvancedOptionsWidget;
+static const char * g_szClassName_KviIrcAdvancedOptionsWidget = "KviIrcAdvancedOptionsWidget";
+static const char * g_szName_KviChannelOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviChannelOptionsWidget;
+static const char * g_szClassName_KviChannelOptionsWidget = "KviChannelOptionsWidget";
+static const char * g_szName_KviChannelGeneralOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviChannelGeneralOptionsWidget;
+static const char * g_szClassName_KviChannelGeneralOptionsWidget = "KviChannelGeneralOptionsWidget";
+static const char * g_szName_KviChannelAdvancedOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviChannelAdvancedOptionsWidget;
+static const char * g_szClassName_KviChannelAdvancedOptionsWidget = "KviChannelAdvancedOptionsWidget";
+static const char * g_szName_KviIrcOutputOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviIrcOutputOptionsWidget;
+static const char * g_szClassName_KviIrcOutputOptionsWidget = "KviIrcOutputOptionsWidget";
+static const char * g_szName_KviIrcViewThemeOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviIrcViewThemeOptionsWidget;
+static const char * g_szClassName_KviIrcViewThemeOptionsWidget = "KviIrcViewThemeOptionsWidget";
+static const char * g_szName_KviIrcViewLookOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviIrcViewLookOptionsWidget;
+static const char * g_szClassName_KviIrcViewLookOptionsWidget = "KviIrcViewLookOptionsWidget";
+static const char * g_szName_KviIrcViewFeaturesOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviIrcViewFeaturesOptionsWidget;
+static const char * g_szClassName_KviIrcViewFeaturesOptionsWidget = "KviIrcViewFeaturesOptionsWidget";
+static const char * g_szName_KviLagOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviLagOptionsWidget;
+static const char * g_szClassName_KviLagOptionsWidget = "KviLagOptionsWidget";
+static const char * g_szName_KviLoggingOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviLoggingOptionsWidget;
+static const char * g_szClassName_KviLoggingOptionsWidget = "KviLoggingOptionsWidget";
+static const char * g_szName_KviMediaTypesOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviMediaTypesOptionsWidget;
+static const char * g_szClassName_KviMediaTypesOptionsWidget = "KviMediaTypesOptionsWidget";
+static const char * g_szName_KviMessageOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviMessageOptionsWidget;
+static const char * g_szClassName_KviMessageOptionsWidget = "KviMessageOptionsWidget";
+static const char * g_szName_KviPrivmsgOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviPrivmsgOptionsWidget;
+static const char * g_szClassName_KviPrivmsgOptionsWidget = "KviPrivmsgOptionsWidget";
+static const char * g_szName_KviTimestampOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviTimestampOptionsWidget;
+static const char * g_szClassName_KviTimestampOptionsWidget = "KviTimestampOptionsWidget";
+static const char * g_szName_KviMessageColorsOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviMessageColorsOptionsWidget;
+static const char * g_szClassName_KviMessageColorsOptionsWidget = "KviMessageColorsOptionsWidget";
+static const char * g_szName_KviStandardColorsOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviStandardColorsOptionsWidget;
+static const char * g_szClassName_KviStandardColorsOptionsWidget = "KviStandardColorsOptionsWidget";
+static const char * g_szName_KviNickServOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviNickServOptionsWidget;
+static const char * g_szClassName_KviNickServOptionsWidget = "KviNickServOptionsWidget";
+static const char * g_szName_KviNotifyOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviNotifyOptionsWidget;
+static const char * g_szClassName_KviNotifyOptionsWidget = "KviNotifyOptionsWidget";
+static const char * g_szName_KviNotifierOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviNotifierOptionsWidget;
+static const char * g_szClassName_KviNotifierOptionsWidget = "KviNotifierOptionsWidget";
+static const char * g_szName_KviProtectionOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviProtectionOptionsWidget;
+static const char * g_szClassName_KviProtectionOptionsWidget = "KviProtectionOptionsWidget";
+static const char * g_szName_KviProxyOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviProxyOptionsWidget;
+static const char * g_szClassName_KviProxyOptionsWidget = "KviProxyOptionsWidget";
+static const char * g_szName_KviQueryOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviQueryOptionsWidget;
+static const char * g_szClassName_KviQueryOptionsWidget = "KviQueryOptionsWidget";
+static const char * g_szName_KviServerOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviServerOptionsWidget;
+static const char * g_szClassName_KviServerOptionsWidget = "KviServerOptionsWidget";
+static const char * g_szName_KviSoundOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviSoundOptionsWidget;
+static const char * g_szClassName_KviSoundOptionsWidget = "KviSoundOptionsWidget";
+static const char * g_szName_KviSoundGeneralOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviSoundGeneralOptionsWidget;
+static const char * g_szClassName_KviSoundGeneralOptionsWidget = "KviSoundGeneralOptionsWidget";
+static const char * g_szName_KviSoundsOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviSoundsOptionsWidget;
+static const char * g_szClassName_KviSoundsOptionsWidget = "KviSoundsOptionsWidget";
+static const char * g_szName_KviTaskBarOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviTaskBarOptionsWidget;
+static const char * g_szClassName_KviTaskBarOptionsWidget = "KviTaskBarOptionsWidget";
+static const char * g_szName_KviTreeTaskBarOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviTreeTaskBarOptionsWidget;
+static const char * g_szClassName_KviTreeTaskBarOptionsWidget = "KviTreeTaskBarOptionsWidget";
+static const char * g_szName_KviTreeTaskBarForegroundOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviTreeTaskBarForegroundOptionsWidget;
+static const char * g_szClassName_KviTreeTaskBarForegroundOptionsWidget = "KviTreeTaskBarForegroundOptionsWidget";
+static const char * g_szName_KviTreeTaskBarBackgroundOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviTreeTaskBarBackgroundOptionsWidget;
+static const char * g_szClassName_KviTreeTaskBarBackgroundOptionsWidget = "KviTreeTaskBarBackgroundOptionsWidget";
+static const char * g_szName_KviTreeTaskBarFeaturesOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviTreeTaskBarFeaturesOptionsWidget;
+static const char * g_szClassName_KviTreeTaskBarFeaturesOptionsWidget = "KviTreeTaskBarFeaturesOptionsWidget";
+static const char * g_szName_KviClassicTaskBarOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviClassicTaskBarOptionsWidget;
+static const char * g_szClassName_KviClassicTaskBarOptionsWidget = "KviClassicTaskBarOptionsWidget";
+static const char * g_szName_KviTextEncodingOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviTextEncodingOptionsWidget;
+static const char * g_szClassName_KviTextEncodingOptionsWidget = "KviTextEncodingOptionsWidget";
+static const char * g_szName_KviTextIconsOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviTextIconsOptionsWidget;
+static const char * g_szClassName_KviTextIconsOptionsWidget = "KviTextIconsOptionsWidget";
+static const char * g_szName_KviToolsOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviToolsOptionsWidget;
+static const char * g_szClassName_KviToolsOptionsWidget = "KviToolsOptionsWidget";
+static const char * g_szName_KviTopicLabelLookOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviTopicLabelLookOptionsWidget;
+static const char * g_szClassName_KviTopicLabelLookOptionsWidget = "KviTopicLabelLookOptionsWidget";
+static const char * g_szName_KviTrayOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviTrayOptionsWidget;
+static const char * g_szClassName_KviTrayOptionsWidget = "KviTrayOptionsWidget";
+static const char * g_szName_KviUParserOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviUParserOptionsWidget;
+static const char * g_szClassName_KviUParserOptionsWidget = "KviUParserOptionsWidget";
+static const char * g_szName_KviUrlHandlersOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviUrlHandlersOptionsWidget;
+static const char * g_szClassName_KviUrlHandlersOptionsWidget = "KviUrlHandlersOptionsWidget";
+static const char * g_szName_KviUserListLookOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviUserListLookOptionsWidget;
+static const char * g_szClassName_KviUserListLookOptionsWidget = "KviUserListLookOptionsWidget";
+static const char * g_szName_KviUserListLookBackgroundOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviUserListLookBackgroundOptionsWidget;
+static const char * g_szClassName_KviUserListLookBackgroundOptionsWidget = "KviUserListLookBackgroundOptionsWidget";
+static const char * g_szName_KviUserListLookForegroundOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviUserListLookForegroundOptionsWidget;
+static const char * g_szClassName_KviUserListLookForegroundOptionsWidget = "KviUserListLookForegroundOptionsWidget";
+static const char * g_szName_KviUserListGridOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviUserListGridOptionsWidget;
+static const char * g_szClassName_KviUserListGridOptionsWidget = "KviUserListGridOptionsWidget";
+static const char * g_szName_KviUserListFeaturesOptionsWidget = KVI_OPTIONS_WIDGET_NAME_KviUserListFeaturesOptionsWidget;
+static const char * g_szClassName_KviUserListFeaturesOptionsWidget = "KviUserListFeaturesOptionsWidget";
+
+KviOptionsInstanceManager::KviOptionsInstanceManager()
+: QObject(0)
+{
+
+ //debug("Instantiating");
+ // Create the global widget dict : case sensitive , do not copy keys
+ m_pInstanceTree = new KviPointerList<KviOptionsWidgetInstanceEntry>;
+ m_pInstanceTree->setAutoDelete(true);
+
+
+ KviOptionsWidgetInstanceEntry * e0;
+ e0 = new KviOptionsWidgetInstanceEntry;
+ e0->createProc = &classKviConnectionOptionsWidget_createInstanceProc;
+ e0->pWidget = 0;
+ e0->szClassName = g_szClassName_KviConnectionOptionsWidget;
+ e0->iIcon = KVI_OPTIONS_WIDGET_ICON_KviConnectionOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviConnectionOptionsWidget
+ e0->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviConnectionOptionsWidget;
+ #else
+ e0->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviConnectionOptionsWidget
+ e0->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviConnectionOptionsWidget;
+ e0->szKeywords = __tr2qs_ctx_no_xgettext(e0->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviConnectionOptionsWidget
+ e0->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviConnectionOptionsWidget;
+ #else
+ e0->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviConnectionOptionsWidget
+ e0->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviConnectionOptionsWidget;
+ #else
+ e0->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviConnectionOptionsWidget
+ e0->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviConnectionOptionsWidget;
+ #else
+ e0->bIsNotContained = false;
+ #endif
+ e0->szNameNoLocale = g_szName_KviConnectionOptionsWidget;
+ e0->szName = __tr2qs_ctx_no_xgettext(g_szName_KviConnectionOptionsWidget,"options");
+ m_pInstanceTree->append(e0);
+
+ e0->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;
+ e0->pChildList->setAutoDelete(true);
+
+ KviOptionsWidgetInstanceEntry * e1;
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviConnectionAdvancedOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviConnectionAdvancedOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviConnectionAdvancedOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviConnectionAdvancedOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviConnectionAdvancedOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviConnectionAdvancedOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviConnectionAdvancedOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviConnectionAdvancedOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviConnectionAdvancedOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviConnectionAdvancedOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviConnectionAdvancedOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviConnectionAdvancedOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviConnectionAdvancedOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviConnectionAdvancedOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviConnectionAdvancedOptionsWidget,"options");
+ e0->pChildList->append(e1);
+
+ e1->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;
+ e1->pChildList->setAutoDelete(true);
+
+ KviOptionsWidgetInstanceEntry * e2;
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviSSLOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviSSLOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviSSLOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviSSLOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviSSLOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviSSLOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviSSLOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviSSLOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviSSLOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviSSLOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviSSLOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviSSLOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviSSLOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviSSLOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviSSLOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviTransportOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviTransportOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviTransportOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviTransportOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviTransportOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviTransportOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviTransportOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviTransportOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviTransportOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviTransportOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviTransportOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTransportOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTransportOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviTransportOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviTransportOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviIdentOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviIdentOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviIdentOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviIdentOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviIdentOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviIdentOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviIdentOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviIdentOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviIdentOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviIdentOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviIdentOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIdentOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIdentOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviIdentOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviIdentOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviProxyOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviProxyOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviProxyOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviProxyOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviProxyOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviProxyOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviProxyOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviProxyOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviProxyOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviProxyOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviProxyOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviProxyOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviProxyOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviProxyOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviProxyOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e0 = new KviOptionsWidgetInstanceEntry;
+ e0->createProc = &classKviDccOptionsWidget_createInstanceProc;
+ e0->pWidget = 0;
+ e0->szClassName = g_szClassName_KviDccOptionsWidget;
+ e0->iIcon = KVI_OPTIONS_WIDGET_ICON_KviDccOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviDccOptionsWidget
+ e0->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviDccOptionsWidget;
+ #else
+ e0->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviDccOptionsWidget
+ e0->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviDccOptionsWidget;
+ e0->szKeywords = __tr2qs_ctx_no_xgettext(e0->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviDccOptionsWidget
+ e0->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviDccOptionsWidget;
+ #else
+ e0->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviDccOptionsWidget
+ e0->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviDccOptionsWidget;
+ #else
+ e0->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviDccOptionsWidget
+ e0->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviDccOptionsWidget;
+ #else
+ e0->bIsNotContained = false;
+ #endif
+ e0->szNameNoLocale = g_szName_KviDccOptionsWidget;
+ e0->szName = __tr2qs_ctx_no_xgettext(g_szName_KviDccOptionsWidget,"options");
+ m_pInstanceTree->append(e0);
+
+ e0->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;
+ e0->pChildList->setAutoDelete(true);
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviDccGeneralOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviDccGeneralOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviDccGeneralOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviDccGeneralOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviDccGeneralOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviDccGeneralOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviDccGeneralOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviDccGeneralOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviDccGeneralOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviDccGeneralOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviDccGeneralOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviDccGeneralOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviDccGeneralOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviDccGeneralOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviDccGeneralOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviDccAdvancedOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviDccAdvancedOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviDccAdvancedOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviDccAdvancedOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviDccAdvancedOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviDccAdvancedOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviDccAdvancedOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviDccAdvancedOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviDccAdvancedOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviDccAdvancedOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviDccAdvancedOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviDccAdvancedOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviDccAdvancedOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviDccAdvancedOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviDccAdvancedOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviDccSendOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviDccSendOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviDccSendOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviDccSendOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviDccSendOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviDccSendOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviDccSendOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviDccSendOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviDccSendOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviDccSendOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviDccSendOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviDccSendOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviDccSendOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviDccSendOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviDccSendOptionsWidget,"options");
+ e0->pChildList->append(e1);
+
+ e1->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;
+ e1->pChildList->setAutoDelete(true);
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviDccSendGeneralOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviDccSendGeneralOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviDccSendGeneralOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviDccSendGeneralOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviDccSendGeneralOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviDccSendGeneralOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviDccSendGeneralOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviDccSendGeneralOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviDccSendGeneralOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviDccSendGeneralOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviDccSendGeneralOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviDccSendGeneralOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviDccSendGeneralOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviDccSendGeneralOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviDccSendGeneralOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviDccSendAdvancedOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviDccSendAdvancedOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviDccSendAdvancedOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviDccSendAdvancedOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviDccSendAdvancedOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviDccSendAdvancedOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviDccSendAdvancedOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviDccSendAdvancedOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviDccSendAdvancedOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviDccSendAdvancedOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviDccSendAdvancedOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviDccSendAdvancedOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviDccSendAdvancedOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviDccSendAdvancedOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviDccSendAdvancedOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviDccChatOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviDccChatOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviDccChatOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviDccChatOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviDccChatOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviDccChatOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviDccChatOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviDccChatOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviDccChatOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviDccChatOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviDccChatOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviDccChatOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviDccChatOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviDccChatOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviDccChatOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviDccVoiceOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviDccVoiceOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviDccVoiceOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviDccVoiceOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviDccVoiceOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviDccVoiceOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviDccVoiceOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviDccVoiceOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviDccVoiceOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviDccVoiceOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviDccVoiceOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviDccVoiceOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviDccVoiceOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviDccVoiceOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviDccVoiceOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e0 = new KviOptionsWidgetInstanceEntry;
+ e0->createProc = &classKviGeneralOptOptionsWidget_createInstanceProc;
+ e0->pWidget = 0;
+ e0->szClassName = g_szClassName_KviGeneralOptOptionsWidget;
+ e0->iIcon = KVI_OPTIONS_WIDGET_ICON_KviGeneralOptOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviGeneralOptOptionsWidget
+ e0->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviGeneralOptOptionsWidget;
+ #else
+ e0->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviGeneralOptOptionsWidget
+ e0->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviGeneralOptOptionsWidget;
+ e0->szKeywords = __tr2qs_ctx_no_xgettext(e0->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviGeneralOptOptionsWidget
+ e0->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviGeneralOptOptionsWidget;
+ #else
+ e0->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviGeneralOptOptionsWidget
+ e0->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviGeneralOptOptionsWidget;
+ #else
+ e0->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviGeneralOptOptionsWidget
+ e0->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviGeneralOptOptionsWidget;
+ #else
+ e0->bIsNotContained = false;
+ #endif
+ e0->szNameNoLocale = g_szName_KviGeneralOptOptionsWidget;
+ e0->szName = __tr2qs_ctx_no_xgettext(g_szName_KviGeneralOptOptionsWidget,"options");
+ m_pInstanceTree->append(e0);
+
+ e0->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;
+ e0->pChildList->setAutoDelete(true);
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviMediaTypesOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviMediaTypesOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviMediaTypesOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviMediaTypesOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviMediaTypesOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviMediaTypesOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviMediaTypesOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviMediaTypesOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviMediaTypesOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviMediaTypesOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviMediaTypesOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviMediaTypesOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviMediaTypesOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviMediaTypesOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviMediaTypesOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviSoundOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviSoundOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviSoundOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviSoundOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviSoundOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviSoundOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviSoundOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviSoundOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviSoundOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviSoundOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviSoundOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviSoundOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviSoundOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviSoundOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviSoundOptionsWidget,"options");
+ e0->pChildList->append(e1);
+
+ e1->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;
+ e1->pChildList->setAutoDelete(true);
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviSoundGeneralOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviSoundGeneralOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviSoundGeneralOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviSoundGeneralOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviSoundGeneralOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviSoundGeneralOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviSoundGeneralOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviSoundGeneralOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviSoundGeneralOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviSoundGeneralOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviSoundGeneralOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviSoundGeneralOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviSoundGeneralOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviSoundGeneralOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviSoundGeneralOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviSoundsOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviSoundsOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviSoundsOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviSoundsOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviSoundsOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviSoundsOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviSoundsOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviSoundsOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviSoundsOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviSoundsOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviSoundsOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviSoundsOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviSoundsOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviSoundsOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviSoundsOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviTextEncodingOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviTextEncodingOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviTextEncodingOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviTextEncodingOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviTextEncodingOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviTextEncodingOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviTextEncodingOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviTextEncodingOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviTextEncodingOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviTextEncodingOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviTextEncodingOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTextEncodingOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTextEncodingOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviTextEncodingOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviTextEncodingOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviUParserOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviUParserOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviUParserOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviUParserOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviUParserOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviUParserOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviUParserOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviUParserOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviUParserOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviUParserOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviUParserOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviUParserOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviUParserOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviUParserOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviUParserOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviUrlHandlersOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviUrlHandlersOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviUrlHandlersOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviUrlHandlersOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviUrlHandlersOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviUrlHandlersOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviUrlHandlersOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviUrlHandlersOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviUrlHandlersOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviUrlHandlersOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviUrlHandlersOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviUrlHandlersOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviUrlHandlersOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviUrlHandlersOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviUrlHandlersOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e0 = new KviOptionsWidgetInstanceEntry;
+ e0->createProc = &classKviIdentityOptionsWidget_createInstanceProc;
+ e0->pWidget = 0;
+ e0->szClassName = g_szClassName_KviIdentityOptionsWidget;
+ e0->iIcon = KVI_OPTIONS_WIDGET_ICON_KviIdentityOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviIdentityOptionsWidget
+ e0->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviIdentityOptionsWidget;
+ #else
+ e0->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviIdentityOptionsWidget
+ e0->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviIdentityOptionsWidget;
+ e0->szKeywords = __tr2qs_ctx_no_xgettext(e0->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviIdentityOptionsWidget
+ e0->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviIdentityOptionsWidget;
+ #else
+ e0->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviIdentityOptionsWidget
+ e0->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviIdentityOptionsWidget;
+ #else
+ e0->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIdentityOptionsWidget
+ e0->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIdentityOptionsWidget;
+ #else
+ e0->bIsNotContained = false;
+ #endif
+ e0->szNameNoLocale = g_szName_KviIdentityOptionsWidget;
+ e0->szName = __tr2qs_ctx_no_xgettext(g_szName_KviIdentityOptionsWidget,"options");
+ m_pInstanceTree->append(e0);
+
+ e0->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;
+ e0->pChildList->setAutoDelete(true);
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviIdentityGeneralOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviIdentityGeneralOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviIdentityGeneralOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviIdentityGeneralOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviIdentityGeneralOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviIdentityGeneralOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviIdentityGeneralOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviIdentityGeneralOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviIdentityGeneralOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviIdentityGeneralOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviIdentityGeneralOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIdentityGeneralOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIdentityGeneralOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviIdentityGeneralOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviIdentityGeneralOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviIdentityAvatarOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviIdentityAvatarOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviIdentityAvatarOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviIdentityAvatarOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviIdentityAvatarOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviIdentityAvatarOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviIdentityAvatarOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviIdentityAvatarOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviIdentityAvatarOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviIdentityAvatarOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviIdentityAvatarOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIdentityAvatarOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIdentityAvatarOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviIdentityAvatarOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviIdentityAvatarOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviIdentityAdvancedOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviIdentityAdvancedOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviIdentityAdvancedOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviIdentityAdvancedOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviIdentityAdvancedOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviIdentityAdvancedOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviIdentityAdvancedOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviIdentityAdvancedOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviIdentityAdvancedOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviIdentityAdvancedOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviIdentityAdvancedOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIdentityAdvancedOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIdentityAdvancedOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviIdentityAdvancedOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviIdentityAdvancedOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e0 = new KviOptionsWidgetInstanceEntry;
+ e0->createProc = &classKviInputLookOptionsWidget_createInstanceProc;
+ e0->pWidget = 0;
+ e0->szClassName = g_szClassName_KviInputLookOptionsWidget;
+ e0->iIcon = KVI_OPTIONS_WIDGET_ICON_KviInputLookOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviInputLookOptionsWidget
+ e0->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviInputLookOptionsWidget;
+ #else
+ e0->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviInputLookOptionsWidget
+ e0->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviInputLookOptionsWidget;
+ e0->szKeywords = __tr2qs_ctx_no_xgettext(e0->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviInputLookOptionsWidget
+ e0->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviInputLookOptionsWidget;
+ #else
+ e0->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviInputLookOptionsWidget
+ e0->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviInputLookOptionsWidget;
+ #else
+ e0->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviInputLookOptionsWidget
+ e0->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviInputLookOptionsWidget;
+ #else
+ e0->bIsNotContained = false;
+ #endif
+ e0->szNameNoLocale = g_szName_KviInputLookOptionsWidget;
+ e0->szName = __tr2qs_ctx_no_xgettext(g_szName_KviInputLookOptionsWidget,"options");
+ m_pInstanceTree->append(e0);
+ e0->pChildList = 0;
+
+ e0 = new KviOptionsWidgetInstanceEntry;
+ e0->createProc = &classKviInterfaceFeaturesOptionsWidget_createInstanceProc;
+ e0->pWidget = 0;
+ e0->szClassName = g_szClassName_KviInterfaceFeaturesOptionsWidget;
+ e0->iIcon = KVI_OPTIONS_WIDGET_ICON_KviInterfaceFeaturesOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviInterfaceFeaturesOptionsWidget
+ e0->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviInterfaceFeaturesOptionsWidget;
+ #else
+ e0->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviInterfaceFeaturesOptionsWidget
+ e0->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviInterfaceFeaturesOptionsWidget;
+ e0->szKeywords = __tr2qs_ctx_no_xgettext(e0->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviInterfaceFeaturesOptionsWidget
+ e0->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviInterfaceFeaturesOptionsWidget;
+ #else
+ e0->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviInterfaceFeaturesOptionsWidget
+ e0->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviInterfaceFeaturesOptionsWidget;
+ #else
+ e0->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviInterfaceFeaturesOptionsWidget
+ e0->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviInterfaceFeaturesOptionsWidget;
+ #else
+ e0->bIsNotContained = false;
+ #endif
+ e0->szNameNoLocale = g_szName_KviInterfaceFeaturesOptionsWidget;
+ e0->szName = __tr2qs_ctx_no_xgettext(g_szName_KviInterfaceFeaturesOptionsWidget,"options");
+ m_pInstanceTree->append(e0);
+
+ e0->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;
+ e0->pChildList->setAutoDelete(true);
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviInputFeaturesOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviInputFeaturesOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviInputFeaturesOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviInputFeaturesOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviInputFeaturesOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviInputFeaturesOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviInputFeaturesOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviInputFeaturesOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviInputFeaturesOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviInputFeaturesOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviInputFeaturesOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviInputFeaturesOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviInputFeaturesOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviInputFeaturesOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviInputFeaturesOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviNotifierOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviNotifierOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviNotifierOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviNotifierOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviNotifierOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviNotifierOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviNotifierOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviNotifierOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviNotifierOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviNotifierOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviNotifierOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviNotifierOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviNotifierOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviNotifierOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviNotifierOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviTrayOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviTrayOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviTrayOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviTrayOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviTrayOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviTrayOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviTrayOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviTrayOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviTrayOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviTrayOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviTrayOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTrayOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTrayOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviTrayOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviTrayOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e0 = new KviOptionsWidgetInstanceEntry;
+ e0->createProc = &classKviThemeGeneralOptionsWidget_createInstanceProc;
+ e0->pWidget = 0;
+ e0->szClassName = g_szClassName_KviThemeGeneralOptionsWidget;
+ e0->iIcon = KVI_OPTIONS_WIDGET_ICON_KviThemeGeneralOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviThemeGeneralOptionsWidget
+ e0->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviThemeGeneralOptionsWidget;
+ #else
+ e0->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviThemeGeneralOptionsWidget
+ e0->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviThemeGeneralOptionsWidget;
+ e0->szKeywords = __tr2qs_ctx_no_xgettext(e0->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviThemeGeneralOptionsWidget
+ e0->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviThemeGeneralOptionsWidget;
+ #else
+ e0->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviThemeGeneralOptionsWidget
+ e0->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviThemeGeneralOptionsWidget;
+ #else
+ e0->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviThemeGeneralOptionsWidget
+ e0->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviThemeGeneralOptionsWidget;
+ #else
+ e0->bIsNotContained = false;
+ #endif
+ e0->szNameNoLocale = g_szName_KviThemeGeneralOptionsWidget;
+ e0->szName = __tr2qs_ctx_no_xgettext(g_szName_KviThemeGeneralOptionsWidget,"options");
+ m_pInstanceTree->append(e0);
+ e0->pChildList = 0;
+
+ e0 = new KviOptionsWidgetInstanceEntry;
+ e0->createProc = &classKviThemeTransparencyOptionsWidget_createInstanceProc;
+ e0->pWidget = 0;
+ e0->szClassName = g_szClassName_KviThemeTransparencyOptionsWidget;
+ e0->iIcon = KVI_OPTIONS_WIDGET_ICON_KviThemeTransparencyOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviThemeTransparencyOptionsWidget
+ e0->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviThemeTransparencyOptionsWidget;
+ #else
+ e0->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviThemeTransparencyOptionsWidget
+ e0->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviThemeTransparencyOptionsWidget;
+ e0->szKeywords = __tr2qs_ctx_no_xgettext(e0->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviThemeTransparencyOptionsWidget
+ e0->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviThemeTransparencyOptionsWidget;
+ #else
+ e0->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviThemeTransparencyOptionsWidget
+ e0->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviThemeTransparencyOptionsWidget;
+ #else
+ e0->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviThemeTransparencyOptionsWidget
+ e0->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviThemeTransparencyOptionsWidget;
+ #else
+ e0->bIsNotContained = false;
+ #endif
+ e0->szNameNoLocale = g_szName_KviThemeTransparencyOptionsWidget;
+ e0->szName = __tr2qs_ctx_no_xgettext(g_szName_KviThemeTransparencyOptionsWidget,"options");
+ m_pInstanceTree->append(e0);
+ e0->pChildList = 0;
+
+ e0 = new KviOptionsWidgetInstanceEntry;
+ e0->createProc = &classKviThemeMdiCaptionsOptionsWidget_createInstanceProc;
+ e0->pWidget = 0;
+ e0->szClassName = g_szClassName_KviThemeMdiCaptionsOptionsWidget;
+ e0->iIcon = KVI_OPTIONS_WIDGET_ICON_KviThemeMdiCaptionsOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviThemeMdiCaptionsOptionsWidget
+ e0->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviThemeMdiCaptionsOptionsWidget;
+ #else
+ e0->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviThemeMdiCaptionsOptionsWidget
+ e0->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviThemeMdiCaptionsOptionsWidget;
+ e0->szKeywords = __tr2qs_ctx_no_xgettext(e0->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviThemeMdiCaptionsOptionsWidget
+ e0->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviThemeMdiCaptionsOptionsWidget;
+ #else
+ e0->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviThemeMdiCaptionsOptionsWidget
+ e0->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviThemeMdiCaptionsOptionsWidget;
+ #else
+ e0->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviThemeMdiCaptionsOptionsWidget
+ e0->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviThemeMdiCaptionsOptionsWidget;
+ #else
+ e0->bIsNotContained = false;
+ #endif
+ e0->szNameNoLocale = g_szName_KviThemeMdiCaptionsOptionsWidget;
+ e0->szName = __tr2qs_ctx_no_xgettext(g_szName_KviThemeMdiCaptionsOptionsWidget,"options");
+ m_pInstanceTree->append(e0);
+ e0->pChildList = 0;
+
+ e0 = new KviOptionsWidgetInstanceEntry;
+ e0->createProc = &classKviThemeMdiAreaOptionsWidget_createInstanceProc;
+ e0->pWidget = 0;
+ e0->szClassName = g_szClassName_KviThemeMdiAreaOptionsWidget;
+ e0->iIcon = KVI_OPTIONS_WIDGET_ICON_KviThemeMdiAreaOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviThemeMdiAreaOptionsWidget
+ e0->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviThemeMdiAreaOptionsWidget;
+ #else
+ e0->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviThemeMdiAreaOptionsWidget
+ e0->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviThemeMdiAreaOptionsWidget;
+ e0->szKeywords = __tr2qs_ctx_no_xgettext(e0->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviThemeMdiAreaOptionsWidget
+ e0->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviThemeMdiAreaOptionsWidget;
+ #else
+ e0->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviThemeMdiAreaOptionsWidget
+ e0->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviThemeMdiAreaOptionsWidget;
+ #else
+ e0->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviThemeMdiAreaOptionsWidget
+ e0->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviThemeMdiAreaOptionsWidget;
+ #else
+ e0->bIsNotContained = false;
+ #endif
+ e0->szNameNoLocale = g_szName_KviThemeMdiAreaOptionsWidget;
+ e0->szName = __tr2qs_ctx_no_xgettext(g_szName_KviThemeMdiAreaOptionsWidget,"options");
+ m_pInstanceTree->append(e0);
+ e0->pChildList = 0;
+
+ e0 = new KviOptionsWidgetInstanceEntry;
+ e0->createProc = &classKviThemeToolBarAppletsOptionsWidget_createInstanceProc;
+ e0->pWidget = 0;
+ e0->szClassName = g_szClassName_KviThemeToolBarAppletsOptionsWidget;
+ e0->iIcon = KVI_OPTIONS_WIDGET_ICON_KviThemeToolBarAppletsOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviThemeToolBarAppletsOptionsWidget
+ e0->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviThemeToolBarAppletsOptionsWidget;
+ #else
+ e0->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviThemeToolBarAppletsOptionsWidget
+ e0->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviThemeToolBarAppletsOptionsWidget;
+ e0->szKeywords = __tr2qs_ctx_no_xgettext(e0->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviThemeToolBarAppletsOptionsWidget
+ e0->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviThemeToolBarAppletsOptionsWidget;
+ #else
+ e0->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviThemeToolBarAppletsOptionsWidget
+ e0->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviThemeToolBarAppletsOptionsWidget;
+ #else
+ e0->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviThemeToolBarAppletsOptionsWidget
+ e0->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviThemeToolBarAppletsOptionsWidget;
+ #else
+ e0->bIsNotContained = false;
+ #endif
+ e0->szNameNoLocale = g_szName_KviThemeToolBarAppletsOptionsWidget;
+ e0->szName = __tr2qs_ctx_no_xgettext(g_szName_KviThemeToolBarAppletsOptionsWidget,"options");
+ m_pInstanceTree->append(e0);
+ e0->pChildList = 0;
+
+ e0 = new KviOptionsWidgetInstanceEntry;
+ e0->createProc = &classKviIrcOptionsWidget_createInstanceProc;
+ e0->pWidget = 0;
+ e0->szClassName = g_szClassName_KviIrcOptionsWidget;
+ e0->iIcon = KVI_OPTIONS_WIDGET_ICON_KviIrcOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviIrcOptionsWidget
+ e0->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviIrcOptionsWidget;
+ #else
+ e0->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviIrcOptionsWidget
+ e0->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviIrcOptionsWidget;
+ e0->szKeywords = __tr2qs_ctx_no_xgettext(e0->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviIrcOptionsWidget
+ e0->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviIrcOptionsWidget;
+ #else
+ e0->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviIrcOptionsWidget
+ e0->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviIrcOptionsWidget;
+ #else
+ e0->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIrcOptionsWidget
+ e0->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIrcOptionsWidget;
+ #else
+ e0->bIsNotContained = false;
+ #endif
+ e0->szNameNoLocale = g_szName_KviIrcOptionsWidget;
+ e0->szName = __tr2qs_ctx_no_xgettext(g_szName_KviIrcOptionsWidget,"options");
+ m_pInstanceTree->append(e0);
+
+ e0->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;
+ e0->pChildList->setAutoDelete(true);
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviIrcGeneralOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviIrcGeneralOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviIrcGeneralOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviIrcGeneralOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviIrcGeneralOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviIrcGeneralOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviIrcGeneralOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviIrcGeneralOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviIrcGeneralOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviIrcGeneralOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviIrcGeneralOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIrcGeneralOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIrcGeneralOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviIrcGeneralOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviIrcGeneralOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviIrcAdvancedOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviIrcAdvancedOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviIrcAdvancedOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviIrcAdvancedOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviIrcAdvancedOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviIrcAdvancedOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviIrcAdvancedOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviIrcAdvancedOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviIrcAdvancedOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviIrcAdvancedOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviIrcAdvancedOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIrcAdvancedOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIrcAdvancedOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviIrcAdvancedOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviIrcAdvancedOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviChannelOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviChannelOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviChannelOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviChannelOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviChannelOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviChannelOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviChannelOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviChannelOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviChannelOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviChannelOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviChannelOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviChannelOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviChannelOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviChannelOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviChannelOptionsWidget,"options");
+ e0->pChildList->append(e1);
+
+ e1->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;
+ e1->pChildList->setAutoDelete(true);
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviChannelGeneralOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviChannelGeneralOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviChannelGeneralOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviChannelGeneralOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviChannelGeneralOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviChannelGeneralOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviChannelGeneralOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviChannelGeneralOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviChannelGeneralOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviChannelGeneralOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviChannelGeneralOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviChannelGeneralOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviChannelGeneralOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviChannelGeneralOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviChannelGeneralOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviChannelAdvancedOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviChannelAdvancedOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviChannelAdvancedOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviChannelAdvancedOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviChannelAdvancedOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviChannelAdvancedOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviChannelAdvancedOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviChannelAdvancedOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviChannelAdvancedOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviChannelAdvancedOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviChannelAdvancedOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviChannelAdvancedOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviChannelAdvancedOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviChannelAdvancedOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviChannelAdvancedOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviIrcOutputOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviIrcOutputOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviIrcOutputOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviIrcOutputOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviIrcOutputOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviIrcOutputOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviIrcOutputOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviIrcOutputOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviIrcOutputOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviIrcOutputOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviIrcOutputOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIrcOutputOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIrcOutputOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviIrcOutputOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviIrcOutputOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviProtectionOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviProtectionOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviProtectionOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviProtectionOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviProtectionOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviProtectionOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviProtectionOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviProtectionOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviProtectionOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviProtectionOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviProtectionOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviProtectionOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviProtectionOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviProtectionOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviProtectionOptionsWidget,"options");
+ e0->pChildList->append(e1);
+
+ e1->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;
+ e1->pChildList->setAutoDelete(true);
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviAntispamOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviAntispamOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviAntispamOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviAntispamOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviAntispamOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviAntispamOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviAntispamOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviAntispamOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviAntispamOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviAntispamOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviAntispamOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviAntispamOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviAntispamOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviAntispamOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviAntispamOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviCtcpFloodProtectionOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviCtcpFloodProtectionOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviCtcpFloodProtectionOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviCtcpFloodProtectionOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviCtcpFloodProtectionOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviCtcpFloodProtectionOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviCtcpFloodProtectionOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviCtcpFloodProtectionOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviCtcpFloodProtectionOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviCtcpFloodProtectionOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviCtcpFloodProtectionOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviCtcpFloodProtectionOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviCtcpFloodProtectionOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviCtcpFloodProtectionOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviCtcpFloodProtectionOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviIgnoreOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviIgnoreOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviIgnoreOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviIgnoreOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviIgnoreOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviIgnoreOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviIgnoreOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviIgnoreOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviIgnoreOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviIgnoreOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviIgnoreOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIgnoreOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIgnoreOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviIgnoreOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviIgnoreOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviQueryOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviQueryOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviQueryOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviQueryOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviQueryOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviQueryOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviQueryOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviQueryOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviQueryOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviQueryOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviQueryOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviQueryOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviQueryOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviQueryOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviQueryOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviToolsOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviToolsOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviToolsOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviToolsOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviToolsOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviToolsOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviToolsOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviToolsOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviToolsOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviToolsOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviToolsOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviToolsOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviToolsOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviToolsOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviToolsOptionsWidget,"options");
+ e0->pChildList->append(e1);
+
+ e1->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;
+ e1->pChildList->setAutoDelete(true);
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviAvatarAdvancedOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviAvatarAdvancedOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviAvatarAdvancedOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviAvatarAdvancedOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviAvatarAdvancedOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviAvatarAdvancedOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviAvatarAdvancedOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviAvatarAdvancedOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviAvatarAdvancedOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviAvatarAdvancedOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviAvatarAdvancedOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviAvatarAdvancedOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviAvatarAdvancedOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviAvatarAdvancedOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviAvatarAdvancedOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviAwayOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviAwayOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviAwayOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviAwayOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviAwayOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviAwayOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviAwayOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviAwayOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviAwayOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviAwayOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviAwayOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviAwayOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviAwayOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviAwayOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviAwayOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviCtcpOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviCtcpOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviCtcpOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviCtcpOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviCtcpOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviCtcpOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviCtcpOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviCtcpOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviCtcpOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviCtcpOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviCtcpOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviCtcpOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviCtcpOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviCtcpOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviCtcpOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviAlertHighlightingOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviAlertHighlightingOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviAlertHighlightingOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviAlertHighlightingOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviAlertHighlightingOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviAlertHighlightingOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviAlertHighlightingOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviAlertHighlightingOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviAlertHighlightingOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviAlertHighlightingOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviAlertHighlightingOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviAlertHighlightingOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviAlertHighlightingOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviAlertHighlightingOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviAlertHighlightingOptionsWidget,"options");
+ e1->pChildList->append(e2);
+
+ e2->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;
+ e2->pChildList->setAutoDelete(true);
+
+ KviOptionsWidgetInstanceEntry * e3;
+ e3 = new KviOptionsWidgetInstanceEntry;
+ e3->createProc = &classKviHighlightingOptionsWidget_createInstanceProc;
+ e3->pWidget = 0;
+ e3->szClassName = g_szClassName_KviHighlightingOptionsWidget;
+ e3->iIcon = KVI_OPTIONS_WIDGET_ICON_KviHighlightingOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviHighlightingOptionsWidget
+ e3->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviHighlightingOptionsWidget;
+ #else
+ e3->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviHighlightingOptionsWidget
+ e3->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviHighlightingOptionsWidget;
+ e3->szKeywords = __tr2qs_ctx_no_xgettext(e3->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviHighlightingOptionsWidget
+ e3->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviHighlightingOptionsWidget;
+ #else
+ e3->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviHighlightingOptionsWidget
+ e3->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviHighlightingOptionsWidget;
+ #else
+ e3->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviHighlightingOptionsWidget
+ e3->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviHighlightingOptionsWidget;
+ #else
+ e3->bIsNotContained = false;
+ #endif
+ e3->szNameNoLocale = g_szName_KviHighlightingOptionsWidget;
+ e3->szName = __tr2qs_ctx_no_xgettext(g_szName_KviHighlightingOptionsWidget,"options");
+ e2->pChildList->append(e3);
+ e3->pChildList = 0;
+
+ e3 = new KviOptionsWidgetInstanceEntry;
+ e3->createProc = &classKviAlertOptionsWidget_createInstanceProc;
+ e3->pWidget = 0;
+ e3->szClassName = g_szClassName_KviAlertOptionsWidget;
+ e3->iIcon = KVI_OPTIONS_WIDGET_ICON_KviAlertOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviAlertOptionsWidget
+ e3->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviAlertOptionsWidget;
+ #else
+ e3->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviAlertOptionsWidget
+ e3->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviAlertOptionsWidget;
+ e3->szKeywords = __tr2qs_ctx_no_xgettext(e3->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviAlertOptionsWidget
+ e3->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviAlertOptionsWidget;
+ #else
+ e3->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviAlertOptionsWidget
+ e3->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviAlertOptionsWidget;
+ #else
+ e3->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviAlertOptionsWidget
+ e3->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviAlertOptionsWidget;
+ #else
+ e3->bIsNotContained = false;
+ #endif
+ e3->szNameNoLocale = g_szName_KviAlertOptionsWidget;
+ e3->szName = __tr2qs_ctx_no_xgettext(g_szName_KviAlertOptionsWidget,"options");
+ e2->pChildList->append(e3);
+ e3->pChildList = 0;
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviLagOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviLagOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviLagOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviLagOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviLagOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviLagOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviLagOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviLagOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviLagOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviLagOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviLagOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviLagOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviLagOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviLagOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviLagOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviLoggingOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviLoggingOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviLoggingOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviLoggingOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviLoggingOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviLoggingOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviLoggingOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviLoggingOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviLoggingOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviLoggingOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviLoggingOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviLoggingOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviLoggingOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviLoggingOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviLoggingOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviNickServOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviNickServOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviNickServOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviNickServOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviNickServOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviNickServOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviNickServOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviNickServOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviNickServOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviNickServOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviNickServOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviNickServOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviNickServOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviNickServOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviNickServOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviNotifyOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviNotifyOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviNotifyOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviNotifyOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviNotifyOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviNotifyOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviNotifyOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviNotifyOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviNotifyOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviNotifyOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviNotifyOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviNotifyOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviNotifyOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviNotifyOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviNotifyOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviTextIconsOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviTextIconsOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviTextIconsOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviTextIconsOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviTextIconsOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviTextIconsOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviTextIconsOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviTextIconsOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviTextIconsOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviTextIconsOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviTextIconsOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTextIconsOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTextIconsOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviTextIconsOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviTextIconsOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e0 = new KviOptionsWidgetInstanceEntry;
+ e0->createProc = &classKviIrcViewThemeOptionsWidget_createInstanceProc;
+ e0->pWidget = 0;
+ e0->szClassName = g_szClassName_KviIrcViewThemeOptionsWidget;
+ e0->iIcon = KVI_OPTIONS_WIDGET_ICON_KviIrcViewThemeOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviIrcViewThemeOptionsWidget
+ e0->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviIrcViewThemeOptionsWidget;
+ #else
+ e0->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviIrcViewThemeOptionsWidget
+ e0->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviIrcViewThemeOptionsWidget;
+ e0->szKeywords = __tr2qs_ctx_no_xgettext(e0->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviIrcViewThemeOptionsWidget
+ e0->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviIrcViewThemeOptionsWidget;
+ #else
+ e0->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviIrcViewThemeOptionsWidget
+ e0->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviIrcViewThemeOptionsWidget;
+ #else
+ e0->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIrcViewThemeOptionsWidget
+ e0->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIrcViewThemeOptionsWidget;
+ #else
+ e0->bIsNotContained = false;
+ #endif
+ e0->szNameNoLocale = g_szName_KviIrcViewThemeOptionsWidget;
+ e0->szName = __tr2qs_ctx_no_xgettext(g_szName_KviIrcViewThemeOptionsWidget,"options");
+ m_pInstanceTree->append(e0);
+
+ e0->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;
+ e0->pChildList->setAutoDelete(true);
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviIrcViewLookOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviIrcViewLookOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviIrcViewLookOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviIrcViewLookOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviIrcViewLookOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviIrcViewLookOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviIrcViewLookOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviIrcViewLookOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviIrcViewLookOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviIrcViewLookOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviIrcViewLookOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIrcViewLookOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIrcViewLookOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviIrcViewLookOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviIrcViewLookOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviIrcViewFeaturesOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviIrcViewFeaturesOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviIrcViewFeaturesOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviIrcViewFeaturesOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviIrcViewFeaturesOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviIrcViewFeaturesOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviIrcViewFeaturesOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviIrcViewFeaturesOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviIrcViewFeaturesOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviIrcViewFeaturesOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviIrcViewFeaturesOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIrcViewFeaturesOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviIrcViewFeaturesOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviIrcViewFeaturesOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviIrcViewFeaturesOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e0 = new KviOptionsWidgetInstanceEntry;
+ e0->createProc = &classKviMessageOptionsWidget_createInstanceProc;
+ e0->pWidget = 0;
+ e0->szClassName = g_szClassName_KviMessageOptionsWidget;
+ e0->iIcon = KVI_OPTIONS_WIDGET_ICON_KviMessageOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviMessageOptionsWidget
+ e0->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviMessageOptionsWidget;
+ #else
+ e0->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviMessageOptionsWidget
+ e0->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviMessageOptionsWidget;
+ e0->szKeywords = __tr2qs_ctx_no_xgettext(e0->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviMessageOptionsWidget
+ e0->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviMessageOptionsWidget;
+ #else
+ e0->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviMessageOptionsWidget
+ e0->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviMessageOptionsWidget;
+ #else
+ e0->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviMessageOptionsWidget
+ e0->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviMessageOptionsWidget;
+ #else
+ e0->bIsNotContained = false;
+ #endif
+ e0->szNameNoLocale = g_szName_KviMessageOptionsWidget;
+ e0->szName = __tr2qs_ctx_no_xgettext(g_szName_KviMessageOptionsWidget,"options");
+ m_pInstanceTree->append(e0);
+
+ e0->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;
+ e0->pChildList->setAutoDelete(true);
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviPrivmsgOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviPrivmsgOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviPrivmsgOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviPrivmsgOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviPrivmsgOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviPrivmsgOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviPrivmsgOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviPrivmsgOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviPrivmsgOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviPrivmsgOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviPrivmsgOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviPrivmsgOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviPrivmsgOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviPrivmsgOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviPrivmsgOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviTimestampOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviTimestampOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviTimestampOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviTimestampOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviTimestampOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviTimestampOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviTimestampOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviTimestampOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviTimestampOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviTimestampOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviTimestampOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTimestampOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTimestampOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviTimestampOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviTimestampOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviMessageColorsOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviMessageColorsOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviMessageColorsOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviMessageColorsOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviMessageColorsOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviMessageColorsOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviMessageColorsOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviMessageColorsOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviMessageColorsOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviMessageColorsOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviMessageColorsOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviMessageColorsOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviMessageColorsOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviMessageColorsOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviMessageColorsOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviStandardColorsOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviStandardColorsOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviStandardColorsOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviStandardColorsOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviStandardColorsOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviStandardColorsOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviStandardColorsOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviStandardColorsOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviStandardColorsOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviStandardColorsOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviStandardColorsOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviStandardColorsOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviStandardColorsOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviStandardColorsOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviStandardColorsOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e0 = new KviOptionsWidgetInstanceEntry;
+ e0->createProc = &classKviServerOptionsWidget_createInstanceProc;
+ e0->pWidget = 0;
+ e0->szClassName = g_szClassName_KviServerOptionsWidget;
+ e0->iIcon = KVI_OPTIONS_WIDGET_ICON_KviServerOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviServerOptionsWidget
+ e0->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviServerOptionsWidget;
+ #else
+ e0->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviServerOptionsWidget
+ e0->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviServerOptionsWidget;
+ e0->szKeywords = __tr2qs_ctx_no_xgettext(e0->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviServerOptionsWidget
+ e0->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviServerOptionsWidget;
+ #else
+ e0->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviServerOptionsWidget
+ e0->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviServerOptionsWidget;
+ #else
+ e0->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviServerOptionsWidget
+ e0->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviServerOptionsWidget;
+ #else
+ e0->bIsNotContained = false;
+ #endif
+ e0->szNameNoLocale = g_szName_KviServerOptionsWidget;
+ e0->szName = __tr2qs_ctx_no_xgettext(g_szName_KviServerOptionsWidget,"options");
+ m_pInstanceTree->append(e0);
+ e0->pChildList = 0;
+
+ e0 = new KviOptionsWidgetInstanceEntry;
+ e0->createProc = &classKviTaskBarOptionsWidget_createInstanceProc;
+ e0->pWidget = 0;
+ e0->szClassName = g_szClassName_KviTaskBarOptionsWidget;
+ e0->iIcon = KVI_OPTIONS_WIDGET_ICON_KviTaskBarOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviTaskBarOptionsWidget
+ e0->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviTaskBarOptionsWidget;
+ #else
+ e0->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviTaskBarOptionsWidget
+ e0->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviTaskBarOptionsWidget;
+ e0->szKeywords = __tr2qs_ctx_no_xgettext(e0->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviTaskBarOptionsWidget
+ e0->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviTaskBarOptionsWidget;
+ #else
+ e0->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviTaskBarOptionsWidget
+ e0->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviTaskBarOptionsWidget;
+ #else
+ e0->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTaskBarOptionsWidget
+ e0->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTaskBarOptionsWidget;
+ #else
+ e0->bIsNotContained = false;
+ #endif
+ e0->szNameNoLocale = g_szName_KviTaskBarOptionsWidget;
+ e0->szName = __tr2qs_ctx_no_xgettext(g_szName_KviTaskBarOptionsWidget,"options");
+ m_pInstanceTree->append(e0);
+
+ e0->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;
+ e0->pChildList->setAutoDelete(true);
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviTreeTaskBarOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviTreeTaskBarOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviTreeTaskBarOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviTreeTaskBarOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviTreeTaskBarOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviTreeTaskBarOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviTreeTaskBarOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviTreeTaskBarOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviTreeTaskBarOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviTreeTaskBarOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviTreeTaskBarOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTreeTaskBarOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTreeTaskBarOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviTreeTaskBarOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviTreeTaskBarOptionsWidget,"options");
+ e0->pChildList->append(e1);
+
+ e1->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;
+ e1->pChildList->setAutoDelete(true);
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviTreeTaskBarForegroundOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviTreeTaskBarForegroundOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviTreeTaskBarForegroundOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviTreeTaskBarForegroundOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviTreeTaskBarForegroundOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviTreeTaskBarForegroundOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviTreeTaskBarForegroundOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviTreeTaskBarForegroundOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviTreeTaskBarForegroundOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviTreeTaskBarForegroundOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviTreeTaskBarForegroundOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTreeTaskBarForegroundOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTreeTaskBarForegroundOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviTreeTaskBarForegroundOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviTreeTaskBarForegroundOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviTreeTaskBarBackgroundOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviTreeTaskBarBackgroundOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviTreeTaskBarBackgroundOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviTreeTaskBarBackgroundOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviTreeTaskBarBackgroundOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviTreeTaskBarBackgroundOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviTreeTaskBarBackgroundOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviTreeTaskBarBackgroundOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviTreeTaskBarBackgroundOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviTreeTaskBarBackgroundOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviTreeTaskBarBackgroundOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTreeTaskBarBackgroundOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTreeTaskBarBackgroundOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviTreeTaskBarBackgroundOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviTreeTaskBarBackgroundOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e2 = new KviOptionsWidgetInstanceEntry;
+ e2->createProc = &classKviTreeTaskBarFeaturesOptionsWidget_createInstanceProc;
+ e2->pWidget = 0;
+ e2->szClassName = g_szClassName_KviTreeTaskBarFeaturesOptionsWidget;
+ e2->iIcon = KVI_OPTIONS_WIDGET_ICON_KviTreeTaskBarFeaturesOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviTreeTaskBarFeaturesOptionsWidget
+ e2->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviTreeTaskBarFeaturesOptionsWidget;
+ #else
+ e2->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviTreeTaskBarFeaturesOptionsWidget
+ e2->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviTreeTaskBarFeaturesOptionsWidget;
+ e2->szKeywords = __tr2qs_ctx_no_xgettext(e2->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviTreeTaskBarFeaturesOptionsWidget
+ e2->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviTreeTaskBarFeaturesOptionsWidget;
+ #else
+ e2->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviTreeTaskBarFeaturesOptionsWidget
+ e2->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviTreeTaskBarFeaturesOptionsWidget;
+ #else
+ e2->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTreeTaskBarFeaturesOptionsWidget
+ e2->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTreeTaskBarFeaturesOptionsWidget;
+ #else
+ e2->bIsNotContained = false;
+ #endif
+ e2->szNameNoLocale = g_szName_KviTreeTaskBarFeaturesOptionsWidget;
+ e2->szName = __tr2qs_ctx_no_xgettext(g_szName_KviTreeTaskBarFeaturesOptionsWidget,"options");
+ e1->pChildList->append(e2);
+ e2->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviClassicTaskBarOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviClassicTaskBarOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviClassicTaskBarOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviClassicTaskBarOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviClassicTaskBarOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviClassicTaskBarOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviClassicTaskBarOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviClassicTaskBarOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviClassicTaskBarOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviClassicTaskBarOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviClassicTaskBarOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviClassicTaskBarOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviClassicTaskBarOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviClassicTaskBarOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviClassicTaskBarOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e0 = new KviOptionsWidgetInstanceEntry;
+ e0->createProc = &classKviTopicLabelLookOptionsWidget_createInstanceProc;
+ e0->pWidget = 0;
+ e0->szClassName = g_szClassName_KviTopicLabelLookOptionsWidget;
+ e0->iIcon = KVI_OPTIONS_WIDGET_ICON_KviTopicLabelLookOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviTopicLabelLookOptionsWidget
+ e0->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviTopicLabelLookOptionsWidget;
+ #else
+ e0->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviTopicLabelLookOptionsWidget
+ e0->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviTopicLabelLookOptionsWidget;
+ e0->szKeywords = __tr2qs_ctx_no_xgettext(e0->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviTopicLabelLookOptionsWidget
+ e0->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviTopicLabelLookOptionsWidget;
+ #else
+ e0->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviTopicLabelLookOptionsWidget
+ e0->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviTopicLabelLookOptionsWidget;
+ #else
+ e0->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTopicLabelLookOptionsWidget
+ e0->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviTopicLabelLookOptionsWidget;
+ #else
+ e0->bIsNotContained = false;
+ #endif
+ e0->szNameNoLocale = g_szName_KviTopicLabelLookOptionsWidget;
+ e0->szName = __tr2qs_ctx_no_xgettext(g_szName_KviTopicLabelLookOptionsWidget,"options");
+ m_pInstanceTree->append(e0);
+ e0->pChildList = 0;
+
+ e0 = new KviOptionsWidgetInstanceEntry;
+ e0->createProc = &classKviUserListLookOptionsWidget_createInstanceProc;
+ e0->pWidget = 0;
+ e0->szClassName = g_szClassName_KviUserListLookOptionsWidget;
+ e0->iIcon = KVI_OPTIONS_WIDGET_ICON_KviUserListLookOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviUserListLookOptionsWidget
+ e0->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviUserListLookOptionsWidget;
+ #else
+ e0->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviUserListLookOptionsWidget
+ e0->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviUserListLookOptionsWidget;
+ e0->szKeywords = __tr2qs_ctx_no_xgettext(e0->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviUserListLookOptionsWidget
+ e0->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviUserListLookOptionsWidget;
+ #else
+ e0->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviUserListLookOptionsWidget
+ e0->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviUserListLookOptionsWidget;
+ #else
+ e0->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviUserListLookOptionsWidget
+ e0->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviUserListLookOptionsWidget;
+ #else
+ e0->bIsNotContained = false;
+ #endif
+ e0->szNameNoLocale = g_szName_KviUserListLookOptionsWidget;
+ e0->szName = __tr2qs_ctx_no_xgettext(g_szName_KviUserListLookOptionsWidget,"options");
+ m_pInstanceTree->append(e0);
+
+ e0->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;
+ e0->pChildList->setAutoDelete(true);
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviUserListLookBackgroundOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviUserListLookBackgroundOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviUserListLookBackgroundOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviUserListLookBackgroundOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviUserListLookBackgroundOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviUserListLookBackgroundOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviUserListLookBackgroundOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviUserListLookBackgroundOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviUserListLookBackgroundOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviUserListLookBackgroundOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviUserListLookBackgroundOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviUserListLookBackgroundOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviUserListLookBackgroundOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviUserListLookBackgroundOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviUserListLookBackgroundOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviUserListLookForegroundOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviUserListLookForegroundOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviUserListLookForegroundOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviUserListLookForegroundOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviUserListLookForegroundOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviUserListLookForegroundOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviUserListLookForegroundOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviUserListLookForegroundOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviUserListLookForegroundOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviUserListLookForegroundOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviUserListLookForegroundOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviUserListLookForegroundOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviUserListLookForegroundOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviUserListLookForegroundOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviUserListLookForegroundOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviUserListGridOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviUserListGridOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviUserListGridOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviUserListGridOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviUserListGridOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviUserListGridOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviUserListGridOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviUserListGridOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviUserListGridOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviUserListGridOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviUserListGridOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviUserListGridOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviUserListGridOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviUserListGridOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviUserListGridOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+ e1 = new KviOptionsWidgetInstanceEntry;
+ e1->createProc = &classKviUserListFeaturesOptionsWidget_createInstanceProc;
+ e1->pWidget = 0;
+ e1->szClassName = g_szClassName_KviUserListFeaturesOptionsWidget;
+ e1->iIcon = KVI_OPTIONS_WIDGET_ICON_KviUserListFeaturesOptionsWidget;
+ #ifdef KVI_OPTIONS_WIDGET_PRIORITY_KviUserListFeaturesOptionsWidget
+ e1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_KviUserListFeaturesOptionsWidget;
+ #else
+ e1->iPriority = 0;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_KviUserListFeaturesOptionsWidget
+ e1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_KviUserListFeaturesOptionsWidget;
+ e1->szKeywords = __tr2qs_ctx_no_xgettext(e1->szKeywordsNoLocale,"options");;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_GROUP_KviUserListFeaturesOptionsWidget
+ e1->szGroup = KVI_OPTIONS_WIDGET_GROUP_KviUserListFeaturesOptionsWidget;
+ #else
+ e1->szGroup = "general";
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_CONTAINER_KviUserListFeaturesOptionsWidget
+ e1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_KviUserListFeaturesOptionsWidget;
+ #else
+ e1->bIsContainer = false;
+ #endif
+ #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_KviUserListFeaturesOptionsWidget
+ e1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_KviUserListFeaturesOptionsWidget;
+ #else
+ e1->bIsNotContained = false;
+ #endif
+ e1->szNameNoLocale = g_szName_KviUserListFeaturesOptionsWidget;
+ e1->szName = __tr2qs_ctx_no_xgettext(g_szName_KviUserListFeaturesOptionsWidget,"options");
+ e0->pChildList->append(e1);
+ e1->pChildList = 0;
+
+}
+
+void KviOptionsInstanceManager::deleteInstanceTree(KviPointerList<KviOptionsWidgetInstanceEntry> * l)
+{
+ if(l)
+ {
+ for(KviOptionsWidgetInstanceEntry * e = l->first();e;e = l->next())
+ {
+ if(e->pWidget)
+ {
+ if(e->pWidget->parent()->inherits("KviOptionsWidgetContainer"))
+ {
+ disconnect(e->pWidget,SIGNAL(destroyed()),this,SLOT(widgetDestroyed()));
+ delete e->pWidget->parent();
+ e->pWidget = 0;
+ } else {
+ debug("Ops...i have deleted the options dialog ?");
+ }
+ } //else debug("Clas %s has no widget",e->szName);
+ if(e->pChildList)deleteInstanceTree(e->pChildList);
+ }
+ delete l;
+ }
+}
+
+
+KviOptionsInstanceManager::~KviOptionsInstanceManager()
+{
+ if(m_pInstanceTree)debug("Ops...KviOptionsInstanceManager::cleanup() not called ?");
+}
+
+void KviOptionsInstanceManager::cleanup(KviModule * m)
+{
+ deleteInstanceTree(m_pInstanceTree);
+ m_pInstanceTree = 0;
+}
+
+void KviOptionsInstanceManager::widgetDestroyed()
+{
+ KviOptionsWidgetInstanceEntry * e = findInstanceEntry(sender(),m_pInstanceTree);
+ if(e)e->pWidget = 0;
+ if(g_iOptionWidgetInstances > 0)g_iOptionWidgetInstances--;
+
+}
+
+KviOptionsWidget * KviOptionsInstanceManager::getInstance(KviOptionsWidgetInstanceEntry * e,QWidget * par)
+{
+ if(!e)return 0;
+ if(!(e->pWidget))
+ {
+ e->pWidget = e->createProc(par);
+ g_iOptionWidgetInstances++;
+ connect(e->pWidget,SIGNAL(destroyed()),this,SLOT(widgetDestroyed()));
+ }
+ if(e->pWidget->parent() != par)
+ {
+ QWidget * oldPar = (QWidget *)e->pWidget->parent();
+ e->pWidget->reparent(par,QPoint(0,0));
+ delete oldPar;
+ }
+ if(e->bIsContainer)
+ {
+ // need to create the container structure!
+ e->pWidget->createTabbedPage();
+ if(e->pChildList)
+ {
+ KviPointerList<KviOptionsWidgetInstanceEntry> tmp;
+ tmp.setAutoDelete(false);
+
+ for(KviOptionsWidgetInstanceEntry * e2 = e->pChildList->first();e2;e2 = e->pChildList->next())
+ {
+ // add only non containers and widgets not explicitly marked as noncontained
+ if((!e2->bIsContainer) && (!e2->bIsNotContained))
+ {
+ KviOptionsWidgetInstanceEntry * ee = tmp.first();
+ int idx = 0;
+ while(ee)
+ {
+ if(ee->iPriority >= e2->iPriority)break;
+ idx++;
+ ee = tmp.next();
+ }
+ tmp.insert(idx,e2);
+ }
+ }
+
+ for(KviOptionsWidgetInstanceEntry * e3 = tmp.last();e3;e3 = tmp.prev())
+ {
+ KviOptionsWidget * ow = getInstance(e3,e->pWidget->tabWidget());
+ e->pWidget->addOptionsWidget(e3->szName,*(g_pIconManager->getSmallIcon(e3->iIcon)),ow);
+ }
+ }
+ }
+ return e->pWidget;
+}
+
+KviOptionsWidgetInstanceEntry * KviOptionsInstanceManager::findInstanceEntry(const QObject * ptr,KviPointerList<KviOptionsWidgetInstanceEntry> * l)
+{
+ if(l)
+ {
+ for(KviOptionsWidgetInstanceEntry * e = l->first();e;e = l->next())
+ {
+ if(ptr == e->pWidget)return e;
+ if(e->pChildList)
+ {
+ KviOptionsWidgetInstanceEntry * e2 = findInstanceEntry(ptr,e->pChildList);
+ if(e2)return e2;
+ }
+ }
+ }
+ return 0;
+}
+
+KviOptionsWidgetInstanceEntry * KviOptionsInstanceManager::findInstanceEntry(const char * clName,KviPointerList<KviOptionsWidgetInstanceEntry> * l)
+{
+ if(l)
+ {
+ for(KviOptionsWidgetInstanceEntry * e = l->first();e;e = l->next())
+ {
+ if(kvi_strEqualCI(e->szClassName,clName))return e;
+ if(e->pChildList)
+ {
+ KviOptionsWidgetInstanceEntry * e2 = findInstanceEntry(clName,e->pChildList);
+ if(e2)return e2;
+ }
+ }
+ }
+ return 0;
+}
+
+KviOptionsWidgetInstanceEntry * KviOptionsInstanceManager::findInstanceEntry(const char * clName)
+{
+ return findInstanceEntry(clName,m_pInstanceTree);
+}
+
+
+#include "m_instances.moc"
+
diff --git a/src/modules/options/instances.h b/src/modules/options/instances.h
new file mode 100644
index 00000000..fc8674cc
--- /dev/null
+++ b/src/modules/options/instances.h
@@ -0,0 +1,83 @@
+
+
+#ifndef __OPTIONS_INSTANCES_H__
+#define __OPTIONS_INSTANCES_H__
+
+//
+// File : instances.h
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001-2006 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+//
+// Instance creation routines for the KVIrc options module
+// DO NOT EDIT THIS FILE!! ALL CHANGES WILL BE LOST!!
+// This file is automatically generated by mkcreateinstanceproc.sh
+// so any change should go in that script
+//
+
+#include "kvi_optionswidget.h"
+#include "kvi_module.h"
+#include "kvi_pointerlist.h"
+#include "kvi_qstring.h"
+
+typedef struct _KviOptionsWidgetInstanceEntry KviOptionsWidgetInstanceEntry;
+
+
+typedef struct _KviOptionsWidgetInstanceEntry
+{
+ KviOptionsWidget * (*createProc)(QWidget *);
+ KviOptionsWidget * pWidget; // singleton
+ int iIcon;
+ QString szName;
+ QString szNameNoLocale;
+ const char * szClassName;
+ int iPriority;
+ QString szKeywords;
+ QString szKeywordsNoLocale;
+ QString szGroup;
+ bool bIsContainer;
+ bool bIsNotContained;
+ KviPointerList<KviOptionsWidgetInstanceEntry> * pChildList;
+ bool bDoInsert; // a helper for KviOptionsDialog::fillListView()
+} KviOptionsWidgetInstanceEntry;
+
+
+class KviOptionsInstanceManager : public QObject
+{
+ Q_OBJECT
+public:
+ KviOptionsInstanceManager();
+ virtual ~KviOptionsInstanceManager();
+protected:
+ KviPointerList<KviOptionsWidgetInstanceEntry> * m_pInstanceTree;
+public:
+ KviPointerList<KviOptionsWidgetInstanceEntry> * instanceEntryTree(){ return m_pInstanceTree; };
+ KviOptionsWidget * getInstance(KviOptionsWidgetInstanceEntry * e,QWidget * par);
+ KviOptionsWidgetInstanceEntry * findInstanceEntry(const char * clName);
+ void cleanup(KviModule * m);
+protected:
+ KviOptionsWidgetInstanceEntry * findInstanceEntry(const char * clName,KviPointerList<KviOptionsWidgetInstanceEntry> * l);
+ KviOptionsWidgetInstanceEntry * findInstanceEntry(const QObject * ptr,KviPointerList<KviOptionsWidgetInstanceEntry> * l);
+ void deleteInstanceTree(KviPointerList<KviOptionsWidgetInstanceEntry> * l);
+protected slots:
+ void widgetDestroyed();
+};
+
+#endif //__OPTIONS_INSTANCES_H__
+
diff --git a/src/modules/options/libkvioptions.cpp b/src/modules/options/libkvioptions.cpp
new file mode 100644
index 00000000..175b61ff
--- /dev/null
+++ b/src/modules/options/libkvioptions.cpp
@@ -0,0 +1,324 @@
+//============================================================================================
+//
+// File : libkvioptions.cpp
+// Creation date : Fri Aug 18 2000 15:04:09 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 1999-2006 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//============================================================================================
+
+#include "kvi_module.h"
+#include "kvi_options.h"
+#include "kvi_app.h"
+#include "kvi_frame.h"
+#include "kvi_window.h"
+#include "kvi_locale.h"
+#include "kvi_mirccntrl.h"
+#include "kvi_out.h"
+#include "kvi_splash.h"
+
+#include "container.h"
+#include "instances.h"
+
+#include "dialog.h"
+
+#include <qsplitter.h>
+#include "kvi_pointerhashtable.h"
+
+
+KviPointerHashTable<QString,KviOptionsDialog> * g_pOptionsDialogDict = 0;
+
+KviOptionsInstanceManager * g_pOptionsInstanceManager = 0;
+
+extern int g_iOptionWidgetInstances;
+
+/*
+ @doc: options.save
+ @type:
+ command
+ @title:
+ options.save
+ @short:
+ Saves the options to disk
+ @syntax:
+ options.save
+ @description:
+ Saves the options to disk; this includes aliases , popups ,
+ events and user preferences.
+*/
+
+static bool options_kvs_cmd_save(KviKvsModuleCommandCall * c)
+{
+ g_pApp->saveOptions();
+ return true;
+}
+
+
+/*
+ @doc: options.dialog
+ @type:
+ command
+ @title:
+ options.dialog
+ @short:
+ Shows the "options dialog"
+ @syntax:
+ options.dialog [-t] [options_group]
+ @description:
+ Shows the KVIrc options dialog for the specified options group.
+ If the [-t] switch is used , the dialog is opened as toplevel window,
+ otherwise it is opened as part of the current frame window.[br]
+ Valid values for [options_group] are "general" and "theme".
+ If [options_group] is omitted, the option group "general" is assumed.
+ This command is exported by the "options" module.
+ @seealso:
+ [fnc]$options.isDialog[/fnc]
+*/
+
+
+static bool options_kvs_cmd_dialog(KviKvsModuleCommandCall * c)
+{
+ QString szGroup;
+ KVSM_PARAMETERS_BEGIN(c)
+ KVSM_PARAMETER("options_group",KVS_PT_STRING,KVS_PF_OPTIONAL,szGroup)
+ KVSM_PARAMETERS_END(c)
+ if(szGroup.isEmpty())szGroup = "general";
+ KviOptionsDialog * d = g_pOptionsDialogDict->find(szGroup);
+ if(d)
+ {
+ if(c->hasSwitch('t',"toplevel"))
+ {
+ if(d->parent())
+ {
+ d->reparent(0,QPoint(0,0),true);
+ }
+ } else {
+ if(d->parent() != c->window()->frame()->splitter())
+ {
+ d->reparent(c->window()->frame()->splitter(),QPoint(0,0),true);
+ }
+ }
+ } else {
+ if(c->hasSwitch('t',"toplevel"))
+ {
+ d = new KviOptionsDialog(0,szGroup);
+ } else {
+ d = new KviOptionsDialog(c->window()->frame()->splitter(),szGroup);
+ }
+ g_pOptionsDialogDict->insert(szGroup,d);
+ }
+ d->raise();
+ d->show();
+ d->setFocus();
+ return true;
+}
+
+/*
+ @doc: options.pages
+ @type:
+ command
+ @title:
+ options.pages
+ @short:
+ Lists the option pages
+ @syntax:
+ options.pages
+ @description:
+ Lists the option pages available for editing by the means of [cmd]options.edit[/cmd].
+ @seealso:
+*/
+
+
+static void options_kvs_module_print_pages(KviKvsModuleCommandCall * c,KviOptionsWidgetInstanceEntry * e,const char * prefix)
+{
+ c->window()->output(KVI_OUT_SYSTEMMESSAGE,"%s%c%s%c (%Q)",prefix,KVI_TEXT_BOLD,e->szClassName,KVI_TEXT_BOLD,&(e->szName));
+ KviStr szPre = prefix;
+ szPre.append(" ");
+ if(e->pChildList)
+ {
+ for(KviOptionsWidgetInstanceEntry * ex = e->pChildList->first();ex;ex = e->pChildList->next())
+ {
+ options_kvs_module_print_pages(c,ex,szPre.ptr());
+ }
+ }
+}
+static bool options_kvs_cmd_pages(KviKvsModuleCommandCall * c)
+{
+ KviPointerList<KviOptionsWidgetInstanceEntry> * l = g_pOptionsInstanceManager->instanceEntryTree();
+
+ for(KviOptionsWidgetInstanceEntry * e = l->first();e;e = l->next())
+ {
+ options_kvs_module_print_pages(c,e,"");
+ }
+
+ return true;
+}
+
+/*
+ @doc: options.edit
+ @type:
+ command
+ @title:
+ options.edit [-m]
+ @short:
+ Shows a single options page
+ @syntax:
+ options.edit <"options page class name">
+ @description:
+ Shows an options page as toplevel dialog.
+ The available option pages can be listed by using [cmd]options.pages[/cmd].
+ If the -m switch is used, the dialog will appear as modal, blocking input
+ to the main frame until it's closed.
+ @seealso:
+*/
+
+static bool options_kvs_cmd_edit(KviKvsModuleCommandCall * c)
+{
+ QString szOption;
+ KVSM_PARAMETERS_BEGIN(c)
+ KVSM_PARAMETER("option",KVS_PT_STRING,0,szOption)
+ KVSM_PARAMETERS_END(c)
+ KviOptionsWidgetInstanceEntry * e = g_pOptionsInstanceManager->findInstanceEntry(szOption);
+ if(!e)
+ {
+ c->warning(__tr2qs_ctx("No such options page class name %Q","options"),&szOption);
+ return true;
+ }
+
+ if(e->pWidget)
+ {
+ //c->warning(__tr("The editor page is already open","options"));
+ e->pWidget->raise();
+ e->pWidget->setActiveWindow();
+ e->pWidget->setFocus();
+ return true;
+ }
+
+ QWidget * w;
+
+ if(c->hasSwitch('m',"modal"))
+ {
+ w = g_pApp->activeModalWidget();
+ if(!w)w = g_pFrame;
+ } else {
+ w = g_pFrame;
+ }
+
+ KviOptionsWidgetContainer * wc = new KviOptionsWidgetContainer(w,c->hasSwitch('m',"modal"));
+
+ wc->setup(g_pOptionsInstanceManager->getInstance(e,wc));
+
+ // a trick for the dialog covering the splash screen before the time (this is prolly a WM or Qt bug)
+ if(g_pSplashScreen)
+ {
+ if(g_pSplashScreen->isVisible()) // another bug: this ALWAYS RETURNS TRUE, even if the splash was hidden by a mouse click...
+ {
+ QObject::connect(g_pSplashScreen,SIGNAL(destroyed()),wc,SLOT(show()));
+ return true;
+ }
+ }
+
+ wc->show();
+ wc->raise();
+ return true;
+}
+
+/*
+ @doc: options.isdialog
+ @type:
+ function
+ @title:
+ $options.isdialog
+ @short:
+ Returns the options dialog state
+ @syntax:
+ <boolean> $options.isdialog([options_group:string])
+ @description:
+ Returns '1' if the options dialog for the specified options_group is open, '0' otherwise.[br]
+ If [options_group] is omitted then the group "general" is assumed.
+ At the moment of writing the valid [options_group] values are "general" and "theme".
+ This command is exported by the "options" module.
+ @seealso:
+ [cmd]options.dialog[/cmd]
+*/
+
+static bool options_kvs_fnc_isdialog(KviKvsModuleFunctionCall * c)
+{
+ QString szGroup;
+ KVSM_PARAMETERS_BEGIN(c)
+ KVSM_PARAMETER("options_group",KVS_PT_STRING,KVS_PF_OPTIONAL,szGroup)
+ KVSM_PARAMETERS_END(c)
+ if(szGroup.isEmpty())szGroup = "general";
+ c->returnValue()->setBoolean(g_pOptionsDialogDict->find(szGroup));
+ return true;
+}
+
+
+static bool options_module_init(KviModule * m)
+{
+ g_pOptionsInstanceManager = new KviOptionsInstanceManager();
+
+ KVSM_REGISTER_SIMPLE_COMMAND(m,"dialog",options_kvs_cmd_dialog);
+ KVSM_REGISTER_SIMPLE_COMMAND(m,"save",options_kvs_cmd_save);
+ KVSM_REGISTER_SIMPLE_COMMAND(m,"pages",options_kvs_cmd_pages);
+ KVSM_REGISTER_SIMPLE_COMMAND(m,"edit",options_kvs_cmd_edit);
+ KVSM_REGISTER_FUNCTION(m,"isDialog",options_kvs_fnc_isdialog);
+
+ g_pOptionsDialogDict = new KviPointerHashTable<QString,KviOptionsDialog>;
+ g_pOptionsDialogDict->setAutoDelete(false);
+
+ return true;
+}
+
+static bool options_module_cleanup(KviModule *m)
+{
+ KviPointerHashTableIterator<QString,KviOptionsDialog> it(*g_pOptionsDialogDict);
+ KviPointerList<KviOptionsDialog> l;
+ l.setAutoDelete(false);
+ KviOptionsDialog * d;
+ while(d = it.current())
+ {
+ l.append(d);
+ ++it;
+ }
+ for(d = l.first();d;d = l.next())delete d;
+ delete g_pOptionsDialogDict;
+ g_pOptionsDialogDict = 0;
+
+ g_pOptionsInstanceManager->cleanup(m);
+ delete g_pOptionsInstanceManager;
+ g_pOptionsInstanceManager = 0;
+
+ return true;
+}
+
+static bool options_module_can_unload(KviModule *m)
+{
+ return ((g_pOptionsDialogDict->isEmpty()) && (g_iOptionWidgetInstances == 0));
+}
+
+KVIRC_MODULE(
+ "Options", // module name
+ "1.0.0", // module version
+ "Copyright (C) 2000 Szymon Stefanek (pragma at kvirc dot net)", // author & (C)
+ "Options Dialog",
+ options_module_init,
+ options_module_can_unload,
+ 0,
+ options_module_cleanup
+)
diff --git a/src/modules/options/mkcreateinstanceproc.sh b/src/modules/options/mkcreateinstanceproc.sh
new file mode 100755
index 00000000..97be80b5
--- /dev/null
+++ b/src/modules/options/mkcreateinstanceproc.sh
@@ -0,0 +1,441 @@
+#!/bin/sh
+
+#####################################################################################################
+#
+# Generator for instances.h and instances.cpp
+#
+# This file is part of the KVirc irc client distribution
+# Copyright (C) 2001-2006 Szymon Stefanek (pragma at kvirc dot net)
+#
+#####################################################################################################
+
+
+echo "" > instances.h
+
+######################################################################################################
+cat >> instances.h <<EOF
+
+#ifndef __OPTIONS_INSTANCES_H__
+#define __OPTIONS_INSTANCES_H__
+
+//
+// File : instances.h
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001-2006 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+//
+// Instance creation routines for the KVIrc options module
+// DO NOT EDIT THIS FILE!! ALL CHANGES WILL BE LOST!!
+// This file is automatically generated by mkcreateinstanceproc.sh
+// so any change should go in that script
+//
+
+#include "kvi_optionswidget.h"
+#include "kvi_module.h"
+#include "kvi_pointerlist.h"
+#include "kvi_qstring.h"
+
+typedef struct _KviOptionsWidgetInstanceEntry KviOptionsWidgetInstanceEntry;
+
+
+typedef struct _KviOptionsWidgetInstanceEntry
+{
+ KviOptionsWidget * (*createProc)(QWidget *);
+ KviOptionsWidget * pWidget; // singleton
+ int iIcon;
+ QString szName;
+ QString szNameNoLocale;
+ const char * szClassName;
+ int iPriority;
+ QString szKeywords;
+ QString szKeywordsNoLocale;
+ QString szGroup;
+ bool bIsContainer;
+ bool bIsNotContained;
+ KviPointerList<KviOptionsWidgetInstanceEntry> * pChildList;
+ bool bDoInsert; // a helper for KviOptionsDialog::fillListView()
+} KviOptionsWidgetInstanceEntry;
+
+
+class KviOptionsInstanceManager : public QObject
+{
+ Q_OBJECT
+public:
+ KviOptionsInstanceManager();
+ virtual ~KviOptionsInstanceManager();
+protected:
+ KviPointerList<KviOptionsWidgetInstanceEntry> * m_pInstanceTree;
+public:
+ KviPointerList<KviOptionsWidgetInstanceEntry> * instanceEntryTree(){ return m_pInstanceTree; };
+ KviOptionsWidget * getInstance(KviOptionsWidgetInstanceEntry * e,QWidget * par);
+ KviOptionsWidgetInstanceEntry * findInstanceEntry(const char * clName);
+ void cleanup(KviModule * m);
+protected:
+ KviOptionsWidgetInstanceEntry * findInstanceEntry(const char * clName,KviPointerList<KviOptionsWidgetInstanceEntry> * l);
+ KviOptionsWidgetInstanceEntry * findInstanceEntry(const QObject * ptr,KviPointerList<KviOptionsWidgetInstanceEntry> * l);
+ void deleteInstanceTree(KviPointerList<KviOptionsWidgetInstanceEntry> * l);
+protected slots:
+ void widgetDestroyed();
+};
+
+#endif //__OPTIONS_INSTANCES_H__
+
+EOF
+######################################################################################################
+
+CLASS_LIST=`grep -h "[ ]*\:[ ]*public[ ]*KviOptionsWidget" optw_*.h | sed -e 's/[ ]*\:[ ]*public[ ]*KviOptionsWidget'//g | sed -e 's/[ ]*class[ ]*//g'`
+
+
+TARGET="instances.cpp"
+
+echo "" > $TARGET
+
+######################################################################################################
+cat >> instances.cpp <<EOF
+
+//
+// File : instances.cpp
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek ([email protected])
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+//
+// Instance creation routines for the KVIrc options module
+// DO NOT EDIT THIS FILE!! ALL CHANGES WILL BE LOST!!
+// This file is automatically generated by mkcreateinstanceproc.sh
+// so any change should go in that script
+//
+
+EOF
+######################################################################################################
+
+
+for afile in optw_*.h; do
+ echo "#include \"$afile\"" >> $TARGET
+done
+
+######################################################################################################
+cat >> instances.cpp <<EOF
+
+#include "kvi_locale.h"
+#include "kvi_iconmanager.h"
+#include "instances.h"
+
+int g_iOptionWidgetInstances = 0;
+
+EOF
+######################################################################################################
+
+
+for aclass in $CLASS_LIST; do
+ echo -n "KviOptionsWidget * class$aclass" >> $TARGET
+ echo "_createInstanceProc(QWidget * parent)" >> $TARGET
+ echo "{" >> $TARGET
+ echo " return new $aclass(parent);" >> $TARGET
+ echo "}" >> $TARGET
+ echo "" >> $TARGET
+done
+
+######################################################################################################
+cat >> instances.cpp <<EOF
+
+
+EOF
+######################################################################################################
+
+for aclass in $CLASS_LIST; do
+ echo "static const char * g_szName_$aclass = KVI_OPTIONS_WIDGET_NAME_$aclass;" >> $TARGET
+ echo "static const char * g_szClassName_$aclass = \"$aclass\";" >> $TARGET
+done
+
+######################################################################################################
+cat >> instances.cpp <<EOF
+
+KviOptionsInstanceManager::KviOptionsInstanceManager()
+: QObject(0)
+{
+
+ //debug("Instantiating");
+ // Create the global widget dict : case sensitive , do not copy keys
+ m_pInstanceTree = new KviPointerList<KviOptionsWidgetInstanceEntry>;
+ m_pInstanceTree->setAutoDelete(true);
+
+EOF
+######################################################################################################
+
+CLASSDIR=".classtmp"
+
+mkdir -p $CLASSDIR
+
+rm -f $CLASSDIR/*
+
+for aclass in $CLASS_LIST; do
+ PARENT=`grep -h "KVI_OPTIONS_WIDGET_PARENT_$aclass" optw_*.h | sed -e 's/#define//g' | sed -e s/KVI_OPTIONS_WIDGET_PARENT_$aclass//g | sed -e 's/[ ]*//g'`
+ if [ -z "$PARENT" ]; then
+ PARENT="NOPARENT"
+ fi
+ echo $aclass >> $CLASSDIR/$PARENT
+done
+
+SPACES=""
+
+printclass()
+{
+ echo "" >> $TARGET
+ found=
+ for anum in $DECLARED; do
+ if [ "$anum" = "$1" ]; then
+ found="yes"
+ break
+ fi
+ done
+ if [ -z "$found" ]; then
+ echo "$3 KviOptionsWidgetInstanceEntry * e$1;" >> $TARGET
+ DECLARED="$DECLARED $1"
+ fi
+ echo "$3 e$1 = new KviOptionsWidgetInstanceEntry;" >> $TARGET
+ echo -n "$3 e$1->createProc = &class$2" >> $TARGET
+ echo "_createInstanceProc;" >> $TARGET
+ echo "$3 e$1->pWidget = 0;" >> $TARGET
+ echo "$3 e$1->szClassName = g_szClassName_$2;" >> $TARGET
+ echo "$3 e$1->iIcon = KVI_OPTIONS_WIDGET_ICON_$2;" >> $TARGET
+
+ echo "$3 #ifdef KVI_OPTIONS_WIDGET_PRIORITY_$2" >> $TARGET
+ echo "$3 e$1->iPriority = KVI_OPTIONS_WIDGET_PRIORITY_$2;" >> $TARGET
+ echo "$3 #else" >> $TARGET
+ echo "$3 e$1->iPriority = 0;" >> $TARGET
+ echo "$3 #endif" >> $TARGET
+
+ echo "$3 #ifdef KVI_OPTIONS_WIDGET_KEYWORDS_$2" >> $TARGET
+ echo "$3 e$1->szKeywordsNoLocale = KVI_OPTIONS_WIDGET_KEYWORDS_$2;" >> $TARGET
+ echo "$3 e$1->szKeywords = __tr2qs_ctx_no_xgettext(e$1->szKeywordsNoLocale,\"options\");;" >> $TARGET
+ echo "$3 #endif" >> $TARGET
+
+ echo "$3 #ifdef KVI_OPTIONS_WIDGET_GROUP_$2" >> $TARGET
+ echo "$3 e$1->szGroup = KVI_OPTIONS_WIDGET_GROUP_$2;" >> $TARGET
+ echo "$3 #else" >> $TARGET
+ echo "$3 e$1->szGroup = \"general\";" >> $TARGET
+ echo "$3 #endif" >> $TARGET
+
+ echo "$3 #ifdef KVI_OPTIONS_WIDGET_CONTAINER_$2" >> $TARGET
+ echo "$3 e$1->bIsContainer = KVI_OPTIONS_WIDGET_CONTAINER_$2;" >> $TARGET
+ echo "$3 #else" >> $TARGET
+ echo "$3 e$1->bIsContainer = false;" >> $TARGET
+ echo "$3 #endif" >> $TARGET
+
+ echo "$3 #ifdef KVI_OPTIONS_WIDGET_NOTCONTAINED_$2" >> $TARGET
+ echo "$3 e$1->bIsNotContained = KVI_OPTIONS_WIDGET_NOTCONTAINED_$2;" >> $TARGET
+ echo "$3 #else" >> $TARGET
+ echo "$3 e$1->bIsNotContained = false;" >> $TARGET
+ echo "$3 #endif" >> $TARGET
+
+ echo "$3 e$1->szNameNoLocale = g_szName_$2;" >> $TARGET
+ echo "$3 e$1->szName = __tr2qs_ctx_no_xgettext(g_szName_$2,\"options\");" >> $TARGET
+
+ if [ "$1" = "0" ]; then
+ echo "$3 m_pInstanceTree->append(e$1);" >> $TARGET
+ else
+ VAL=`expr $1 - 1`
+ echo "$3 e$VAL->pChildList->append(e$1);" >> $TARGET
+ fi
+}
+
+addchildren()
+{
+ if [ -f "$CLASSDIR/$2" ]; then
+ LEVEL=`cat $CLASSDIR/$2`
+ for achild in $LEVEL; do
+ printclass $1 $achild "$3"
+ if [ -f "$CLASSDIR/$achild" ]; then
+ echo "" >> $TARGET
+ echo "$3 e$1->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;" >> $TARGET
+ echo "$3 e$1->pChildList->setAutoDelete(true);" >> $TARGET
+ NEXTLEVEL=`expr $1 + 1`
+ addchildren $NEXTLEVEL $achild "$3 "
+ else
+ echo "$3 e$1->pChildList = 0;" >> $TARGET
+ fi
+ done
+ fi
+}
+
+addchildren 0 NOPARENT ""
+
+
+rm -fr $CLASSDIR
+
+######################################################################################################
+cat >> $TARGET <<EOF
+
+}
+
+void KviOptionsInstanceManager::deleteInstanceTree(KviPointerList<KviOptionsWidgetInstanceEntry> * l)
+{
+ if(l)
+ {
+ for(KviOptionsWidgetInstanceEntry * e = l->first();e;e = l->next())
+ {
+ if(e->pWidget)
+ {
+ if(e->pWidget->parent()->inherits("KviOptionsWidgetContainer"))
+ {
+ disconnect(e->pWidget,SIGNAL(destroyed()),this,SLOT(widgetDestroyed()));
+ delete e->pWidget->parent();
+ e->pWidget = 0;
+ } else {
+ debug("Ops...i have deleted the options dialog ?");
+ }
+ } //else debug("Clas %s has no widget",e->szName);
+ if(e->pChildList)deleteInstanceTree(e->pChildList);
+ }
+ delete l;
+ }
+}
+
+
+KviOptionsInstanceManager::~KviOptionsInstanceManager()
+{
+ if(m_pInstanceTree)debug("Ops...KviOptionsInstanceManager::cleanup() not called ?");
+}
+
+void KviOptionsInstanceManager::cleanup(KviModule * m)
+{
+ deleteInstanceTree(m_pInstanceTree);
+ m_pInstanceTree = 0;
+}
+
+void KviOptionsInstanceManager::widgetDestroyed()
+{
+ KviOptionsWidgetInstanceEntry * e = findInstanceEntry(sender(),m_pInstanceTree);
+ if(e)e->pWidget = 0;
+ if(g_iOptionWidgetInstances > 0)g_iOptionWidgetInstances--;
+
+}
+
+KviOptionsWidget * KviOptionsInstanceManager::getInstance(KviOptionsWidgetInstanceEntry * e,QWidget * par)
+{
+ if(!e)return 0;
+ if(!(e->pWidget))
+ {
+ e->pWidget = e->createProc(par);
+ g_iOptionWidgetInstances++;
+ connect(e->pWidget,SIGNAL(destroyed()),this,SLOT(widgetDestroyed()));
+ }
+ if(e->pWidget->parent() != par)
+ {
+ QWidget * oldPar = (QWidget *)e->pWidget->parent();
+ e->pWidget->reparent(par,QPoint(0,0));
+ delete oldPar;
+ }
+ if(e->bIsContainer)
+ {
+ // need to create the container structure!
+ e->pWidget->createTabbedPage();
+ if(e->pChildList)
+ {
+ KviPointerList<KviOptionsWidgetInstanceEntry> tmp;
+ tmp.setAutoDelete(false);
+
+ for(KviOptionsWidgetInstanceEntry * e2 = e->pChildList->first();e2;e2 = e->pChildList->next())
+ {
+ // add only non containers and widgets not explicitly marked as noncontained
+ if((!e2->bIsContainer) && (!e2->bIsNotContained))
+ {
+ KviOptionsWidgetInstanceEntry * ee = tmp.first();
+ int idx = 0;
+ while(ee)
+ {
+ if(ee->iPriority >= e2->iPriority)break;
+ idx++;
+ ee = tmp.next();
+ }
+ tmp.insert(idx,e2);
+ }
+ }
+
+ for(KviOptionsWidgetInstanceEntry * e3 = tmp.last();e3;e3 = tmp.prev())
+ {
+ KviOptionsWidget * ow = getInstance(e3,e->pWidget->tabWidget());
+ e->pWidget->addOptionsWidget(e3->szName,*(g_pIconManager->getSmallIcon(e3->iIcon)),ow);
+ }
+ }
+ }
+ return e->pWidget;
+}
+
+KviOptionsWidgetInstanceEntry * KviOptionsInstanceManager::findInstanceEntry(const QObject * ptr,KviPointerList<KviOptionsWidgetInstanceEntry> * l)
+{
+ if(l)
+ {
+ for(KviOptionsWidgetInstanceEntry * e = l->first();e;e = l->next())
+ {
+ if(ptr == e->pWidget)return e;
+ if(e->pChildList)
+ {
+ KviOptionsWidgetInstanceEntry * e2 = findInstanceEntry(ptr,e->pChildList);
+ if(e2)return e2;
+ }
+ }
+ }
+ return 0;
+}
+
+KviOptionsWidgetInstanceEntry * KviOptionsInstanceManager::findInstanceEntry(const char * clName,KviPointerList<KviOptionsWidgetInstanceEntry> * l)
+{
+ if(l)
+ {
+ for(KviOptionsWidgetInstanceEntry * e = l->first();e;e = l->next())
+ {
+ if(kvi_strEqualCI(e->szClassName,clName))return e;
+ if(e->pChildList)
+ {
+ KviOptionsWidgetInstanceEntry * e2 = findInstanceEntry(clName,e->pChildList);
+ if(e2)return e2;
+ }
+ }
+ }
+ return 0;
+}
+
+KviOptionsWidgetInstanceEntry * KviOptionsInstanceManager::findInstanceEntry(const char * clName)
+{
+ return findInstanceEntry(clName,m_pInstanceTree);
+}
+
+
+#include "m_instances.moc"
+
+EOF
+######################################################################################################
+
diff --git a/src/modules/options/optw_antispam.cpp b/src/modules/options/optw_antispam.cpp
new file mode 100644
index 00000000..ba8180e6
--- /dev/null
+++ b/src/modules/options/optw_antispam.cpp
@@ -0,0 +1,64 @@
+//
+// File : optw_antispam.cpp
+// Creation date : Tue Oct 16 15:47:02 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "optw_antispam.h"
+
+#include <qlayout.h>
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+#include <qlabel.h>
+
+
+
+KviAntispamOptionsWidget::KviAntispamOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"antispam_options_widget")
+{
+ createLayout(3,1);
+
+ KviTalGroupBox *g = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("Enable Anti-spam For","options"));
+ m_b1 = addBoolSelector(g,__tr2qs_ctx("Private messages","options"),KviOption_boolUseAntiSpamOnPrivmsg);
+ connect(m_b1,SIGNAL(toggled(bool)),this,SLOT(reenableStuff(bool)));
+ m_b2 = addBoolSelector(g,__tr2qs_ctx("Private notices","options"),KviOption_boolUseAntiSpamOnNotice);
+ connect(m_b2,SIGNAL(toggled(bool)),this,SLOT(reenableStuff(bool)));
+
+ m_b3 = addBoolSelector(0,1,0,1,__tr2qs_ctx("Silent anti-spam (no warnings)","options"),KviOption_boolSilentAntiSpam);
+ m_sl = addStringListSelector(0,2,0,2,__tr2qs_ctx("Words considered spam:","options"),KviOption_stringlistSpamWords);
+
+ reenableStuff(true);
+
+ layout()->setRowStretch(2,1);
+}
+
+KviAntispamOptionsWidget::~KviAntispamOptionsWidget()
+{
+}
+
+void KviAntispamOptionsWidget::reenableStuff(bool)
+{
+ m_b3->setEnabled(m_b1->isChecked() || m_b2->isChecked());
+ m_sl->setEnabled(m_b1->isChecked() || m_b2->isChecked());
+}
+
+
+#include "m_optw_antispam.moc"
diff --git a/src/modules/options/optw_antispam.h b/src/modules/options/optw_antispam.h
new file mode 100644
index 00000000..28e51b41
--- /dev/null
+++ b/src/modules/options/optw_antispam.h
@@ -0,0 +1,47 @@
+#ifndef _OPTW_ANTISPAM_H_
+#define _OPTW_ANTISPAM_H_
+//
+// File : optw_antispam.h
+// Creation date : Tue Oct 16 15:47:03 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+
+#define KVI_OPTIONS_WIDGET_ICON_KviAntispamOptionsWidget KVI_SMALLICON_SPAM
+#define KVI_OPTIONS_WIDGET_NAME_KviAntispamOptionsWidget __tr2qs_no_lookup("Anti-spam")
+#define KVI_OPTIONS_WIDGET_PARENT_KviAntispamOptionsWidget KviProtectionOptionsWidget
+
+class KviAntispamOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviAntispamOptionsWidget(QWidget * parent);
+ ~KviAntispamOptionsWidget();
+protected:
+ KviBoolSelector * m_b1;
+ KviBoolSelector * m_b2;
+ KviBoolSelector * m_b3;
+ KviStringListSelector * m_sl;
+protected slots:
+ void reenableStuff(bool);
+};
+
+
+#endif //_OPTW_ANTISPAM_H_
diff --git a/src/modules/options/optw_avatar.cpp b/src/modules/options/optw_avatar.cpp
new file mode 100644
index 00000000..f93631fd
--- /dev/null
+++ b/src/modules/options/optw_avatar.cpp
@@ -0,0 +1,131 @@
+//=============================================================================
+//
+// File : optw_avatar.cpp
+// Creation date : Wed Nov 19 09:25:16 2005 GMT by Grifisx & Noldor
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2003-2006 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+#include "optw_avatar.h"
+
+#include "kvi_locale.h"
+#include "kvi_selectors.h"
+#include "kvi_options.h"
+
+#include "kvi_tal_tooltip.h"
+
+KviAvatarAdvancedOptionsWidget::KviAvatarAdvancedOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"avatar_advanced_options_widget")
+{
+ createLayout(4,1);
+ // AVATAR
+
+ // 1st Box
+ KviTalGroupBox *g = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("Scaling in userlist","options"));
+ KviBoolSelector *b = addBoolSelector(g,__tr2qs_ctx("Scale avatar images in userlist (recommended)","options"),KviOption_boolScaleAvatars);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(b,__tr2qs_ctx("<center>This option will force KVIrc to scale avatars" \
+ " shown in the userlist.<br>" \
+ "Avatars will be scaled to fit the " \
+ "constraints set below. Better keep this option on. :)</center>","options"));
+#endif
+ addBoolSelector(g,__tr2qs_ctx("Do not scale avatar if it is less than required size","options"),KviOption_boolDoNotStretchAvatars);
+
+ KviUIntSelector *u = addUIntSelector(g,__tr2qs_ctx("Image width:","options"),KviOption_uintAvatarScaleWidth,0,512,80,KVI_OPTION_BOOL(KviOption_boolScaleAvatars));
+ connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
+ u = addUIntSelector(g,__tr2qs_ctx("Image height:","options"),KviOption_uintAvatarScaleHeight,0,512,80,KVI_OPTION_BOOL(KviOption_boolScaleAvatars));
+ connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
+
+ //2nd
+ g = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("Scaling on load (and in user tooltips)","options"));
+ b = addBoolSelector(g,__tr2qs_ctx("Scale avatar images on image load","options"),KviOption_boolScaleAvatarsOnLoad);
+
+ u = addUIntSelector(g,__tr2qs_ctx("Image width:","options"),KviOption_uintScaleAvatarsOnLoadWidth,0,1280,80,KVI_OPTION_BOOL(KviOption_boolScaleAvatarsOnLoad));
+ connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
+ u = addUIntSelector(g,__tr2qs_ctx("Image height:","options"),KviOption_uintScaleAvatarsOnLoadHeight,0,1280,80,KVI_OPTION_BOOL(KviOption_boolScaleAvatarsOnLoad));
+ connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
+
+ // 2st Box
+ KviTalGroupBox *gs = addGroupBox(0,2,0,2,1,Qt::Horizontal,__tr2qs_ctx("Request CTCP","options"));
+ KviBoolSelector * bs = addBoolSelector(g,__tr2qs_ctx("Request missing avatars","options"),KviOption_boolRequestMissingAvatars);
+ KviUIntSelector * us = addUIntSelector(g,__tr2qs_ctx("Maximum requested file size:","options"),KviOption_uintMaximumRequestedAvatarSize,0,1048576,102400,KVI_OPTION_BOOL(KviOption_boolRequestMissingAvatars));
+
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(bs,
+ __tr2qs_ctx("<center>This option will cause KVIrc to send a DCC GET request " \
+ "when someone sets an avatar and there is no cached copy available.</center>","options"));
+#endif
+ us->setSuffix(__tr2qs_ctx(" bytes","options"));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(us,
+ __tr2qs_ctx("<center>This is the maximum size for avatar images that " \
+ "will be automatically requested.<br>" \
+ "A reasonable value might be 102400 bytes (100 K).</center>","options"));
+#endif
+ connect(bs,SIGNAL(toggled(bool)),us,SLOT(setEnabled(bool)));
+
+ bs = addBoolSelector(gs,__tr2qs_ctx("Automatically accept incoming avatars","options"),KviOption_boolAutoAcceptIncomingAvatars);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(
+ bs,
+ __tr2qs_ctx("<center>This option will cause KVIrc to auto-accept " \
+ "DCC SEND requests for incoming avatars.<br>" \
+ "If you're using the \"Request missing avatars\" option " \
+ "above, enabling this may by useful.<br>" \
+ "Avatars will be saved in the local KVIrc directory.</center>","options"));
+#endif
+
+ bs = addBoolSelector(gs,__tr2qs_ctx("Remember avatars for registered users","options"),KviOption_boolSetLastAvatarAsDefaultForRegisteredUsers);
+
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(
+ bs,
+ __tr2qs_ctx("<center>Use a user's last known avatar by default " \
+ "(only for users that are registered).</center>","options"));
+#endif
+
+ us = addUIntSelector(gs,__tr2qs_ctx("Avatar offer timeout:","options"),KviOption_uintAvatarOfferTimeoutInSecs,1,99999,60);
+ us->setSuffix(__tr2qs_ctx(" sec","options"));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(us,
+ __tr2qs_ctx("<center>This is the amount of time to make an avatar available for transfer when requested.<br>" \
+ "When someone sends a CTCP AVATAR request, " \
+ "KVIrc will reply with a CTCP AVATAR message containing the name and size " \
+ "of your avatar image.<br>" \
+ "A time-limited file offer is added for the image file " \
+ "to the requesting user.</center>","options"));
+#endif
+
+ bs = addBoolSelector(gs,__tr2qs_ctx("Ignore requests if no avatar is set","options"),KviOption_boolIgnoreChannelAvatarRequestsWhenNoAvatarSet);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(bs,
+ __tr2qs_ctx("This option will cause KVIrc to ignore channel CTCP AVATAR requests " \
+ "when you have no avatar set. This is usually a good practice since " \
+ "it helps in reducing traffic by not sending a reply that would be empty.","options"));
+#endif
+
+ addRowSpacer(0,3,0,3);
+}
+
+KviAvatarAdvancedOptionsWidget::~KviAvatarAdvancedOptionsWidget()
+{
+}
+
+
+#include "m_optw_avatar.moc"
diff --git a/src/modules/options/optw_avatar.h b/src/modules/options/optw_avatar.h
new file mode 100644
index 00000000..2235a659
--- /dev/null
+++ b/src/modules/options/optw_avatar.h
@@ -0,0 +1,45 @@
+#ifndef _OPTW_AVATAR_H_
+#define _OPTW_AVATAR_H_
+
+//=============================================================================
+//
+// File : optw_avatar.cpp
+// Creation date : Wed Nov 19 09:25:16 2005 GMT by Grifisx & Noldor
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2003 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+#include "kvi_optionswidget.h"
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviAvatarAdvancedOptionsWidget KVI_SMALLICON_AVATAR
+#define KVI_OPTIONS_WIDGET_NAME_KviAvatarAdvancedOptionsWidget __tr2qs_no_lookup("Avatars")
+#define KVI_OPTIONS_WIDGET_PARENT_KviAvatarAdvancedOptionsWidget KviToolsOptionsWidget
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviAvatarAdvancedOptionsWidget 9
+#define KVI_OPTIONS_WIDGET_MINIMAL_USER_EXPERIENCE_LEVEL_KviAvatarAdvancedOptionsWidget 2
+
+class KviAvatarAdvancedOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviAvatarAdvancedOptionsWidget(QWidget * parent);
+ ~KviAvatarAdvancedOptionsWidget();
+};
+
+#endif //!_OPTW_AVATAR_H_
diff --git a/src/modules/options/optw_away.cpp b/src/modules/options/optw_away.cpp
new file mode 100644
index 00000000..151b8446
--- /dev/null
+++ b/src/modules/options/optw_away.cpp
@@ -0,0 +1,71 @@
+//
+// File : optw_away.cpp
+// Creation date : Mon Oct 29 15:37:16 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+
+#include "optw_away.h"
+
+#include <qlayout.h>
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+//#warning "Info tips"
+
+
+KviAwayOptionsWidget::KviAwayOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"away_options_widget")
+{
+ createLayout(4,1);
+
+ addStringSelector(0,0,0,0, __tr2qs_ctx("Default away message:","options"), KviOption_stringAwayMessage);
+
+ addBoolSelector(0,1,0,1, __tr2qs_ctx("User input exits away mode","options"), KviOption_boolExitAwayOnInput);
+
+ KviTalGroupBox *g = addGroupBox(0,2,0,2,1,Qt::Horizontal,__tr2qs_ctx("Away Nickname","options"));
+ m_pEnableAwayNick = addBoolSelector(g,__tr2qs_ctx("Change nickname on away","options"),KviOption_boolChangeNickAway);
+ connect(m_pEnableAwayNick,SIGNAL(toggled(bool)),this,SLOT(enableCustomAwayText(bool)));
+
+ m_pEnableCustomAwayNick = addBoolSelector(g,__tr2qs_ctx("Use automatic nickname ([5 letters]AWAY)","options"),KviOption_boolAutoGeneratedAwayNick,KVI_OPTION_BOOL(KviOption_boolChangeNickAway));
+ connect(m_pEnableAwayNick,SIGNAL(toggled(bool)),m_pEnableCustomAwayNick,SLOT(setEnabled(bool)));
+ connect(m_pEnableCustomAwayNick,SIGNAL(toggled(bool)),this,SLOT(enableCustomAwayText(bool)));
+
+ // m_p <-- stands for pointer
+ // m_sz <-- stands for a string :)
+// m_szCustomAwayNick = addStringSelector(0,4,0,4,__tr2qs_ctx("Custom away nick","options"),KviOption_stringCustomAwayNick,KVI_OPTION_BOOL(KviOption_boolChangeNickAway) && !(KVI_OPTION_BOOL(KviOption_boolAutoGeneratedAwayNick)));
+
+ m_pCustomAwayNick = addStringSelector(g,__tr2qs_ctx("Custom nickname (%%nick%% means a current nick):","options"),KviOption_stringCustomAwayNick,KVI_OPTION_BOOL(KviOption_boolChangeNickAway) && !(KVI_OPTION_BOOL(KviOption_boolAutoGeneratedAwayNick)));
+
+ addRowSpacer(0,3,0,3);
+}
+
+KviAwayOptionsWidget::~KviAwayOptionsWidget()
+{
+}
+
+void KviAwayOptionsWidget::enableCustomAwayText(bool)
+{
+ m_pCustomAwayNick->setEnabled(m_pEnableAwayNick->isChecked() && !(m_pEnableCustomAwayNick->isChecked()));
+
+}
+
+
+#include "m_optw_away.moc"
diff --git a/src/modules/options/optw_away.h b/src/modules/options/optw_away.h
new file mode 100644
index 00000000..e8892faa
--- /dev/null
+++ b/src/modules/options/optw_away.h
@@ -0,0 +1,46 @@
+#ifndef _OPTW_AWAY_H_
+#define _OPTW_AWAY_H_
+//
+// File : optw_away.h
+// Creation date : Mon Oct 29 15:37:18 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+
+#define KVI_OPTIONS_WIDGET_ICON_KviAwayOptionsWidget KVI_SMALLICON_AWAY
+#define KVI_OPTIONS_WIDGET_NAME_KviAwayOptionsWidget __tr2qs_no_lookup("Away")
+#define KVI_OPTIONS_WIDGET_PARENT_KviAwayOptionsWidget KviToolsOptionsWidget
+
+class KviAwayOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviAwayOptionsWidget(QWidget * parent);
+ ~KviAwayOptionsWidget();
+protected:
+ KviBoolSelector * m_pEnableAwayNick;
+ KviBoolSelector * m_pEnableCustomAwayNick;
+ KviStringSelector * m_pCustomAwayNick;
+public slots:
+ void enableCustomAwayText(bool);
+
+};
+
+#endif //_OPTW_AWAY_H_
diff --git a/src/modules/options/optw_connection.cpp b/src/modules/options/optw_connection.cpp
new file mode 100644
index 00000000..608b47bd
--- /dev/null
+++ b/src/modules/options/optw_connection.cpp
@@ -0,0 +1,321 @@
+//=============================================================================
+//
+// File : optw_connection.cpp
+// Creation date : Sat Nov 24 04:25:16 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+#include "optw_connection.h"
+
+#include "kvi_settings.h"
+#include "kvi_locale.h"
+#include "kvi_options.h"
+#include "kvi_iconmanager.h"
+#include <qradiobutton.h>
+
+
+KviConnectionOptionsWidget::KviConnectionOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"connection_options_widget")
+{
+
+ createLayout(2,1);
+ KviTalGroupBox *gbox = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("On Disconnect","options"));
+
+
+ KviBoolSelector *b1 = addBoolSelector(gbox,__tr2qs_ctx("Keep channels open","options"),KviOption_boolKeepChannelsOpenOnDisconnect,true);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b1,__tr2qs_ctx("<center>This option will cause KVIrc to keep channels open after disconnect.</center>","options"));
+#endif
+
+ b1 = addBoolSelector(gbox,__tr2qs_ctx("Keep queries open","options"),KviOption_boolKeepQueriesOpenOnDisconnect,true);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b1,__tr2qs_ctx("<center>This option will cause KVIrc to keep queries open after disconnect.</center>","options"));
+#endif
+
+ gbox = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("On Unexpected Disconnect","options"));
+
+
+ b1 = addBoolSelector(gbox,__tr2qs_ctx("Keep channels open","options"),KviOption_boolKeepChannelsOpenOnUnexpectedDisconnect,true);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b1,__tr2qs_ctx("<center>This option will cause KVIrc to keep channels open after an unexpected disconnect.</center>","options"));
+#endif
+
+ b1 = addBoolSelector(gbox,__tr2qs_ctx("Keep queries open","options"),KviOption_boolKeepQueriesOpenOnUnexpectedDisconnect,true);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b1,__tr2qs_ctx("<center>This option will cause KVIrc to keep queries open after an unexpected disconnect.</center>","options"));
+#endif
+
+ b1 = addBoolSelector(gbox,__tr2qs_ctx("Rejoin channels after reconnect","options"),KviOption_boolRejoinChannelsAfterReconnect,KVI_OPTION_BOOL(KviOption_boolAutoReconnectOnUnexpectedDisconnect));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b1,__tr2qs_ctx("<center>This option will cause KVIrc to rejoin channels after a successful reconnect attempt.</center>","options"));
+#endif
+ b1 = addBoolSelector(gbox,__tr2qs_ctx("Reopen queries after reconnect","options"),KviOption_boolReopenQueriesAfterReconnect,KVI_OPTION_BOOL(KviOption_boolAutoReconnectOnUnexpectedDisconnect));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b1,__tr2qs_ctx("<center>This option will cause KVIrc to reopen query windows after a successful reconnect attempt.</center>","options"));
+#endif
+
+// gbox = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("On Unexpected Disconnect","options"));
+ KviBoolSelector * b = addBoolSelector(gbox,__tr2qs_ctx("Automatically reconnect","options"),KviOption_boolAutoReconnectOnUnexpectedDisconnect);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,__tr2qs_ctx("<center>This option will enable auto-reconnecting after an unexpected disconnect. " \
+ "An unexpected disconnect is the <b>termination</b> of a <b>fully connected IRC session</b> " \
+ "that was <b>not requested by the user</b> by the means of the QUIT message." \
+ "<p><b>Warning:</b> If you use /RAW to send a QUIT message to the server, " \
+ "this option will not behave correctly, since does not detect the outgoing " \
+ "QUIT message and will attempt to reconnect after the server has closed the connection. " \
+ "For this reason, always use the /QUIT command to close your connections. " \
+ "This option may also behave incorrectly with bouncers that support " \
+ "detaching, in this case a solution could be to prepare an alias that sends the " \
+ "bouncer \"detach\" command immediately before the \"quit\" command.<br>" \
+ "<tt>alias(bncdetach){ raw bouncer detach; quit; }</tt></p></center>","options"));
+#endif
+ KviUIntSelector * u = addUIntSelector(gbox,__tr2qs_ctx("Maximum attempts (0: unlimited):","options"),
+ KviOption_uintMaxAutoReconnectAttempts,0,100,5,
+ KVI_OPTION_BOOL(KviOption_boolAutoReconnectOnUnexpectedDisconnect));
+ connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
+
+ u = addUIntSelector(gbox,__tr2qs_ctx("Delay between attempts:","options"),
+ KviOption_uintAutoReconnectDelay,0,86400,5,
+ KVI_OPTION_BOOL(KviOption_boolAutoReconnectOnUnexpectedDisconnect));
+ u->setSuffix(__tr2qs_ctx(" sec","options"));
+ connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(u,__tr2qs_ctx("<center>Minimum value: <b>0 sec</b><br>Maximum value: <b>86400 sec</b></center>","options"));
+#endif
+
+
+
+
+ addRowSpacer(0,2,4,2);
+}
+
+
+KviConnectionOptionsWidget::~KviConnectionOptionsWidget()
+{
+}
+
+
+
+
+KviSSLOptionsWidget::KviSSLOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"ssl_options_widget")
+{
+#ifdef COMPILE_SSL_SUPPORT
+ createLayout(3,1);
+
+ KviTalGroupBox * gbox = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("Certificate","options"));
+
+ KviBoolSelector * b = addBoolSelector(gbox,__tr2qs_ctx("Use SSL certificate (PEM format only)","options"),
+ &(KVI_OPTION_BOOL(KviOption_boolUseSSLCertificate)),true);
+ KviFileSelector * f = addFileSelector(gbox,__tr2qs_ctx("Certificate location:","options"),
+ &(KVI_OPTION_STRING(KviOption_stringSSLCertificatePath)),KVI_OPTION_BOOL(KviOption_boolUseSSLCertificate));
+ connect(b,SIGNAL(toggled(bool)),f,SLOT(setEnabled(bool)));
+ KviPasswordSelector * p = new KviPasswordSelector(gbox,__tr2qs_ctx("Certificate password:","options"),
+ &(KVI_OPTION_STRING(KviOption_stringSSLCertificatePass)),KVI_OPTION_BOOL(KviOption_boolUseSSLCertificate));
+ connect(b,SIGNAL(toggled(bool)),p,SLOT(setEnabled(bool)));
+
+ gbox = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("Private Key","options"));
+ b = addBoolSelector(gbox,__tr2qs_ctx("Use SSL private key","options"),
+ &(KVI_OPTION_BOOL(KviOption_boolUseSSLPrivateKey)),true);
+ f = addFileSelector(gbox,__tr2qs_ctx("Private key location:","options"),
+ &(KVI_OPTION_STRING(KviOption_stringSSLPrivateKeyPath)),KVI_OPTION_BOOL(KviOption_boolUseSSLPrivateKey));
+ connect(b,SIGNAL(toggled(bool)),f,SLOT(setEnabled(bool)));
+ p = addPasswordSelector(gbox,__tr2qs_ctx("Private key password:","options"),
+ &(KVI_OPTION_STRING(KviOption_stringSSLPrivateKeyPass)),KVI_OPTION_BOOL(KviOption_boolUseSSLPrivateKey));
+ connect(b,SIGNAL(toggled(bool)),p,SLOT(setEnabled(bool)));
+ addRowSpacer(0,2,0,2);
+#else
+ createLayout(1,1);
+ addLabel(0,0,0,0,__tr2qs_ctx("This executable has no SSL support.","options"));
+#endif
+}
+
+KviSSLOptionsWidget::~KviSSLOptionsWidget()
+{
+}
+
+
+
+
+
+
+KviTransportOptionsWidget::KviTransportOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"transport_options_widget")
+{
+ createLayout(5,1);
+ KviUIntSelector * u;
+
+ KviTalGroupBox * g = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("Timeout Values","options"),this);
+ u = addUIntSelector(g,__tr2qs_ctx("Connect timeout:","options"),KviOption_uintIrcSocketTimeout,5,6000,60);
+ u->setSuffix(__tr2qs_ctx(" sec","options"));
+ u = addUIntSelector(g,__tr2qs_ctx("Outgoing data queue flush timeout:","options"),KviOption_uintSocketQueueFlushTimeout,100,2000,500);
+ u->setSuffix(__tr2qs_ctx(" msec","options"));
+ KviBoolSelector * b = addBoolSelector(0,1,0,1,__tr2qs_ctx("Limit outgoing traffic","options"),KviOption_boolLimitOutgoingTraffic);
+ u = addUIntSelector(0,2,0,2,__tr2qs_ctx("Limit to 1 message every:","options"),
+ KviOption_uintOutgoingTrafficLimitUSeconds,10000,2000000,10000000,KVI_OPTION_BOOL(KviOption_boolLimitOutgoingTraffic));
+ u->setSuffix(__tr2qs_ctx(" usec","options"));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(u,__tr2qs_ctx("<center>Minimum value: <b>10000 usec</b><br>Maximum value: <b>10000000 usec</b></center>","options"));
+#endif
+ connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
+
+ g = addGroupBox(0,3,0,3,2,Qt::Horizontal,__tr2qs_ctx("Network Interfaces","options"));
+
+ b = addBoolSelector(g,__tr2qs_ctx("Bind IPv4 connections to:","options"),KviOption_boolBindIrcIpV4ConnectionsToSpecifiedAddress);
+ KviStringSelector * s = addStringSelector(g,"",KviOption_stringIpV4ConnectionBindAddress,KVI_OPTION_BOOL(KviOption_boolBindIrcIpV4ConnectionsToSpecifiedAddress));
+ connect(b,SIGNAL(toggled(bool)),s,SLOT(setEnabled(bool)));
+#ifdef COMPILE_IPV6_SUPPORT
+ b = addBoolSelector(g,__tr2qs_ctx("Bind IPv6 connections to:","options"),KviOption_boolBindIrcIpV6ConnectionsToSpecifiedAddress);
+ s = addStringSelector(g,"",KviOption_stringIpV6ConnectionBindAddress,KVI_OPTION_BOOL(KviOption_boolBindIrcIpV6ConnectionsToSpecifiedAddress));
+ connect(b,SIGNAL(toggled(bool)),s,SLOT(setEnabled(bool)));
+#endif //!COMPILE_IPV6_SUPPORT
+
+ addRowSpacer(0,4,0,4);
+}
+
+KviTransportOptionsWidget::~KviTransportOptionsWidget()
+{
+}
+
+
+
+
+
+
+
+
+
+KviIdentOptionsWidget::KviIdentOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"ident_options_widget")
+{
+ createLayout(6,1);
+
+ m_pEnableIdent = addBoolSelector(0,0,0,0,__tr2qs_ctx("Enable ident service (bad practice on UNIX!)","options"),KviOption_boolUseIdentService);
+ connect(m_pEnableIdent,SIGNAL(toggled(bool)),this,SLOT(enableIpv4InIpv6(bool)));
+
+ KviTalGroupBox * gbox = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("Output verbosity","options"),KVI_OPTION_BOOL(KviOption_boolUseIdentService));
+ connect(m_pEnableIdent,SIGNAL(toggled(bool)),gbox,SLOT(setEnabled(bool)));
+
+ addLabel(gbox,__tr2qs_ctx("Output identd messages to:","options"));
+
+ m_pActiveRadio = new QRadioButton(__tr2qs_ctx("Active window","options"),gbox);
+ m_pConsoleRadio = new QRadioButton(__tr2qs_ctx("Console","options"),gbox);
+ m_pQuietRadio = new QRadioButton(__tr2qs_ctx("Do not show any identd messages","options"),gbox);
+
+ switch(KVI_OPTION_UINT(KviOption_uintIdentdOutputMode))
+ {
+ case KviIdentdOutputMode::Quiet :
+ m_pQuietRadio->setChecked(true);
+ break;
+ case KviIdentdOutputMode::ToConsole :
+ m_pConsoleRadio->setChecked(true);
+ break;
+ case KviIdentdOutputMode::ToActiveWindow :
+ m_pActiveRadio->setChecked(true);
+ break;
+ }
+
+ gbox = addGroupBox(0,2,0,2,1,Qt::Horizontal,__tr2qs_ctx("Configuration","options"),KVI_OPTION_BOOL(KviOption_boolUseIdentService));
+
+ KviBoolSelector *b = addBoolSelector(gbox,__tr2qs_ctx("Enable ident service only while connecting to server","options"),KviOption_boolUseIdentServiceOnlyOnConnect);
+ connect(m_pEnableIdent,SIGNAL(toggled(bool)),b,SLOT(setEnabled(bool)));
+
+ KviStringSelector * s = addStringSelector(gbox,__tr2qs_ctx("Ident username:","options"),
+ KviOption_stringIdentdUser,KVI_OPTION_BOOL(KviOption_boolUseIdentService));
+
+ KviUIntSelector * u = addUIntSelector(gbox,__tr2qs_ctx("Service port:","options"),
+ KviOption_uintIdentdPort,0,65535,113,KVI_OPTION_BOOL(KviOption_boolUseIdentService));
+ connect(m_pEnableIdent,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
+ connect(m_pEnableIdent,SIGNAL(toggled(bool)),gbox,SLOT(setEnabled(bool)));
+
+ gbox = addGroupBox(0,3,0,3,1,Qt::Horizontal,__tr2qs_ctx("IPv6 Settings","options"),KVI_OPTION_BOOL(KviOption_boolUseIdentService));
+ m_pEnableIpv6 = addBoolSelector(gbox,__tr2qs_ctx("Enable service for IPv6","options"),
+ KviOption_boolIdentdEnableIpV6,
+ KVI_OPTION_BOOL(KviOption_boolUseIdentService));
+#ifdef COMPILE_IPV6_SUPPORT
+ connect(m_pEnableIdent,SIGNAL(toggled(bool)),m_pEnableIpv6,SLOT(setEnabled(bool)));
+ connect(m_pEnableIpv6,SIGNAL(toggled(bool)),this,SLOT(enableIpv4InIpv6(bool)));
+#else
+ m_pEnableIpv6->setEnabled(false);
+#endif
+ m_pIpv4InIpv6 = addBoolSelector(gbox,__tr2qs_ctx("IP stack treats IPv4 as part of IPv6 namespace","options"),
+ KviOption_boolIdentdIpV6ContainsIpV4,
+ KVI_OPTION_BOOL(KviOption_boolUseIdentService) && KVI_OPTION_BOOL(KviOption_boolIdentdEnableIpV6));
+ connect(m_pEnableIdent,SIGNAL(toggled(bool)),gbox,SLOT(setEnabled(bool)));
+
+ addLabel(0,4,0,4,
+#ifdef COMPILE_ON_WINDOWS
+ __tr2qs_ctx("<p><b>Warning:</b><br>" \
+ "This is a <b>non RFC 1413 compliant</b> ident daemon that implements " \
+ "only a limited subset of the Identification Protocol specifications. If it is possible, install a " \
+ "real ident daemon.</p>","options")
+#else
+ __tr2qs_ctx("<p><b>Warning:</b><br>" \
+ "This is a <b>non RFC 1413 compliant</b> ident daemon that implements " \
+ "only a limited subset of the Identification Protocol specifications.<br>" \
+ "On UNIX, you may also need root privileges to bind to the auth port (113).<br>" \
+ "It is <b>highly recommended</b> that a <b>real</b> system-wide ident daemon be used instead, "\
+ "or none at all if ident is not required.</p>","options")
+#endif
+ );
+
+ addRowSpacer(0,5,0,5);
+}
+
+KviIdentOptionsWidget::~KviIdentOptionsWidget()
+{
+}
+
+void KviIdentOptionsWidget::commit()
+{
+ KviOptionsWidget::commit();
+ if(m_pConsoleRadio->isOn())
+ KVI_OPTION_UINT(KviOption_uintIdentdOutputMode)=KviIdentdOutputMode::ToConsole;
+ if(m_pActiveRadio->isOn())
+ KVI_OPTION_UINT(KviOption_uintIdentdOutputMode)=KviIdentdOutputMode::ToActiveWindow;
+ if(m_pQuietRadio->isOn())
+ KVI_OPTION_UINT(KviOption_uintIdentdOutputMode)=KviIdentdOutputMode::Quiet;
+}
+
+void KviIdentOptionsWidget::enableIpv4InIpv6(bool)
+{
+#ifdef COMPILE_IPV6_SUPPORT
+ m_pIpv4InIpv6->setEnabled(m_pEnableIdent->isChecked() && m_pEnableIpv6->isChecked());
+#endif
+}
+
+
+
+
+
+
+
+KviConnectionAdvancedOptionsWidget::KviConnectionAdvancedOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"connection_advanced_options_widget")
+{
+
+}
+
+KviConnectionAdvancedOptionsWidget::~KviConnectionAdvancedOptionsWidget()
+{
+
+}
+
+#include "m_optw_connection.moc"
diff --git a/src/modules/options/optw_connection.h b/src/modules/options/optw_connection.h
new file mode 100644
index 00000000..189ee4a0
--- /dev/null
+++ b/src/modules/options/optw_connection.h
@@ -0,0 +1,116 @@
+#ifndef _OPTW_CONNECTION_H_
+#define _OPTW_CONNECTION_H_
+//
+// File : optw_connection.h
+// Creation date : Sat Nov 24 04:25:12 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001-2006 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+
+#define KVI_OPTIONS_WIDGET_ICON_KviConnectionOptionsWidget KVI_SMALLICON_WORLD
+#define KVI_OPTIONS_WIDGET_NAME_KviConnectionOptionsWidget __tr2qs_no_lookup("Connection")
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviConnectionOptionsWidget 98000
+
+class KviConnectionOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviConnectionOptionsWidget(QWidget * parent);
+ ~KviConnectionOptionsWidget();
+};
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviConnectionAdvancedOptionsWidget KVI_SMALLICON_WORLD
+#define KVI_OPTIONS_WIDGET_NAME_KviConnectionAdvancedOptionsWidget __tr2qs_no_lookup("Advanced")
+#define KVI_OPTIONS_WIDGET_PARENT_KviConnectionAdvancedOptionsWidget KviConnectionOptionsWidget
+#define KVI_OPTIONS_WIDGET_CONTAINER_KviConnectionAdvancedOptionsWidget true
+
+class KviConnectionAdvancedOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviConnectionAdvancedOptionsWidget(QWidget * parent);
+ ~KviConnectionAdvancedOptionsWidget();
+};
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviSSLOptionsWidget KVI_SMALLICON_SSL
+#define KVI_OPTIONS_WIDGET_NAME_KviSSLOptionsWidget __tr2qs_no_lookup("SSL")
+#define KVI_OPTIONS_WIDGET_PARENT_KviSSLOptionsWidget KviConnectionAdvancedOptionsWidget
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviSSLOptionsWidget 30
+
+
+
+class KviSSLOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviSSLOptionsWidget(QWidget * parent);
+ ~KviSSLOptionsWidget();
+};
+
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviTransportOptionsWidget KVI_SMALLICON_SOCKETERROR
+#define KVI_OPTIONS_WIDGET_NAME_KviTransportOptionsWidget __tr2qs_no_lookup("Socket")
+#define KVI_OPTIONS_WIDGET_PARENT_KviTransportOptionsWidget KviConnectionAdvancedOptionsWidget
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviTransportOptionsWidget 20
+
+
+class KviTransportOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviTransportOptionsWidget(QWidget * parent);
+ ~KviTransportOptionsWidget();
+};
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviIdentOptionsWidget KVI_SMALLICON_IDENT
+#define KVI_OPTIONS_WIDGET_NAME_KviIdentOptionsWidget __tr2qs_no_lookup("Ident Service")
+#define KVI_OPTIONS_WIDGET_PARENT_KviIdentOptionsWidget KviConnectionAdvancedOptionsWidget
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviIdentOptionsWidget 10
+
+class QRadioButton;
+
+class KviIdentOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviIdentOptionsWidget(QWidget * parent);
+ ~KviIdentOptionsWidget();
+
+ virtual void commit();
+protected:
+ KviBoolSelector * m_pEnableIdent;
+ KviBoolSelector * m_pEnableIpv6;
+ KviBoolSelector * m_pIpv4InIpv6;
+
+ QRadioButton *m_pConsoleRadio;
+ QRadioButton *m_pActiveRadio;
+ QRadioButton *m_pQuietRadio;
+public slots:
+ void enableIpv4InIpv6(bool);
+};
+
+
+
+
+#endif //_OPTW_CONNECTION_H_
diff --git a/src/modules/options/optw_ctcp.cpp b/src/modules/options/optw_ctcp.cpp
new file mode 100644
index 00000000..3913751e
--- /dev/null
+++ b/src/modules/options/optw_ctcp.cpp
@@ -0,0 +1,90 @@
+//
+// File : optw_ctcp.cpp
+// Creation date : Sun Dec 2 20:40:43 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "optw_ctcp.h"
+
+#include "kvi_settings.h"
+#include "kvi_locale.h"
+#include "kvi_options.h"
+
+//#ifdef COMPILE_INFO_TIPS
+// #include "kvi_tal_tooltip.h"
+//#endif
+
+KviCtcpOptionsWidget::KviCtcpOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"ctcp_options_widget")
+{
+
+ createLayout(4,1);
+
+ QLabel * l;
+ l = addLabel(0,0,0,0,__tr2qs_ctx("<center><b>Settings for CTCP.</b></center>"\
+ "<p>The <b>Client-To-Client Protocol</b> (CTCP) " \
+ "is used to transmit special control messages over an IRC connection. " \
+ "These messages can request information from clients or negotiate file transfers." \
+ "<br><br></p>","options"));
+
+
+ KviTalGroupBox *gs = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("CTCP Replies","options"));
+ KviStringSelector * s = addStringSelector(gs, __tr2qs_ctx("Append to VERSION reply:","options"),KviOption_stringCtcpVersionPostfix);
+
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(s,
+ __tr2qs_ctx("<center>This text will be appended to the CTCP VERSION reply.<br>For example, you can place a script name here.</center>","options"));
+#endif
+
+ s = addStringSelector(gs, __tr2qs_ctx("Append to SOURCE reply:","options"),KviOption_stringCtcpSourcePostfix);
+
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(s,
+ __tr2qs_ctx("<center>This text will be appended to the CTCP SOURCE reply.<br>For example, you can place the source URL for a script here.</center>","options"));
+#endif
+
+// s = addStringSelector(gs, __tr2qs_ctx("USERINFO reply:","options"),KviOption_stringCtcpUserinfoReply);
+
+//#ifdef COMPILE_INFO_TIPS
+// mergeTip(s,
+// __tr2qs_ctx("<center>This is the CTCP USERINFO reply.<br>It can contain some information about yourself.</center>","options"));
+//#endif
+
+ s = addStringSelector(gs, __tr2qs_ctx("PAGE reply:","options"),KviOption_stringCtcpPageReply);
+
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(s,
+ __tr2qs_ctx("<center>This is the CTCP PAGE reply.<br>It should contain some sort of acknowledgement for CTCP PAGE messages.</center>","options"));
+#endif
+
+ addBoolSelector(gs,__tr2qs_ctx("Show the CTCP replies in the active window","options"),KviOption_boolCtcpRepliesToActiveWindow);
+
+ addBoolSelector(gs,__tr2qs_ctx("Show dialog for CTCP page requests","options"),KviOption_boolShowDialogOnCtcpPage);
+
+ addRowSpacer(0,3,0,3);
+
+}
+
+
+KviCtcpOptionsWidget::~KviCtcpOptionsWidget()
+{
+}
+
+
+#include "m_optw_ctcp.moc"
diff --git a/src/modules/options/optw_ctcp.h b/src/modules/options/optw_ctcp.h
new file mode 100644
index 00000000..55bdb238
--- /dev/null
+++ b/src/modules/options/optw_ctcp.h
@@ -0,0 +1,41 @@
+#ifndef _OPTW_CTCP_H_
+#define _OPTW_CTCP_H_
+//
+// File : optw_ctcp.h
+// Creation date : Sun Dec 2 20:40:43 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+
+#define KVI_OPTIONS_WIDGET_ICON_KviCtcpOptionsWidget KVI_SMALLICON_CTCPREQUESTREPLIED
+#define KVI_OPTIONS_WIDGET_NAME_KviCtcpOptionsWidget __tr2qs_no_lookup("CTCP")
+#define KVI_OPTIONS_WIDGET_PARENT_KviCtcpOptionsWidget KviToolsOptionsWidget
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviCtcpOptionsWidget 70000
+
+class KviCtcpOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviCtcpOptionsWidget(QWidget * parent);
+ ~KviCtcpOptionsWidget();
+};
+
+
+#endif //_OPTW_CTCP_H_
diff --git a/src/modules/options/optw_ctcpfloodprotection.cpp b/src/modules/options/optw_ctcpfloodprotection.cpp
new file mode 100644
index 00000000..f814858e
--- /dev/null
+++ b/src/modules/options/optw_ctcpfloodprotection.cpp
@@ -0,0 +1,116 @@
+//
+// File : optw_ctcpfloodprotection.cpp
+// Creation date : Sun Jan 21 2001 14:35:06 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "optw_ctcpfloodprotection.h"
+
+#include <qlayout.h>
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+#include <qlabel.h>
+
+/*
+ @doc: ctcpfloodprotectionoptions
+ @type:
+ widget
+ @title:
+ CTCP flood protection options
+ @short:
+ Protection against CTCP flooding
+ @keyterms:
+ ctcp flood
+ @body:
+ Here, you can configure the CTCP flood protection system.[br]
+ The CTCP engine in IRC clients may be subject to an attack, called "CTCP flooding".[br]
+ Basically, the attackers (usually there is more than one offending client) sends a stream
+ of CTCP requests to the victim's client, and the client attempts to respond to all requests
+ by sending a stream of replies to the server, which causes the server to disconnect the user
+ due to "excess flood" for sending too many messages before the server can process them.[br]
+ Many user defined scripts choose to completely ignore all the CTCP requests in order to prevent such attacks.[br]
+ KVIrc offers an alternative method that allows you to take advantage of the CTCP protocol
+ and at the same time prevent the flood attacks.[br]
+ The method is really simple: The client will only respond to a limited number of CTCP requests within a
+ specified time interval.[br]
+ The "Use flood protection" option enables this protection method.[br]
+ In the "Allowed up to" field you should enter the maximum number of CTCP requests that KVIrc should
+ respond to within the interval of time defined in the second field.[br]
+ A strong protection against floods would be replying to 4 requests every 20 seconds.[br]
+ The minimum effective setting is about 3 messages every 6 seconds.[br]
+ Please note that 3 messages every 6 seconds is NOT the same as 10 messages every 20 seconds;
+ the first setting would allow 3 requests within one second, but the client would
+ ignore all the requests for the next 5 seconds, the second setting would allow 10 messages within one second
+ and ignore everything for the next 19 seconds. Therefore, 3/6 is a safer setting.[br]
+ The maximum protection you can set is 0 messages within any number of seconds; in that case any
+ CTCP request will be considered a flood and ignored.[br]
+ [br][br]
+ You can also decide to ignore specific CTCP requests. For example, if you don't want to reply to PING
+ requests, just select "PING" under the "Ignored Requests" section.[br]
+ [br][br]
+ Some specific protection options can be set also in other CTCP options sections:
+ see the [widget:ctcpavatarprotooptions]CTCP AVATAR protocol options[/widget] and [widget:ctcpdccprotooptions]CTCP DCC protocol options[/widget].[br]
+*/
+
+
+KviCtcpFloodProtectionOptionsWidget::KviCtcpFloodProtectionOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"ctcpfloodprotection_options_widget")
+{
+ createLayout(4,2);
+
+ KviBoolSelector * b = addBoolSelector(0,0,1,0,__tr2qs_ctx("Use flood protection (recommended)","options"),KviOption_boolUseCtcpFloodProtection);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,__tr2qs_ctx("<center>This option makes KVIrc only respond to a limited number of CTCP requests within a specified time interval, to prevent \"flooding\" CTCP messages.</center>","options"));
+#endif
+ KviUIntSelector * u = addUIntSelector(0,1,0,1,__tr2qs_ctx("Allow up to:","options"),KviOption_uintMaxCtcpRequests,0,10000,3,KVI_OPTION_BOOL(KviOption_boolUseCtcpFloodProtection));
+ u->setSuffix(__tr2qs_ctx(" requests","options"));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(u,__tr2qs_ctx("<center>Minimum value: <b>0 requests</b><br>Maximum value: <b>10000 requests</b></center>","options"));
+#endif
+ connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
+ u = addUIntSelector(1,1,1,1,__tr2qs_ctx("within:","options"),KviOption_uintCtcpFloodCheckInterval,1,3600,6,KVI_OPTION_BOOL(KviOption_boolUseCtcpFloodProtection));
+ u->setSuffix(__tr2qs_ctx(" sec","options"));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(u,__tr2qs_ctx("<center>Minimum value: <b>1 sec</b><br>Maximum value: <b>3600 sec</b></center>","options"));
+#endif
+ connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
+
+ KviTalGroupBox * g = addGroupBox(0,2,1,2,2,Qt::Horizontal,__tr2qs_ctx("Ignored Requests","options"));
+ addBoolSelector(g,__tr2qs_ctx("PING","options"),KviOption_boolIgnoreCtcpPing);
+ addBoolSelector(g,__tr2qs_ctx("FINGER","options"),KviOption_boolIgnoreCtcpFinger);
+ addBoolSelector(g,__tr2qs_ctx("CLIENTINFO","options"),KviOption_boolIgnoreCtcpClientinfo);
+ addBoolSelector(g,__tr2qs_ctx("USERINFO","options"),KviOption_boolIgnoreCtcpUserinfo);
+ addBoolSelector(g,__tr2qs_ctx("VERSION","options"),KviOption_boolIgnoreCtcpVersion);
+ addBoolSelector(g,__tr2qs_ctx("SOURCE","options"),KviOption_boolIgnoreCtcpSource);
+ addBoolSelector(g,__tr2qs_ctx("TIME","options"),KviOption_boolIgnoreCtcpTime);
+ addBoolSelector(g,__tr2qs_ctx("PAGE","options"),KviOption_boolIgnoreCtcpPage);
+ addBoolSelector(g,__tr2qs_ctx("AVATAR","options"),KviOption_boolIgnoreCtcpAvatar);
+ addBoolSelector(g,__tr2qs_ctx("DCC/TDCC","options"),KviOption_boolIgnoreCtcpDcc);
+
+ addRowSpacer(0,3,1,3);
+}
+
+KviCtcpFloodProtectionOptionsWidget::~KviCtcpFloodProtectionOptionsWidget()
+{
+}
+
+
+#include "m_optw_ctcpfloodprotection.moc"
diff --git a/src/modules/options/optw_ctcpfloodprotection.h b/src/modules/options/optw_ctcpfloodprotection.h
new file mode 100644
index 00000000..43f28fbe
--- /dev/null
+++ b/src/modules/options/optw_ctcpfloodprotection.h
@@ -0,0 +1,41 @@
+#ifndef _OPTW_CTCPFLOODPROTECTION_H_
+#define _OPTW_CTCPFLOODPROTECTION_H_
+
+//
+// File : optw_ctcpfloodprotection.h
+// Creation date : Sun Jan 21 2000 14:34:12 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+
+#define KVI_OPTIONS_WIDGET_ICON_KviCtcpFloodProtectionOptionsWidget KVI_SMALLICON_CTCPREQUESTFLOOD
+#define KVI_OPTIONS_WIDGET_NAME_KviCtcpFloodProtectionOptionsWidget __tr2qs_no_lookup("Flood Protection")
+#define KVI_OPTIONS_WIDGET_PARENT_KviCtcpFloodProtectionOptionsWidget KviProtectionOptionsWidget
+
+class KviCtcpFloodProtectionOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+// Q_CLASSINFO("help","ctcpfloodprotectionoptions")
+public:
+ KviCtcpFloodProtectionOptionsWidget(QWidget * parent);
+ ~KviCtcpFloodProtectionOptionsWidget();
+};
+
+#endif //!_OPTW_CTCPFLOODPROTECTION_H_
diff --git a/src/modules/options/optw_dcc.cpp b/src/modules/options/optw_dcc.cpp
new file mode 100644
index 00000000..1b792da3
--- /dev/null
+++ b/src/modules/options/optw_dcc.cpp
@@ -0,0 +1,393 @@
+//=============================================================================
+//
+// File : optw_dcc.cpp
+// Creation date : Fri Aug 17 22:08:09 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001-2004 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+#include "optw_dcc.h"
+
+#include <qlayout.h>
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+//#warning "Info tips"
+
+KviDccOptionsWidget::KviDccOptionsWidget(QWidget * pParent)
+: KviOptionsWidget(pParent)
+{
+}
+
+KviDccOptionsWidget::~KviDccOptionsWidget()
+{
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+KviDccGeneralOptionsWidget::KviDccGeneralOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"dccgeneral_options_widget")
+{
+ createLayout(2,1);
+
+ KviBoolSelector * b = addBoolSelector(0,0,0,0,__tr2qs_ctx("Use workaround for firewall","options"),KviOption_boolCantAcceptIncomingDccConnections);
+
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,__tr2qs_ctx("<center>Enable this option if you can't accept incoming connections.<br>" \
+ "KVIrc will try to use different methods to send and receive files.<br>" \
+ "Please note that these methods may NOT work when communicating with a non-KVIrc client.</center>","options"));
+#endif
+
+ addRowSpacer(0,1,0,1);
+}
+
+KviDccGeneralOptionsWidget::~KviDccGeneralOptionsWidget()
+{
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+KviDccAdvancedOptionsWidget::KviDccAdvancedOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"dccgeneral_options_widget")
+{
+ createLayout(5,1);
+
+ KviTalGroupBox * g = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("Network Properties","options"));
+
+ KviBoolSelector * b = addBoolSelector(g,__tr2qs_ctx("Use user-defined address or network interface","options"),KviOption_boolDccListenOnSpecifiedInterfaceByDefault);
+
+
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,__tr2qs_ctx("<center>Enable this option if you are on a multihost machine and want " \
+ "to force one of the available IP addresses to be used for outgoing DCCs.<br>This is especially useful " \
+ "when you use IPv6 and IPv4 addresses.<br>You can force KVIrc to always choose the IPv4 interface.</center>","options"));
+#endif
+
+ KviStringSelector * s = addStringSelector(g,__tr2qs_ctx("Listen on address/interface:","options"),KviOption_stringDccListenDefaultInterface,KVI_OPTION_BOOL(KviOption_boolDccListenOnSpecifiedInterfaceByDefault));
+
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(s,__tr2qs_ctx("<center>This is the IP address or name of the interface to use by default for outgoing DCC transfers.<br>" \
+ "On UNIX systems that support it, you can also specify IPv4 interface names (such as <b>ppp0</b>).<br>" \
+ "If you set it to <b>0.0.0.0</b>, KVIrc will try to use the first available IPv4 interface</center>","options"));
+#endif
+
+ connect(b,SIGNAL(toggled(bool)),s,SLOT(setEnabled(bool)));
+
+ b = addBoolSelector(g,__tr2qs_ctx("Use user-defined port range","options"),KviOption_boolUserDefinedPortRange);
+
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,__tr2qs_ctx("<center>Enable this option if you want specify a local port range for DCC.</center>","options"));
+#endif
+
+ KviTalHBox * hb = new KviTalHBox(g);
+ hb->setSpacing(4);
+ KviUIntSelector * u = addUIntSelector(hb,__tr2qs_ctx("Lowest port:","options"),KviOption_uintDccMinPort,1,65535,5000,KVI_OPTION_BOOL(KviOption_boolUserDefinedPortRange));
+ connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
+
+ u = addUIntSelector(hb,__tr2qs_ctx("Highest port:","options"),KviOption_uintDccMaxPort,1,65535,30000,KVI_OPTION_BOOL(KviOption_boolUserDefinedPortRange));
+ connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
+
+ b = addBoolSelector(g,__tr2qs_ctx("Send a fixed address in requests","options"),KviOption_boolDccSendFakeAddressByDefault);
+
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,__tr2qs_ctx("<center>Enable this option if you want to always send a fake IP address in your DCC requests.<br>" \
+ "This might be useful if you're behind a router with a static address that does network address translation (NAT) and forwards all or a range of ports.</center>","options"));
+#endif
+
+ s = addStringSelector(g,__tr2qs_ctx("Send address/interface:","options"),KviOption_stringDefaultDccFakeAddress,KVI_OPTION_BOOL(KviOption_boolDccSendFakeAddressByDefault));
+ connect(b,SIGNAL(toggled(bool)),s,SLOT(setEnabled(bool)));
+
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(s,__tr2qs_ctx("<center>This is the fixed address that will be sent with all DCC requests if you enable the option above.</center>","options"));
+#endif
+
+ KviBoolSelector * b2;
+ b2 = addBoolSelector(g,__tr2qs_ctx("Guess address from IRC server if unroutable","options"),
+ KviOption_boolDccGuessIpFromServerWhenLocalIsUnroutable,!KVI_OPTION_BOOL(KviOption_boolDccSendFakeAddressByDefault));
+ connect(b,SIGNAL(toggled(bool)),b2,SLOT(setNotEnabled(bool)));
+
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b2,__tr2qs_ctx("<center>You can enable this option if you are behind a router that forwards all or a range of ports.<br>" \
+ "KVIrc will try to guess the IP address to use for DCC by looking up the local hostname as seen " \
+ "by the IRC server you're connected to.<br>This method is an exclusive alternative to the \"fixed address\" above.<br>" \
+ "It might guess the correct address automatically if certain conditions are met (e.g. the IRC server does not mask hostnames).</center>","options"));
+#endif
+
+ b = addBoolSelector(g,__tr2qs_ctx("Use \"broken bouncer hack\" to detect address","options"),
+ KviOption_boolDccBrokenBouncerHack,KVI_OPTION_BOOL(KviOption_boolDccGuessIpFromServerWhenLocalIsUnroutable));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,__tr2qs_ctx("<center>When you're behind a dialup router and also tunneling through a psyBNC bouncer, " \
+ "you can use a bug in the bouncer to force KVIrc to bind the DCC connections to the dialup router's address.<br>" \
+ "It's an ugly hack - use it only if nothing else works.</center>","options"));
+#endif
+
+ connect(b2,SIGNAL(toggled(bool)),b,SLOT(setEnabled(bool)));
+
+ b = addBoolSelector(0,1,1,1,__tr2qs_ctx("Notify failed DCC handshakes to the remote end","options"),
+ KviOption_boolNotifyFailedDccHandshakes);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,__tr2qs_ctx("<center>If you enable this option, when a DCC request from a remote " \
+ "user can't be satisfied KVIrc will notify him by a CTCP ERRMSG. This is " \
+ "a nice feature so it is a good idea to leave it on unless for some reason " \
+ "you have deactivated the antiflood system: in this case turning off this option " \
+ "might help if you often get attacked by CTCP floods.</center>","options"));
+#endif
+
+ u = addUIntSelector(0,2,1,2,__tr2qs_ctx("Maximum number of DCC sessions","options"),KviOption_uintMaxDccSlots,0,1000,64);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(u,__tr2qs_ctx("<center>This is the maximum number of concurrent DCC sessions " \
+ "and it includes all the DCC types (send,chat,recv...). " \
+ "KVIrc will refuse the requests when this limit is reached.</center>","options"));
+#endif
+
+ addUIntSelector(0,3,1,3,__tr2qs_ctx("DCC socket timeout:","options"),KviOption_uintDccSocketTimeout,10,65536,180);
+ u->setSuffix(__tr2qs_ctx(" sec","options"));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(u,__tr2qs_ctx("<center>This is the amount of time that KVIrc will wait for a response before assuming that a DCC has failed " \
+ "because the remote client was unable to connect to our listening socket.</center>","options"));
+#endif
+
+ addRowSpacer(0,4,1,4);
+}
+
+KviDccAdvancedOptionsWidget::~KviDccAdvancedOptionsWidget()
+{
+}
+
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+KviDccSendOptionsWidget::KviDccSendOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"dccsend_options_widget")
+{
+}
+
+KviDccSendOptionsWidget::~KviDccSendOptionsWidget()
+{
+}
+
+
+
+KviDccSendGeneralOptionsWidget::KviDccSendGeneralOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"dccsend_options_widget")
+{
+ createLayout(5,1);
+
+ KviBoolSelector * b;
+
+ KviTalGroupBox * g = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("On Incoming File","options"));
+ KviBoolSelector * b2 = addBoolSelector(g,__tr2qs_ctx("Automatically accept","options"),KviOption_boolAutoAcceptDccSend);
+ KviBoolSelector * b3 = addBoolSelector(g,__tr2qs_ctx("Open transfer window as minimized when auto-accepted","options"),KviOption_boolCreateMinimizedDccSendWhenAutoAccepted,!KVI_OPTION_BOOL(KviOption_boolCreateMinimizedDccSend));
+ KviBoolSelector * b4 = addBoolSelector(g,__tr2qs_ctx("Automatically resume when auto-accepted","options"),KviOption_boolAutoResumeDccSendWhenAutoAccepted,KVI_OPTION_BOOL(KviOption_boolAutoAcceptDccSend));
+
+ g = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("Save Location","options"));
+ addDirectorySelector(g,__tr2qs_ctx("Download folder:","options"),KviOption_stringIncomingPath);
+ addBoolSelector(g,__tr2qs_ctx("Sort saved files by nicknames (create subfolders)","options"),KviOption_boolSortReceivedByDccFilesByNicks);
+ addBoolSelector(g,__tr2qs_ctx("Guess save path from media type","options"),KviOption_boolUseIncomingDccMediaTypeSavePath);
+
+
+ g = addGroupBox(0,2,0,2,1,Qt::Horizontal,__tr2qs_ctx("On Download Completion","options"));
+ addBoolSelector(g,__tr2qs_ctx("Notify completion in console","options"),KviOption_boolNotifyDccSendSuccessInConsole);
+ addBoolSelector(g,__tr2qs_ctx("Notify completion in notifier","options"),KviOption_boolNotifyDccSendSuccessInNotifier);
+ b = addBoolSelector(g,__tr2qs_ctx("Automatically clear transfer","options"),KviOption_boolAutoCloseDccSendOnSuccess);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,
+ __tr2qs_ctx("<center>This option will cause succesfully terminated transfers " \
+ "to be automatically removed from the transfer window.</center>","options"));
+#endif //COMPILE_INFO_TIPS
+
+
+ KviBoolSelector * b1 = addBoolSelector(0,3,0,3,__tr2qs_ctx("Always open transfer window as minimized","options"),KviOption_boolCreateMinimizedDccSend);
+
+ connect(b1,SIGNAL(toggled(bool)),b3,SLOT(setNotEnabled(bool)));
+ connect(b2,SIGNAL(toggled(bool)),b4,SLOT(setEnabled(bool)));
+
+ addRowSpacer(0,4,0,4);
+}
+
+KviDccSendGeneralOptionsWidget::~KviDccSendGeneralOptionsWidget()
+{
+}
+
+
+KviDccSendAdvancedOptionsWidget::KviDccSendAdvancedOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"dccsend_advanced_options_widget")
+{
+ createLayout(4,1);
+
+ KviTalGroupBox * g = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("Bug Compatibility","options"));
+ KviBoolSelector * b = addBoolSelector(g,__tr2qs_ctx("Send ACK for byte 0","options"),KviOption_boolSendZeroAckInDccRecv);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,
+ __tr2qs_ctx("<center>This option causes KVIrc to send a zero-byte acknowledge to kick-start " \
+ "the DCC transfer with some buggy IRC clients.<br>" \
+ "Use it only if your DCC transfers stall just after establishing a connection without sending any data.</center>","options"));
+#endif //COMPILE_INFO_TIPS
+
+ b = addBoolSelector(g,__tr2qs_ctx("Accept broken RESUME (mIRC file.ext)","options"),KviOption_boolAcceptBrokenFileNameDccResumeRequests);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,
+ __tr2qs_ctx("<center>This option causes KVIrc to accept RESUME requests with invalid filenames.<br>" \
+ "Use it if KVIrc fails to accept RESUME requests from other clients (e.g. some versions of mIRC).</center>","options"));
+#endif //COMPILE_INFO_TIPS
+
+ b = addBoolSelector(g,__tr2qs_ctx("Replace spaces with underscores in outgoing filenames","options"),KviOption_boolDCCFileTransferReplaceOutgoingSpacesWithUnderscores);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,
+ __tr2qs_ctx("<center>This option causes KVIrc to replace spaces with underscores in filenames " \
+ "for all the outgoing file transfers. This will fix filename handling with some buggy clients (e.g. some versions of mIRC).","options"));
+#endif //COMPILE_INFO_TIPS
+
+
+ g = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("Limits","options"));
+
+ KviTalHBox * hb = new KviTalHBox(g);
+ b = addBoolSelector(hb,__tr2qs_ctx("Limit upload bandwidth to","options"),KviOption_boolLimitDccSendSpeed);
+ KviUIntSelector * u = addUIntSelector(hb,"",KviOption_uintMaxDccSendSpeed,0,0xffffff1,1024,KVI_OPTION_BOOL(KviOption_boolLimitDccSendSpeed));
+ u->setSuffix(" " + __tr2qs_ctx("bytes/sec","options"));
+ connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
+
+ hb = new KviTalHBox(g);
+ b = addBoolSelector(hb,__tr2qs_ctx("Limit download bandwidth to","options"),KviOption_boolLimitDccRecvSpeed);
+ u = addUIntSelector(hb,"",KviOption_uintMaxDccRecvSpeed,0,0xffffff1,1024,KVI_OPTION_BOOL(KviOption_boolLimitDccRecvSpeed));
+ u->setSuffix(" " + __tr2qs_ctx("bytes/sec","options"));
+ connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
+
+
+ u = addUIntSelector(g,__tr2qs_ctx("Maximum number of DCC transfers","options"),KviOption_uintMaxDccSendTransfers,0,1000,10);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(u,__tr2qs_ctx("<center>This is the maximum number of concurrent DCC transfers. " \
+ "KVIrc will refuse the requests when this limit is reached.</center>","options"));
+#endif
+
+ g = addGroupBox(0,2,0,2,1,Qt::Horizontal,__tr2qs_ctx("Tweaks","options"));
+
+ b = addBoolSelector(g,__tr2qs_ctx("Use fast send (send ahead)","options"),KviOption_boolUseFastDccSend);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,
+ __tr2qs_ctx("<center>The \"send ahead\" DCC method allows data to be sent faster by breaking " \
+ "some of the rules of the original DCC SEND protocol specification.<br>" \
+ "Most clients can handle this kind of optimisation so disable it only if you have problems.</center>","options"));
+#endif //COMPILE_INFO_TIPS
+
+ hb = new KviTalHBox(g);
+
+ b = addBoolSelector(hb,__tr2qs_ctx("Force idle step","options"),KviOption_boolDccSendForceIdleStep);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,
+ __tr2qs_ctx("<center>Enable this option when the dcc file transfers " \
+ "tend to block your computer by consuming too much CPU time. " \
+ "When this option is enabled the idle interval below will be " \
+ "forcibly inserted between each sent/received data packet.</center>","options"));
+#endif // COMPILE_INFO_TIPS
+
+ u = addUIntSelector(hb,__tr2qs_ctx("","options"),KviOption_uintDccSendIdleStepInMSec,1,65536,30,KVI_OPTION_BOOL(KviOption_boolDccSendForceIdleStep));
+ connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
+ u->setSuffix(__tr2qs_ctx(" msec","options"));
+
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(u,
+ __tr2qs_ctx("<center>This parameter controls the average delay between two packets sent or received.<br>" \
+ "A smaller interval will cause you to send data faster but will also " \
+ "add load to your CPU, disk and network interface.<br>" \
+ "Reasonable values are from 5 to 50 milliseconds.</center>","options"));
+#endif //COMPILE_INFO_TIPS
+
+ u = addUIntSelector(g,__tr2qs_ctx("Packet size:","options"),KviOption_uintDccSendPacketSize,16,65536,1024);
+ u->setSuffix(__tr2qs_ctx(" bytes","options"));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(u,
+ __tr2qs_ctx("<center>This parameter controls the packet size used for DCC SEND.<br>" \
+ "With bigger packets you will be probably send data faster, but " \
+ "you will also saturate your bandwidth and in some cases " \
+ "cause more disk activity.<br>" \
+ "Reasonable values are from 512 to 4096 bytes.</center>","options"));
+#endif //COMPILE_INFO_TIPS
+
+
+ addRowSpacer(0,3,0,3);
+
+}
+
+KviDccSendAdvancedOptionsWidget::~KviDccSendAdvancedOptionsWidget()
+{
+
+}
+
+
+//KviDccSendOptionsWidget::enableStuff(bool)
+//{
+// m_pOpenMinimizedAutoAccept->setEnabled(m_pAutoAccept->isChecked() && !m_pOpenMinimized->isChecked());
+//}
+
+
+KviDccChatOptionsWidget::KviDccChatOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"dccchat_options_widget")
+{
+ createLayout(3,1);
+
+ KviTalGroupBox * g = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("On Chat Request","options"));
+ KviBoolSelector * b = addBoolSelector(g,__tr2qs_ctx("Automatically accept","options"),KviOption_boolAutoAcceptDccChat);
+ b = addBoolSelector(g,__tr2qs_ctx("Open minimized when auto-accepted","options"),KviOption_boolCreateMinimizedDccChatWhenAutoAccepted,!KVI_OPTION_BOOL(KviOption_boolCreateMinimizedDccChat));
+
+ KviBoolSelector * b1 = addBoolSelector(0,1,0,1,__tr2qs_ctx("Always open as minimized","options"),KviOption_boolCreateMinimizedDccChat);
+
+ connect(b1,SIGNAL(toggled(bool)),b,SLOT(setNotEnabled(bool)));
+
+ addRowSpacer(0,2,0,2);
+}
+
+KviDccChatOptionsWidget::~KviDccChatOptionsWidget()
+{
+}
+
+
+KviDccVoiceOptionsWidget::KviDccVoiceOptionsWidget(QWidget *p):KviOptionsWidget(p)
+{
+ createLayout(8, 1);
+
+ KviBoolSelector * b1 = addBoolSelector(0,0,0,0,__tr2qs_ctx("Open all minimized","options"),KviOption_boolCreateMinimizedDccVoice);
+ KviTalGroupBox * g = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("On Voice Request","options"));
+ KviBoolSelector * b = addBoolSelector(g,__tr2qs_ctx("Automatically accept","options"),KviOption_boolAutoAcceptDccVoice);
+
+ b = addBoolSelector(g,__tr2qs_ctx("Open minimized when auto-accepted","options"),KviOption_boolCreateMinimizedDccVoiceWhenAutoAccepted,!KVI_OPTION_BOOL(KviOption_boolCreateMinimizedDccVoice));
+ connect(b1,SIGNAL(toggled(bool)),b,SLOT(setNotEnabled(bool)));
+
+ addBoolSelector(0,2,0,2,__tr2qs_ctx("Force half-duplex mode on sound device","options"), KviOption_boolDccVoiceForceHalfDuplex);
+ addBoolSelector(0,3,0,3,__tr2qs_ctx("Volume slider controls PCM, not Master","options"), KviOption_boolDccVoiceVolumeSliderControlsPCM);
+
+ addStringSelector(0,4,0,4,__tr2qs_ctx("Sound device:","options"), KviOption_stringDccVoiceSoundDevice);
+ addStringSelector(0,5,0,5,__tr2qs_ctx("Mixer device:","options"), KviOption_stringDccVoiceMixerDevice);
+
+ KviUIntSelector * u = addUIntSelector(0,6,0,6,__tr2qs_ctx("Pre-buffer size:","options"), KviOption_uintDccVoicePreBufferSize, 2048, 65536, 32000);
+ u->setSuffix(" bytes");
+
+
+ addRowSpacer(0,7,0,7);
+}
+
+KviDccVoiceOptionsWidget::~KviDccVoiceOptionsWidget()
+{
+}
+
+#include "m_optw_dcc.moc"
diff --git a/src/modules/options/optw_dcc.h b/src/modules/options/optw_dcc.h
new file mode 100644
index 00000000..5dc67424
--- /dev/null
+++ b/src/modules/options/optw_dcc.h
@@ -0,0 +1,139 @@
+#ifndef _OPTW_DCC_H_
+#define _OPTW_DCC_H_
+//
+// File : optw_dcc.h
+// Creation date : Fri Aug 17 22:08:08 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+
+#define KVI_OPTIONS_WIDGET_ICON_KviDccOptionsWidget KVI_SMALLICON_DCCERROR
+#define KVI_OPTIONS_WIDGET_NAME_KviDccOptionsWidget __tr2qs_no_lookup("DCC")
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviDccOptionsWidget 70000
+#define KVI_OPTIONS_WIDGET_CONTAINER_KviDccOptionsWidget true
+
+class KviDccOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviDccOptionsWidget(QWidget * parent);
+ ~KviDccOptionsWidget();
+};
+
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviDccGeneralOptionsWidget KVI_SMALLICON_DCCERROR
+#define KVI_OPTIONS_WIDGET_NAME_KviDccGeneralOptionsWidget __tr2qs_no_lookup("General")
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviDccGeneralOptionsWidget 70000
+#define KVI_OPTIONS_WIDGET_PARENT_KviDccGeneralOptionsWidget KviDccOptionsWidget
+
+class KviDccGeneralOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviDccGeneralOptionsWidget(QWidget * parent);
+ ~KviDccGeneralOptionsWidget();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviDccAdvancedOptionsWidget KVI_SMALLICON_DCCERROR
+#define KVI_OPTIONS_WIDGET_NAME_KviDccAdvancedOptionsWidget __tr2qs_no_lookup("Advanced")
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviDccAdvancedOptionsWidget 70000
+#define KVI_OPTIONS_WIDGET_PARENT_KviDccAdvancedOptionsWidget KviDccOptionsWidget
+
+class KviDccAdvancedOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviDccAdvancedOptionsWidget(QWidget * parent);
+ ~KviDccAdvancedOptionsWidget();
+};
+
+
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviDccSendOptionsWidget KVI_SMALLICON_DCCMSG
+#define KVI_OPTIONS_WIDGET_NAME_KviDccSendOptionsWidget __tr2qs_no_lookup("File Transfer")
+#define KVI_OPTIONS_WIDGET_PARENT_KviDccSendOptionsWidget KviDccOptionsWidget
+#define KVI_OPTIONS_WIDGET_CONTAINER_KviDccSendOptionsWidget true
+
+
+class KviDccSendOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviDccSendOptionsWidget(QWidget * parent);
+ ~KviDccSendOptionsWidget();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviDccSendGeneralOptionsWidget KVI_SMALLICON_DCCMSG
+#define KVI_OPTIONS_WIDGET_NAME_KviDccSendGeneralOptionsWidget __tr2qs_no_lookup("General")
+#define KVI_OPTIONS_WIDGET_PARENT_KviDccSendGeneralOptionsWidget KviDccSendOptionsWidget
+
+
+class KviDccSendGeneralOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviDccSendGeneralOptionsWidget(QWidget * parent);
+ ~KviDccSendGeneralOptionsWidget();
+};
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviDccSendAdvancedOptionsWidget KVI_SMALLICON_DCCMSG
+#define KVI_OPTIONS_WIDGET_NAME_KviDccSendAdvancedOptionsWidget __tr2qs_no_lookup("Advanced")
+#define KVI_OPTIONS_WIDGET_PARENT_KviDccSendAdvancedOptionsWidget KviDccSendOptionsWidget
+
+class KviDccSendAdvancedOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviDccSendAdvancedOptionsWidget(QWidget * parent);
+ ~KviDccSendAdvancedOptionsWidget();
+};
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviDccChatOptionsWidget KVI_SMALLICON_DCCREQUEST
+#define KVI_OPTIONS_WIDGET_NAME_KviDccChatOptionsWidget __tr2qs_no_lookup("Chat")
+#define KVI_OPTIONS_WIDGET_PARENT_KviDccChatOptionsWidget KviDccOptionsWidget
+#define KVI_OPTIONS_WIDGET_NOTCONTAINED_KviDccChatOptionsWidget true
+
+class KviDccChatOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviDccChatOptionsWidget(QWidget * parent);
+ ~KviDccChatOptionsWidget();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviDccVoiceOptionsWidget KVI_SMALLICON_DCCVOICE
+#define KVI_OPTIONS_WIDGET_NAME_KviDccVoiceOptionsWidget __tr2qs_no_lookup("Voice")
+#define KVI_OPTIONS_WIDGET_PARENT_KviDccVoiceOptionsWidget KviDccOptionsWidget
+#define KVI_OPTIONS_WIDGET_NOTCONTAINED_KviDccVoiceOptionsWidget true
+
+class KviDccVoiceOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviDccVoiceOptionsWidget(QWidget *);
+ ~KviDccVoiceOptionsWidget();
+};
+
+
+#endif //_OPTW_DCC_H_
diff --git a/src/modules/options/optw_generalopt.cpp b/src/modules/options/optw_generalopt.cpp
new file mode 100644
index 00000000..18f86902
--- /dev/null
+++ b/src/modules/options/optw_generalopt.cpp
@@ -0,0 +1,51 @@
+//=============================================================================
+//
+// File : optw_generalopt.cpp
+// Creation date : Wed Nov 19 09:25:16 2005 GMT by Grifisx & Noldor
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2005 Grifisx & Noldor
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+#include "optw_generalopt.h"
+
+#include "kvi_settings.h"
+#include "kvi_locale.h"
+#include "kvi_options.h"
+
+
+KviGeneralOptOptionsWidget::KviGeneralOptOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"generalopt_options_widget")
+{
+
+ createLayout(1,4);
+
+ QLabel * l;
+ l = addLabel(0,0,4,0,__tr2qs_ctx("This section contains the general client options<br>"\
+ "<p>like<b> sound, mediafiles, URL handler </b> etc... " \
+ "</p>","options"));
+ addAdvancedButton(4,1,4,1);
+}
+
+
+KviGeneralOptOptionsWidget::~KviGeneralOptOptionsWidget()
+{
+}
+
+
+#include "m_optw_generalopt.moc"
diff --git a/src/modules/options/optw_generalopt.h b/src/modules/options/optw_generalopt.h
new file mode 100644
index 00000000..fbaaf192
--- /dev/null
+++ b/src/modules/options/optw_generalopt.h
@@ -0,0 +1,39 @@
+#ifndef _OPTW_GENERALOPT_H_
+#define _OPTW_GENERALOPT_H_
+//
+// File : optw_generalopt.h
+// Creation date : Wed Nov 19 09:25:16 2005 GMT by Grifisx & Noldor
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2005 Grifisx & Noldor
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+
+#define KVI_OPTIONS_WIDGET_ICON_KviGeneralOptOptionsWidget KVI_SMALLICON_OPTIONS
+#define KVI_OPTIONS_WIDGET_NAME_KviGeneralOptOptionsWidget __tr2qs_no_lookup("General options")
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviGeneralOptOptionsWidget 40000
+
+class KviGeneralOptOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviGeneralOptOptionsWidget(QWidget * parent);
+ ~KviGeneralOptOptionsWidget();
+};
+
+#endif //_OPTW_CONNECTION_H_
diff --git a/src/modules/options/optw_highlighting.cpp b/src/modules/options/optw_highlighting.cpp
new file mode 100644
index 00000000..ef0f5442
--- /dev/null
+++ b/src/modules/options/optw_highlighting.cpp
@@ -0,0 +1,128 @@
+#ifndef _OPTW_HIGHLIGHTING_CPP_
+#define _OPTW_HIGHLIGHTING_CPP_
+//
+// File : optw_highlighting.cpp
+// Creation date : Sat Nov 3 18:09:35 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "optw_highlighting.h"
+
+#include <qlayout.h>
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+#include <qlabel.h>
+
+KviAlertHighlightingOptionsWidget::KviAlertHighlightingOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"highlighting_options_widget")
+{
+}
+
+KviAlertHighlightingOptionsWidget::~KviAlertHighlightingOptionsWidget()
+{
+}
+
+
+
+KviHighlightingOptionsWidget::KviHighlightingOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"highlighting_options_widget")
+{
+ createLayout(7,1);
+
+ KviBoolSelector * b;
+
+ connect(
+ addBoolSelector(0,0,0,0,__tr2qs_ctx("Enable word highlighting","options"),KviOption_boolUseWordHighlighting),
+ SIGNAL(toggled(bool)),
+ addStringListSelector(0,1,0,1,__tr2qs_ctx("Words to highlight:","options"),KviOption_stringlistHighlightWords,KVI_OPTION_BOOL(KviOption_boolUseWordHighlighting)),
+ SLOT(setEnabled(bool)));
+ addStringSelector(0,2,0,2,__tr2qs_ctx("Word splitters:","options"),KviOption_stringWordSplitters);
+ // This can be used even without Word highlighting
+ b = addBoolSelector(0,3,0,3,__tr2qs_ctx("Highlight messages containing my nickname","options"),KviOption_boolAlwaysHighlightNick);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,__tr2qs_ctx("<center>If this option is enabled, KVIrc will highlight any user message containing your current nickname</center>","options"));
+#endif
+ b = addBoolSelector(0,4,0,4,__tr2qs_ctx("Flash the system taskbar entry on highlighted messages","options"),KviOption_boolFlashWindowOnHighlightedMessages);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,__tr2qs_ctx("<center>If this option is enabled, KVIrc will (attempt to) flash the system taskbar entry when a highlighted message is printed and KVIrc is not the active window</center>","options"));
+#endif
+ b = addBoolSelector(0,5,0,5,__tr2qs_ctx("Popup the notifier window on highlighted messages","options"),KviOption_boolPopupNotifierOnHighlightedMessages);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,__tr2qs_ctx("<center>If this option is enabled, KVIrc will popup a little notifier window in the low right corner of your desktop when a highlighted message is printed and KVIrc is not the active window</center>","options"));
+#endif
+
+ addRowSpacer(0,6,0,6);
+}
+
+KviHighlightingOptionsWidget::~KviHighlightingOptionsWidget()
+{
+}
+
+
+
+
+
+
+KviAlertOptionsWidget::KviAlertOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"highlighting_options_widget")
+{
+ createLayout(2,1);
+
+ KviBoolSelector * b;
+
+ KviTalGroupBox * g = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("Alert Restrictions","options"));
+ KviBoolSelector * b3 = addBoolSelector(g,__tr2qs_ctx("Restrict alert","options"),KviOption_boolHighlightOnlyNormalMsg);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b3, __tr2qs_ctx("<center>If this option is enabled, KVIrc will alert in the taskbar only if a normal message is received in a channel.<br>Actions like joins, parts and mode changes will be ignored.<br> This is useful if you are in channels with a high rate of traffic and only want to be alerted for messages that are interesting to you.</center>","options"));
+#endif
+ KviBoolSelector * b4 = addBoolSelector(g,__tr2qs_ctx("Alert for highlighted words","options"),KviOption_boolHighlightOnlyNormalMsgHighlightInChanToo,KVI_OPTION_BOOL(KviOption_boolHighlightOnlyNormalMsg));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b4, __tr2qs_ctx("<center>If this option is enabled, the taskbar will also alert for messages which contain a word from the highlighted words list above.</center>","options"));
+#endif
+ KviBoolSelector * b5 = addBoolSelector(g,__tr2qs_ctx("Alert for query messages","options"),KviOption_boolHighlightOnlyNormalMsgQueryToo,KVI_OPTION_BOOL(KviOption_boolHighlightOnlyNormalMsg));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b5, __tr2qs_ctx("<center>If this option is enabled, the taskbar will also alert for messages which are shown in queries.</center>","options"));
+#endif
+ connect(b3,SIGNAL(toggled(bool)),b4,SLOT(setEnabled(bool)));
+ connect(b3,SIGNAL(toggled(bool)),b5,SLOT(setEnabled(bool)));
+
+ KviBoolSelector * b6 = addBoolSelector(g,__tr2qs_ctx("Use custom alert level","options"),KviOption_boolHighlightOnlyAtCostumHighlightLevel);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b6, __tr2qs_ctx("<center>If this option is enabled, KVIrc will alert in the taskbar only if the specified alert level is reached.</center>","options"));
+#endif
+ KviUIntSelector * b7 = addUIntSelector(g,__tr2qs_ctx("Minimum alert level:","options"),KviOption_uintMinHighlightLevel,1,KVI_MSGTYPE_MAXLEVEL,KVI_MSGTYPE_MAXLEVEL,KVI_OPTION_UINT(KviOption_boolHighlightOnlyAtCostumHighlightLevel));
+ b7->setEnabled(KVI_OPTION_BOOL(KviOption_boolHighlightOnlyAtCostumHighlightLevel));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b6, __tr2qs_ctx("<center>This option sets the minimum alert level for the taskbar.</center>","options"));
+#endif
+ connect(b6,SIGNAL(toggled(bool)),b7,SLOT(setEnabled(bool)));
+
+ addRowSpacer(0,1,0,1);
+}
+
+KviAlertOptionsWidget::~KviAlertOptionsWidget()
+{
+}
+
+
+#include "m_optw_highlighting.moc"
+
+#endif //_OPTW_HIGHLIGHTING_CPP_
diff --git a/src/modules/options/optw_highlighting.h b/src/modules/options/optw_highlighting.h
new file mode 100644
index 00000000..f222412e
--- /dev/null
+++ b/src/modules/options/optw_highlighting.h
@@ -0,0 +1,67 @@
+#ifndef _OPTW_HIGHLIGHTING_H_
+#define _OPTW_HIGHLIGHTING_H_
+//
+// File : optw_highlighting.h
+// Creation date : Sat Nov 3 18:09:37 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+
+#define KVI_OPTIONS_WIDGET_ICON_KviAlertHighlightingOptionsWidget KVI_SMALLICON_RAW
+#define KVI_OPTIONS_WIDGET_NAME_KviAlertHighlightingOptionsWidget __tr2qs_no_lookup("Alert/Highlight")
+#define KVI_OPTIONS_WIDGET_PARENT_KviAlertHighlightingOptionsWidget KviToolsOptionsWidget
+#define KVI_OPTIONS_WIDGET_CONTAINER_KviAlertHighlightingOptionsWidget true
+
+class KviAlertHighlightingOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviAlertHighlightingOptionsWidget(QWidget * parent);
+ ~KviAlertHighlightingOptionsWidget();
+};
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviHighlightingOptionsWidget KVI_SMALLICON_RAW
+#define KVI_OPTIONS_WIDGET_NAME_KviHighlightingOptionsWidget __tr2qs_no_lookup("Highlight")
+#define KVI_OPTIONS_WIDGET_PARENT_KviHighlightingOptionsWidget KviAlertHighlightingOptionsWidget
+
+class KviHighlightingOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviHighlightingOptionsWidget(QWidget * parent);
+ ~KviHighlightingOptionsWidget();
+};
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviAlertOptionsWidget KVI_SMALLICON_RAW
+#define KVI_OPTIONS_WIDGET_NAME_KviAlertOptionsWidget __tr2qs_no_lookup("Taskbar Alert")
+#define KVI_OPTIONS_WIDGET_PARENT_KviAlertOptionsWidget KviAlertHighlightingOptionsWidget
+
+class KviAlertOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviAlertOptionsWidget(QWidget * parent);
+ ~KviAlertOptionsWidget();
+};
+
+
+#endif //_OPTW_HIGHLIGHTING_H_
diff --git a/src/modules/options/optw_ident.cpp b/src/modules/options/optw_ident.cpp
new file mode 100644
index 00000000..7dafdd52
--- /dev/null
+++ b/src/modules/options/optw_ident.cpp
@@ -0,0 +1,37 @@
+//================================================================================
+//
+// File : optw_ident.cpp
+// Creation date : Mon Oct 29 15:48:42 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001-2004 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//================================================================================
+
+#include "optw_ident.h"
+
+#include <kvi_tal_groupbox.h>
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+#include "kvi_settings.h"
+
+//#warning "Info tips"
+
+
+
+#include "m_optw_ident.moc"
diff --git a/src/modules/options/optw_ident.h b/src/modules/options/optw_ident.h
new file mode 100644
index 00000000..89ea8975
--- /dev/null
+++ b/src/modules/options/optw_ident.h
@@ -0,0 +1,28 @@
+#ifndef _OPTW_IDENT_H_
+#define _OPTW_IDENT_H_
+//
+// File : optw_ident.h
+// Creation date : Mon Oct 29 15:48:40 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+
+
+#endif //_OPTW_IDENT_H_
diff --git a/src/modules/options/optw_identity.cpp b/src/modules/options/optw_identity.cpp
new file mode 100644
index 00000000..998ca5a4
--- /dev/null
+++ b/src/modules/options/optw_identity.cpp
@@ -0,0 +1,729 @@
+//============================================================================
+//
+// File : optw_identity.cpp
+// Creation date : Tue Nov 14 2000 23:06:53 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2000 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//============================================================================
+
+#include "optw_identity.h"
+
+#include <qlineedit.h>
+#include <qcheckbox.h>
+#include <qpushbutton.h>
+#include <qlayout.h>
+#include "kvi_tal_tooltip.h"
+#include <qtabwidget.h>
+#include <qcombobox.h>
+#include <qmessagebox.h>
+#include <qtimer.h>
+#include <qvalidator.h>
+
+#include "kvi_defaults.h"
+#include "kvi_settings.h"
+#include "kvi_options.h"
+#include "kvi_locale.h"
+#include "kvi_app.h"
+#include "kvi_window.h"
+#include "kvi_console.h"
+#include "kvi_optionswidget.h"
+#include "kvi_filedialog.h"
+#include "kvi_iconmanager.h"
+#include "kvi_http.h"
+
+
+//#warning "Info tips"
+
+
+KviNickAlternativesDialog::KviNickAlternativesDialog(QWidget * par,const QString &n1,const QString &n2,const QString &n3)
+: QDialog(par)
+{
+ QGridLayout * g = new QGridLayout(this,5,3,4,12);
+
+ setCaption(__tr2qs_ctx("Nickname alternatives","options"));
+
+ QLabel * l = new QLabel(this);
+ l->setText(__tr2qs_ctx("<center>Here you can choose up to three nicknames " \
+ "alternative to the primary one. KVIrc will use the alternatives " \
+ "if the primary nick is already used by someone else on a particular " \
+ "IRC network.</center>","options"));
+ g->addMultiCellWidget(l,0,0,0,2);
+
+ l = new QLabel(this);
+ l->setText(__tr2qs_ctx("Alt. Nickname 1:","options"));
+ g->addWidget(l,1,0);
+ m_pNickEdit1 = new QLineEdit(this);
+ g->addMultiCellWidget(m_pNickEdit1,1,1,1,2);
+ m_pNickEdit1->setText(n1);
+
+ l = new QLabel(this);
+ l->setText(__tr2qs_ctx("Alt. Nickname 2:","options"));
+ g->addWidget(l,2,0);
+ m_pNickEdit2 = new QLineEdit(this);
+ g->addMultiCellWidget(m_pNickEdit2,2,2,1,2);
+ m_pNickEdit2->setText(n2);
+
+ l = new QLabel(this);
+ l->setText(__tr2qs_ctx("Alt. Nickname 3:","options"));
+ g->addWidget(l,3,0);
+ m_pNickEdit3 = new QLineEdit(this);
+ g->addMultiCellWidget(m_pNickEdit3,3,3,1,2);
+ m_pNickEdit3->setText(n3);
+ KviTalHBox * h = new KviTalHBox(this);
+ h->setSpacing(8);
+ g->addWidget(h,4,2);
+
+ QPushButton * pb = new QPushButton(__tr2qs_ctx("Cancel","options"),h);
+ //g->addWidget(pb,4,2);
+ connect(pb,SIGNAL(clicked()),this,SLOT(reject()));
+
+ pb = new QPushButton(__tr2qs_ctx("Ok","options"),h);
+ pb->setDefault(true);
+ connect(pb,SIGNAL(clicked()),this,SLOT(accept()));
+
+ g->setColStretch(0,1);
+
+ //setMinimumSize(250,120);
+}
+
+KviNickAlternativesDialog::~KviNickAlternativesDialog()
+{
+}
+
+void KviNickAlternativesDialog::fill(QString &n1,QString &n2,QString &n3)
+{
+ n1 = m_pNickEdit1->text();
+ n2 = m_pNickEdit2->text();
+ n3 = m_pNickEdit3->text();
+}
+
+
+
+
+
+
+
+
+
+
+
+
+KviAvatarDownloadDialog::KviAvatarDownloadDialog(QWidget * par,const QString &szUrl)
+: QDialog(par)
+{
+ setCaption(__tr2qs_ctx("Avatar Download - KVIrc","options"));
+
+ m_szUrl = szUrl;
+
+ QGridLayout * g = new QGridLayout(this,2,2,4,8);
+
+ m_pOutput = new QLabel(__tr2qs_ctx("<center>Please wait while the avatar is being downloaded</center>","options"),this);
+ g->addMultiCellWidget(m_pOutput,0,0,0,1);
+
+ QPushButton * b = new QPushButton(__tr2qs_ctx("Abort","options"),this);
+ g->addWidget(b,1,1);
+ connect(b,SIGNAL(clicked()),this,SLOT(cancelClicked()));
+
+ m_pRequest = new KviHttpRequest();
+
+ QTimer::singleShot(0,this,SLOT(startDownload()));
+
+ g->setRowStretch(0,1);
+ g->setColStretch(0,1);
+
+ setMinimumSize(250,120);
+}
+
+KviAvatarDownloadDialog::~KviAvatarDownloadDialog()
+{
+ delete m_pRequest;
+}
+
+void KviAvatarDownloadDialog::startDownload()
+{
+ connect(m_pRequest,SIGNAL(terminated(bool)),this,SLOT(downloadTerminated(bool)));
+ connect(m_pRequest,SIGNAL(status(const char *)),this,SLOT(downloadMessage(const char *)));
+
+ QString tmp = m_szUrl;
+ g_pIconManager->urlToCachedFileName(tmp);
+ g_pApp->getLocalKvircDirectory(m_szLocalFileName,KviApp::Avatars,tmp);
+
+ m_pRequest->setExistingFileAction(KviHttpRequest::RenameExisting);
+ if(!m_pRequest->get(KviUrl(m_szUrl),KviHttpRequest::StoreToFile,m_szLocalFileName.utf8().data()))
+ {
+ m_szErrorMessage = __tr2qs_ctx("Failed to start the download","options");
+ reject();
+ }
+}
+
+void KviAvatarDownloadDialog::closeEvent(QCloseEvent * e)
+{
+ m_szErrorMessage = __tr2qs_ctx("Download aborted by user","options");
+ e->ignore();
+ reject();
+}
+
+void KviAvatarDownloadDialog::cancelClicked()
+{
+ m_szErrorMessage = __tr2qs_ctx("Download aborted by user","options");
+ reject();
+}
+
+void KviAvatarDownloadDialog::downloadMessage(const char * message)
+{
+ if(message)
+ {
+ QString txt = "<center>";
+ txt += message;
+ txt += "</center>";
+ m_pOutput->setText(message);
+ }
+}
+
+void KviAvatarDownloadDialog::downloadTerminated(bool bSuccess)
+{
+ if(bSuccess)
+ {
+ accept();
+ } else {
+ m_szErrorMessage = m_pRequest->lastError();
+ reject();
+ }
+}
+
+KviAvatarSelectionDialog::KviAvatarSelectionDialog(QWidget * par,const QString &szInitialPath)
+: QDialog(par)
+{
+ setCaption(__tr2qs_ctx("Choose Avatar - KVIrc","options"));
+
+ QGridLayout * g = new QGridLayout(this,3,3,4,8);
+
+
+ QString msg = "<center>";
+ msg += __tr2qs_ctx("Please select an avatar image. " \
+ "The full path to a local file or an image on the Web can be used.<br>" \
+ "If you wish to use a local image file, click the \"<b>Browse</b>\"" \
+ "button to browse local folders.<br>" \
+ "The full URL for an image (including <b>http://</b>) can be entered manually.","options");
+ msg += "</center><br>";
+
+ QLabel * l = new QLabel(msg,this);
+ l->setMinimumWidth(250);
+
+ g->addMultiCellWidget(l,0,0,0,2);
+
+ m_pLineEdit = new QLineEdit(this);
+ m_pLineEdit->setText(szInitialPath);
+ m_pLineEdit->setMinimumWidth(180);
+
+ g->addMultiCellWidget(m_pLineEdit,1,1,0,1);
+
+ QPushButton * b = new QPushButton(__tr2qs_ctx("&Browse...","options"),this);
+ connect(b,SIGNAL(clicked()),this,SLOT(chooseFileClicked()));
+ g->addWidget(b,1,2);
+ KviTalHBox * h = new KviTalHBox(this);h->setSpacing(8);g->addMultiCellWidget(h,2,2,1,2);
+ b = new QPushButton(__tr2qs_ctx("&OK","options"),h);
+ b->setMinimumWidth(80);
+ b->setDefault(true);
+ connect(b,SIGNAL(clicked()),this,SLOT(okClicked()));
+ //g->addWidget(b,2,1);
+
+ b = new QPushButton(__tr2qs_ctx("Cancel","options"),h);
+ b->setMinimumWidth(80);
+ connect(b,SIGNAL(clicked()),this,SLOT(cancelClicked()));
+ //g->addWidget(b,2,2);
+
+ g->setRowStretch(0,1);
+ g->setColStretch(0,1);
+ //setMinimumSize(250,120);
+}
+
+KviAvatarSelectionDialog::~KviAvatarSelectionDialog()
+{
+}
+
+void KviAvatarSelectionDialog::okClicked()
+{
+ m_szAvatarName = m_pLineEdit->text();
+ accept();
+}
+
+void KviAvatarSelectionDialog::cancelClicked()
+{
+ reject();
+}
+
+void KviAvatarSelectionDialog::chooseFileClicked()
+{
+ QString tmp;
+ if(KviFileDialog::askForOpenFileName(tmp,__tr2qs_ctx("Choose an Image File - KVIrc","options"),
+ QString::null,QString::null,false,true,this))
+ {
+ m_pLineEdit->setText(tmp);
+ }
+}
+
+void KviAvatarSelectionDialog::closeEvent(QCloseEvent * e)
+{
+ e->ignore();
+ reject();
+}
+
+
+
+
+
+
+KviIdentityOptionsWidget::KviIdentityOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent)
+{
+}
+
+KviIdentityOptionsWidget::~KviIdentityOptionsWidget()
+{
+}
+
+
+
+
+KviIdentityGeneralOptionsWidget::KviIdentityGeneralOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent)
+{
+ m_szAltNicknames[0] = KVI_OPTION_STRING(KviOption_stringNickname2);
+ m_szAltNicknames[1] = KVI_OPTION_STRING(KviOption_stringNickname3);
+ m_szAltNicknames[2] = KVI_OPTION_STRING(KviOption_stringNickname4);
+
+
+ createLayout(3,1);
+ layout()->setMargin(10);
+
+ KviTalGroupBox * gbox = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("Basic Properties","options"));
+ KviTalHBox * hb = new KviTalHBox(gbox);
+ hb->setSpacing(3);
+
+ KviStringSelector * sel = addStringSelector(hb,__tr2qs_ctx("Nickname:","options"),KviOption_stringNickname1);
+ sel->setMinimumLabelWidth(120);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(sel,__tr2qs_ctx("<center>Your <b>nickname</b> is your primary form of identification on IRC.<br>" \
+ "Since servers cannot accept multiple users sharing the same nickname " \
+ "(case insensitive), you can provide alternative nicknames to be used in case"\
+ "the server refuses to accept the default one.</center>","options"));
+#endif
+ QValidator * v = new QRegExpValidator(QRegExp("[^-0-9 ][^ ]*"),hb);
+ sel->setValidator(v);
+
+ QPushButton * pb = new QPushButton(__tr2qs_ctx("Alternatives...","options"),hb);
+ connect(pb,SIGNAL(clicked()),this,SLOT(setNickAlternatives()));
+
+ sel = addStringSelector(gbox,__tr2qs_ctx("Username:","options"),KviOption_stringUsername);
+ sel->setMinimumLabelWidth(120);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(sel,__tr2qs_ctx("<center>This is the <b>username</b> that you will use to connect to the server.<br>" \
+ "In the past, it was used as a form of authentication, but it normally has no special use now.<br>" \
+ "In addition to your nickname, you are identified on IRC by your <b>username@hostname</b>.</br>" \
+ "Basically, you can enter any word you like here. :D</center>","options"));
+#endif
+ sel = addStringSelector(gbox,__tr2qs_ctx("Real name:","options"),KviOption_stringRealname);
+ sel->setMinimumLabelWidth(120);
+
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(sel,__tr2qs_ctx("<center>This text will appear when someone does a /WHOIS on you.<br>" \
+ "It is intended to be your real name, but people tend to put random quotes and phrases here too.</center>","options"));
+#endif
+
+
+ QString szOptionalCtcpUserInfo = __tr2qs_ctx("This field is optional and will appear as part of the CTCP USERINFO reply.","options");
+ QString szCenterBegin("<center>");
+ QString szCenterEnd("</center>");
+ QString szTrailing = "<br><br>" + szOptionalCtcpUserInfo + szCenterEnd;
+
+ gbox = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("Profile","options"));
+
+ hb = new KviTalHBox(gbox);
+ hb->setSpacing(4);
+
+ QLabel * l = new QLabel(__tr2qs_ctx("Age:","options"),hb);
+ l->setMinimumWidth(120);
+
+ m_pAgeCombo = new QComboBox(hb);
+#ifdef COMPILE_INFO_TIPS
+ QString szTip1 = szCenterBegin + __tr2qs_ctx("Here you can specify your age.","options") + szTrailing;
+ KviTalToolTip::add(l,szTip1);
+ KviTalToolTip::add(m_pAgeCombo,szTip1);
+#endif
+ m_pAgeCombo->insertItem(__tr2qs_ctx("Unspecified","options"));
+ unsigned int i;
+ for(i=1;i<120;i++)
+ {
+ QString tmp;
+ tmp.setNum(i);
+ m_pAgeCombo->insertItem(tmp);
+ }
+
+ bool bOk;
+ i = KVI_OPTION_STRING(KviOption_stringCtcpUserInfoAge).toUInt(&bOk);
+ if(!bOk)i = 0;
+ if(i > 120)i = 120;
+ m_pAgeCombo->setCurrentItem(i);
+
+ hb->setStretchFactor(m_pAgeCombo,1);
+
+
+ hb = new KviTalHBox(gbox);
+ hb->setSpacing(4);
+
+ l = new QLabel(__tr2qs_ctx("Gender:","options"),hb);
+ l->setMinimumWidth(120);
+
+ m_pGenderCombo = new QComboBox(hb);
+#ifdef COMPILE_INFO_TIPS
+ QString szTip2 = szCenterBegin + __tr2qs_ctx("Here you can specify your gender.","options") + szTrailing;
+ KviTalToolTip::add(l,szTip2);
+ KviTalToolTip::add(m_pGenderCombo,szTip2);
+#endif
+
+ m_pGenderCombo->insertItem(__tr2qs_ctx("Unspecified","options"));
+ m_pGenderCombo->insertItem(__tr2qs_ctx("Female","options"));
+ m_pGenderCombo->insertItem(__tr2qs_ctx("Male","options"));
+
+ if(KviQString::equalCI(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender),"Male"))
+ m_pGenderCombo->setCurrentItem(2);
+ else if(KviQString::equalCI(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender),"Female"))
+ m_pGenderCombo->setCurrentItem(1);
+ else
+ m_pGenderCombo->setCurrentItem(0);
+
+ hb->setStretchFactor(m_pGenderCombo,1);
+
+ sel = addStringSelector(gbox,__tr2qs_ctx("Location:","options"),KviOption_stringCtcpUserInfoLocation);
+ sel->setMinimumLabelWidth(120);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(sel,szCenterBegin + __tr2qs_ctx("You can describe here your approximate physical location. " \
+ "Something like \"Region, Country\" will be ok. Please note that this information will be viewable " \
+ "by anyone so putting more data (like the exact address), generally, <b>is not a good idea</b>.","options") + szTrailing);
+#endif
+
+ sel = addStringSelector(gbox,__tr2qs_ctx("Languages:","options"),KviOption_stringCtcpUserInfoLanguages);
+ sel->setMinimumLabelWidth(120);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(sel,szCenterBegin + __tr2qs_ctx("You can put here the short names of the languages you can speak. " \
+ "An example might be \"EN,IT\" that would mean that you speak both Italian and English.","options") + szTrailing);
+#endif
+
+ sel = addStringSelector(gbox,__tr2qs_ctx("Other:","options"),KviOption_stringCtcpUserInfoOther);
+ sel->setMinimumLabelWidth(120);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(sel,szCenterBegin + __tr2qs_ctx("You can put here some additional personal data. " \
+ "It might be a funny quote or your homepage url... " \
+ "Please note that this information will be viewable " \
+ "by anyone so <b>don't put any sensible data</b> (passwords, telephone or credit card numbers).","options") + szTrailing);
+#endif
+
+ addRowSpacer(0,2,0,2);
+}
+
+KviIdentityGeneralOptionsWidget::~KviIdentityGeneralOptionsWidget()
+{
+}
+
+void KviIdentityGeneralOptionsWidget::setNickAlternatives()
+{
+ KviNickAlternativesDialog * dlg = new KviNickAlternativesDialog(this,m_szAltNicknames[0],m_szAltNicknames[1],m_szAltNicknames[2]);
+ if(dlg->exec() != QDialog::Accepted)return;
+ dlg->fill(m_szAltNicknames[0],m_szAltNicknames[1],m_szAltNicknames[2]);
+ delete dlg;
+}
+
+
+void KviIdentityGeneralOptionsWidget::commit()
+{
+ KviOptionsWidget::commit();
+
+ if(KVI_OPTION_STRING(KviOption_stringRealname).isEmpty()) KVI_OPTION_STRING(KviOption_stringUsername)=KVI_DEFAULT_REALNAME;
+ if(KVI_OPTION_STRING(KviOption_stringUsername).isEmpty()) KVI_OPTION_STRING(KviOption_stringUsername)=KVI_DEFAULT_USERNAME;
+
+ KVI_OPTION_STRING(KviOption_stringNickname2) = m_szAltNicknames[0];
+ KVI_OPTION_STRING(KviOption_stringNickname3) = m_szAltNicknames[1];
+ KVI_OPTION_STRING(KviOption_stringNickname4) = m_szAltNicknames[2];
+
+
+ int i = m_pAgeCombo->currentItem();
+ if(i < 0)i = 0;
+ if(i > 120)i = 120;
+ if(i <= 0)KVI_OPTION_STRING(KviOption_stringCtcpUserInfoAge) = "";
+ else KVI_OPTION_STRING(KviOption_stringCtcpUserInfoAge).setNum(i);
+
+ switch(m_pGenderCombo->currentItem())
+ {
+ case 1:
+ // this should be in english
+ KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender) = "Female";
+ break;
+ case 2:
+ // this should be in english
+ KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender) = "Male";
+ break;
+ default:
+ KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender) = "";
+ break;
+ }
+
+
+}
+
+
+KviIdentityAvatarOptionsWidget::KviIdentityAvatarOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent)
+{
+ createLayout(4,1);
+ layout()->setMargin(10);
+
+ m_pLocalAvatar = new KviPixmap(KVI_OPTION_PIXMAP(KviOption_pixmapMyAvatar));
+
+ bool bHaveAvatar = (!KVI_OPTION_STRING(KviOption_stringMyAvatar).isEmpty()) && m_pLocalAvatar->pixmap();
+
+#ifdef COMPILE_INFO_TIPS
+ QString szTip = __tr2qs_ctx("Here you can choose your avatar image. It will be visible<br>" \
+ "by other people that request it. Choose a nice image of yourself,<br>" \
+ "possibly avoiding obscenity and offending images. It is a good idea<br>" \
+ "to choose a relatively small file (say 150 Kb max) because<br>" \
+ "most clients have a limit on the size of avatars being downloaded.<br>" \
+ "The image also should be smaller than 800x600 pixels since<br>" \
+ "it will have to be viewable in everyone's monitor.","options");
+#endif
+
+ m_pUseAvatarCheck = new KviStyledCheckBox(__tr2qs_ctx("Use avatar","options"),this);
+ addWidgetToLayout(m_pUseAvatarCheck,0,0,0,0);
+ m_pUseAvatarCheck->setChecked(bHaveAvatar);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(m_pUseAvatarCheck,szTip);
+#endif
+
+ m_pAvatarPreview = new KviPixmapPreview(this);
+ addWidgetToLayout(m_pAvatarPreview,0,1,0,1);
+ m_pAvatarPreview->setPixmap(m_pLocalAvatar);
+ m_pAvatarPreview->setEnabled(bHaveAvatar);
+ connect(m_pUseAvatarCheck,SIGNAL(toggled(bool)),m_pAvatarPreview,SLOT(setEnabled(bool)));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(m_pAvatarPreview,szTip);
+#endif
+
+ KviTalHBox * hb = new KviTalHBox(this);
+ hb->setSpacing(4);
+ addWidgetToLayout(hb,0,2,0,2);
+
+ m_pAvatarNameEdit = new QLineEdit(hb);
+ m_pAvatarNameEdit->setReadOnly(true);
+ m_pAvatarNameEdit->setEnabled(bHaveAvatar);
+ m_pAvatarNameEdit->setText(KVI_OPTION_STRING(KviOption_stringMyAvatar));
+ connect(m_pUseAvatarCheck,SIGNAL(toggled(bool)),m_pAvatarNameEdit,SLOT(setEnabled(bool)));
+
+ m_pChooseAvatarButton = new QPushButton(__tr2qs_ctx("Choose...","options"),hb);
+ m_pChooseAvatarButton->setEnabled(bHaveAvatar);
+ connect(m_pUseAvatarCheck,SIGNAL(toggled(bool)),m_pChooseAvatarButton,SLOT(setEnabled(bool)));
+
+ connect(m_pChooseAvatarButton,SIGNAL(clicked()),this,SLOT(chooseAvatar()));
+
+ layout()->setRowStretch(1,2);
+}
+
+KviIdentityAvatarOptionsWidget::~KviIdentityAvatarOptionsWidget()
+{
+ delete m_pLocalAvatar;
+}
+
+
+void KviIdentityAvatarOptionsWidget::commit(void)
+{
+ KviOptionsWidget::commit();
+
+ QString szAvatarName = m_pAvatarNameEdit->text();
+
+ if(m_pUseAvatarCheck->isChecked() && m_pLocalAvatar->pixmap() && (!szAvatarName.isEmpty()))
+ {
+ KVI_OPTION_STRING(KviOption_stringMyAvatar) = szAvatarName;
+ KVI_OPTION_PIXMAP(KviOption_pixmapMyAvatar) = *m_pLocalAvatar;
+ g_pApp->setAvatarFromOptions();
+ } else {
+ KVI_OPTION_STRING(KviOption_stringMyAvatar) = "";
+ KVI_OPTION_PIXMAP(KviOption_pixmapMyAvatar) = KviPixmap();
+ }
+
+}
+
+
+void KviIdentityAvatarOptionsWidget::chooseAvatar()
+{
+ QString szCurrent = m_pAvatarNameEdit->text();
+
+ KviAvatarSelectionDialog dlg(this,szCurrent);
+ if(dlg.exec() != QDialog::Accepted)return;
+
+ szCurrent = dlg.avatarName();
+ szCurrent.stripWhiteSpace();
+
+ if(KviQString::equalCIN(szCurrent,"http://",7))
+ {
+ // this is an url
+ // first check if we have it in the cache
+ KviAvatar * a = g_pIconManager->getAvatar(QString::null,szCurrent);
+ if(!a)
+ {
+ // no cache... try downloading
+ KviAvatarDownloadDialog dlg(this,szCurrent);
+ if(dlg.exec() == QDialog::Accepted)
+ {
+ // downloaded!
+ // try to load it
+ if(!m_pLocalAvatar->load(dlg.localFileName()))
+ {
+ // unloadable
+ szCurrent = "";
+ QMessageBox::warning(this,__tr2qs_ctx("Failed to Load Avatar - KVIrc","options"),
+ __tr2qs_ctx("Failed to load the avatar image.<br>" \
+ "It may be an unaccessible file or an " \
+ "unsupported image format.","options"),QMessageBox::Ok,QMessageBox::NoButton);
+ } // else loaded!
+ } else {
+ // unloadable
+ QString tmp;
+ KviQString::sprintf(tmp,__tr2qs_ctx("Failed to download the avatar image.<br>" \
+ "<b>%Q</b>","options"),&(dlg.errorMessage()));
+ QMessageBox::warning(this,__tr2qs_ctx("Avatar Download Failed - KVIrc","options"),tmp,QMessageBox::Ok,QMessageBox::NoButton);
+ szCurrent = "";
+ m_pLocalAvatar->setNull();
+ }
+ } else {
+ // else OK.. got it in the cache
+ m_pLocalAvatar->set(*(a->pixmap()),a->localPath());
+ delete a;
+ }
+ } else {
+ // this is a local path
+ if(m_pLocalAvatar->load(szCurrent))
+ {
+ // local path, loaded
+ QString tmp = szCurrent;
+ int idx = tmp.findRev("/");
+ if(idx != -1)
+ {
+ szCurrent = tmp.right(tmp.length() - (idx + 1));
+ tmp = szCurrent;
+ }
+ idx = tmp.findRev("\\");
+ if(idx != -1)
+ {
+ szCurrent = tmp.right(tmp.length() - (idx + 1));
+ tmp = szCurrent;
+ }
+ } else {
+ // unloadable
+ QMessageBox::warning(this,__tr2qs_ctx("Failed to Load Avatar - KVIrc","options"),
+ __tr2qs_ctx("Failed to load the avatar image.<br>" \
+ "It may be an unaccessible file or an " \
+ "unsupported image format.","options"),QMessageBox::Ok,QMessageBox::NoButton);
+ szCurrent = "";
+ }
+ }
+
+ if(m_pLocalAvatar->pixmap())
+ {
+ if((m_pLocalAvatar->pixmap()->width() > 1024) || (m_pLocalAvatar->pixmap()->height() > 768))
+ {
+ QMessageBox::warning(this,__tr2qs_ctx("Avatar Might Be Too Big - KVIrc","options"),
+ __tr2qs_ctx("The avatar you have choosen is bigger than 1024x768 pixels.<br>" \
+ "Such a big image will not be seen on all the user monitors<br>" \
+ "and will probably be scaled by the remote clients with poor quality<br>" \
+ "algorithms to improve performance. You *should* scale it manually<br>" \
+ "to a sane size (like 800x600) or choose a different image.","options"));
+ }
+ }
+
+ m_pAvatarNameEdit->setText(szCurrent);
+ m_pAvatarPreview->setPixmap(m_pLocalAvatar);
+}
+
+
+
+
+
+
+KviIdentityAdvancedOptionsWidget::KviIdentityAdvancedOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent)
+{
+ m_pISelector=0;
+ m_pWSelector=0;
+ m_pSSelector=0;
+
+ m_sModeStr = KVI_OPTION_STRING(KviOption_stringDefaultUserMode);
+ m_bI = m_sModeStr.contains('i');
+ m_bW = m_sModeStr.contains('w');
+ m_bS = m_sModeStr.contains('s');
+
+
+ createLayout(2,1);
+ layout()->setMargin(10);
+
+ KviTalGroupBox * gbox = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("User Mode","options"));
+ m_pISelector = addBoolSelector(gbox,__tr2qs_ctx("Invisible (+i)","options"),&m_bI);
+ m_pSSelector = addBoolSelector(gbox,__tr2qs_ctx("Server notices (+s)","options"),&m_bS);
+ m_pWSelector = addBoolSelector(gbox,__tr2qs_ctx("Wallops (+w)","options"),&m_bW);
+
+ gbox = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("Default Messages","options"));
+
+
+ KviStringSelector * sel = addStringSelector(gbox, __tr2qs_ctx("Part message:","options"),KviOption_stringPartMessage);
+ sel->setMinimumLabelWidth(120);
+
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(sel,__tr2qs_ctx("<center>This is the default part message that will be used when you<br>" \
+ "leave a channel by closing a channel window.</center>","options"));
+#endif
+
+ sel = addStringSelector(gbox, __tr2qs_ctx("Quit message:","options"),KviOption_stringQuitMessage);
+ sel->setMinimumLabelWidth(120);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(sel,__tr2qs_ctx("<center>This is the default quit message that will be used when you<br>" \
+ "quit your IRC session by closing the console window or disconnecting by pressing the disconnect button.</center>","options"));
+#endif
+
+ addRowSpacer(0,2,0,2);
+}
+
+KviIdentityAdvancedOptionsWidget::~KviIdentityAdvancedOptionsWidget()
+{
+}
+
+void KviIdentityAdvancedOptionsWidget::commit()
+{
+ KviOptionsWidget::commit();
+
+ m_sModeStr = m_bI ? "i" : "";
+ if(m_bS)m_sModeStr += "s";
+ if(m_bW)m_sModeStr += "w";
+
+ KVI_OPTION_STRING(KviOption_stringDefaultUserMode) = m_sModeStr.ptr();
+}
+
+
+
+
+
+
+#include "m_optw_identity.moc"
diff --git a/src/modules/options/optw_identity.h b/src/modules/options/optw_identity.h
new file mode 100644
index 00000000..479614c4
--- /dev/null
+++ b/src/modules/options/optw_identity.h
@@ -0,0 +1,192 @@
+#ifndef _OPTW_IDENTITY_H_
+#define _OPTW_IDENTITY_H_
+
+//=============================================================================
+//
+// File : optw_identity.h
+// Creation date : Tue Nov 14 2000 23:06:12 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2000-2004 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+
+#include "kvi_optionswidget.h"
+#include "kvi_settings.h"
+#include "kvi_selectors.h"
+
+#include <qdialog.h>
+#include "kvi_pixmap.h"
+
+
+class QLineEdit;
+class QCheckBox;
+class QPushButton;
+class QComboBox;
+
+class KviNickAlternativesDialog : public QDialog
+{
+ friend class KviIdentityGeneralOptionsWidget;
+ Q_OBJECT
+protected:
+ KviNickAlternativesDialog(QWidget * par,const QString &n1,const QString &n2,const QString &n3);
+ ~KviNickAlternativesDialog();
+protected:
+ QLineEdit * m_pNickEdit1;
+ QLineEdit * m_pNickEdit2;
+ QLineEdit * m_pNickEdit3;
+protected:
+ void fill(QString &n1,QString &n2,QString &n3);
+};
+
+class KviAvatarSelectionDialog : public QDialog
+{
+ friend class KviIdentityAvatarOptionsWidget;
+ Q_OBJECT
+public:
+ KviAvatarSelectionDialog(QWidget * par,const QString &szInitialPath);
+ ~KviAvatarSelectionDialog();
+protected:
+ QLineEdit * m_pLineEdit;
+ QString m_szAvatarName;
+protected:
+ virtual void closeEvent(QCloseEvent * e);
+ const QString &avatarName(){ return m_szAvatarName; };
+protected slots:
+ void okClicked();
+ void cancelClicked();
+ void chooseFileClicked();
+};
+
+class KviHttpRequest;
+
+class KviAvatarDownloadDialog : public QDialog
+{
+ friend class KviIdentityAvatarOptionsWidget;
+ Q_OBJECT
+public:
+ KviAvatarDownloadDialog(QWidget * par,const QString &szUrl);
+ ~KviAvatarDownloadDialog();
+protected:
+ KviHttpRequest * m_pRequest;
+ QLabel * m_pOutput;
+ QString m_szErrorMessage;
+ QString m_szLocalFileName;
+ QString m_szUrl;
+protected:
+ virtual void closeEvent(QCloseEvent * e);
+ const QString & localFileName(){ return m_szLocalFileName; };
+ const QString & errorMessage(){ return m_szErrorMessage; };
+protected slots:
+ void startDownload();
+ void cancelClicked();
+ void downloadTerminated(bool bSuccess);
+ void downloadMessage(const char * msg);
+};
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviIdentityOptionsWidget KVI_SMALLICON_WHO
+#define KVI_OPTIONS_WIDGET_NAME_KviIdentityOptionsWidget __tr2qs_no_lookup("Identity")
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviIdentityOptionsWidget 99998
+#define KVI_OPTIONS_WIDGET_CONTAINER_KviIdentityOptionsWidget true
+
+
+class KviIdentityOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviIdentityOptionsWidget(QWidget * parent);
+ ~KviIdentityOptionsWidget();
+};
+
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviIdentityGeneralOptionsWidget KVI_SMALLICON_WHO
+#define KVI_OPTIONS_WIDGET_NAME_KviIdentityGeneralOptionsWidget __tr2qs_no_lookup("General")
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviIdentityGeneralOptionsWidget 90000
+#define KVI_OPTIONS_WIDGET_PARENT_KviIdentityGeneralOptionsWidget KviIdentityOptionsWidget
+
+
+class KviIdentityGeneralOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviIdentityGeneralOptionsWidget(QWidget * pParent);
+ ~KviIdentityGeneralOptionsWidget();
+protected:
+ QString m_szAltNicknames[3];
+
+ QComboBox * m_pAgeCombo;
+ QComboBox * m_pGenderCombo;
+protected slots:
+ void setNickAlternatives();
+protected:
+ virtual void commit(void);
+};
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviIdentityAvatarOptionsWidget KVI_SMALLICON_AVATAR
+#define KVI_OPTIONS_WIDGET_NAME_KviIdentityAvatarOptionsWidget __tr2qs_no_lookup("Avatar")
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviIdentityAvatarOptionsWidget 80000
+#define KVI_OPTIONS_WIDGET_PARENT_KviIdentityAvatarOptionsWidget KviIdentityOptionsWidget
+
+
+class KviIdentityAvatarOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviIdentityAvatarOptionsWidget(QWidget * pParent);
+ ~KviIdentityAvatarOptionsWidget();
+protected:
+ QCheckBox * m_pUseAvatarCheck;
+ QLineEdit * m_pAvatarNameEdit;
+ QPushButton * m_pChooseAvatarButton;
+ KviPixmap * m_pLocalAvatar;
+ KviPixmapPreview * m_pAvatarPreview;
+protected slots:
+ void chooseAvatar();
+protected:
+ virtual void commit(void);
+};
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviIdentityAdvancedOptionsWidget KVI_SMALLICON_SPY
+#define KVI_OPTIONS_WIDGET_NAME_KviIdentityAdvancedOptionsWidget __tr2qs_no_lookup("Advanced")
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviIdentityAdvancedOptionsWidget 70000
+#define KVI_OPTIONS_WIDGET_PARENT_KviIdentityAdvancedOptionsWidget KviIdentityOptionsWidget
+
+
+class KviIdentityAdvancedOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviIdentityAdvancedOptionsWidget(QWidget * pParent);
+ ~KviIdentityAdvancedOptionsWidget();
+protected:
+ bool m_bI;
+ bool m_bW;
+ bool m_bS;
+ KviStr m_sModeStr;
+ KviBoolSelector * m_pISelector;
+ KviBoolSelector * m_pWSelector;
+ KviBoolSelector * m_pSSelector;
+protected:
+ virtual void commit(void);
+};
+
+#endif //!_OPTW_IDENTITY_H_
diff --git a/src/modules/options/optw_ignore.cpp b/src/modules/options/optw_ignore.cpp
new file mode 100644
index 00000000..26e4c0d9
--- /dev/null
+++ b/src/modules/options/optw_ignore.cpp
@@ -0,0 +1,62 @@
+//
+// File : optw_ignore.h
+// Creation date : Thu Feb 12 15:11:29 2002 GMT by Juanjo �lvarez
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "optw_ignore.h"
+
+#include <qlayout.h>
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+//#warning "Info tips"
+
+
+KviIgnoreOptionsWidget::KviIgnoreOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"ignore_options_widget")
+{
+ createLayout(3,1);
+
+ KviTalGroupBox *g = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("Enable Ignore For","options"));
+ m_pIgnorePrivmsg = addBoolSelector(g,__tr2qs_ctx("Private/channel messages","options"),KviOption_boolEnableIgnoreOnPrivMsg);
+ m_pIgnoreNotice = addBoolSelector(g,__tr2qs_ctx("Private/channel notices","options"),KviOption_boolEnableIgnoreOnNotice);
+
+ connect(m_pIgnorePrivmsg,SIGNAL(toggled(bool)),this,SLOT(enableVerbose(bool)));
+
+ m_pVerboseIgnore = addBoolSelector(0,1,0,1,__tr2qs_ctx("Use verbose ignore (show messages in console)","options"),
+ KviOption_boolVerboseIgnore,
+ KVI_OPTION_BOOL(KviOption_boolEnableIgnoreOnPrivMsg) || KVI_OPTION_BOOL(KviOption_boolEnableIgnoreOnNotice));
+
+ addRowSpacer(0,2,0,2);
+}
+
+KviIgnoreOptionsWidget::~KviIgnoreOptionsWidget()
+{
+}
+
+void KviIgnoreOptionsWidget::enableVerbose(bool)
+{
+ m_pVerboseIgnore->setEnabled(m_pIgnorePrivmsg->isChecked() || m_pIgnoreNotice->isChecked());
+}
+
+
+
+#include "m_optw_ignore.moc"
diff --git a/src/modules/options/optw_ignore.h b/src/modules/options/optw_ignore.h
new file mode 100644
index 00000000..cb7203f5
--- /dev/null
+++ b/src/modules/options/optw_ignore.h
@@ -0,0 +1,47 @@
+#ifndef _OPTW_IGNORE_H_
+#define _OPTW_IGNORE_H_
+//
+// File : optw_ignore.h
+// Creation date : Thu Feb 12 15:11:30 2002 GMT by Juanjo �lvarez
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+#include "kvi_selectors.h"
+
+#define KVI_OPTIONS_WIDGET_ICON_KviIgnoreOptionsWidget KVI_SMALLICON_IGNORE
+#define KVI_OPTIONS_WIDGET_NAME_KviIgnoreOptionsWidget __tr2qs_no_lookup("Ignore")
+#define KVI_OPTIONS_WIDGET_PARENT_KviIgnoreOptionsWidget KviProtectionOptionsWidget
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviIgnoreOptionsWidget __tr2qs_no_lookup("protection")
+
+class KviIgnoreOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviIgnoreOptionsWidget(QWidget * parent);
+ ~KviIgnoreOptionsWidget();
+public:
+ KviBoolSelector * m_pIgnorePrivmsg;
+ KviBoolSelector * m_pIgnoreNotice;
+ KviBoolSelector * m_pVerboseIgnore;
+protected slots:
+ void enableVerbose(bool);
+};
+
+#endif //_OPTW_IGNORE_H_
diff --git a/src/modules/options/optw_input.cpp b/src/modules/options/optw_input.cpp
new file mode 100644
index 00000000..4dd73987
--- /dev/null
+++ b/src/modules/options/optw_input.cpp
@@ -0,0 +1,156 @@
+//
+// File : optw_input.cpp
+// Creation date : Sat Aug 11 2001 04:25:52 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+#include "optw_input.h"
+
+#include <qlayout.h>
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+//#warning "Info tips"
+
+KviInputLookOptionsWidget::KviInputLookOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"ircviewlook_options_widget")
+{
+ createLayout(10,2);
+
+ addFontSelector(0,0,1,0,__tr2qs_ctx("Font","options"),KviOption_fontInput);
+ addColorSelector(0,1,1,1,__tr2qs_ctx("Background color","options"),KviOption_colorInputBackground);
+ addColorSelector(0,2,1,2,__tr2qs_ctx("Foreground color","options"),KviOption_colorInputForeground);
+ addColorSelector(0,3,1,3,__tr2qs_ctx("Selection background color","options"),KviOption_colorInputSelectionBackground);
+ addColorSelector(0,4,1,4,__tr2qs_ctx("Selection foreground color","options"),KviOption_colorInputSelectionForeground);
+ addColorSelector(0,5,1,5,__tr2qs_ctx("Control char color","options"),KviOption_colorInputControl);
+ addColorSelector(0,6,1,6,__tr2qs_ctx("Cursor color","options"),KviOption_colorInputCursor);
+
+ addPixmapSelector(0,7,1,7,__tr2qs_ctx("Background image","options"),KviOption_pixmapInputBackground);
+
+ addLabel(0,8,0,8,__tr2qs_ctx("Horizontal align:","options"));
+ m_pHorizontalAlign=new QComboBox(this);
+ addWidgetToLayout(m_pHorizontalAlign,1,8,1,8);
+
+ addLabel(0,9,0,9,__tr2qs_ctx("Vertical align:","options"));
+ m_pVerticalAlign=new QComboBox(this);
+ addWidgetToLayout(m_pVerticalAlign,1,9,1,9);
+
+ m_pHorizontalAlign->insertItem(__tr2qs_ctx("Tile","options"));
+ m_pHorizontalAlign->insertItem(__tr2qs_ctx("Left","options"));
+ m_pHorizontalAlign->insertItem(__tr2qs_ctx("Right","options"));
+ m_pHorizontalAlign->insertItem(__tr2qs_ctx("Center","options"));
+
+ m_pVerticalAlign->insertItem(__tr2qs_ctx("Tile","options"));
+ m_pVerticalAlign->insertItem(__tr2qs_ctx("Top","options"));
+ m_pVerticalAlign->insertItem(__tr2qs_ctx("Bottom","options"));
+ m_pVerticalAlign->insertItem(__tr2qs_ctx("Center","options"));
+
+ switch( KVI_OPTION_UINT(KviOption_uintInputPixmapAlign) & Qt::AlignHorizontal_Mask)
+ {
+ case Qt::AlignLeft:
+ m_pHorizontalAlign->setCurrentItem(1);
+ break;
+ case Qt::AlignRight:
+ m_pHorizontalAlign->setCurrentItem(2);
+ break;
+ case Qt::AlignHCenter:
+ m_pHorizontalAlign->setCurrentItem(3);
+ break;
+ default:
+ m_pHorizontalAlign->setCurrentItem(0);
+ }
+
+ switch( KVI_OPTION_UINT(KviOption_uintInputPixmapAlign) & Qt::AlignVertical_Mask)
+ {
+ case Qt::AlignTop:
+ m_pVerticalAlign->setCurrentItem(1);
+ break;
+ case Qt::AlignBottom:
+ m_pVerticalAlign->setCurrentItem(2);
+ break;
+ case Qt::AlignVCenter:
+ m_pVerticalAlign->setCurrentItem(3);
+ break;
+ default:
+ m_pVerticalAlign->setCurrentItem(0);
+ }
+
+
+ layout()->setRowStretch(7,1);
+}
+
+KviInputLookOptionsWidget::~KviInputLookOptionsWidget()
+{
+}
+
+void KviInputLookOptionsWidget::commit()
+{
+ int iFlags=0;
+ switch(m_pHorizontalAlign->currentItem())
+ {
+ case 1:
+ iFlags|=Qt::AlignLeft;
+ break;
+ case 2:
+ iFlags|=Qt::AlignRight;
+ break;
+ case 3:
+ iFlags|=Qt::AlignHCenter;
+ break;
+ }
+ switch(m_pVerticalAlign->currentItem())
+ {
+ case 1:
+ iFlags|=Qt::AlignTop;
+ break;
+ case 2:
+ iFlags|=Qt::AlignBottom;
+ break;
+ case 3:
+ iFlags|=Qt::AlignVCenter;
+ break;
+ }
+
+ KVI_OPTION_UINT(KviOption_uintInputPixmapAlign)=iFlags;
+ KviOptionsWidget::commit();
+}
+
+
+
+KviInputFeaturesOptionsWidget::KviInputFeaturesOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"ircviewfeatures_options_widget")
+{
+ createLayout(6,1);
+
+ addBoolSelector(0,0,0,0,__tr2qs_ctx("Warp cursor at the end of line when browsing history","options"),KviOption_boolInputHistoryCursorAtEnd);
+ addBoolSelector(0,1,0,1,__tr2qs_ctx("Disable the input history window and it's log memory.","options"),KviOption_boolDisableInputHistory); //G&N 2005
+ addBoolSelector(0,2,0,2,__tr2qs_ctx("Hide input toolbuttons by default","options"),KviOption_boolHideInputToolButtons);
+ KviTalGroupBox * g = addGroupBox(0,3,0,3,1,Qt::Horizontal,__tr2qs_ctx("Nick completion","options"));
+ addBoolSelector(g,__tr2qs_ctx("Use bash-like nick completion","options"),KviOption_boolBashLikeNickCompletion);
+ addStringSelector(g,__tr2qs_ctx("Nick completion postfix string","options"),KviOption_stringNickCompletionPostfix);
+ addBoolSelector(g,__tr2qs_ctx("Use the completion postfix string for the first word only","options"),KviOption_boolUseNickCompletionPostfixForFirstWordOnly);
+ addBoolSelector(0,4,0,4,__tr2qs_ctx("Commandline in user-friendly mode by default","options"),KviOption_boolCommandlineInUserFriendlyModeByDefault);
+ addRowSpacer(0,5,0,5);
+}
+
+KviInputFeaturesOptionsWidget::~KviInputFeaturesOptionsWidget()
+{
+}
+
+#include "m_optw_input.moc"
diff --git a/src/modules/options/optw_input.h b/src/modules/options/optw_input.h
new file mode 100644
index 00000000..eb088460
--- /dev/null
+++ b/src/modules/options/optw_input.h
@@ -0,0 +1,61 @@
+#ifndef _OPTW_INPUT_H_
+#define _OPTW_INPUT_H_
+
+//==================================================================================
+//
+// File : optw_input.h
+// Creation date : Sat Aug 11 2001 04:25:01 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001-2006 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//==================================================================================
+
+#include "kvi_optionswidget.h"
+#include <qcombobox.h>
+
+#define KVI_OPTIONS_WIDGET_ICON_KviInputLookOptionsWidget KVI_SMALLICON_INPUT
+#define KVI_OPTIONS_WIDGET_NAME_KviInputLookOptionsWidget __tr2qs_no_lookup("Input")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviInputLookOptionsWidget __tr2qs_no_lookup("theme,colors,text")
+#define KVI_OPTIONS_WIDGET_GROUP_KviInputLookOptionsWidget "theme"
+
+class KviInputLookOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+private:
+ QComboBox* m_pHorizontalAlign;
+ QComboBox* m_pVerticalAlign;
+public:
+ KviInputLookOptionsWidget(QWidget * parent);
+ ~KviInputLookOptionsWidget();
+
+ virtual void commit();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviInputFeaturesOptionsWidget KVI_SMALLICON_INPUT
+#define KVI_OPTIONS_WIDGET_NAME_KviInputFeaturesOptionsWidget __tr2qs_no_lookup("Input")
+#define KVI_OPTIONS_WIDGET_PARENT_KviInputFeaturesOptionsWidget KviInterfaceFeaturesOptionsWidget
+
+class KviInputFeaturesOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviInputFeaturesOptionsWidget(QWidget * parent);
+ ~KviInputFeaturesOptionsWidget();
+};
+
+#endif //!_OPTW_INPUT_H_
diff --git a/src/modules/options/optw_interfacefeatures.cpp b/src/modules/options/optw_interfacefeatures.cpp
new file mode 100644
index 00000000..3cae7662
--- /dev/null
+++ b/src/modules/options/optw_interfacefeatures.cpp
@@ -0,0 +1,88 @@
+//=============================================================================
+//
+// File : optw_interfacefeatures.cpp
+// Creation date : Sat Jun 2 2001 14:52:53 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001-2005 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+#include "optw_interfacefeatures.h"
+
+#include <qlayout.h>
+#include <qlabel.h>
+#include <string.h>
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+#include "kvi_app.h"
+#include "kvi_fileutils.h"
+
+KviInterfaceFeaturesOptionsWidget::KviInterfaceFeaturesOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"interfacefeatures_options_widget")
+{
+ createLayout(8,1);
+
+
+
+ addBoolSelector(0,0,0,0,__tr2qs_ctx("Minimize on startup","options"),KviOption_boolStartupMinimized);
+ addBoolSelector(0,1,0,1,__tr2qs_ctx("Confirm quit with active connections","options"),KviOption_boolConfirmCloseWhenThereAreConnections);
+ addBoolSelector(0,2,0,2,__tr2qs_ctx("Remember window properties","options"),KviOption_boolWindowsRememberProperties);
+
+ QString szSplashDisableFile;
+ g_pApp->getLocalKvircDirectory(szSplashDisableFile,KviApp::Pics,"disable-splash." KVI_VERSION);
+ bool bDisableSplash = KviFileUtils::fileExists(szSplashDisableFile);
+ m_pDisableSplash = new KviStyledCheckBox(__tr2qs_ctx("Disable splash screen","options"),this);
+ addWidgetToLayout(m_pDisableSplash,0,3,0,3);
+ m_pDisableSplash->setChecked(bDisableSplash);
+
+ addBoolSelector(0,4,0,4,__tr2qs_ctx("Enable visual effects","options"),KviOption_boolEnableVisualEffects);
+ addBoolSelector(0,5,0,5,__tr2qs_ctx("Hide Channel window tool buttons by default","options"),KviOption_boolHideWindowToolButtons);
+
+ KviTalGroupBox * g = addGroupBox(0,6,0,6,1,Qt::Horizontal,__tr2qs_ctx("Open Dialog Window For","options"));
+ addBoolSelector(g,__tr2qs_ctx("Preferences","options"),KviOption_boolShowGeneralOptionsDialogAsToplevel);
+ addBoolSelector(g,__tr2qs_ctx("Registered Users","options"),KviOption_boolShowRegisteredUsersDialogAsToplevel);
+ addBoolSelector(g,__tr2qs_ctx("Identity","options"),KviOption_boolShowIdentityDialogAsToplevel);
+ addBoolSelector(g,__tr2qs_ctx("Servers","options"),KviOption_boolShowServersConnectDialogAsToplevel);
+ addBoolSelector(g,__tr2qs_ctx("Join Channels","options"),KviOption_boolShowChannelsJoinDialogAsToplevel);
+ addRowSpacer(0,7,0,7);
+}
+
+KviInterfaceFeaturesOptionsWidget::~KviInterfaceFeaturesOptionsWidget()
+{
+}
+
+void KviInterfaceFeaturesOptionsWidget::commit()
+{
+ KviOptionsWidget::commit();
+
+ QString szSplashDisableFile;
+ g_pApp->getLocalKvircDirectory(szSplashDisableFile,KviApp::Pics,"disable-splash." KVI_VERSION);
+
+ if(m_pDisableSplash->isChecked())
+ {
+ if(!KviFileUtils::fileExists(szSplashDisableFile))
+ KviFileUtils::writeFile(szSplashDisableFile,"");
+ } else {
+ if(KviFileUtils::fileExists(szSplashDisableFile))
+ KviFileUtils::removeFile(szSplashDisableFile);
+ }
+
+}
+
+#include "m_optw_interfacefeatures.moc"
diff --git a/src/modules/options/optw_interfacefeatures.h b/src/modules/options/optw_interfacefeatures.h
new file mode 100644
index 00000000..f85dfb9e
--- /dev/null
+++ b/src/modules/options/optw_interfacefeatures.h
@@ -0,0 +1,48 @@
+#ifndef _OPTW_INTERFACEFEATURES_H_
+#define _OPTW_INTERFACEFEATURES_H_
+
+//=============================================================================
+//
+// File : optw_interfacefeatures.h
+// Creation date : Sat Jun 2 2001 14:50:01 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001-2005 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+#include "kvi_optionswidget.h"
+
+#define KVI_OPTIONS_WIDGET_ICON_KviInterfaceFeaturesOptionsWidget KVI_SMALLICON_IDEA
+#define KVI_OPTIONS_WIDGET_NAME_KviInterfaceFeaturesOptionsWidget __tr2qs_no_lookup("Interface")
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviInterfaceFeaturesOptionsWidget 50000
+
+class QCheckBox;
+
+class KviInterfaceFeaturesOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviInterfaceFeaturesOptionsWidget(QWidget * parent);
+ ~KviInterfaceFeaturesOptionsWidget();
+protected:
+ QCheckBox * m_pDisableSplash;
+public:
+ virtual void commit();
+};
+
+#endif //!_OPTW_INTERFACEFEATURES_H_
diff --git a/src/modules/options/optw_interfacelookglobal.cpp b/src/modules/options/optw_interfacelookglobal.cpp
new file mode 100644
index 00000000..50cf845f
--- /dev/null
+++ b/src/modules/options/optw_interfacelookglobal.cpp
@@ -0,0 +1,215 @@
+//
+// File : optw_interfacelookglobal.cpp
+// Creation date : Sun Jun 3 2001 20:50:13 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "optw_interfacelookglobal.h"
+
+#include <qlayout.h>
+
+#include "kvi_settings.h"
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+KviThemeGeneralOptionsWidget::KviThemeGeneralOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent)
+{
+ createLayout(4,2);
+
+ KviBoolSelector * b = addBoolSelector(0,1,1,1,__tr2qs_ctx("Use global application font","options"),KviOption_boolUseGlobalApplicationFont);
+ KviBoolSelector * g = addBoolSelector(0,0,1,0,__tr2qs_ctx("Hide icons in Popup","options"),KviOption_boolDisablePopupIcons);
+ KviFontSelector * f = addFontSelector(0,2,1,2,__tr2qs_ctx("Global application font:","options"),KviOption_fontApplication,
+ KVI_OPTION_BOOL(KviOption_boolUseGlobalApplicationFont));
+
+ connect(b,SIGNAL(toggled(bool)),f,SLOT(setEnabled(bool)));
+
+ addRowSpacer(0,3,1,3);
+}
+
+KviThemeGeneralOptionsWidget::~KviThemeGeneralOptionsWidget()
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+KviThemeTransparencyOptionsWidget::KviThemeTransparencyOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent)
+{
+#ifdef COMPILE_PSEUDO_TRANSPARENCY
+
+ #ifdef COMPILE_KDE_SUPPORT
+ createLayout(7,2);
+ #else
+ createLayout(5,2);
+ #endif
+
+ m_pUseTransparencyBoolSelector = addBoolSelector(0,0,1,0,__tr2qs_ctx("Enable fake transparency","options"),KviOption_boolUseGlobalPseudoTransparency);
+#ifdef COMPILE_INFO_TIPS
+ #ifdef COMPILE_KDE_SUPPORT
+ mergeTip(m_pUseTransparencyBoolSelector,
+ __tr2qs_ctx("<center>This option makes all KVIrc windows look " \
+ "transparent.<br>You must choose a blending " \
+ "background image to below or check the " \
+ "\"Use KDE desktop for transparency\" option.</center>","options"));
+ #else
+ mergeTip(m_pUseTransparencyBoolSelector,
+ __tr2qs_ctx("<center>This option makes all KVIrc windows look " \
+ "like transparent.<br>You must choose a blending " \
+ "background image to below.</center>","options"));
+ #endif
+#endif
+
+ KviUIntSelector * u = addUIntSelector(0,1,1,1,__tr2qs_ctx("Child window opacity:","options"),KviOption_uintGlobalTransparencyChildFadeFactor,
+ 0,100,35,KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency));
+ connect(m_pUseTransparencyBoolSelector,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
+
+ u = addUIntSelector(0,2,1,2,__tr2qs_ctx("Parent window opacity:","options"),KviOption_uintGlobalTransparencyParentFadeFactor,
+ 0,100,10,KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency));
+ connect(m_pUseTransparencyBoolSelector,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
+
+ KviColorSelector * c = addColorSelector(0,3,1,3,__tr2qs_ctx("Blend color:","options"),KviOption_colorGlobalTransparencyFade,
+ KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency));
+ connect(m_pUseTransparencyBoolSelector,SIGNAL(toggled(bool)),c,SLOT(setEnabled(bool)));
+
+// addRowSpacer(0,13,0,13);
+#ifdef COMPILE_KDE_SUPPORT
+ m_pObtainBackgroundFromKdeBoolSelector = addBoolSelector(0,4,1,4,__tr2qs_ctx("Use KDE desktop for transparency","options"),KviOption_boolObtainGlobalBackgroundFromKde,
+ KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency));
+ connect(m_pUseTransparencyBoolSelector,SIGNAL(toggled(bool)),m_pObtainBackgroundFromKdeBoolSelector,SLOT(setEnabled(bool)));
+ connect(m_pObtainBackgroundFromKdeBoolSelector,SIGNAL(toggled(bool)),this,SLOT(enableUpdateKdeBackgroundBoolSelector(bool)));
+
+ m_pUpdateKdeBackgroundOnChangeBoolSelector = addBoolSelector(0,5,1,5,__tr2qs_ctx("Keep in sync with KDE background changes","options"),KviOption_boolUpdateKdeBackgroundOnChange,
+ KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency) && KVI_OPTION_BOOL(KviOption_boolObtainGlobalBackgroundFromKde));
+
+ m_pGlobalBackgroundPixmapSelector = addPixmapSelector(0,6,1,6,__tr2qs_ctx("Transparency blend image:","options"),KviOption_pixmapGlobalTransparencyBackground,
+ KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency) && !KVI_OPTION_BOOL(KviOption_boolObtainGlobalBackgroundFromKde));
+ layout()->setRowStretch(6,1);
+ connect(m_pObtainBackgroundFromKdeBoolSelector,SIGNAL(toggled(bool)),this,SLOT(enableGlobalBackgroundPixmapSelector(bool)));
+
+#else //!COMPILE_KDE_SUPPORT
+ m_pGlobalBackgroundPixmapSelector = addPixmapSelector(0,4,1,4,__tr2qs_ctx("Transparency blend image:","options"),KviOption_pixmapGlobalTransparencyBackground,
+ KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency));
+ layout()->setRowStretch(4,1);
+#endif //!COMPILE_KDE_SUPPORT
+ connect(m_pUseTransparencyBoolSelector,SIGNAL(toggled(bool)),this,SLOT(enableGlobalBackgroundPixmapSelector(bool)));
+ connect(m_pUseTransparencyBoolSelector,SIGNAL(toggled(bool)),this,SLOT(enableUpdateKdeBackgroundBoolSelector(bool)));
+#else
+ createLayout(1,1);
+ addRowSpacer(0,0,0,0);
+#endif
+}
+
+KviThemeTransparencyOptionsWidget::~KviThemeTransparencyOptionsWidget()
+{
+}
+
+void KviThemeTransparencyOptionsWidget::enableGlobalBackgroundPixmapSelector(bool)
+{
+#ifdef COMPILE_PSEUDO_TRANSPARENCY
+ #ifdef COMPILE_KDE_SUPPORT
+ m_pGlobalBackgroundPixmapSelector->setEnabled(m_pUseTransparencyBoolSelector->isChecked() && !(m_pObtainBackgroundFromKdeBoolSelector->isChecked()));
+ #else
+ m_pGlobalBackgroundPixmapSelector->setEnabled(m_pUseTransparencyBoolSelector->isChecked());
+ #endif
+#endif
+}
+
+void KviThemeTransparencyOptionsWidget::enableUpdateKdeBackgroundBoolSelector(bool)
+{
+#ifdef COMPILE_PSEUDO_TRANSPARENCY
+ #ifdef COMPILE_KDE_SUPPORT
+ m_pUpdateKdeBackgroundOnChangeBoolSelector->setEnabled(m_pUseTransparencyBoolSelector->isChecked() && m_pObtainBackgroundFromKdeBoolSelector->isChecked());
+ #endif
+#endif
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+KviThemeMdiCaptionsOptionsWidget::KviThemeMdiCaptionsOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent)
+{
+ createLayout(7,1);
+
+ addColorSelector(0,0,0,0,__tr2qs_ctx("Active Background","options"),KviOption_colorMdiCaptionActive);
+ addColorSelector(0,1,0,1,__tr2qs_ctx("Inactive Background","options"),KviOption_colorMdiCaptionInactive);
+ addColorSelector(0,2,0,2,__tr2qs_ctx("Active Text (Primary)","options"),KviOption_colorCaptionTextActive);
+ addColorSelector(0,3,0,3,__tr2qs_ctx("Active Text (Secondary)","options"),KviOption_colorCaptionTextActive2);
+ addColorSelector(0,4,0,4,__tr2qs_ctx("Inactive Text (Primary)","options"),KviOption_colorCaptionTextInactive);
+ addColorSelector(0,5,0,5,__tr2qs_ctx("Inactive Text (Secondary)","options"),KviOption_colorCaptionTextInactive2);
+
+ addRowSpacer(0,6,0,6);
+}
+
+KviThemeMdiCaptionsOptionsWidget::~KviThemeMdiCaptionsOptionsWidget()
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+KviThemeMdiAreaOptionsWidget::KviThemeMdiAreaOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent)
+{
+ createLayout(2,1);
+
+ addColorSelector(0,0,0,0,__tr2qs_ctx("Background","options"),KviOption_colorMdiBackground);
+ addPixmapSelector(0,1,0,1,__tr2qs_ctx("Background Image","options"),KviOption_pixmapMdiBackground);
+
+ layout()->setRowStretch(1,1);
+}
+
+KviThemeMdiAreaOptionsWidget::~KviThemeMdiAreaOptionsWidget()
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+KviThemeToolBarAppletsOptionsWidget::KviThemeToolBarAppletsOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent)
+{
+ createLayout(9,1);
+
+ addFontSelector(0,0,0,0,__tr2qs_ctx("Font","options"),KviOption_fontIrcToolBarApplet);
+
+ addColorSelector(0,1,0,1,__tr2qs_ctx("Background","options"),KviOption_colorIrcToolBarAppletBackground);
+ addColorSelector(0,2,0,2,__tr2qs_ctx("Low-Contrast Foreground","options"),KviOption_colorIrcToolBarAppletForegroundLowContrast);
+ addColorSelector(0,3,0,3,__tr2qs_ctx("Mid-Contrast Foreground","options"),KviOption_colorIrcToolBarAppletForegroundMidContrast);
+ addColorSelector(0,4,0,4,__tr2qs_ctx("Active High-Contrast Foreground (Primary)","options"),KviOption_colorIrcToolBarAppletForegroundHighContrastActive1);
+ addColorSelector(0,5,0,5,__tr2qs_ctx("Active High-Contrast Foreground (Secondary)","options"),KviOption_colorIrcToolBarAppletForegroundHighContrastActive2);
+ addColorSelector(0,6,0,6,__tr2qs_ctx("Inactive High-Contrast Foreground (Primary)","options"),KviOption_colorIrcToolBarAppletForegroundHighContrastInactive1);
+ addColorSelector(0,7,0,7,__tr2qs_ctx("Inactive High-Contrast Foreground (Secondary)","options"),KviOption_colorIrcToolBarAppletForegroundHighContrastInactive2);
+
+ addPixmapSelector(0,8,0,8,__tr2qs_ctx("Background Image","options"),KviOption_pixmapIrcToolBarAppletBackground);
+
+ layout()->setRowStretch(8,1);
+}
+
+KviThemeToolBarAppletsOptionsWidget::~KviThemeToolBarAppletsOptionsWidget()
+{
+}
+
+
+#include "m_optw_interfacelookglobal.moc"
diff --git a/src/modules/options/optw_interfacelookglobal.h b/src/modules/options/optw_interfacelookglobal.h
new file mode 100644
index 00000000..ac4153b1
--- /dev/null
+++ b/src/modules/options/optw_interfacelookglobal.h
@@ -0,0 +1,113 @@
+#ifndef _OPTW_INTERFACELOOKGLOBAL_H_
+#define _OPTW_INTERFACELOOKGLOBAL_H_
+
+//
+// File : optw_interfacelookglobal.h
+// Creation date : Sun Jun 3 2001 20:49:02 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_settings.h"
+#include "kvi_optionswidget.h"
+#include "kvi_selectors.h"
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviThemeGeneralOptionsWidget KVI_SMALLICON_GUI
+#define KVI_OPTIONS_WIDGET_NAME_KviThemeGeneralOptionsWidget __tr2qs_no_lookup("General")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviThemeGeneralOptionsWidget __tr2qs_no_lookup("theme")
+#define KVI_OPTIONS_WIDGET_GROUP_KviThemeGeneralOptionsWidget "theme"
+
+
+class KviThemeGeneralOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviThemeGeneralOptionsWidget(QWidget * parent);
+ ~KviThemeGeneralOptionsWidget();
+};
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviThemeTransparencyOptionsWidget KVI_SMALLICON_TRANSPARENT
+#define KVI_OPTIONS_WIDGET_NAME_KviThemeTransparencyOptionsWidget __tr2qs_no_lookup("Transparency")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviThemeTransparencyOptionsWidget __tr2qs_no_lookup("theme,background")
+#define KVI_OPTIONS_WIDGET_GROUP_KviThemeTransparencyOptionsWidget "theme"
+
+
+class KviThemeTransparencyOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviThemeTransparencyOptionsWidget(QWidget * parent);
+ ~KviThemeTransparencyOptionsWidget();
+protected:
+#ifdef COMPILE_PSEUDO_TRANSPARENCY
+ KviPixmapSelector * m_pGlobalBackgroundPixmapSelector;
+ KviBoolSelector * m_pUseTransparencyBoolSelector;
+ #ifdef COMPILE_KDE_SUPPORT
+ KviBoolSelector * m_pObtainBackgroundFromKdeBoolSelector;
+ KviBoolSelector * m_pUpdateKdeBackgroundOnChangeBoolSelector;
+ #endif
+#endif
+protected slots:
+ void enableGlobalBackgroundPixmapSelector(bool);
+ void enableUpdateKdeBackgroundBoolSelector(bool);
+};
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviThemeMdiCaptionsOptionsWidget KVI_SMALLICON_CAPTION
+#define KVI_OPTIONS_WIDGET_NAME_KviThemeMdiCaptionsOptionsWidget __tr2qs_no_lookup("Window Captions")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviThemeMdiCaptionsOptionsWidget __tr2qs_no_lookup("theme,mdi")
+#define KVI_OPTIONS_WIDGET_GROUP_KviThemeMdiCaptionsOptionsWidget "theme"
+
+class KviThemeMdiCaptionsOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviThemeMdiCaptionsOptionsWidget(QWidget * parent);
+ ~KviThemeMdiCaptionsOptionsWidget();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviThemeMdiAreaOptionsWidget KVI_SMALLICON_APPLET
+#define KVI_OPTIONS_WIDGET_NAME_KviThemeMdiAreaOptionsWidget __tr2qs_no_lookup("Workspace")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviThemeMdiAreaOptionsWidget __tr2qs_no_lookup("theme,mdi")
+#define KVI_OPTIONS_WIDGET_GROUP_KviThemeMdiAreaOptionsWidget "theme"
+
+class KviThemeMdiAreaOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviThemeMdiAreaOptionsWidget(QWidget * parent);
+ ~KviThemeMdiAreaOptionsWidget();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviThemeToolBarAppletsOptionsWidget KVI_SMALLICON_APPLET
+#define KVI_OPTIONS_WIDGET_NAME_KviThemeToolBarAppletsOptionsWidget __tr2qs_no_lookup("ToolBar Applets")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviThemeToolBarAppletsOptionsWidget __tr2qs_no_lookup("theme,toolbar")
+#define KVI_OPTIONS_WIDGET_GROUP_KviThemeToolBarAppletsOptionsWidget "theme"
+
+
+class KviThemeToolBarAppletsOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviThemeToolBarAppletsOptionsWidget(QWidget * parent);
+ ~KviThemeToolBarAppletsOptionsWidget();
+};
+
+#endif //!_OPTW_INTERFACELOOKGLOBAL_H_
diff --git a/src/modules/options/optw_irc.cpp b/src/modules/options/optw_irc.cpp
new file mode 100644
index 00000000..537fde9a
--- /dev/null
+++ b/src/modules/options/optw_irc.cpp
@@ -0,0 +1,220 @@
+//
+// File : optw_irc.cpp
+// Creation date : Sun Dec 2 18:59:48 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+
+#include "optw_irc.h"
+
+#include "kvi_settings.h"
+#include "kvi_locale.h"
+#include "kvi_options.h"
+#include "kvi_ircmask.h"
+
+#include <qcombobox.h>
+
+
+KviIrcOptionsWidget::KviIrcOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"irc_options_widget")
+{
+}
+
+
+KviIrcOptionsWidget::~KviIrcOptionsWidget()
+{
+}
+
+
+KviIrcGeneralOptionsWidget::KviIrcGeneralOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"irc_options_widget")
+{
+ createLayout(3,1);
+ KviBoolSelector *b = addBoolSelector(0,0,0,0,__tr2qs_ctx("Minimize console after successful login","options"),KviOption_boolMinimizeConsoleAfterConnect);
+
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,__tr2qs_ctx("<center>This option will cause KVIrc to minimize the console window after successfully logging into a server.</center>","options"));
+#endif
+
+ b = addBoolSelector(0,1,0,1,__tr2qs_ctx("Show network name in console taskbar entry","options"),KviOption_boolShowNetworkNameForConsoleTaskBarEntry);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,__tr2qs_ctx("<center>This option will cause KVIrc to show the network name as the console taskbar entry instead of the server name. This is nice to keep on unless your servers are not organized in networks or you often connect to two servers of the same network.</center>","options"));
+#endif
+
+
+ addRowSpacer(0,2,0,2);
+}
+
+
+KviIrcGeneralOptionsWidget::~KviIrcGeneralOptionsWidget()
+{
+}
+
+
+
+KviIrcAdvancedOptionsWidget::KviIrcAdvancedOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"irc_advanced_options_widget")
+{
+ createLayout(3,1);
+ KviBoolSelector *b = addBoolSelector(0,0,0,0,__tr2qs_ctx("Force immediate quit","options"),KviOption_boolForceBrutalQuit);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,
+ __tr2qs_ctx("<center>This option causes KVIrc to close " \
+ "the connection immediately after sending the QUIT message.<br>" \
+ "When this option is disabled, KVIrc will wait for the server " \
+ "to close the connection.<br>" \
+ "Note that if you use this, your QUIT message may be not displayed.</center>","options"));
+#endif
+ addBoolSelector(0,1,0,1,__tr2qs_ctx("Prepend gender info to realname","options"),KviOption_boolPrependGenderInfoToRealname);
+}
+
+KviIrcAdvancedOptionsWidget::~KviIrcAdvancedOptionsWidget()
+{
+}
+
+
+
+
+
+KviChannelOptionsWidget::KviChannelOptionsWidget(QWidget * pParent)
+: KviOptionsWidget(pParent)
+{
+}
+
+KviChannelOptionsWidget::~KviChannelOptionsWidget()
+{
+}
+
+
+KviChannelGeneralOptionsWidget::KviChannelGeneralOptionsWidget(QWidget * pParent)
+: KviOptionsWidget(pParent)
+{
+ createLayout(5,1);
+
+ KviTalGroupBox * g = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("On Channel Kick","options"));
+
+ KviBoolSelector *b = addBoolSelector(g,__tr2qs_ctx("Rejoin channel","options"),KviOption_boolRejoinChannelOnKick);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,
+ __tr2qs_ctx("<center>This option will cause KVIrc to attempt " \
+ "to rejoin a channel after being kicked.</center>","options"));
+#endif
+ b = addBoolSelector(g,__tr2qs_ctx("Keep channel open","options"),KviOption_boolKeepChannelOpenOnKick);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,
+ __tr2qs_ctx("<center>This option will cause KVIrc to keep " \
+ "the channel window open after being kicked.<br>" \
+ "It might be a good idea to also enable the " \
+ "\"Rejoin channel\" option.</center>","options"));
+#endif
+
+ g = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("On Channel Part","options"));
+
+ b = addBoolSelector(g,__tr2qs_ctx("Keep channel open","options"),KviOption_boolKeepChannelOpenOnPart);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,
+ __tr2qs_ctx("<center>This option will cause KVIrc to keep " \
+ "the channel window open after leaving it.</center>","options"));
+#endif
+
+ b = addBoolSelector(0,2,0,2,__tr2qs_ctx("Automatically join channel on invite","options"),KviOption_boolAutoJoinOnInvite);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,
+ __tr2qs_ctx("<center>This option will cause KVIrc to automatically " \
+ "join a channel when an INVITE message for that channel is received.<br>" \
+ "<b>Warning:</b> This may help spammers harass you. :)</center>","options"));
+#endif
+
+ b = addBoolSelector(0,3,0,3, __tr2qs_ctx("Always open channels as minimized","options"),KviOption_boolCreateMinimizedChannels);
+
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,
+ __tr2qs_ctx("<center>This option causes newly created " \
+ "channel windows to be immediately minimized.<br>" \
+ "Enable this if you don't like channels " \
+ "popping up while you're typing something in a channel. :D</center>","options"));
+#endif
+
+
+ addRowSpacer(0,4,0,4);
+}
+
+KviChannelGeneralOptionsWidget::~KviChannelGeneralOptionsWidget()
+{
+}
+
+
+KviChannelAdvancedOptionsWidget::KviChannelAdvancedOptionsWidget(QWidget * pParent)
+: KviOptionsWidget(pParent)
+{
+ createLayout(6,4);
+
+ KviBoolSelector * b = addBoolSelector(0,0,4,0,__tr2qs_ctx("Log joined channels history","options"),KviOption_boolLogChannelHistory);
+
+ addLabel(0,1,0,1,__tr2qs_ctx("Default ban mask:","options"));
+
+ m_pBanTypeCombo=new QComboBox(this);
+ addWidgetToLayout(m_pBanTypeCombo,1,1,4,1);
+
+ KviIrcMask hostmask("[email protected]");
+ KviIrcMask ipmask("[email protected]");
+ QString tmp1;
+ QString tmp2;
+ for(int i=0;i<=26;i++)
+ {
+
+ hostmask.mask(tmp1,(KviIrcMask::MaskType)i);
+ ipmask.mask(tmp2,(KviIrcMask::MaskType)i);
+ m_pBanTypeCombo->insertItem(QString("%1 (%2)").arg(tmp1).arg(tmp2));
+ }
+ m_pBanTypeCombo->setCurrentItem(KVI_OPTION_UINT(KviOption_uintDefaultBanType));
+
+ KviTalGroupBox * g = addGroupBox(0,2,4,2,1,Qt::Horizontal,__tr2qs_ctx("On Channel Join","options"));
+ addBoolSelector(g,__tr2qs_ctx("Do not send /WHO request","options"),KviOption_boolDisableWhoRequestOnJoin);
+ addBoolSelector(g,__tr2qs_ctx("Do not request ban list","options"),KviOption_boolDisableBanListRequestOnJoin);
+ addBoolSelector(g,__tr2qs_ctx("Do not request ban exception list","options"),KviOption_boolDisableBanExceptionListRequestOnJoin);
+ addBoolSelector(g,__tr2qs_ctx("Do not request invite list","options"),KviOption_boolDisableInviteListRequestOnJoin);
+
+ b = addBoolSelector(0,3,4,3,__tr2qs_ctx("Do not update the away list","options"),KviOption_boolDisableAwayListUpdates);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,
+ __tr2qs_ctx("<center>KVIrc sends out a channel /WHO message every now and then to keep " \
+ "the channel away list in sync. Use this option to disable this feature (and to save " \
+ "your IRC bandwidth.</center>","options"));
+#endif
+
+ g = addGroupBox(0,4,4,4,1,Qt::Horizontal,__tr2qs_ctx("On Channel Join","options"));
+ addBoolSelector(g,__tr2qs_ctx("Echo channel topic","options"),KviOption_boolEchoNumericTopic);
+ addBoolSelector(g,__tr2qs_ctx("Show channel sync time","options"),KviOption_boolShowChannelSyncTime);
+
+ addRowSpacer(0,5,4,5);
+}
+
+KviChannelAdvancedOptionsWidget::~KviChannelAdvancedOptionsWidget()
+{
+}
+
+void KviChannelAdvancedOptionsWidget::commit()
+{
+ KVI_OPTION_UINT(KviOption_uintDefaultBanType)=m_pBanTypeCombo->currentItem();
+ if((KVI_OPTION_UINT(KviOption_uintDefaultBanType)<0 )|| (KVI_OPTION_UINT(KviOption_uintDefaultBanType)>26)) KVI_OPTION_UINT(KviOption_uintDefaultBanType)=7;
+ KviOptionsWidget::commit();
+}
+
+#include "m_optw_irc.moc"
diff --git a/src/modules/options/optw_irc.h b/src/modules/options/optw_irc.h
new file mode 100644
index 00000000..cc33d284
--- /dev/null
+++ b/src/modules/options/optw_irc.h
@@ -0,0 +1,116 @@
+#ifndef _OPTW_IRC_H_
+#define _OPTW_IRC_H_
+//=============================================================================
+//
+// File : optw_irc.h
+// Creation date : Sun Dec 2 18:59:49 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001-2006 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+#include "kvi_optionswidget.h"
+
+class QComboBox;
+
+#define KVI_OPTIONS_WIDGET_ICON_KviIrcOptionsWidget KVI_SMALLICON_IRC
+#define KVI_OPTIONS_WIDGET_NAME_KviIrcOptionsWidget __tr2qs_no_lookup("IRC")
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviIrcOptionsWidget 80000
+#define KVI_OPTIONS_WIDGET_CONTAINER_KviIrcOptionsWidget true
+
+class KviIrcOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviIrcOptionsWidget(QWidget * parent);
+ ~KviIrcOptionsWidget();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviIrcGeneralOptionsWidget KVI_SMALLICON_IRC
+#define KVI_OPTIONS_WIDGET_NAME_KviIrcGeneralOptionsWidget __tr2qs_no_lookup("General")
+#define KVI_OPTIONS_WIDGET_PARENT_KviIrcGeneralOptionsWidget KviIrcOptionsWidget
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviIrcGeneralOptionsWidget 80000
+
+class KviIrcGeneralOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviIrcGeneralOptionsWidget(QWidget * parent);
+ ~KviIrcGeneralOptionsWidget();
+};
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviIrcAdvancedOptionsWidget KVI_SMALLICON_IRC
+#define KVI_OPTIONS_WIDGET_NAME_KviIrcAdvancedOptionsWidget __tr2qs_no_lookup("Advanced")
+#define KVI_OPTIONS_WIDGET_PARENT_KviIrcAdvancedOptionsWidget KviIrcOptionsWidget
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviIrcAdvancedOptionsWidget 50000
+
+class KviIrcAdvancedOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviIrcAdvancedOptionsWidget(QWidget * parent);
+ ~KviIrcAdvancedOptionsWidget();
+};
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviChannelOptionsWidget KVI_SMALLICON_CHANNEL
+#define KVI_OPTIONS_WIDGET_NAME_KviChannelOptionsWidget __tr2qs_no_lookup("Channel")
+#define KVI_OPTIONS_WIDGET_PARENT_KviChannelOptionsWidget KviIrcOptionsWidget
+#define KVI_OPTIONS_WIDGET_CONTAINER_KviChannelOptionsWidget true
+#define KVI_OPTIONS_WIDGET_NOTCONTAINED_KviChannelOptionsWidget true
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviChannelOptionsWidget 90000
+
+class KviChannelOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviChannelOptionsWidget(QWidget * parent);
+ ~KviChannelOptionsWidget();
+};
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviChannelGeneralOptionsWidget KVI_SMALLICON_CHANNEL
+#define KVI_OPTIONS_WIDGET_NAME_KviChannelGeneralOptionsWidget __tr2qs_no_lookup("General")
+#define KVI_OPTIONS_WIDGET_PARENT_KviChannelGeneralOptionsWidget KviChannelOptionsWidget
+
+class KviChannelGeneralOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviChannelGeneralOptionsWidget(QWidget * parent);
+ ~KviChannelGeneralOptionsWidget();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviChannelAdvancedOptionsWidget KVI_SMALLICON_CHANNEL
+#define KVI_OPTIONS_WIDGET_NAME_KviChannelAdvancedOptionsWidget __tr2qs_no_lookup("Advanced")
+#define KVI_OPTIONS_WIDGET_PARENT_KviChannelAdvancedOptionsWidget KviChannelOptionsWidget
+
+class KviChannelAdvancedOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviChannelAdvancedOptionsWidget(QWidget * parent);
+ ~KviChannelAdvancedOptionsWidget();
+public:
+ virtual void commit();
+protected:
+ QComboBox * m_pBanTypeCombo;
+};
+
+#endif //_OPTW_IRC_H_
diff --git a/src/modules/options/optw_ircoutput.cpp b/src/modules/options/optw_ircoutput.cpp
new file mode 100644
index 00000000..cfa28456
--- /dev/null
+++ b/src/modules/options/optw_ircoutput.cpp
@@ -0,0 +1,94 @@
+//
+// File : optw_ircoutput.cpp
+// Creation date : Wed Nov 15 2000 11:45:06 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2000 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "optw_ircoutput.h"
+
+#include <qlayout.h>
+
+#include "kvi_settings.h"
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+#include <qcombobox.h>
+#include <qlabel.h>
+
+#ifdef COMPILE_INFO_TIPS
+ #include "kvi_tal_tooltip.h"
+#endif
+
+KviIrcOutputOptionsWidget::KviIrcOutputOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"ircoutput_options_widget")
+{
+ createLayout(7,2);
+
+ QLabel * l =new QLabel(__tr2qs_ctx("Output verbosity","options"),this);
+ addWidgetToLayout(l,0,0,0,0);
+
+ m_pVerbosityCombo = new QComboBox(false,this);
+ addWidgetToLayout(m_pVerbosityCombo,1,0,1,0);
+
+ m_pVerbosityCombo->insertItem(__tr2qs_ctx("Mute","options"));
+ m_pVerbosityCombo->insertItem(__tr2qs_ctx("Quiet","options"));
+ m_pVerbosityCombo->insertItem(__tr2qs_ctx("Normal","options"));
+ m_pVerbosityCombo->insertItem(__tr2qs_ctx("Verbose","options"));
+ m_pVerbosityCombo->insertItem(__tr2qs_ctx("Paranoic","options"));
+
+ if(KVI_OPTION_UINT(KviOption_uintOutputVerbosityLevel) > KVI_VERBOSITY_LEVEL_PARANOIC)
+ KVI_OPTION_UINT(KviOption_uintOutputVerbosityLevel) = KVI_VERBOSITY_LEVEL_NORMAL;
+ m_pVerbosityCombo->setCurrentItem(KVI_OPTION_UINT(KviOption_uintOutputVerbosityLevel));
+
+ KviTalGroupBox * g = addGroupBox(0,1,1,1,1,Qt::Horizontal,__tr2qs_ctx("Show in active window","options"));
+ addBoolSelector(g,__tr2qs_ctx("External messages","options"),KviOption_boolExternalMessagesToActiveWindow);
+ addBoolSelector(g,__tr2qs_ctx("External CTCP replies","options"),KviOption_boolCtcpRepliesToActiveWindow);
+ addBoolSelector(g,__tr2qs_ctx("Whois replies","options"),KviOption_boolWhoisRepliesToActiveWindow);
+ addBoolSelector(g,__tr2qs_ctx("ChanServ and NickServ notices","options"),KviOption_boolServicesNoticesToActiveWindow);
+ addBoolSelector(g,__tr2qs_ctx("Invite messages","options"),KviOption_boolInvitesToActiveWindow);
+ addBoolSelector(g,__tr2qs_ctx("Server replies","options"),KviOption_boolServerRepliesToActiveWindow);
+ addBoolSelector(g,__tr2qs_ctx("Server notices","options"),KviOption_boolServerNoticesToActiveWindow);
+ addBoolSelector(g,__tr2qs_ctx("Broadcast and WALLOPS messages","options"),KviOption_boolOperatorMessagesToActiveWindow);
+// if(KVI_OPTION_UINT(KviOption_uintUserExperienceLevel)>=2)
+// {
+ addBoolSelector(0,2,1,2,__tr2qs_ctx("Show extended server information","options"),KviOption_boolShowExtendedServerInfo);
+ addBoolSelector(0,3,1,3,__tr2qs_ctx("Show server pings","options"),KviOption_boolShowPingPong);
+ addBoolSelector(0,4,1,4,__tr2qs_ctx("Show own parts in the console","options"),KviOption_boolShowOwnParts);
+ addBoolSelector(0,5,1,5,__tr2qs_ctx("Show compact mode changes","options"),KviOption_boolShowCompactModeChanges);
+
+ addRowSpacer(0,6,1,6);
+// } else {
+// addRowSpacer(0,2,1,2);
+// }
+}
+
+KviIrcOutputOptionsWidget::~KviIrcOutputOptionsWidget()
+{
+}
+
+void KviIrcOutputOptionsWidget::commit()
+{
+ KviOptionsWidget::commit();
+
+ int i = m_pVerbosityCombo->currentItem();
+ if((i < 0) || (i > KVI_VERBOSITY_LEVEL_PARANOIC))i = KVI_VERBOSITY_LEVEL_NORMAL;
+ KVI_OPTION_UINT(KviOption_uintOutputVerbosityLevel) = i;
+}
+
+#include "m_optw_ircoutput.moc"
diff --git a/src/modules/options/optw_ircoutput.h b/src/modules/options/optw_ircoutput.h
new file mode 100644
index 00000000..27e5c4c8
--- /dev/null
+++ b/src/modules/options/optw_ircoutput.h
@@ -0,0 +1,49 @@
+#ifndef _OPTW_IRCOUTPUT_H_
+#define _OPTW_IRCOUTPUT_H_
+
+//
+// File : optw_ircoutput.h
+// Creation date : Wed Nov 15 2000 11:47:51 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2000 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+#include "kvi_tal_listview.h"
+
+class QComboBox;
+
+#define KVI_OPTIONS_WIDGET_ICON_KviIrcOutputOptionsWidget KVI_SMALLICON_RAW
+#define KVI_OPTIONS_WIDGET_NAME_KviIrcOutputOptionsWidget __tr2qs_no_lookup("Verbosity And Output")
+#define KVI_OPTIONS_WIDGET_PARENT_KviIrcOutputOptionsWidget KviIrcOptionsWidget
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviIrcOutputOptionsWidget __tr2qs_no_lookup("debug")
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviIrcOutputOptionsWidget 75000
+
+class KviIrcOutputOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviIrcOutputOptionsWidget(QWidget * parent);
+ ~KviIrcOutputOptionsWidget();
+protected:
+ QComboBox * m_pVerbosityCombo;
+protected:
+ virtual void commit();
+};
+
+#endif //!_OPTW_IRCOUTPUT_H_
diff --git a/src/modules/options/optw_ircview.cpp b/src/modules/options/optw_ircview.cpp
new file mode 100644
index 00000000..860f80c5
--- /dev/null
+++ b/src/modules/options/optw_ircview.cpp
@@ -0,0 +1,168 @@
+//
+// File : optw_ircview.cpp
+// Creation date : Sat Aug 11 2001 03:29:52 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+#include "optw_ircview.h"
+
+#include <qlayout.h>
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+//#warning "Info tips"
+
+KviIrcViewThemeOptionsWidget::KviIrcViewThemeOptionsWidget(QWidget * pParent)
+: KviOptionsWidget(pParent)
+{
+}
+
+KviIrcViewThemeOptionsWidget::~KviIrcViewThemeOptionsWidget()
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+KviIrcViewLookOptionsWidget::KviIrcViewLookOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"ircviewlook_options_widget")
+{
+ createLayout(6,2);
+
+ addFontSelector(0,0,1,0,__tr2qs_ctx("Font:","options"),KviOption_fontIrcView);
+ addColorSelector(0,1,1,1,__tr2qs_ctx("Background color:","options"),KviOption_colorIrcViewBackground);
+
+ addPixmapSelector(0,2,1,2,__tr2qs_ctx("Background image:","options"),KviOption_pixmapIrcViewBackground);
+
+ addLabel(0,3,0,3,__tr2qs_ctx("Horizontal align:","options"));
+ m_pHorizontalAlign=new QComboBox(this);
+ addWidgetToLayout(m_pHorizontalAlign,1,3,1,3);
+
+ addLabel(0,4,0,4,__tr2qs_ctx("Vertical align:","options"));
+ m_pVerticalAlign=new QComboBox(this);
+ addWidgetToLayout(m_pVerticalAlign,1,4,1,4);
+
+ addColorSelector(0,5,1,5,__tr2qs_ctx("Mark Line:","options"),KviOption_colorIrcViewMarkLine);
+
+ m_pHorizontalAlign->insertItem(__tr2qs_ctx("Tile","options"));
+ m_pHorizontalAlign->insertItem(__tr2qs_ctx("Left","options"));
+ m_pHorizontalAlign->insertItem(__tr2qs_ctx("Right","options"));
+ m_pHorizontalAlign->insertItem(__tr2qs_ctx("Center","options"));
+
+ m_pVerticalAlign->insertItem(__tr2qs_ctx("Tile","options"));
+ m_pVerticalAlign->insertItem(__tr2qs_ctx("Top","options"));
+ m_pVerticalAlign->insertItem(__tr2qs_ctx("Bottom","options"));
+ m_pVerticalAlign->insertItem(__tr2qs_ctx("Center","options"));
+
+ switch( KVI_OPTION_UINT(KviOption_uintIrcViewPixmapAlign) & Qt::AlignHorizontal_Mask)
+ {
+ case Qt::AlignLeft:
+ m_pHorizontalAlign->setCurrentItem(1);
+ break;
+ case Qt::AlignRight:
+ m_pHorizontalAlign->setCurrentItem(2);
+ break;
+ case Qt::AlignHCenter:
+ m_pHorizontalAlign->setCurrentItem(3);
+ break;
+ default:
+ m_pHorizontalAlign->setCurrentItem(0);
+ }
+
+ switch( KVI_OPTION_UINT(KviOption_uintIrcViewPixmapAlign) & Qt::AlignVertical_Mask)
+ {
+ case Qt::AlignTop:
+ m_pVerticalAlign->setCurrentItem(1);
+ break;
+ case Qt::AlignBottom:
+ m_pVerticalAlign->setCurrentItem(2);
+ break;
+ case Qt::AlignVCenter:
+ m_pVerticalAlign->setCurrentItem(3);
+ break;
+ default:
+ m_pVerticalAlign->setCurrentItem(0);
+ }
+
+ layout()->setRowStretch(2,1);
+}
+
+KviIrcViewLookOptionsWidget::~KviIrcViewLookOptionsWidget()
+{
+}
+
+void KviIrcViewLookOptionsWidget::commit()
+{
+ int iFlags=0;
+ switch(m_pHorizontalAlign->currentItem())
+ {
+ case 1:
+ iFlags|=Qt::AlignLeft;
+ break;
+ case 2:
+ iFlags|=Qt::AlignRight;
+ break;
+ case 3:
+ iFlags|=Qt::AlignHCenter;
+ break;
+ }
+ switch(m_pVerticalAlign->currentItem())
+ {
+ case 1:
+ iFlags|=Qt::AlignTop;
+ break;
+ case 2:
+ iFlags|=Qt::AlignBottom;
+ break;
+ case 3:
+ iFlags|=Qt::AlignVCenter;
+ break;
+ }
+
+ KVI_OPTION_UINT(KviOption_uintIrcViewPixmapAlign)=iFlags;
+ KviOptionsWidget::commit();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+KviIrcViewFeaturesOptionsWidget::KviIrcViewFeaturesOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"ircviewfeatures_options_widget")
+{
+ createLayout(14,1);
+
+
+
+ addBoolSelector(0,7,0,7,__tr2qs_ctx("Enable URL highlighting","options"),KviOption_boolIrcViewUrlHighlighting);
+ addBoolSelector(0,8,0,8,__tr2qs_ctx("Use line wrap margin","options"),KviOption_boolIrcViewWrapMargin);
+ KviUIntSelector * s = addUIntSelector(0,9,0,9,__tr2qs_ctx("Maximum buffer size:","options"),KviOption_uintIrcViewMaxBufferSize,32,32767,2048);
+ s->setSuffix(__tr2qs_ctx(" lines","options"));
+ s = addUIntSelector(0,10,0,10,__tr2qs_ctx("Link tooltip show delay:","options"),KviOption_uintIrcViewToolTipTimeoutInMsec,256,10000,1800);
+ s->setSuffix(__tr2qs_ctx(" msec","options"));
+ s = addUIntSelector(0,11,0,11,__tr2qs_ctx("Link tooltip hide delay:","options"),KviOption_uintIrcViewToolTipHideTimeoutInMsec,256,10000,12000);
+ s->setSuffix(__tr2qs_ctx(" msec","options"));
+ addBoolSelector(0,12,0,12,__tr2qs_ctx("Track last read text line","options"),KviOption_boolTrackLastReadTextViewLine);
+ addRowSpacer(0,13,0,13);
+
+}
+
+KviIrcViewFeaturesOptionsWidget::~KviIrcViewFeaturesOptionsWidget()
+{
+}
+
+
+
+#include "m_optw_ircview.moc"
diff --git a/src/modules/options/optw_ircview.h b/src/modules/options/optw_ircview.h
new file mode 100644
index 00000000..3da03a5a
--- /dev/null
+++ b/src/modules/options/optw_ircview.h
@@ -0,0 +1,83 @@
+#ifndef _OPTW_IRCVIEW_H_
+#define _OPTW_IRCVIEW_H_
+
+//=============================================================================
+//
+// File : optw_ircview.h
+// Creation date : Sat Aug 11 2001 03:28:19 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001-2006 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+
+#include "kvi_optionswidget.h"
+#include <qcombobox.h>
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviIrcViewThemeOptionsWidget KVI_SMALLICON_IRCVIEW
+#define KVI_OPTIONS_WIDGET_NAME_KviIrcViewThemeOptionsWidget __tr2qs_no_lookup("Output")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviIrcViewThemeOptionsWidget __tr2qs_no_lookup("theme,colors,output")
+#define KVI_OPTIONS_WIDGET_GROUP_KviIrcViewThemeOptionsWidget "theme"
+#define KVI_OPTIONS_WIDGET_CONTAINER_KviIrcViewThemeOptionsWidget true
+
+class KviIrcViewThemeOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviIrcViewThemeOptionsWidget(QWidget * pParent);
+ ~KviIrcViewThemeOptionsWidget();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviIrcViewLookOptionsWidget KVI_SMALLICON_IRCVIEW
+#define KVI_OPTIONS_WIDGET_NAME_KviIrcViewLookOptionsWidget __tr2qs_no_lookup("Look")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviIrcViewLookOptionsWidget __tr2qs_no_lookup("theme,colors,output")
+#define KVI_OPTIONS_WIDGET_GROUP_KviIrcViewLookOptionsWidget "theme"
+#define KVI_OPTIONS_WIDGET_PARENT_KviIrcViewLookOptionsWidget KviIrcViewThemeOptionsWidget
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviIrcViewLookOptionsWidget 30
+
+class KviIrcViewLookOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+private:
+ QComboBox* m_pHorizontalAlign;
+ QComboBox* m_pVerticalAlign;
+public:
+ KviIrcViewLookOptionsWidget(QWidget * parent);
+ ~KviIrcViewLookOptionsWidget();
+public:
+ virtual void commit();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviIrcViewFeaturesOptionsWidget KVI_SMALLICON_IRCVIEW
+#define KVI_OPTIONS_WIDGET_NAME_KviIrcViewFeaturesOptionsWidget __tr2qs_no_lookup("Features")
+#define KVI_OPTIONS_WIDGET_GROUP_KviIrcViewFeaturesOptionsWidget "theme"
+#define KVI_OPTIONS_WIDGET_PARENT_KviIrcViewFeaturesOptionsWidget KviIrcViewThemeOptionsWidget
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviIrcViewFeaturesOptionsWidget 20
+
+class KviIrcViewFeaturesOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviIrcViewFeaturesOptionsWidget(QWidget * parent);
+ ~KviIrcViewFeaturesOptionsWidget();
+};
+
+
+
+#endif //!_OPTW_IRCVIEW_H_
diff --git a/src/modules/options/optw_lag.cpp b/src/modules/options/optw_lag.cpp
new file mode 100644
index 00000000..8c9cf201
--- /dev/null
+++ b/src/modules/options/optw_lag.cpp
@@ -0,0 +1,85 @@
+//
+// File : optw_lag.cpp
+// Creation date : Wed Cct 16 10:45:54 CEST 2002 by Juanjo �lvarez ([email protected])
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2002 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+
+#include "optw_lag.h"
+
+#include <qlayout.h>
+#include "kvi_tal_tooltip.h"
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+//#warning "Info tips"
+
+
+KviLagOptionsWidget::KviLagOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"lag_options_widget")
+{
+ createLayout(3,1);
+
+ KviBoolSelector * pUse = addBoolSelector(0,0,0,0, __tr2qs_ctx("Enable lag meter","options"), KviOption_boolUseLagMeterEngine);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(pUse,__tr2qs_ctx("<center>This enables the lag meter engine, which checks at regular intervals how much lag (latency) the server has.</center>","options"));
+#endif
+ KviTalGroupBox *g = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("Configuration","options"),KVI_OPTION_BOOL(KviOption_boolUseLagMeterEngine));
+ KviUIntSelector * pInterval = addUIntSelector(g, __tr2qs_ctx("Lag meter heartbeat:","options"),KviOption_uintLagMeterHeartbeat,2000,10000,5000,KVI_OPTION_BOOL(KviOption_boolUseLagMeterEngine));
+ pInterval->setSuffix(__tr2qs_ctx(" msec","options"));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(pInterval,
+ __tr2qs_ctx("<center>This option allows you to set the lag meter heartbeat interval.<br>" \
+ "The lower the heartbeat interval the higher will be the accuracy of the lag check " \
+ "but also higher cpu usage and data traffic to the server.<br>" \
+ "Please note that this is NOT the interval between pings sent to the server: " \
+ "the pings (if any) will be sent really less often. " \
+ "5000 is a reasonable value.</center>","options"));
+#endif
+ connect(pUse,SIGNAL(toggled(bool)),pInterval,SLOT(setEnabled(bool)));
+
+ KviUIntSelector * pAlarm = addUIntSelector(g, __tr2qs_ctx("Trigger event if lag exceeds:","options"), KviOption_uintLagAlarmTime,5000,1000000,30000, KVI_OPTION_BOOL(KviOption_boolUseLagMeterEngine));
+ pAlarm->setSuffix(__tr2qs_ctx(" msec","options"));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(pAlarm,__tr2qs_ctx("<center>This option controls the threshold for the " \
+ "OnLagAlarmTimeUp and OnLagAlarmTimeDown events. When the lag goes above " \
+ "the threshold OnLagAlarmTimeUp will be triggered and when the lag falls " \
+ "back below the threshold then OnLagAlarmTimeDown will be triggered</center>","options"));
+#endif
+ connect(pUse,SIGNAL(toggled(bool)),pAlarm,SLOT(setEnabled(bool)));
+
+ KviBoolSelector * pShow = addBoolSelector(g, __tr2qs_ctx("Show lag in IRC context display","options"), KviOption_boolShowLagOnContextDisplay, KVI_OPTION_BOOL(KviOption_boolUseLagMeterEngine));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(pShow,__tr2qs_ctx("<center>This makes the IRC context display applet show the current lag after the user's nickname (in seconds)</center>","options"));
+#endif
+
+ connect(pUse,SIGNAL(toggled(bool)),pShow,SLOT(setEnabled(bool)));
+ connect(pUse,SIGNAL(toggled(bool)),g,SLOT(setEnabled(bool)));
+
+ addRowSpacer(0,2,0,2);
+
+}
+
+KviLagOptionsWidget::~KviLagOptionsWidget()
+{
+}
+
+
+#include "m_optw_lag.moc"
diff --git a/src/modules/options/optw_lag.h b/src/modules/options/optw_lag.h
new file mode 100644
index 00000000..7e49cafd
--- /dev/null
+++ b/src/modules/options/optw_lag.h
@@ -0,0 +1,40 @@
+#ifndef _OPTW_LAG_H_
+#define _OPTW_LAG_H_
+//
+// File : optw_lag.h
+// Creation date : wed oct 16 10:45:14 CEST 2002 by Juanjo �varez
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2002 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+
+#define KVI_OPTIONS_WIDGET_ICON_KviLagOptionsWidget KVI_SMALLICON_STATS
+#define KVI_OPTIONS_WIDGET_NAME_KviLagOptionsWidget __tr2qs_no_lookup("Lag")
+#define KVI_OPTIONS_WIDGET_PARENT_KviLagOptionsWidget KviToolsOptionsWidget
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviLagOptionsWidget __tr2qs_no_lookup("time,ping")
+
+class KviLagOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviLagOptionsWidget(QWidget * parent);
+ ~KviLagOptionsWidget();
+};
+
+#endif //_OPTW_LAG_H_
diff --git a/src/modules/options/optw_logging.cpp b/src/modules/options/optw_logging.cpp
new file mode 100644
index 00000000..9d77836d
--- /dev/null
+++ b/src/modules/options/optw_logging.cpp
@@ -0,0 +1,64 @@
+//
+// File : optw_logging.cpp
+// Creation date : Mon Oct 29 15:37:16 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+
+#include "optw_logging.h"
+
+#include <qlayout.h>
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+//#warning "Info tips"
+
+
+KviLoggingOptionsWidget::KviLoggingOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"logging_options_widget")
+{
+ createLayout(4,1);
+
+ KviTalGroupBox * g = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("Automatically Log","options"));
+ addBoolSelector(g,__tr2qs_ctx("Query windows","options"),KviOption_boolAutoLogQueries);
+ addBoolSelector(g,__tr2qs_ctx("Channel windows","options"),KviOption_boolAutoLogChannels);
+ addBoolSelector(g,__tr2qs_ctx("DCC Chat windows","options"),KviOption_boolAutoLogDccChat);
+ addBoolSelector(g,__tr2qs_ctx("Console windows","options"),KviOption_boolAutoLogConsole);
+#ifdef COMPILE_ZLIB_SUPPORT
+ addBoolSelector(0,1,0,1,__tr2qs_ctx("Gzip logs","options"),KviOption_boolGzipLogs);
+#endif
+ addBoolSelector(0,2,0,2,__tr2qs_ctx("Strip colors in logs","options"),KviOption_boolStripControlCodesInLogs);
+ KviUIntSelector* us = addUIntSelector(0,3,0,3,__tr2qs_ctx("Auto flush logs every","options"),KviOption_uintAutoFlushLogs,0,99999,0);
+ us->setSuffix(__tr2qs_ctx(" min","options"));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(us,
+ __tr2qs_ctx("<center>Save logs with the current interval<br>" \
+ "Set to 0 to disable this feature</center>","options"));
+#endif
+ addRowSpacer(0,4,0,4);
+}
+
+KviLoggingOptionsWidget::~KviLoggingOptionsWidget()
+{
+}
+
+
+
+#include "m_optw_logging.moc"
diff --git a/src/modules/options/optw_logging.h b/src/modules/options/optw_logging.h
new file mode 100644
index 00000000..f3f3e1c4
--- /dev/null
+++ b/src/modules/options/optw_logging.h
@@ -0,0 +1,42 @@
+#ifndef _OPTW_LOGGING_H_
+#define _OPTW_LOGGING_H_
+//
+// File : optw_logging.h
+// Creation date : Mon Oct 29 15:37:18 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+
+#define KVI_OPTIONS_WIDGET_ICON_KviLoggingOptionsWidget KVI_SMALLICON_LOG
+#define KVI_OPTIONS_WIDGET_NAME_KviLoggingOptionsWidget __tr2qs_no_lookup("Logging")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviLoggingOptionsWidget __tr2qs_no_lookup("save,output")
+#define KVI_OPTIONS_WIDGET_PARENT_KviLoggingOptionsWidget KviToolsOptionsWidget
+
+//noway #define KVI_OPTIONS_WIDGET_NO_PARENT_KviLoggingOptionsWidget KviIrcOptionsWidget
+
+class KviLoggingOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviLoggingOptionsWidget(QWidget * parent);
+ ~KviLoggingOptionsWidget();
+};
+
+#endif //_OPTW_LOGGING_H_
diff --git a/src/modules/options/optw_mediatypes.cpp b/src/modules/options/optw_mediatypes.cpp
new file mode 100644
index 00000000..c798a4eb
--- /dev/null
+++ b/src/modules/options/optw_mediatypes.cpp
@@ -0,0 +1,262 @@
+//
+// File : optw_mediatypes.cpp
+// Creation date : Sat Jan 20 2001 16:14:53 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "optw_mediatypes.h"
+
+#include <qlayout.h>
+#include <qlabel.h>
+#include "kvi_tal_tooltip.h"
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+// kvi_app.cpp
+extern KVIRC_API KviMediaManager * g_pMediaManager;
+
+static void copyMediaType(KviMediaType * dst,const KviMediaType * src)
+{
+ dst->szFileMask = src->szFileMask;
+ dst->szIanaType = src->szIanaType;
+ dst->szDescription = src->szDescription;
+ dst->szMagicBytes = src->szMagicBytes;
+ dst->szSavePath = src->szSavePath;
+ dst->szCommandline = src->szCommandline;
+ dst->szRemoteExecCommandline = src->szRemoteExecCommandline;
+ dst->szIcon = src->szIcon;
+}
+
+KviMediaTypeListViewItem::KviMediaTypeListViewItem(KviTalListView * w,KviMediaType * t)
+: KviTalListViewItem(w)
+{
+ copyData(t);
+}
+
+KviMediaTypeListViewItem::~KviMediaTypeListViewItem()
+{
+}
+
+void KviMediaTypeListViewItem::copyData(KviMediaType * t)
+{
+ copyMediaType(&m_data,t);
+ setText(0,m_data.szFileMask.ptr());
+ setText(1,m_data.szIanaType.ptr());
+ setText(2,m_data.szDescription.ptr());
+}
+
+KviMediaTypesOptionsWidget::KviMediaTypesOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"mediatypes_options_widget")
+{
+ createLayout(11,3);
+
+ m_pListView = new KviTalListView(this);
+ m_pListView->addColumn(__tr2qs_ctx("Pattern","options"));
+ m_pListView->addColumn(__tr2qs_ctx("MIME Type","options"));
+ m_pListView->addColumn(__tr2qs_ctx("Description","options"));
+ m_pListView->setAllColumnsShowFocus(true);
+
+
+
+ connect(m_pListView,SIGNAL(currentChanged(KviTalListViewItem *)),this,SLOT(currentItemChanged(KviTalListViewItem *)));
+
+ layout()->addMultiCellWidget(m_pListView,0,0,0,2);
+
+ QLabel * l = new QLabel(__tr2qs_ctx("Description:","options"),this);
+ layout()->addWidget(l,1,0);
+ m_pDescription = new QLineEdit(this);
+ layout()->addMultiCellWidget(m_pDescription,1,1,1,2);
+
+ l = new QLabel(__tr2qs_ctx("MIME type:","options"),this);
+ layout()->addWidget(l,2,0);
+ m_pIanaType = new QLineEdit(this);
+ layout()->addMultiCellWidget(m_pIanaType,2,2,1,2);
+
+ l = new QLabel(__tr2qs_ctx("File pattern:","options"),this);
+ layout()->addWidget(l,3,0);
+ m_pFileMask = new QLineEdit(this);
+ layout()->addMultiCellWidget(m_pFileMask,3,3,1,2);
+
+ l = new QLabel(__tr2qs_ctx("Magic bytes:","options"),this);
+ layout()->addWidget(l,4,0);
+ m_pMagicBytes = new QLineEdit(this);
+ layout()->addMultiCellWidget(m_pMagicBytes,4,4,1,2);
+
+ l = new QLabel(__tr2qs_ctx("Save path:","options"),this);
+ layout()->addWidget(l,5,0);
+ m_pSavePath = new QLineEdit(this);
+ layout()->addMultiCellWidget(m_pSavePath,5,5,1,2);
+
+ l = new QLabel(__tr2qs_ctx("Local open command:","options"),this);
+ layout()->addWidget(l,6,0);
+ m_pCommandline = new QLineEdit(this);
+ layout()->addMultiCellWidget(m_pCommandline,6,6,1,2);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(m_pCommandline,__tr2qs_ctx("<center>This field contains the command to execute to open a local file.<br>" \
+ "<tt>$0</tt> is used in place of the filename</center>","options"));
+#endif
+
+ l = new QLabel(__tr2qs_ctx("Remote open command:","options"),this);
+ layout()->addWidget(l,7,0);
+ m_pRemoteExecCommandline = new QLineEdit(this);
+ layout()->addMultiCellWidget(m_pRemoteExecCommandline,7,7,1,2);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(m_pRemoteExecCommandline,__tr2qs_ctx("<center>This field contains the command to execute when automatically opening a received file.<br>" \
+ "<tt>$0</tt> is used in place of the filename</center>","options"));
+#endif
+
+ l = new QLabel(__tr2qs_ctx("Icon","options"),this);
+ layout()->addWidget(l,8,0);
+ m_pIcon = new QLineEdit(this);
+ layout()->addMultiCellWidget(m_pIcon,8,8,1,2);
+
+ QFrame * f = new QFrame(this);
+ f->setFrameStyle(QFrame::Sunken | QFrame::HLine);
+ layout()->addMultiCellWidget(f,9,9,0,2);
+
+ QPushButton * b = new QPushButton(__tr2qs_ctx("&New","options"),this);
+ connect(b,SIGNAL(clicked()),this,SLOT(newMediaType()));
+ layout()->addWidget(b,10,1);
+
+ m_pDelete = new QPushButton(__tr2qs_ctx("Re&move","options"),this);
+ connect(m_pDelete,SIGNAL(clicked()),this,SLOT(delMediaType()));
+ layout()->addWidget(m_pDelete,10,2);
+
+
+ layout()->setColStretch(1,1);
+ layout()->setColStretch(2,1);
+ layout()->setRowStretch(0,1);
+
+ m_pLastItem = 0;
+
+ fillListView();
+}
+
+KviMediaTypesOptionsWidget::~KviMediaTypesOptionsWidget()
+{
+}
+
+void KviMediaTypesOptionsWidget::fillListView()
+{
+ m_pListView->clear();
+ g_pMediaManager->lock();
+ KviPointerList<KviMediaType> * l = g_pMediaManager->mediaTypeList();
+ KviMediaTypeListViewItem * it;
+ for(KviMediaType * t = l->first();t;t = l->next())
+ {
+ it = new KviMediaTypeListViewItem(m_pListView,t);
+ }
+ g_pMediaManager->unlock();
+ enableOrDisable();
+}
+
+void KviMediaTypesOptionsWidget::saveLastItem()
+{
+ if(m_pLastItem)
+ {
+ KviMediaType t;
+ t.szDescription = m_pDescription->text();
+ t.szIanaType = m_pIanaType->text();
+ t.szFileMask = m_pFileMask->text();
+ t.szSavePath = m_pSavePath->text();
+ t.szCommandline = m_pCommandline->text();
+ t.szMagicBytes = m_pMagicBytes->text();
+ t.szRemoteExecCommandline = m_pRemoteExecCommandline->text();
+ t.szIcon = m_pIcon->text();
+
+ if(t.szDescription.isEmpty())t.szDescription = __tr2qs_ctx("[Unknown Media Type]","options");
+
+ m_pLastItem->copyData(&t);
+ }
+}
+
+void KviMediaTypesOptionsWidget::enableOrDisable()
+{
+ m_pDescription->setEnabled(m_pLastItem);
+ m_pIanaType->setEnabled(m_pLastItem);
+ m_pFileMask->setEnabled(m_pLastItem);
+ m_pSavePath->setEnabled(m_pLastItem);
+ m_pCommandline->setEnabled(m_pLastItem);
+ m_pMagicBytes->setEnabled(m_pLastItem);
+ m_pRemoteExecCommandline->setEnabled(m_pLastItem);
+ m_pDelete->setEnabled(m_pLastItem);
+ m_pIcon->setEnabled(m_pLastItem);
+}
+
+void KviMediaTypesOptionsWidget::setLineEdits()
+{
+ m_pDescription->setText(m_pLastItem ? m_pLastItem->data()->szDescription.ptr() : "");
+ m_pIanaType->setText(m_pLastItem ? m_pLastItem->data()->szIanaType.ptr() : "");
+ m_pFileMask->setText(m_pLastItem ? m_pLastItem->data()->szFileMask.ptr() : "");
+ m_pSavePath->setText(m_pLastItem ? m_pLastItem->data()->szSavePath.ptr() : "");
+ m_pCommandline->setText(m_pLastItem ? m_pLastItem->data()->szCommandline.ptr() : "");
+ m_pMagicBytes->setText(m_pLastItem ? m_pLastItem->data()->szMagicBytes.ptr() : "");
+ m_pRemoteExecCommandline->setText(m_pLastItem ? m_pLastItem->data()->szRemoteExecCommandline.ptr() : "");
+ m_pIcon->setText(m_pLastItem ? m_pLastItem->data()->szIcon.ptr() : "");
+}
+
+void KviMediaTypesOptionsWidget::currentItemChanged(KviTalListViewItem *it)
+{
+ saveLastItem();
+ m_pLastItem = (KviMediaTypeListViewItem *)it;
+ if(it)
+ {
+ if(!it->isSelected())m_pListView->setSelected(it,true);
+ }
+ setLineEdits();
+ enableOrDisable();
+}
+
+void KviMediaTypesOptionsWidget::newMediaType()
+{
+ KviMediaType empty;
+ empty.szDescription = __tr2qs_ctx("New Media Type","options");
+ KviMediaTypeListViewItem * it = new KviMediaTypeListViewItem(m_pListView,&empty);
+ m_pListView->setCurrentItem(it);
+ m_pListView->setSelected(it,true);
+}
+
+void KviMediaTypesOptionsWidget::delMediaType()
+{
+ if(m_pLastItem)
+ {
+ KviMediaTypeListViewItem * it = m_pLastItem;
+ m_pLastItem = 0;
+ delete it;
+ }
+}
+
+void KviMediaTypesOptionsWidget::commit()
+{
+ saveLastItem();
+ KviMediaTypeListViewItem * it = (KviMediaTypeListViewItem *)m_pListView->firstChild();
+ g_pMediaManager->lock();
+ g_pMediaManager->clear();
+ while(it)
+ {
+ KviMediaType * t = new KviMediaType;
+ copyMediaType(t,it->data());
+ g_pMediaManager->insertMediaType(t);
+ it = (KviMediaTypeListViewItem *)it->nextSibling();
+ }
+ g_pMediaManager->unlock();
+}
+
+#include "m_optw_mediatypes.moc"
diff --git a/src/modules/options/optw_mediatypes.h b/src/modules/options/optw_mediatypes.h
new file mode 100644
index 00000000..22fab930
--- /dev/null
+++ b/src/modules/options/optw_mediatypes.h
@@ -0,0 +1,83 @@
+#ifndef _OPTW_MEDIATYPES_H_
+#define _OPTW_MEDIATYPES_H_
+
+//
+// File : optw_mediatypes.h
+// Creation date : Sat Jan 20 2001 16:12:10 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+#include "kvi_tal_listview.h"
+#include <qlineedit.h>
+#include <qpushbutton.h>
+
+#include "kvi_mediatype.h"
+
+class KviMediaTypeListViewItem : public KviTalListViewItem
+{
+public:
+ KviMediaTypeListViewItem(KviTalListView * w,KviMediaType * t);
+ ~KviMediaTypeListViewItem();
+private:
+ KviMediaType m_data;
+public:
+ void copyData(KviMediaType * t);
+ const KviMediaType * data(){ return &m_data; };
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviMediaTypesOptionsWidget KVI_SMALLICON_FILE
+#define KVI_OPTIONS_WIDGET_NAME_KviMediaTypesOptionsWidget __tr2qs_no_lookup("Media Types")
+#define KVI_OPTIONS_WIDGET_PARENT_KviMediaTypesOptionsWidget KviGeneralOptOptionsWidget
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviMediaTypesOptionsWidget __tr2qs_no_lookup("file,audio,video,programs")
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviMediaTypesOptionsWidget 60000
+//#define KVI_OPTIONS_WIDGET_HIDDEN_KviMediaTypesOptionsWidget true
+
+class KviMediaTypesOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviMediaTypesOptionsWidget(QWidget * parent);
+ ~KviMediaTypesOptionsWidget();
+private:
+ KviTalListView * m_pListView;
+ QLineEdit * m_pDescription;
+ QLineEdit * m_pIanaType;
+ QLineEdit * m_pFileMask;
+ QLineEdit * m_pSavePath;
+ QLineEdit * m_pCommandline;
+ QLineEdit * m_pMagicBytes;
+ QLineEdit * m_pRemoteExecCommandline;
+ QLineEdit * m_pIcon;
+ QPushButton * m_pDelete;
+ KviMediaTypeListViewItem * m_pLastItem;
+private:
+ void fillListView();
+ void saveLastItem();
+ void enableOrDisable();
+ void setLineEdits();
+private slots:
+ void currentItemChanged(KviTalListViewItem *it);
+ void newMediaType();
+ void delMediaType();
+public:
+ virtual void commit();
+};
+
+#endif //!_OPTW_IDENTITY_H_
diff --git a/src/modules/options/optw_messages.cpp b/src/modules/options/optw_messages.cpp
new file mode 100644
index 00000000..54b4629a
--- /dev/null
+++ b/src/modules/options/optw_messages.cpp
@@ -0,0 +1,693 @@
+//=============================================================================
+//
+// File : optw_messages.cpp
+// Creation date : Sat Aug 11 2001 18:12:00 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001-2004 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+#define _WANT_OPTION_FLAGS_
+
+#include "optw_messages.h"
+
+#include <qlayout.h>
+#include <qpushbutton.h>
+#include "kvi_tal_vbox.h"
+#include <qcursor.h>
+#include <qpainter.h>
+#include "kvi_styled_controls.h"
+
+#include "kvi_settings.h"
+
+#ifndef COMPILE_ON_WINDOWS
+ #include <unistd.h> // symlink()
+#endif
+
+#include "kvi_options.h"
+#include "kvi_app.h"
+#include "kvi_locale.h"
+#include "kvi_iconmanager.h"
+#include "kvi_mirccntrl.h"
+#include "kvi_config.h"
+#include "kvi_filedialog.h"
+
+//#warning "Info tips"
+
+#ifdef COMPILE_PSEUDO_TRANSPARENCY
+ extern KVIRC_API QPixmap * g_pShadedChildGlobalDesktopBackground;
+#endif
+
+
+KviMessageOptionsWidget::KviMessageOptionsWidget(QWidget * pParent)
+: KviOptionsWidget(pParent)
+{
+}
+
+KviMessageOptionsWidget::~KviMessageOptionsWidget()
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+KviPrivmsgOptionsWidget::KviPrivmsgOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"privmsg_options_widget")
+{
+ createLayout(4,1);
+
+ KviBoolSelector * b1;
+ KviBoolSelector * b2;
+
+ KviTalGroupBox * g = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("General","options"));
+
+ addBoolSelector(g,__tr2qs_ctx("Show message icons","options"),KviOption_boolIrcViewShowImages);
+ addBoolSelector(g,__tr2qs_ctx("Draw some emoticons (smileys) as pictures","options"),KviOption_boolDrawEmoticons);
+ addBoolSelector(g,__tr2qs_ctx("Don't show colors in user messages","options"),KviOption_boolStripMircColorsInUserMessages);
+
+
+
+
+ g = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("Nicknames","options"));
+
+ b1 = addBoolSelector(g,__tr2qs_ctx("\"Smart\" nickname colors","options"),KviOption_boolColorNicks);
+ b2 = addBoolSelector(g,__tr2qs_ctx("Use same colors as in the userlist","options"),KviOption_boolUseUserListColorsAsNickColors,!KVI_OPTION_BOOL(KviOption_boolColorNicks));
+ connect(b1,SIGNAL(toggled(bool)),b2,SLOT(setNotEnabled(bool)));
+ addBoolSelector(g,__tr2qs_ctx("Show nicknames in bold","options"),KviOption_boolBoldedNicks);
+ addBoolSelector(g,__tr2qs_ctx("Show user and host","options"),KviOption_boolShowUserAndHostInPrivmsgView);
+ addBoolSelector(g,__tr2qs_ctx("Show channel mode prefix","options"),KviOption_boolShowChannelUserFlagInPrivmsgView);
+ KviBoolSelector * b = addBoolSelector(g,__tr2qs_ctx("User-defined prefix and postfix","options"),KviOption_boolUseExtendedPrivmsgView);
+
+ QLabel * l = addLabel(g,__tr2qs_ctx("[PREFIX]nickname[!user@host][POSTFIX] message","options"));
+
+ l->setEnabled(KVI_OPTION_BOOL(KviOption_boolUseExtendedPrivmsgView));
+ connect(b,
+ SIGNAL(toggled(bool)),
+ l,
+ SLOT(setEnabled(bool)));
+
+ KviTalVBox * vb = new KviTalVBox(g);
+ vb->setSpacing(5);
+
+ connect(
+ b,
+ SIGNAL(toggled(bool)),
+ addStringSelector(vb,__tr2qs_ctx("Prefix:","options"),KviOption_stringExtendedPrivmsgPrefix,KVI_OPTION_BOOL(KviOption_boolUseExtendedPrivmsgView)),
+ SLOT(setEnabled(bool)));
+ connect(
+ b,
+ SIGNAL(toggled(bool)),
+ addStringSelector(vb,__tr2qs_ctx("Postfix:","options"),KviOption_stringExtendedPrivmsgPostfix,KVI_OPTION_BOOL(KviOption_boolUseExtendedPrivmsgView)),
+ SLOT(setEnabled(bool)));
+ addRowSpacer(0,3,0,3);
+}
+
+KviPrivmsgOptionsWidget::~KviPrivmsgOptionsWidget()
+{
+
+}
+
+KviTimestampOptionsWidget::KviTimestampOptionsWidget(QWidget * pParent)
+: KviOptionsWidget(pParent)
+{
+ createLayout(5,1);
+ m_pUseTimestampSelector = addBoolSelector(0,0,0,0,__tr2qs_ctx("Show timestamp","options"),KviOption_boolIrcViewTimestamp);
+
+ connect(m_pUseTimestampSelector,SIGNAL(toggled(bool)),this,SLOT(enableDisableTimestampSelector(bool)));
+ KviBoolSelector* b = addBoolSelector(0,1,0,1,__tr2qs_ctx("Use UTC time for timestamp","options"),KviOption_boolIrcViewTimestampUTC,KVI_OPTION_BOOL(KviOption_boolIrcViewTimestamp));
+
+ connect(m_pUseTimestampSelector,SIGNAL(toggled(bool)),b,SLOT(setEnabled(bool)));
+
+ KviTalHBox *hb = new KviTalHBox(this);
+ addWidgetToLayout(hb,0,2,0,2);
+
+ m_pSpecialTimestampColorSelector = addBoolSelector(hb,__tr2qs_ctx("Use special color for timestamps","options"),KviOption_boolUseSpecialColorForTimestamp,KVI_OPTION_BOOL(KviOption_boolIrcViewTimestamp));
+ connect(m_pSpecialTimestampColorSelector,SIGNAL(toggled(bool)),this,SLOT(enableDisableTimestampSelector(bool)));
+ connect(m_pUseTimestampSelector,SIGNAL(toggled(bool)),m_pSpecialTimestampColorSelector,SLOT(setEnabled(bool)));
+
+ m_pTimestampColorSelector = addMircTextColorSelector(hb,"",KviOption_uintTimeStampForeground,KviOption_uintTimeStampBackground,KVI_OPTION_BOOL(KviOption_boolIrcViewTimestamp) && KVI_OPTION_BOOL(KviOption_boolUseSpecialColorForTimestamp));
+
+ KviStringSelector * st=addStringSelector(0,3,0,3,__tr2qs_ctx("Timestamp format:","options"),KviOption_stringIrcViewTimestampFormat);
+ connect(m_pUseTimestampSelector,SIGNAL(toggled(bool)),st,SLOT(setEnabled(bool)));
+
+ connect(m_pUseTimestampSelector,SIGNAL(toggled(bool)),m_pSpecialTimestampColorSelector,SLOT(setEnabled(bool)));
+ addRowSpacer(0,4,0,4);
+}
+
+KviTimestampOptionsWidget::~KviTimestampOptionsWidget()
+{
+}
+
+void KviTimestampOptionsWidget::enableDisableTimestampSelector(bool)
+{
+ m_pTimestampColorSelector->setEnabled(m_pUseTimestampSelector->isChecked() && m_pSpecialTimestampColorSelector->isChecked());
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+KviStandardColorsOptionsWidget::KviStandardColorsOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"stdcolors")
+{
+ createLayout(5,4);
+
+ addColorSelector(0,0,0,0,"0:",&(KVI_OPTION_MIRCCOLOR(0)));
+ addColorSelector(1,0,1,0,"1:",&(KVI_OPTION_MIRCCOLOR(1)));
+ addColorSelector(2,0,2,0,"2:",&(KVI_OPTION_MIRCCOLOR(2)));
+ addColorSelector(3,0,3,0,"3:",&(KVI_OPTION_MIRCCOLOR(3)));
+ addColorSelector(0,1,0,1,"4:",&(KVI_OPTION_MIRCCOLOR(4)));
+ addColorSelector(1,1,1,1,"5:",&(KVI_OPTION_MIRCCOLOR(5)));
+ addColorSelector(2,1,2,1,"6:",&(KVI_OPTION_MIRCCOLOR(6)));
+ addColorSelector(3,1,3,1,"7:",&(KVI_OPTION_MIRCCOLOR(7)));
+ addColorSelector(0,2,0,2,"8:",&(KVI_OPTION_MIRCCOLOR(8)));
+ addColorSelector(1,2,1,2,"9:",&(KVI_OPTION_MIRCCOLOR(9)));
+ addColorSelector(2,2,2,2,"10:",&(KVI_OPTION_MIRCCOLOR(10)));
+ addColorSelector(3,2,3,2,"11:",&(KVI_OPTION_MIRCCOLOR(11)));
+ addColorSelector(0,3,0,3,"12:",&(KVI_OPTION_MIRCCOLOR(12)));
+ addColorSelector(1,3,1,3,"13:",&(KVI_OPTION_MIRCCOLOR(13)));
+ addColorSelector(2,3,2,3,"14:",&(KVI_OPTION_MIRCCOLOR(14)));
+ addColorSelector(3,3,3,3,"15:",&(KVI_OPTION_MIRCCOLOR(15)));
+
+ addRowSpacer(0,4,3,4);
+
+ layout()->setRowStretch(4,1);
+}
+
+KviStandardColorsOptionsWidget::~KviStandardColorsOptionsWidget()
+{
+}
+
+
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+KviMessageListView::KviMessageListView(QWidget * par)
+: KviTalListView(par)
+{
+ setItemMargin(2);
+}
+
+KviMessageListView::~KviMessageListView()
+{
+}
+
+
+void KviMessageListView::paintEmptyAreaInternal(QPainter * p,const QRect &viewportRect,const QRect &painterRect)
+{
+#ifdef COMPILE_PSEUDO_TRANSPARENCY
+ if(g_pShadedChildGlobalDesktopBackground)
+ {
+ QPoint pnt = viewport()->mapToGlobal(viewportRect.topLeft());
+ p->drawTiledPixmap(painterRect.x(),painterRect.y(),painterRect.width(),painterRect.height(),*g_pShadedChildGlobalDesktopBackground,pnt.x(),pnt.y());
+ } else {
+#endif
+ QPixmap * pix = KVI_OPTION_PIXMAP(KviOption_pixmapIrcViewBackground).pixmap();
+ if(pix)
+ {
+ QPoint pnt = viewportToContents(viewportRect.topLeft());
+ p->fillRect(painterRect.x(),painterRect.y(),painterRect.width(),painterRect.height(),KVI_OPTION_COLOR(KviOption_colorIrcViewBackground));
+ p->drawTiledPixmap(painterRect.x(),painterRect.y(),painterRect.width(),painterRect.height(),*pix,pnt.x(),pnt.y());
+ } else {
+ p->fillRect(painterRect.x(),painterRect.y(),painterRect.width(),painterRect.height(),KVI_OPTION_COLOR(KviOption_colorIrcViewBackground));
+ }
+#ifdef COMPILE_PSEUDO_TRANSPARENCY
+ }
+#endif
+}
+
+void KviMessageListView::paintEmptyArea(QPainter * p,const QRect &rct)
+{
+ paintEmptyAreaInternal(p,rct,rct);
+ KviTalListView::paintEmptyArea(p,rct);
+}
+
+
+
+
+
+
+KviMessageListViewItem::KviMessageListViewItem(KviTalListView * l,int optId)
+: KviTalListViewItem(l)
+{
+ m_iOptId = optId;
+ setText(0,"WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW");
+ m_pMsgType = new KviMsgType(KVI_OPTION_MSGTYPE(optId));
+ setPixmap(0,*(g_pIconManager->getSmallIcon(0))); // just a dummy one to ensure that the size of the item is at least 20 pixels (16 + 2 * margin)
+}
+
+KviMessageListViewItem::~KviMessageListViewItem()
+{
+ delete m_pMsgType;
+}
+
+void KviMessageListViewItem::paintCell(QPainter * p,const QColorGroup &,int,int w,int)
+{
+#ifdef COMPILE_PSEUDO_TRANSPARENCY
+ if(g_pShadedChildGlobalDesktopBackground)
+ {
+ QPoint pnt = listView()->viewport()->mapToGlobal(QPoint(int(p->worldMatrix().dx()),int(p->worldMatrix().dy())));
+ p->drawTiledPixmap(0,0,w,height(),*g_pShadedChildGlobalDesktopBackground,pnt.x(),pnt.y());
+ } else {
+#endif
+ QPixmap * pix = KVI_OPTION_PIXMAP(KviOption_pixmapIrcViewBackground).pixmap();
+ if(pix)
+ {
+ QPoint pnt = listView()->viewportToContents(QPoint(int(p->worldMatrix().dx()),int(p->worldMatrix().dy())));
+ p->fillRect(0,0,w,height(),KVI_OPTION_COLOR(KviOption_colorIrcViewBackground));
+ p->drawTiledPixmap(0,0,w,height(),*pix,pnt.x(),pnt.y());
+ } else {
+ p->fillRect(0,0,w,height(),KVI_OPTION_COLOR(KviOption_colorIrcViewBackground));
+ }
+#ifdef COMPILE_PSEUDO_TRANSPARENCY
+ }
+#endif
+
+
+ p->drawPixmap(listView()->itemMargin(),(height() - 16) / 2,*(g_pIconManager->getSmallIcon(m_pMsgType->pixId())));
+ // draw the background
+ if(m_pMsgType->back() < 16)
+ {
+ QColor bColor = KVI_OPTION_MIRCCOLOR(m_pMsgType->back());
+ p->fillRect(22,listView()->itemMargin(),w - 24,height() - (listView()->itemMargin() * 2),bColor);
+ }
+ unsigned char ucFore = m_pMsgType->fore();
+ if(ucFore > 15)ucFore = 0;
+ p->setPen(QPen(KVI_OPTION_MIRCCOLOR(ucFore)));
+ // skip the msgtype prefix
+ QString txt = (g_msgtypeOptionsTable[m_iOptId].name + 7);
+ txt += " (";
+ txt += __tr2qs_no_xgettext(QString::fromUtf8(m_pMsgType->type()));
+ txt += ")";
+ p->drawText(24,listView()->itemMargin(),w - 24,height() - (listView()->itemMargin() * 2),Qt::AlignLeft | Qt::AlignVCenter,txt);
+ if(isSelected())
+ {
+#ifdef COMPILE_USE_QT4
+ QPen pen(KVI_OPTION_COLOR(KviOption_colorIrcViewBackground));
+ pen.setStyle(Qt::DashLine);
+ p->setPen( pen);
+ p->drawRect(0,0,w,height());
+ p->drawRect(1,1,w - 2,height() - 2);
+#else
+
+ p->drawWinFocusRect(0,0,w,height(),KVI_OPTION_COLOR(KviOption_colorIrcViewBackground));
+ p->drawWinFocusRect(1,1,w - 2,height() - 2,KVI_OPTION_COLOR(KviOption_colorIrcViewBackground));
+#endif
+ }
+}
+
+
+KviMessageColorListBoxItem::KviMessageColorListBoxItem(KviTalListBox * b,const QColor &clr,int idx)
+: KviTalListBoxText(b,QString::null)
+{
+ m_clr = clr;
+ m_iClrIdx = idx;
+ if((idx < 0) || (idx > 15))setText(__tr2qs_ctx("Transparent","options"));
+}
+
+KviMessageColorListBoxItem::~KviMessageColorListBoxItem()
+{
+}
+
+void KviMessageColorListBoxItem::paint(QPainter * p)
+{
+ QColor clr;
+
+ const KviTalListBox * lb = (const KviTalListBox *)listBox();
+
+ if((m_iClrIdx >= 0) && (m_iClrIdx <= 15))
+ {
+ clr = lb->isEnabled() ? KVI_OPTION_MIRCCOLOR(m_iClrIdx) : Qt::gray;
+ p->fillRect(0,0,width(lb),height(lb),clr);
+ } else {
+ clr = listBox()->colorGroup().background();
+ KviTalListBoxText::paint(p);
+ }
+#if QT_VERSION >= 300
+ if(isSelected())
+#else
+ if(selected())
+#endif
+ {
+#ifdef COMPILE_USE_QT4
+ QPen pen(clr);
+ pen.setStyle(Qt::DashLine);
+ p->setPen( pen);
+ p->drawRect(0,0,width(lb),height(lb));
+ p->drawRect(1,1,width(lb) - 2,height(lb) - 2);
+ p->drawRect(2,2,width(lb) - 4,height(lb) - 4);
+#else
+ p->drawWinFocusRect(0,0,width(lb),height(lb),clr);
+ p->drawWinFocusRect(1,1,width(lb) - 2,height(lb) - 2,clr);
+ p->drawWinFocusRect(2,2,width(lb) - 4,height(lb) - 4,clr);
+#endif
+ }
+}
+/*
+int KviMessageColorListBoxItem::width(const KviTalListBox * lb) const
+{
+ int w = lb->width();
+ if(w < 30)w = 30;
+ if(w > 150)w = 150;
+ return w;
+}
+
+int KviMessageColorListBoxItem::height(const KviTalListBox *) const
+{
+ return 30;
+}
+*/
+
+/*
+KviIrcColorsOptionsWidget::KviIrcColorsOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"irccolors","options")
+{
+ createLayout(5,4);
+
+ addRowSpacer(0,4,3,4);
+}
+
+KviIrcColorsOptionsWidget::~KviIrcColorsOptionsWidget()
+{
+}
+*/
+
+KviMessageColorsOptionsWidget::KviMessageColorsOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"messages")
+{
+ int i;
+
+ createLayout(2,4);
+
+ m_pLastItem = 0;
+
+
+ m_pListView = new KviMessageListView(this);
+ m_pListView->addColumn(__tr2qs_ctx("Message Type","options"));
+ m_pListView->setAllColumnsShowFocus(true);
+ m_pListView->setSelectionMode(KviTalListView::Single);
+ m_pListView->setFont(KVI_OPTION_FONT(KviOption_fontIrcView));
+ m_pListView->setStaticBackground(true);
+#ifdef COMPILE_USE_QT4
+ m_pListView->viewport()->setBackgroundMode(Qt::NoBackground);
+#else
+ m_pListView->viewport()->setBackgroundMode(QWidget::NoBackground);
+#endif
+
+ addWidgetToLayout(m_pListView,0,0,2,0);
+
+ KviTalVBox * box = new KviTalVBox(this);
+ addWidgetToLayout(box,3,0,3,0);
+
+ QLabel * l = new QLabel(__tr2qs_ctx("Background:","options"),box);
+
+ m_pBackListBox = new KviTalListBox(box);
+ m_pBackItems[16] = new KviMessageColorListBoxItem(m_pBackListBox,Qt::gray,KVI_TRANSPARENT);
+ for(i=0;i<16;i++)
+ {
+ m_pBackItems[i] = new KviMessageColorListBoxItem(m_pBackListBox,KVI_OPTION_MIRCCOLOR(i),i);
+ }
+
+ l = new QLabel(__tr2qs_ctx("Foreground:","options"),box);
+
+ m_pForeListBox = new KviTalListBox(box);
+ for(i=0;i<16;i++)
+ {
+ m_pForeItems[i] = new KviMessageColorListBoxItem(m_pForeListBox,KVI_OPTION_MIRCCOLOR(i),i);
+ }
+
+ l = new QLabel(__tr2qs_ctx("Alert level:","options"),box);
+
+ m_pLevelListBox = new KviTalListBox(box);
+ KviTalListBoxText * lbt;
+ for(i=0;i<6;i++)
+ {
+ QString tmpn;
+ tmpn.setNum(i);
+ lbt = new KviTalListBoxText(m_pLevelListBox,tmpn);
+ }
+
+ m_pIconButton = new KviStyledToolButton(box);
+ connect(m_pIconButton,SIGNAL(clicked()),this,SLOT(iconButtonClicked()));
+
+ m_pIconPopup = new KviTalPopupMenu(this);
+ KviIconWidget * iw = new KviIconWidget(m_pIconPopup);
+ connect(iw,SIGNAL(selected(int)),this,SLOT(newIconSelected(int)));
+ m_pIconPopup->insertItem(iw);
+
+
+ m_pEnableLogging = new KviStyledCheckBox(__tr2qs_ctx("Log this","options"),box);
+
+ KviTalHBox * h = new KviTalHBox(this);
+ addWidgetToLayout(h,0,1,3,1);
+ QPushButton * b = new QPushButton(__tr2qs_ctx("Load From...","options"),h);
+ connect(b,SIGNAL(clicked()),this,SLOT(load()));
+ b = new QPushButton(__tr2qs_ctx("Save As...","options"),h);
+ connect(b,SIGNAL(clicked()),this,SLOT(save()));
+
+
+ KviMessageListViewItem * it;
+
+ for(i=0;i<KVI_NUM_MSGTYPE_OPTIONS;i++)
+ {
+ it = new KviMessageListViewItem(m_pListView,i);
+ }
+
+ layout()->setRowStretch(0,1);
+ layout()->setColStretch(0,1);
+
+ connect(m_pListView,SIGNAL(selectionChanged(KviTalListViewItem *)),this,SLOT(itemChanged(KviTalListViewItem *)));
+ connect(m_pForeListBox,SIGNAL(selectionChanged(KviTalListBoxItem *)),this,SLOT(colorChanged(KviTalListBoxItem *)));
+ connect(m_pBackListBox,SIGNAL(selectionChanged(KviTalListBoxItem *)),this,SLOT(colorChanged(KviTalListBoxItem *)));
+
+ itemChanged(0);
+}
+
+KviMessageColorsOptionsWidget::~KviMessageColorsOptionsWidget()
+{
+}
+
+void KviMessageColorsOptionsWidget::newIconSelected(int iconId)
+{
+ if(!m_pLastItem)return;
+ if(iconId >= KVI_NUM_SMALL_ICONS)return;
+ m_pLastItem->msgType()->setPixId(iconId);
+ m_pIconButton->setIconSet(*(g_pIconManager->getSmallIcon(iconId)));
+ m_pListView->repaintItem(m_pLastItem);
+}
+
+void KviMessageColorsOptionsWidget::saveLastItem()
+{
+ if(!m_pLastItem)return;
+
+ int curIt = m_pForeListBox->currentItem();
+ if(curIt != -1)
+ {
+ //debug("Setting fore %d",curIt);
+ KviMessageColorListBoxItem * fore = (KviMessageColorListBoxItem *)m_pForeListBox->item(curIt);
+ //debug("And is %d",fore);
+ if(fore)m_pLastItem->msgType()->setFore(fore->m_iClrIdx);
+ }
+ curIt = m_pBackListBox->currentItem();
+ if(curIt != -1)
+ {
+ KviMessageColorListBoxItem * back = (KviMessageColorListBoxItem *)m_pBackListBox->item(curIt);
+ if(back)m_pLastItem->msgType()->setBack(back->m_iClrIdx);
+ }
+ m_pLastItem->msgType()->enableLogging(m_pEnableLogging->isChecked());
+ //debug("Updating","options");
+ curIt = m_pLevelListBox->currentItem();
+ if(curIt < 0 || curIt > 5)curIt = 1;
+ m_pLastItem->msgType()->setLevel(curIt);
+ m_pListView->repaintItem(m_pLastItem);
+}
+
+void KviMessageColorsOptionsWidget::itemChanged(KviTalListViewItem * it)
+{
+ //debug("Item changed","options");
+ if(m_pLastItem)saveLastItem();
+
+ m_pLastItem = 0; // do NOT save in this routine
+
+ m_pForeListBox->setEnabled(it);
+ m_pBackListBox->setEnabled(it);
+ m_pEnableLogging->setEnabled(it);
+ m_pIconButton->setEnabled(it);
+ m_pLevelListBox->setEnabled(it);
+
+ if(it)
+ {
+ int back = ((KviMessageListViewItem *)it)->msgType()->back();
+ int fore = ((KviMessageListViewItem *)it)->msgType()->fore();
+ if(fore >= 0 && fore <= 15)
+ {
+ m_pForeListBox->setCurrentItem(m_pForeItems[fore]);
+ }
+ if(back >= 0 && back <= 15)
+ {
+ m_pBackListBox->setCurrentItem(m_pBackItems[back]);
+ } else {
+ m_pBackListBox->setCurrentItem(m_pBackItems[16]);
+ }
+ m_pLevelListBox->setCurrentItem(((KviMessageListViewItem *)it)->msgType()->level());
+ m_pEnableLogging->setChecked(((KviMessageListViewItem *)it)->msgType()->logEnabled());
+ m_pIconButton->setIconSet(*(g_pIconManager->getSmallIcon(((KviMessageListViewItem *)it)->msgType()->pixId())));
+ }
+
+ // Ok...can save from now on
+ m_pLastItem = (KviMessageListViewItem *)it;
+
+}
+
+void KviMessageColorsOptionsWidget::colorChanged(KviTalListBoxItem *)
+{
+ if(m_pLastItem)saveLastItem();
+}
+
+void KviMessageColorsOptionsWidget::iconButtonClicked()
+{
+ m_pIconPopup->popup(QCursor::pos());
+}
+
+void KviMessageColorsOptionsWidget::commit()
+{
+ saveLastItem();
+
+ mergeResetFlag(KviOption_resetUpdateGui);
+
+ KviMessageListViewItem * it = (KviMessageListViewItem *)m_pListView->firstChild();
+ while(it)
+ {
+ KVI_OPTION_MSGTYPE(it->optionId()) = *(it->msgType());
+ it = (KviMessageListViewItem *)(it->nextSibling());
+ }
+
+ KviOptionsWidget::commit();
+}
+
+void KviMessageColorsOptionsWidget::save()
+{
+ QString szName;
+ QString szInit;
+ g_pApp->getLocalKvircDirectory(szInit,KviApp::MsgColors);
+
+ if(KviFileDialog::askForSaveFileName(szName,__tr2qs_ctx("Choose a Filename - KVIrc","options"),szInit))
+ {
+ if(m_pLastItem)saveLastItem();
+
+ KviConfig cfg(szName,KviConfig::Write);
+
+ cfg.setGroup("Messages");
+
+ KviStr tmp;
+
+
+ KviMessageListViewItem * it = (KviMessageListViewItem *)m_pListView->firstChild();
+
+ while(it)
+ {
+ tmp.sprintf("Fore%d",it->optionId());
+ cfg.writeEntry(tmp.ptr(),it->msgType()->fore());
+ tmp.sprintf("Back%d",it->optionId());
+ cfg.writeEntry(tmp.ptr(),it->msgType()->back());
+ tmp.sprintf("Icon%d",it->optionId());
+ cfg.writeEntry(tmp.ptr(),it->msgType()->pixId());
+ tmp.sprintf("Log%d",it->optionId());
+ cfg.writeEntry(tmp.ptr(),it->msgType()->logEnabled());
+ tmp.sprintf("Level%d",it->optionId());
+ cfg.writeEntry(tmp.ptr(),it->msgType()->level());
+ it = (KviMessageListViewItem *)(it->nextSibling());
+ }
+
+ }
+}
+
+//#include <errno.h>
+
+void KviMessageColorsOptionsWidget::load()
+{
+
+ //KviStr szName;
+ QString szName;
+ //KviStr szInit;
+ QString szInit;
+ g_pApp->getLocalKvircDirectory(szInit,KviApp::MsgColors);
+
+#ifndef COMPILE_ON_WINDOWS
+ // symlink local to global
+ //KviStr szGlobal;
+ QString szGlobal;
+ g_pApp->getGlobalKvircDirectory(szGlobal,KviApp::MsgColors);
+ //KviStr szLocal;
+ QString szLocal;
+ g_pApp->getLocalKvircDirectory(szLocal,KviApp::MsgColors,"presets");
+ //debug("SYMLINKING %s to %s",szGlobal.ptr(),szLocal.ptr());
+ //debug("SYMLINK RETURNS %d (%d)",::symlink(szGlobal.ptr(),szLocal.ptr()));
+ //debug("ERRNO (%d)",errno);
+ symlink(szGlobal,szLocal);
+ // FIXME: Do it also on windows...
+#endif
+
+ if(KviFileDialog::askForOpenFileName(szName,__tr2qs_ctx("Choose a Filename - KVIrc ","options"),szInit))
+ {
+
+ itemChanged(0);
+
+
+ KviConfig cfg(szName,KviConfig::Read);
+
+ cfg.setGroup("Messages");
+
+ //KviStr tmp;
+ QString tmp;
+ KviMessageListViewItem * it = (KviMessageListViewItem *)m_pListView->firstChild();
+
+ while(it)
+ {
+ tmp.sprintf("Fore%d",it->optionId());
+ int fore = cfg.readIntEntry(tmp,it->msgType()->fore());
+ if(fore < 0 || fore > 15)fore = 0;
+ it->msgType()->setFore(fore);
+
+ tmp.sprintf("Back%d",it->optionId());
+ int back = cfg.readIntEntry(tmp,it->msgType()->back());
+ if(back < 0 || back > 15)back = KVI_TRANSPARENT;
+ it->msgType()->setBack(back);
+
+ tmp.sprintf("Icon%d",it->optionId());
+ int ico = cfg.readIntEntry(tmp,it->msgType()->pixId());
+ if(ico < 0 || ico >= KVI_NUM_SMALL_ICONS)ico = 0;
+ it->msgType()->setPixId(ico);
+
+ tmp.sprintf("Log%d",it->optionId());
+ bool bLog = cfg.readBoolEntry(tmp,it->msgType()->logEnabled());
+ it->msgType()->enableLogging(bLog);
+
+ tmp.sprintf("Level%d",it->optionId());
+ int iLevel = cfg.readIntEntry(tmp,it->msgType()->level());
+ it->msgType()->setLevel(iLevel);
+
+ m_pListView->repaintItem(it);
+
+ it = (KviMessageListViewItem *)(it->nextSibling());
+ }
+
+ }
+}
+
+#include "m_optw_messages.moc"
diff --git a/src/modules/options/optw_messages.h b/src/modules/options/optw_messages.h
new file mode 100644
index 00000000..7f82a145
--- /dev/null
+++ b/src/modules/options/optw_messages.h
@@ -0,0 +1,186 @@
+#ifndef _OPTW_MESSAGES_H_
+#define _OPTW_MESSAGES_H_
+
+//
+// File : optw_messages.h
+// Creation date : Sat Aug 11 2001 18:11:21 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+
+#include "kvi_msgtype.h"
+
+#include "kvi_tal_listview.h"
+#include "kvi_tal_listbox.h"
+#include <qcheckbox.h>
+#include <qtoolbutton.h>
+#include "kvi_tal_popupmenu.h"
+
+#define KVI_OPTIONS_WIDGET_ICON_KviMessageOptionsWidget KVI_SMALLICON_MESSAGES
+#define KVI_OPTIONS_WIDGET_NAME_KviMessageOptionsWidget __tr2qs_no_lookup("Text")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviMessageOptionsWidget __tr2qs_no_lookup("theme,colors,output")
+#define KVI_OPTIONS_WIDGET_GROUP_KviMessageOptionsWidget "theme"
+#define KVI_OPTIONS_WIDGET_CONTAINER_KviMessageOptionsWidget true
+
+class KviMessageOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviMessageOptionsWidget(QWidget * pParent);
+ ~KviMessageOptionsWidget();
+};
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviPrivmsgOptionsWidget KVI_SMALLICON_RAW
+#define KVI_OPTIONS_WIDGET_NAME_KviPrivmsgOptionsWidget __tr2qs_no_lookup("Message Style")
+#define KVI_OPTIONS_WIDGET_PARENT_KviPrivmsgOptionsWidget KviMessageOptionsWidget
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviPrivmsgOptionsWidget 40
+#define KVI_OPTIONS_WIDGET_GROUP_KviPrivmsgOptionsWidget "theme"
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviPrivmsgOptionsWidget __tr2qs_no_lookup("theme,privmsg,output,format")
+
+class KviPrivmsgOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviPrivmsgOptionsWidget(QWidget * parent);
+ ~KviPrivmsgOptionsWidget();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviTimestampOptionsWidget KVI_SMALLICON_TIME
+#define KVI_OPTIONS_WIDGET_NAME_KviTimestampOptionsWidget __tr2qs_no_lookup("Timestamp")
+#define KVI_OPTIONS_WIDGET_PARENT_KviTimestampOptionsWidget KviMessageOptionsWidget
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviTimestampOptionsWidget 20
+#define KVI_OPTIONS_WIDGET_GROUP_KviTimestampOptionsWidget "theme"
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviTimestampOptionsWidget __tr2qs_no_lookup("time,timestamp")
+
+class KviTimestampOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviTimestampOptionsWidget(QWidget * parent);
+ ~KviTimestampOptionsWidget();
+public:
+ KviBoolSelector * m_pUseTimestampSelector;
+ KviBoolSelector * m_pSpecialTimestampColorSelector;
+ KviMircTextColorSelector * m_pTimestampColorSelector;
+protected slots:
+ void enableDisableTimestampSelector(bool);
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviMessageColorsOptionsWidget KVI_SMALLICON_MESSAGES
+#define KVI_OPTIONS_WIDGET_NAME_KviMessageColorsOptionsWidget __tr2qs_no_lookup("Message Colors")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviMessageColorsOptionsWidget __tr2qs_no_lookup("theme,colors,messages,output")
+#define KVI_OPTIONS_WIDGET_GROUP_KviMessageColorsOptionsWidget "theme"
+#define KVI_OPTIONS_WIDGET_PARENT_KviMessageColorsOptionsWidget KviMessageOptionsWidget
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviMessageColorsOptionsWidget 30
+
+class KviMessageListView : public KviTalListView
+{
+ Q_OBJECT
+public:
+ KviMessageListView(QWidget * par);
+ ~KviMessageListView();
+protected:
+ void paintEmptyAreaInternal(QPainter * p,const QRect &viewportRect,const QRect &painterRect);
+public:
+ void paintEmptyArea(QPainter * p,const QRect &rct);
+};
+
+
+class KviMessageListViewItem : public KviTalListViewItem
+{
+public:
+ KviMessageListViewItem(KviTalListView * l,int optId);
+ ~KviMessageListViewItem();
+private:
+ int m_iOptId;
+ KviMsgType * m_pMsgType;
+public:
+ int optionId(){ return m_iOptId; };
+ KviMsgType * msgType(){ return m_pMsgType; };
+ virtual void paintCell(QPainter * p,const QColorGroup &,int,int,int);
+};
+
+
+class KviMessageColorListBoxItem : public KviTalListBoxText
+{
+public:
+ KviMessageColorListBoxItem(KviTalListBox * b,const QColor & clr,int idx);
+ ~KviMessageColorListBoxItem();
+public:
+ int m_iClrIdx;
+ QColor m_clr;
+public:
+ virtual void paint(QPainter * p);
+ virtual int width(const KviTalListBox * lv) const { return 120; };
+};
+
+
+
+
+class KviMessageColorsOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviMessageColorsOptionsWidget(QWidget * parent);
+ ~KviMessageColorsOptionsWidget();
+public:
+ KviMessageListView * m_pListView;
+ KviTalListBox * m_pForeListBox;
+ KviTalListBox * m_pBackListBox;
+ KviTalListBox * m_pLevelListBox;
+ KviMessageColorListBoxItem * m_pForeItems[16];
+ KviMessageColorListBoxItem * m_pBackItems[17];
+ KviMessageListViewItem * m_pLastItem;
+ QCheckBox * m_pEnableLogging;
+ QToolButton * m_pIconButton;
+ KviTalPopupMenu * m_pIconPopup;
+public:
+ void saveLastItem();
+protected slots:
+ void itemChanged(KviTalListViewItem * it);
+ void colorChanged(KviTalListBoxItem *);
+ void iconButtonClicked();
+ void newIconSelected(int iconId);
+ virtual void commit();
+ virtual void save();
+ virtual void load();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviStandardColorsOptionsWidget KVI_SMALLICON_COLORS
+#define KVI_OPTIONS_WIDGET_NAME_KviStandardColorsOptionsWidget __tr2qs_no_lookup("Color Set")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviStandardColorsOptionsWidget __tr2qs_no_lookup("theme,colors,messages,output")
+#define KVI_OPTIONS_WIDGET_GROUP_KviStandardColorsOptionsWidget "theme"
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviStandardColorsOptionsWidget 20
+#define KVI_OPTIONS_WIDGET_PARENT_KviStandardColorsOptionsWidget KviMessageOptionsWidget
+
+class KviStandardColorsOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviStandardColorsOptionsWidget(QWidget * par);
+ ~KviStandardColorsOptionsWidget();
+
+};
+
+
+
+
+#endif //!_OPTW_MESSAGES_H_
diff --git a/src/modules/options/optw_nickserv.cpp b/src/modules/options/optw_nickserv.cpp
new file mode 100644
index 00000000..f182dc32
--- /dev/null
+++ b/src/modules/options/optw_nickserv.cpp
@@ -0,0 +1,368 @@
+//=============================================================================
+//
+// File : optw_nickserv.cpp
+// Creation date : Fri Aug 10 2001 03:38:10 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001-2005 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+#include "optw_nickserv.h"
+
+#include <qlayout.h>
+#include "kvi_tal_tooltip.h"
+#include "kvi_tal_listview.h"
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qcheckbox.h>
+#include <qmessagebox.h>
+
+#include "kvi_qstring.h"
+#include "kvi_options.h"
+#include "kvi_locale.h"
+#include "kvi_nickserv.h"
+#include "kvi_ircmask.h"
+
+// kvi_app.cpp
+extern KVIRC_API KviNickServRuleSet * g_pNickServRuleSet;
+
+
+KviNickServRuleEditor::KviNickServRuleEditor(QWidget * par,bool bUseServerMaskField)
+: QDialog(par)
+{
+ setCaption(__tr2qs_ctx("NickServ Authentication Rule","options"));
+
+ QString html_center_begin = "<center>";
+ QString html_center_end = "</center>";
+
+ QGridLayout * gl = new QGridLayout(this,bUseServerMaskField ? 7 : 6,4,10,5);
+
+ QLabel * l = new QLabel(__tr2qs_ctx("Registered NickName","options"),this);
+ gl->addWidget(l,0,0);
+
+ m_pRegisteredNickEdit = new QLineEdit(this);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pRegisteredNickEdit,html_center_begin + __tr2qs_ctx("Put here the nickname that you have registered with NickServ","options") + html_center_end);
+#endif
+ gl->addMultiCellWidget(m_pRegisteredNickEdit,0,0,1,3);
+
+ l = new QLabel(__tr2qs_ctx("NickServ Mask","options"),this);
+ gl->addWidget(l,1,0);
+
+ m_pNickServMaskEdit = new QLineEdit(this);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pNickServMaskEdit,
+ html_center_begin + __tr2qs_ctx("This is the mask that NickServ must match to be correctly identified as the NickServ service. " \
+ "This usually will be something like <b>[email protected]</b>.<br>" \
+ "You can use wildcards for this field, but generally it is a security flaw. " \
+ "If you're 100%% sure that NO user on the network can use the nickname \"NickServ\", " \
+ "the mask <b>NickServ!*@*</b> may be safe to use in this field.","options") + html_center_end);
+#endif
+ gl->addMultiCellWidget(m_pNickServMaskEdit,1,1,1,3);
+
+ l = new QLabel(__tr2qs_ctx("Message Regexp","options"),this);
+ gl->addWidget(l,2,0);
+
+ m_pMessageRegexpEdit = new QLineEdit(this);
+ gl->addMultiCellWidget(m_pMessageRegexpEdit,2,2,1,3);
+
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pMessageRegexpEdit,
+ html_center_begin + __tr2qs_ctx("This is the simple regular expression that the identification request message " \
+ "from NickServ must match in order to be correctly recognized.<br>" \
+ "The message is usually something like \"To identify yourself please use /ns IDENTIFY password\" " \
+ "and it is sent when the NickServ wants you to authenticate yourself. " \
+ "You can use the * and ? wildcards.","options") + html_center_end);
+#endif
+ l = new QLabel(__tr2qs_ctx("Identify Command","options"),this);
+ gl->addWidget(l,3,0);
+
+ m_pIdentifyCommandEdit = new QLineEdit(this);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pIdentifyCommandEdit,
+ html_center_begin + __tr2qs_ctx("This is the command that will be executed when NickServ requests authentication " \
+ "for the nickname described in this rule (if the both server and NickServ mask are matched). " \
+ "This usually will be something like <b>msg NickServ identify &lt;yourpassword&gt;</b>.<br>" \
+ "You can use <b>msg -q</b> if you don't want the password echoed on the screen. " \
+ "Please note that there is no leading slash in this command.","options") + html_center_end);
+#endif
+ gl->addMultiCellWidget(m_pIdentifyCommandEdit,3,3,1,3);
+
+
+ int iNextLine = 4;
+
+ if(bUseServerMaskField)
+ {
+ l = new QLabel(__tr2qs_ctx("Server mask","options"),this);
+ gl->addWidget(l,4,0);
+
+ m_pServerMaskEdit = new QLineEdit(this);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pServerMaskEdit,
+ html_center_begin + __tr2qs_ctx("This is the mask that the current server must match in order " \
+ "for this rule to apply. It can contain * and ? wildcards.<br>Do NOT use simply \"*\" here...","options") + html_center_end);
+#endif
+ gl->addMultiCellWidget(m_pServerMaskEdit,4,4,1,3);
+ iNextLine++;
+ } else {
+ m_pServerMaskEdit = 0;
+ }
+
+
+#ifdef COMPILE_INFO_TIPS
+ l = new QLabel(html_center_begin + __tr2qs_ctx("Hint: Move the mouse cursor over the fields to get help","options") + html_center_end,this);
+#else
+ l = new QLabel("",this);
+#endif
+ l->setMargin(10);
+ gl->addMultiCellWidget(l,iNextLine,iNextLine,0,3);
+
+ iNextLine++;
+
+ QPushButton * p = new QPushButton(__tr2qs_ctx("Cancel","options"),this);
+ p->setMinimumWidth(100);
+ connect(p,SIGNAL(clicked()),this,SLOT(reject()));
+ gl->addWidget(p,iNextLine,2);
+
+ m_pOkButton = new QPushButton(__tr2qs_ctx("OK","options"),this);
+ m_pOkButton->setMinimumWidth(100);
+ m_pOkButton->setDefault(true);
+ connect(m_pOkButton,SIGNAL(clicked()),this,SLOT(okPressed()));
+ gl->addWidget(m_pOkButton,iNextLine,3);
+
+ gl->setColStretch(1,1);
+ gl->setRowStretch(bUseServerMaskField ? 5 : 4,1);
+
+ setMinimumWidth(250);
+}
+
+KviNickServRuleEditor::~KviNickServRuleEditor()
+{
+}
+
+
+
+bool KviNickServRuleEditor::validate()
+{
+ QString s = m_pRegisteredNickEdit->text();
+
+ QString m = __tr2qs_ctx("Invalid NickServ Rule","options");
+ QString o = __tr2qs_ctx("OK","options");
+
+ if(s.isEmpty())
+ {
+ QMessageBox::warning(this,m,__tr2qs_ctx("The Nickname field can't be empty!","options"),o);
+ return false;
+ }
+
+ if(s.find(QChar(' ')) != -1)
+ {
+ QMessageBox::warning(this,m,__tr2qs_ctx("The Nickname field can't contain spaces!","options"),o);
+ return false;
+ }
+
+ s = m_pNickServMaskEdit->text();
+
+ if(s.isEmpty())
+ {
+ QMessageBox::warning(this,m,__tr2qs_ctx("The NickServ mask can't be empty!<br>You must put at least * there.","options"),o);
+ return false;
+ }
+
+ s = m_pMessageRegexpEdit->text();
+
+ if(s.isEmpty())
+ {
+ QMessageBox::warning(this,m,__tr2qs_ctx("The Message Regexp can't be empty!<br>You must put at least * there.","options"),o);
+ return false;
+ }
+
+ s = m_pIdentifyCommandEdit->text();
+
+ if(s.isEmpty())
+ {
+ QMessageBox::warning(this,m,__tr2qs_ctx("The Identify Command can't be empty!","options"),o);
+ return false;
+ }
+
+ return true;
+}
+
+void KviNickServRuleEditor::okPressed()
+{
+ if(!validate())return;
+ accept();
+}
+
+
+bool KviNickServRuleEditor::editRule(KviNickServRule * r)
+{
+ m_pRegisteredNickEdit->setText(r->registeredNick().isEmpty() ? QString("MyNick") : r->registeredNick());
+ m_pNickServMaskEdit->setText(r->nickServMask().isEmpty() ? QString("NickServ!*@*") : r->nickServMask());
+ m_pMessageRegexpEdit->setText(r->messageRegexp().isEmpty() ? QString("*IDENTIFY*") : r->messageRegexp());
+ m_pIdentifyCommandEdit->setText(r->identifyCommand().isEmpty() ? QString("msg -q NickServ IDENTIFY <password>") : r->identifyCommand());
+ if(m_pServerMaskEdit)
+ m_pServerMaskEdit->setText(r->serverMask().isEmpty() ? QString("irc.yourserver.org") : r->serverMask());
+ m_pRegisteredNickEdit->selectAll();
+ if(exec() != QDialog::Accepted)return false;
+ r->setRegisteredNick(m_pRegisteredNickEdit->text());
+ r->setNickServMask(m_pNickServMaskEdit->text());
+ r->setMessageRegexp(m_pMessageRegexpEdit->text());
+ r->setIdentifyCommand(m_pIdentifyCommandEdit->text());
+ if(m_pServerMaskEdit)
+ r->setServerMask(m_pServerMaskEdit->text());
+ return true;
+}
+
+
+
+KviNickServOptionsWidget::KviNickServOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"nickserv_options_widget")
+{
+ createLayout(3,3);
+
+ QGridLayout * gl = layout();
+
+ KviNickServRuleSet * rs = g_pNickServRuleSet;
+ bool bNickServEnabled = rs ? (rs->isEnabled() && !rs->isEmpty()) : false;
+
+ m_pNickServCheck = new KviStyledCheckBox(__tr2qs_ctx("Enable NickServ Identification","options"),this);
+ gl->addMultiCellWidget(m_pNickServCheck,0,0,0,2);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pNickServCheck,
+ __tr2qs_ctx("This check enables the automatic identification with NickServ","options"));
+#endif
+ m_pNickServCheck->setChecked(bNickServEnabled);
+
+ m_pNickServListView = new KviTalListView(this);
+ m_pNickServListView->setSelectionMode(KviTalListView::Single);
+ m_pNickServListView->setAllColumnsShowFocus(true);
+ m_pNickServListView->addColumn(__tr2qs_ctx("Nickname","options"));
+ m_pNickServListView->addColumn(__tr2qs_ctx("Server mask","options"));
+ m_pNickServListView->addColumn(__tr2qs_ctx("NickServ Mask","options"));
+ m_pNickServListView->addColumn(__tr2qs_ctx("NickServ Request Mask","options"));
+ m_pNickServListView->addColumn(__tr2qs_ctx("Identify Command","options"));
+ connect(m_pNickServListView,SIGNAL(selectionChanged()),this,SLOT(enableDisableNickServControls()));
+
+ gl->addMultiCellWidget(m_pNickServListView,1,1,0,2);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pNickServListView,
+ __tr2qs_ctx("<center>This is a list of NickServ identification rules. " \
+ "KVIrc will use them to model its automatic interaction with NickServ on all the networks.<br>" \
+ "Please be aware that this feature can cause your NickServ passwords to be stolen " \
+ "if used improperly. Make sure that you fully understand the NickServ authentication protocol.<br>" \
+ "In other words, be sure to know what you're doing.<br>" \
+ "Also note that the password that you provide is stored as <b>PLAIN TEXT</b>.<br>" \
+ "KVIrc supports also per-network NickServ authentication rules that can be " \
+ "created in the \"Advanced...\" network options (accessible from the servers dialog)."
+ "</center>","options"));
+#endif
+
+ m_pAddRuleButton = new QPushButton(__tr2qs_ctx("Add Rule","options"),this);
+ connect(m_pAddRuleButton,SIGNAL(clicked()),this,SLOT(addNickServRule()));
+ gl->addWidget(m_pAddRuleButton,2,0);
+
+ m_pEditRuleButton = new QPushButton(__tr2qs_ctx("Edit Rule","options"),this);
+ connect(m_pEditRuleButton,SIGNAL(clicked()),this,SLOT(editNickServRule()));
+ gl->addWidget(m_pEditRuleButton,2,1);
+
+ m_pDelRuleButton = new QPushButton(__tr2qs_ctx("Delete Rule","options"),this);
+ connect(m_pDelRuleButton,SIGNAL(clicked()),this,SLOT(delNickServRule()));
+ gl->addWidget(m_pDelRuleButton,2,2);
+
+ connect(m_pNickServCheck,SIGNAL(toggled(bool)),this,SLOT(enableDisableNickServControls()));
+
+ if(rs && rs->rules())
+ {
+ KviPointerList<KviNickServRule> * ll = rs->rules();
+ for(KviNickServRule * rule = ll->first();rule;rule = ll->next())
+ {
+ (void)new KviTalListViewItem(m_pNickServListView,rule->registeredNick(),rule->serverMask(),rule->nickServMask(),rule->messageRegexp(),rule->identifyCommand());
+ }
+ }
+
+ enableDisableNickServControls();
+
+ gl->setRowStretch(1,1);
+
+
+}
+
+KviNickServOptionsWidget::~KviNickServOptionsWidget()
+{
+}
+
+void KviNickServOptionsWidget::editNickServRule()
+{
+ KviTalListViewItem * it = m_pNickServListView->currentItem();
+ if(!it)return;
+ KviNickServRule r(it->text(0),it->text(2),it->text(3),it->text(4),it->text(1));
+ KviNickServRuleEditor ed(this,true);
+ if(ed.editRule(&r))
+ {
+ it->setText(0,r.registeredNick());
+ it->setText(1,r.serverMask());
+ it->setText(2,r.nickServMask());
+ it->setText(3,r.messageRegexp());
+ it->setText(4,r.identifyCommand());
+ }
+}
+
+void KviNickServOptionsWidget::addNickServRule()
+{
+ KviNickServRule r;
+ KviNickServRuleEditor ed(this,true);
+ if(ed.editRule(&r))
+ (void)new KviTalListViewItem(m_pNickServListView,r.registeredNick(),r.serverMask(),r.nickServMask(),r.messageRegexp(),r.identifyCommand());
+}
+
+void KviNickServOptionsWidget::delNickServRule()
+{
+ KviTalListViewItem * it = m_pNickServListView->currentItem();
+ if(!it)return;
+ delete it;
+ enableDisableNickServControls();
+}
+
+void KviNickServOptionsWidget::enableDisableNickServControls()
+{
+ bool bEnabled = m_pNickServCheck->isChecked();
+ m_pNickServListView->setEnabled(bEnabled);
+ m_pAddRuleButton->setEnabled(bEnabled);
+ bEnabled = bEnabled && (m_pNickServListView->childCount() > 0) && m_pNickServListView->currentItem();
+ m_pDelRuleButton->setEnabled(bEnabled);
+ m_pEditRuleButton->setEnabled(bEnabled);
+}
+
+void KviNickServOptionsWidget::commit()
+{
+ g_pNickServRuleSet->clear();
+ if(m_pNickServListView->childCount() > 0)
+ {
+ g_pNickServRuleSet->setEnabled(m_pNickServCheck->isChecked());
+ KviTalListViewItem * it = m_pNickServListView->firstChild();
+ while(it)
+ {
+ g_pNickServRuleSet->addRule(KviNickServRule::createInstance(it->text(0),it->text(2),it->text(3),it->text(4),it->text(1)));
+ it = it->nextSibling();
+ }
+ }
+ KviOptionsWidget::commit();
+}
+
+#include "m_optw_nickserv.moc"
diff --git a/src/modules/options/optw_nickserv.h b/src/modules/options/optw_nickserv.h
new file mode 100644
index 00000000..b9e41e90
--- /dev/null
+++ b/src/modules/options/optw_nickserv.h
@@ -0,0 +1,89 @@
+#ifndef _OPTW_NICKSERV_H_
+#define _OPTW_NICKSERV_H_
+
+//=============================================================================
+//
+// File : optw_nickserv.h
+// Creation date : Fri Aug 10 2001 03:37:21 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001-2005 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+
+#include "kvi_settings.h"
+#include "kvi_optionswidget.h"
+
+#include <qdialog.h>
+
+#define KVI_OPTIONS_WIDGET_ICON_KviNickServOptionsWidget KVI_SMALLICON_NICKSERV
+#define KVI_OPTIONS_WIDGET_NAME_KviNickServOptionsWidget __tr2qs_no_lookup("NickServ")
+#define KVI_OPTIONS_WIDGET_PARENT_KviNickServOptionsWidget KviToolsOptionsWidget
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviNickServOptionsWidget __tr2qs_no_lookup("authentication,identify")
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviNickServOptionsWidget 10000
+//#define KVI_OPTIONS_WIDGET_HIDDEN_KviNickServOptionsWidget true
+
+class QLineEdit;
+class QPushButton;
+class KviNickServRule;
+class KviTalListView;
+class QCheckBox;
+
+class KviNickServRuleEditor : public QDialog
+{
+ Q_OBJECT
+public:
+ KviNickServRuleEditor(QWidget * par,bool bUseServerMaskField = false);
+ ~KviNickServRuleEditor();
+protected:
+ QLineEdit * m_pRegisteredNickEdit;
+ QLineEdit * m_pNickServMaskEdit;
+ QLineEdit * m_pMessageRegexpEdit;
+ QLineEdit * m_pIdentifyCommandEdit;
+ QLineEdit * m_pServerMaskEdit;
+ QPushButton * m_pOkButton;
+public:
+ bool editRule(KviNickServRule * r);
+protected:
+ bool validate();
+protected slots:
+ void okPressed();
+};
+
+class KviNickServOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviNickServOptionsWidget(QWidget * parent);
+ ~KviNickServOptionsWidget();
+protected:
+ KviTalListView * m_pNickServListView;
+ QCheckBox * m_pNickServCheck;
+ QPushButton * m_pAddRuleButton;
+ QPushButton * m_pDelRuleButton;
+ QPushButton * m_pEditRuleButton;
+protected slots:
+ void enableDisableNickServControls();
+ void addNickServRule();
+ void delNickServRule();
+ void editNickServRule();
+public:
+ virtual void commit();
+};
+
+#endif //!_OPTW_NICKSERV_H_
diff --git a/src/modules/options/optw_notify.cpp b/src/modules/options/optw_notify.cpp
new file mode 100644
index 00000000..6ee5dc05
--- /dev/null
+++ b/src/modules/options/optw_notify.cpp
@@ -0,0 +1,134 @@
+//
+// File : optw_notify.cpp
+// Creation date : Sun Oct 28 15:11:29 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "optw_notify.h"
+
+#include <qlayout.h>
+#include "kvi_settings.h"
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+
+//#warning "Info tips"
+
+
+KviNotifyOptionsWidget::KviNotifyOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"notify_options_widget")
+{
+ createLayout(5,1);
+
+ KviBoolSelector * b = addBoolSelector(0,0,0,0,__tr2qs_ctx("Use online notify list","options"),KviOption_boolUseNotifyList);
+ KviTalGroupBox *g = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("Configuration","options"));
+ connect(b,SIGNAL(toggled(bool)),g,SLOT(setEnabled(bool)));
+
+ connect(b,
+ SIGNAL(toggled(bool)),
+ addBoolSelector(g,__tr2qs_ctx("Show notifications in active window","options"),
+ KviOption_boolNotifyListChangesToActiveWindow,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)),
+ SLOT(setEnabled(bool)));
+ connect(b,
+ SIGNAL(toggled(bool)),
+ addBoolSelector(g,__tr2qs_ctx("Flash window when users are going online","options"),
+ KviOption_boolFlashWindowOnNotifyOnLine,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)),
+ SLOT(setEnabled(bool)));
+ connect(b,
+ SIGNAL(toggled(bool)),
+ addBoolSelector(g,__tr2qs_ctx("Popup notifier when users are going online","options"),
+ KviOption_boolPopupNotifierOnNotifyOnLine,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)),
+ SLOT(setEnabled(bool)));
+
+ g = addGroupBox(0,2,0,2,1,Qt::Horizontal,__tr2qs_ctx("Advanced configuration","options"));
+ connect(b,SIGNAL(toggled(bool)),g,SLOT(setEnabled(bool)));
+
+ connect(b,
+ SIGNAL(toggled(bool)),
+ addBoolSelector(g,__tr2qs_ctx("Check USERHOST for online users","options"),
+ KviOption_boolNotifyListSendUserhostForOnlineUsers,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)),
+ SLOT(setEnabled(bool)));
+ connect(b,
+ SIGNAL(toggled(bool)),
+ addBoolSelector(g,__tr2qs_ctx("Use \"smart\" notify list manager","options"),
+ KviOption_boolUseIntelligentNotifyListManager,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)),
+ SLOT(setEnabled(bool)));
+ connect(b,
+ SIGNAL(toggled(bool)),
+ addBoolSelector(g,__tr2qs_ctx("Use the WATCH method if available","options"),
+ KviOption_boolUseWatchListIfAvailable,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)),
+ SLOT(setEnabled(bool)));
+ connect(b,
+ SIGNAL(toggled(bool)),
+ addUIntSelector(g,__tr2qs_ctx("Check interval (in seconds)","options"),
+ KviOption_uintNotifyListCheckTimeInSecs,
+ 5,3600,180,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)),
+ SLOT(setEnabled(bool)));
+ connect(b,
+ SIGNAL(toggled(bool)),
+ addUIntSelector(g,__tr2qs_ctx("ISON delay (in seconds)","options"),
+ KviOption_uintNotifyListIsOnDelayTimeInSecs,
+ 5,180,6,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)),
+ SLOT(setEnabled(bool)));
+ connect(b,
+ SIGNAL(toggled(bool)),
+ addUIntSelector(g,__tr2qs_ctx("USERHOST delay (in seconds)","options"),
+ KviOption_uintNotifyListUserhostDelayTimeInSecs,
+ 5,180,6,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)),
+ SLOT(setEnabled(bool)));
+
+ addLabel(0,3,0,3,__tr2qs_ctx("<p><b>Note:</b><br>The notify list is managed using the \"Registered Users\" settings.</p>","options"));
+ addRowSpacer(0,4,0,4);
+}
+
+KviNotifyOptionsWidget::~KviNotifyOptionsWidget()
+{
+}
+
+
+
+
+KviNotifierOptionsWidget::KviNotifierOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"notifier_options_widget")
+{
+ createLayout(3,1);
+
+ KviBoolSelector * b = addBoolSelector(0,0,0,0,__tr2qs_ctx("Forcibly and completely disable the notifier","options"),KviOption_boolForciblyDisableNotifier);
+#ifdef COMPILE_INFO_TIPS
+ QString tip = "<center>";
+ tip += __tr2qs_ctx("This is an option for the impatient: it allows to forcibly and permanently disable " \
+ "the notifier window. Please note that if this option is activated then " \
+ "the notifier will NOT popup even if all the other options around specify " \
+ "to use it in response to particular events. Also note that this option " \
+ "will make all the /notifier.* commands fail silently.","options");
+ tip += "</center>";
+ mergeTip(b,tip);
+#endif
+ addBoolSelector(0,1,0,1,__tr2qs_ctx("Disable notifier window flashing","options"),KviOption_boolDisableNotifierFlashing);
+ addBoolSelector(0,2,0,2,__tr2qs_ctx("Disable notifier window fade effect","options"),KviOption_boolDisableNotifierFadein);
+
+ addRowSpacer(0,3,0,3);
+}
+
+KviNotifierOptionsWidget::~KviNotifierOptionsWidget()
+{
+}
+
+
+#include "m_optw_notify.moc"
diff --git a/src/modules/options/optw_notify.h b/src/modules/options/optw_notify.h
new file mode 100644
index 00000000..374ddc21
--- /dev/null
+++ b/src/modules/options/optw_notify.h
@@ -0,0 +1,54 @@
+#ifndef _OPTW_NOTIFY_H_
+#define _OPTW_NOTIFY_H_
+//
+// File : optw_notify.h
+// Creation date : Sun Oct 28 15:11:30 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+
+#define KVI_OPTIONS_WIDGET_ICON_KviNotifyOptionsWidget KVI_SMALLICON_REGUSERS
+#define KVI_OPTIONS_WIDGET_NAME_KviNotifyOptionsWidget __tr2qs_no_lookup("Contacts")
+#define KVI_OPTIONS_WIDGET_PARENT_KviNotifyOptionsWidget KviToolsOptionsWidget
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviNotifyOptionsWidget __tr2qs_no_lookup("notify,buddy,buddies,friends")
+#define KVI_OPTIONS_WIDGET_MINIMAL_USER_EXPERIENCE_LEVEL_KviNotifyOptionsWidget 2
+
+class KviNotifyOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviNotifyOptionsWidget(QWidget * parent);
+ ~KviNotifyOptionsWidget();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviNotifierOptionsWidget KVI_SMALLICON_ALERT
+#define KVI_OPTIONS_WIDGET_NAME_KviNotifierOptionsWidget __tr2qs_no_lookup("Notifier")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviNotifierOptionsWidget __tr2qs_no_lookup("popup")
+#define KVI_OPTIONS_WIDGET_PARENT_KviNotifierOptionsWidget KviInterfaceFeaturesOptionsWidget
+
+class KviNotifierOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviNotifierOptionsWidget(QWidget * parent);
+ ~KviNotifierOptionsWidget();
+};
+
+#endif //_OPTW_NOTIFY_H_
diff --git a/src/modules/options/optw_protection.cpp b/src/modules/options/optw_protection.cpp
new file mode 100644
index 00000000..27a0f4b1
--- /dev/null
+++ b/src/modules/options/optw_protection.cpp
@@ -0,0 +1,50 @@
+//=============================================================================
+//
+// File : optw_protection.cpp
+// Creation date : Wed Ott 19 16:15:16 2005 GMT by Grifisx & Noldor
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2005 Grifisx & Noldor
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+#include "optw_protection.h"
+
+#include <qlayout.h>
+
+#include "kvi_settings.h"
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+KviProtectionOptionsWidget::KviProtectionOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"protection_options_widget")
+{
+
+ createLayout(1,1);
+
+ QLabel * l;
+ l = addLabel(0,0,0,0,__tr2qs_ctx("This section contains irc protection tools<br>"\
+ "<p>like<b> flood, ignore, antispam. </b> " \
+ "</p>","options"));
+
+}
+
+KviProtectionOptionsWidget::~KviProtectionOptionsWidget()
+{
+}
+
+#include "m_optw_protection.moc"
diff --git a/src/modules/options/optw_protection.h b/src/modules/options/optw_protection.h
new file mode 100644
index 00000000..5ac37e43
--- /dev/null
+++ b/src/modules/options/optw_protection.h
@@ -0,0 +1,48 @@
+#ifndef _OPTW_PROTECTION_H_
+#define _OPTW_PROTECTION_H_
+
+//=============================================================================
+//
+// File : optw_protection.h
+//
+// This file is part of the KVirc irc client distribution
+// Creation date : Wed Ott 19 16:15:16 2005 GMT by Grifisx & Noldor
+//
+// Copyright (C) 2005 Grifisx & Noldor
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+#include "kvi_settings.h"
+#include "kvi_optionswidget.h"
+#include "kvi_selectors.h"
+
+#define KVI_OPTIONS_WIDGET_ICON_KviProtectionOptionsWidget KVI_SMALLICON_SPY
+#define KVI_OPTIONS_WIDGET_NAME_KviProtectionOptionsWidget __tr2qs_no_lookup("Protection")
+#define KVI_OPTIONS_WIDGET_PARENT_KviProtectionOptionsWidget KviIrcOptionsWidget
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviProtectionOptionsWidget 60000
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviProtectionOptionsWidget __tr2qs_no_lookup("ctcp,flood")
+#define KVI_OPTIONS_WIDGET_CONTAINER_KviProtectionOptionsWidget true
+#define KVI_OPTIONS_WIDGET_NOTCONTAINED_KviProtectionOptionsWidget true
+
+class KviProtectionOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviProtectionOptionsWidget(QWidget * parent);
+ ~KviProtectionOptionsWidget();
+};
+
+#endif //!_OPTW_PROTECTION_H_
diff --git a/src/modules/options/optw_proxy.cpp b/src/modules/options/optw_proxy.cpp
new file mode 100644
index 00000000..523d3c79
--- /dev/null
+++ b/src/modules/options/optw_proxy.cpp
@@ -0,0 +1,367 @@
+//
+// File : optw_proxy.cpp
+// Creation date : Mon Jun 24 2000 22:02:11 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2000 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "optw_proxy.h"
+#include "kvi_locale.h"
+#include "kvi_iconmanager.h"
+#include "kvi_proxydb.h"
+#include "kvi_ipeditor.h"
+#include "kvi_netutils.h"
+#include "kvi_settings.h"
+#include "kvi_options.h"
+#include "kvi_styled_controls.h"
+
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qcombobox.h>
+#include <qcheckbox.h>
+#include <kvi_tal_groupbox.h>
+#include "kvi_tal_popupmenu.h"
+#include <qcursor.h>
+#include "kvi_tal_tooltip.h"
+#include <qtoolbutton.h>
+
+
+KviProxyOptionsListViewItem::KviProxyOptionsListViewItem(KviTalListView *parent,const QPixmap &pm,KviProxy * prx)
+: KviTalListViewItem(parent,prx->m_szHostname.ptr())
+{
+ setPixmap(0,pm);
+ m_pProxyData = new KviProxy(*prx);
+}
+
+KviProxyOptionsListViewItem::~KviProxyOptionsListViewItem()
+{
+ delete m_pProxyData;
+}
+
+KviProxyOptionsWidget::KviProxyOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"proxy_options_widget")
+{
+ createLayout(3,2);
+
+ addBoolSelector(0,0,1,0,__tr2qs_ctx("Use proxy","options"),KviOption_boolUseProxyHost);
+
+ m_pListView = new KviTalListView(this);
+ addWidgetToLayout(m_pListView,0,1,0,1);
+ m_pListView->addColumn(__tr2qs_ctx("Proxy","options"));
+ m_pListView->setRootIsDecorated(true);
+ m_pListView->setAllColumnsShowFocus(true);
+ m_pListView->setSelectionMode(KviTalListView::Single);
+
+ connect(m_pListView,SIGNAL(selectionChanged(KviTalListViewItem *)),
+ this,SLOT(listViewItemSelectionChanged(KviTalListViewItem *)));
+ connect(m_pListView,SIGNAL(rightButtonPressed(KviTalListViewItem *,const QPoint &,int)),
+ this,SLOT(listViewRightButtonPressed(KviTalListViewItem *,const QPoint &,int)));
+
+#ifdef COMPILE_INFO_TIPS
+ QString tiptxt = __tr2qs_ctx("<center>This is the list of available proxy servers.<br>" \
+ "Right-click on the list to add or remove proxies.</center>","options");
+ mergeTip(m_pListView,tiptxt);
+ mergeTip(m_pListView->viewport(),tiptxt);
+#endif
+
+ KviTalVBox * vbox = new KviTalVBox(this);
+ addWidgetToLayout(vbox,1,1,1,1);
+
+ QToolButton * tb = new KviStyledToolButton(vbox);
+ tb->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_PROXY)));
+ tb->setAutoRaise(true);
+ connect(tb,SIGNAL(clicked()),this,SLOT(newProxy()));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(tb,__tr2qs_ctx("New Proxy","options"));
+#endif
+
+ tb = new KviStyledToolButton(vbox);
+ tb->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CUT)));
+ //tb->setEnabled(false);
+ tb->setAutoRaise(true);
+ connect(tb,SIGNAL(clicked()),this,SLOT(removeCurrent()));
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(tb,__tr2qs_ctx("Remove Proxy","options"));
+#endif
+
+ QFrame * lll = new QFrame(vbox);
+ vbox->setStretchFactor(lll,100);
+
+
+ KviTalGroupBox * gbox = addGroupBox(0,2,1,2,2,Qt::Horizontal,__tr2qs_ctx("Configuration","options"),this);
+ //QGridLayout * gl = new QGridLayout(gbox->layout());
+ //gl->setMargin(2);
+ //gl->setSpacing(4);
+
+ m_pProxyLabel = new QLabel(__tr2qs_ctx("Proxy:","options"),gbox);
+
+ m_pProxyEdit = new QLineEdit(gbox);
+
+ m_pPortLabel = new QLabel(__tr2qs_ctx("Port:","options"),gbox);
+
+ m_pPortEdit = new QLineEdit(gbox);
+
+ m_pIpLabel = new QLabel(__tr2qs_ctx("IP address:","options"),gbox);
+
+ m_pIpEditor = new KviIpEditor(gbox,KviIpEditor::IpV4);
+
+ m_pUserLabel = new QLabel(__tr2qs_ctx("Username:","options"),gbox);
+
+ m_pUserEdit = new QLineEdit(gbox);
+
+ m_pPassLabel = new QLabel(__tr2qs_ctx("Password:","options"),gbox);
+
+ m_pPassEdit = new QLineEdit(gbox);
+
+ m_pProtocolLabel = new QLabel(__tr2qs_ctx("Protocol:","options"),gbox);
+
+ m_pProtocolBox = new QComboBox(false,gbox);
+
+ QStringList l;
+ KviProxy::getSupportedProtocolNames(l);
+
+ m_pProtocolBox->insertStringList(l);
+
+ m_pIpV6Check = new KviStyledCheckBox(__tr2qs_ctx("Use IPv6 protocol","options"),gbox);
+ connect(m_pIpV6Check,SIGNAL(toggled(bool)),this,SLOT(ipV6CheckToggled(bool)));
+#ifndef COMPILE_IPV6_SUPPORT
+ m_pIpV6Check->setEnabled(false);
+#endif
+
+ m_pLastEditedItem = 0;
+
+ fillProxyList();
+
+ layout()->setRowStretch(0,1);
+ layout()->setColStretch(0,1);
+
+ m_pContextPopup = new KviTalPopupMenu(this);
+
+
+}
+
+KviProxyOptionsWidget::~KviProxyOptionsWidget()
+{
+}
+
+
+void KviProxyOptionsWidget::ipV6CheckToggled(bool bEnabled)
+{
+ m_pIpEditor->setAddressType(bEnabled ? KviIpEditor::IpV6 : KviIpEditor::IpV4);
+}
+
+void KviProxyOptionsWidget::fillProxyList()
+{
+ KviProxyOptionsListViewItem * prx;
+
+ KviPointerList<KviProxy> * l = g_pProxyDataBase->proxyList();
+
+ for(KviProxy * p = l->first();p;p = l->next())
+ {
+ prx = new KviProxyOptionsListViewItem(m_pListView,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_PROXY)),p);
+ if(p == g_pProxyDataBase->currentProxy())
+ {
+ m_pListView->setSelected(prx,true);
+ m_pListView->ensureItemVisible(prx);
+ }
+ }
+ if(!(g_pProxyDataBase->currentProxy()))listViewItemSelectionChanged(0);
+}
+
+void KviProxyOptionsWidget::listViewItemSelectionChanged(KviTalListViewItem *it)
+{
+ if(m_pLastEditedItem)saveLastItem();
+ m_pLastEditedItem = (KviProxyOptionsListViewItem *)it;
+
+ m_pProxyLabel->setEnabled(m_pLastEditedItem);
+ m_pProxyEdit->setEnabled(m_pLastEditedItem);
+ m_pIpLabel->setEnabled(m_pLastEditedItem);
+ m_pIpEditor->setEnabled(m_pLastEditedItem);
+ m_pUserLabel->setEnabled(m_pLastEditedItem);
+ m_pUserEdit->setEnabled(m_pLastEditedItem);
+ m_pPassLabel->setEnabled(m_pLastEditedItem);
+ m_pPassEdit->setEnabled(m_pLastEditedItem);
+ m_pProtocolLabel->setEnabled(m_pLastEditedItem);
+ m_pProtocolBox->setEnabled(m_pLastEditedItem);
+ m_pPortLabel->setEnabled(m_pLastEditedItem);
+ m_pPortEdit->setEnabled(m_pLastEditedItem);
+
+#ifdef COMPILE_IPV6_SUPPORT
+ m_pIpV6Check->setEnabled(m_pLastEditedItem);
+#else
+ m_pIpV6Check->setEnabled(false);
+#endif
+ if(m_pLastEditedItem)
+ {
+ m_pProxyEdit->setText(m_pLastEditedItem->m_pProxyData->m_szHostname.ptr());
+
+ for(int i=0;i<m_pProtocolBox->count();i++)
+ {
+ KviStr txt = m_pProtocolBox->text(i);
+ if(kvi_strEqualCI(m_pLastEditedItem->m_pProxyData->protocolName(),txt.ptr()))
+ {
+ m_pProtocolBox->setCurrentItem(i);
+ break;
+ }
+ }
+
+#ifdef COMPILE_IPV6_SUPPORT
+ m_pIpV6Check->setChecked(m_pLastEditedItem->m_pProxyData->isIpV6());
+ m_pIpEditor->setAddressType(m_pLastEditedItem->m_pProxyData->isIpV6() ? KviIpEditor::IpV6 : KviIpEditor::IpV4);
+#else
+ m_pIpV6Check->setChecked(false);
+ m_pIpEditor->setAddressType(KviIpEditor::IpV4);
+#endif
+
+
+ if(!m_pIpEditor->setAddress(m_pLastEditedItem->m_pProxyData->m_szIp.ptr()))
+ {
+#ifdef COMPILE_IPV6_SUPPORT
+ m_pIpEditor->setAddress(m_pLastEditedItem->m_pProxyData->isIpV6() ? "0:0:0:0:0:0:0:0" : "0.0.0.0");
+#else
+ m_pIpEditor->setAddress("0.0.0.0");
+#endif
+ }
+
+ m_pUserEdit->setText(m_pLastEditedItem->m_pProxyData->m_szUser.ptr());
+ m_pPassEdit->setText(m_pLastEditedItem->m_pProxyData->m_szPass.ptr());
+ KviStr tmp(KviStr::Format,"%u",m_pLastEditedItem->m_pProxyData->m_uPort);
+ m_pPortEdit->setText(tmp.ptr());
+ } else {
+ m_pProxyEdit->setText("");
+ m_pUserEdit->setText("");
+ m_pPassEdit->setText("");
+ m_pPortEdit->setText("");
+ m_pIpEditor->setAddress("0.0.0.0");
+ m_pIpV6Check->setEnabled(false);
+ }
+}
+
+
+void KviProxyOptionsWidget::saveLastItem()
+{
+ if(m_pLastEditedItem)
+ {
+ KviStr tmp = m_pProxyEdit->text();
+ if(tmp.isEmpty())tmp = "irc.unknown.net";
+ m_pLastEditedItem->setText(0,tmp.ptr());
+ m_pLastEditedItem->m_pProxyData->m_szHostname = tmp;
+#ifdef COMPILE_IPV6_SUPPORT
+ m_pLastEditedItem->m_pProxyData->m_bIsIpV6 = m_pIpV6Check->isChecked();
+#else
+ m_pLastEditedItem->m_pProxyData->m_bIsIpV6 = false;
+#endif
+ m_pLastEditedItem->m_pProxyData->m_szIp = "";
+ KviStr tmpAddr = m_pIpEditor->address();
+
+ if(!m_pIpEditor->hasEmptyFields())
+ {
+#ifdef COMPILE_IPV6_SUPPORT
+ if(m_pIpV6Check->isChecked())
+ {
+ if((!kvi_strEqualCI(tmpAddr.ptr(),"0:0:0:0:0:0:0:0")) &&
+ kvi_isValidStringIp_V6(tmpAddr.ptr()))
+ {
+ m_pLastEditedItem->m_pProxyData->m_szIp = tmpAddr;
+ }
+ } else {
+#endif
+ if((!kvi_strEqualCI(tmpAddr.ptr(),"0.0.0.0")) &&
+ kvi_isValidStringIp(tmpAddr.ptr()))
+ {
+ m_pLastEditedItem->m_pProxyData->m_szIp = tmpAddr;
+ }
+#ifdef COMPILE_IPV6_SUPPORT
+ }
+#endif
+ }
+
+ m_pLastEditedItem->m_pProxyData->m_szPass = m_pPassEdit->text();
+ m_pLastEditedItem->m_pProxyData->m_szUser = m_pUserEdit->text();
+ tmp = m_pPortEdit->text();
+ bool bOk;
+ kvi_u32_t uPort = tmp.toUInt(&bOk);
+ if(!bOk)uPort = 1080;
+ m_pLastEditedItem->m_pProxyData->m_uPort = uPort;
+// m_pLastEditedItem->m_pProxyData->m_bSocksV5 = m_pSocks5Check->isChecked();
+ tmp = m_pProtocolBox->currentText();
+ m_pLastEditedItem->m_pProxyData->setNamedProtocol(tmp.ptr());
+ }
+}
+
+void KviProxyOptionsWidget::commit()
+{
+ saveLastItem();
+ g_pProxyDataBase->clear();
+ KviProxyOptionsListViewItem * it = (KviProxyOptionsListViewItem *)m_pListView->firstChild();
+ while(it)
+ {
+ KviStr tmp = it->text(0);
+ if(tmp.hasData())
+ {
+ KviProxy * prx = new KviProxy(*(((KviProxyOptionsListViewItem *)it)->m_pProxyData));
+ g_pProxyDataBase->insertProxy(prx);
+
+ if(it == m_pLastEditedItem)g_pProxyDataBase->setCurrentProxy(prx);
+ }
+ it = (KviProxyOptionsListViewItem *)it->nextSibling();
+ }
+
+ if(g_pProxyDataBase->currentProxy() == 0)
+ {
+ g_pProxyDataBase->setCurrentProxy(g_pProxyDataBase->proxyList()->first());
+ }
+
+ KviOptionsWidget::commit();
+}
+
+void KviProxyOptionsWidget::listViewRightButtonPressed(KviTalListViewItem *it,const QPoint &pnt,int col)
+{
+ m_pContextPopup->clear();
+ m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_PROXY)),__tr2qs_ctx("&New Proxy","options"),this,SLOT(newProxy()));
+ m_pContextPopup->setItemEnabled(m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CUT)),__tr2qs_ctx("Re&move Proxy","options"),this,SLOT(removeCurrent())),it);
+ m_pContextPopup->popup(QCursor::pos());
+}
+
+void KviProxyOptionsWidget::newProxy()
+{
+ KviProxy prx;
+ KviProxyOptionsListViewItem * it = new KviProxyOptionsListViewItem(m_pListView,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_PROXY)),&prx);
+ m_pListView->setSelected(it,true);
+ m_pListView->ensureItemVisible(it);
+}
+
+
+void KviProxyOptionsWidget::removeCurrent()
+{
+ if(m_pLastEditedItem)
+ {
+ delete m_pLastEditedItem;
+ m_pLastEditedItem = 0;
+ KviTalListViewItem * it = m_pListView->firstChild();
+ if(it)
+ {
+ m_pListView->setSelected(it,true);
+ m_pListView->ensureItemVisible(it);
+ } else {
+ listViewItemSelectionChanged(0);
+ }
+ }
+}
+
+#include "m_optw_proxy.moc"
diff --git a/src/modules/options/optw_proxy.h b/src/modules/options/optw_proxy.h
new file mode 100644
index 00000000..a6f18ada
--- /dev/null
+++ b/src/modules/options/optw_proxy.h
@@ -0,0 +1,94 @@
+#ifndef _OPTW_PROXY_H_
+#define _OPTW_PROXY_H_
+
+//
+// File : optw_proxy.h
+// Creation date : Mon Jun 24 2000 21:58:25 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2000 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+#include "kvi_tal_listview.h"
+
+
+class KviProxy;
+class KviProxyDataBase;
+
+extern KVIRC_API KviProxyDataBase * g_pProxyDataBase;
+
+class KviProxyOptionsListViewItem : public KviTalListViewItem
+{
+public:
+ KviProxyOptionsListViewItem(KviTalListView *parent,const QPixmap &pm,KviProxy * prx);
+ ~KviProxyOptionsListViewItem();
+public:
+ KviProxy * m_pProxyData;
+};
+
+class QLabel;
+class QLineEdit;
+class KviIpEditor;
+class QCheckBox;
+class KviTalPopupMenu;
+class QComboBox;
+
+#define KVI_OPTIONS_WIDGET_ICON_KviProxyOptionsWidget KVI_SMALLICON_PROXY
+#define KVI_OPTIONS_WIDGET_NAME_KviProxyOptionsWidget __tr2qs_no_lookup("Proxy Hosts")
+#define KVI_OPTIONS_WIDGET_PARENT_KviProxyOptionsWidget KviConnectionOptionsWidget
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviProxyOptionsWidget __tr2qs_no_lookup("connection,servers")
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviProxyOptionsWidget 70000
+
+class KviProxyOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviProxyOptionsWidget(QWidget * parent);
+ ~KviProxyOptionsWidget();
+protected:
+ KviTalListView * m_pListView;
+ QLabel * m_pProxyLabel;
+ QLineEdit * m_pProxyEdit;
+ QLabel * m_pIpLabel;
+ KviIpEditor * m_pIpEditor;
+ QLabel * m_pUserLabel;
+ QLineEdit * m_pUserEdit;
+ QLabel * m_pPassLabel;
+ QLineEdit * m_pPassEdit;
+ QLabel * m_pPortLabel;
+ QLineEdit * m_pPortEdit;
+ QLabel * m_pProtocolLabel;
+ QComboBox * m_pProtocolBox;
+ KviTalPopupMenu * m_pContextPopup;
+ QCheckBox * m_pIpV6Check;
+ KviProxyOptionsListViewItem * m_pLastEditedItem;
+private:
+
+ void fillProxyList();
+ void saveLastItem();
+protected slots:
+ void listViewItemSelectionChanged(KviTalListViewItem *it);
+ void listViewRightButtonPressed(KviTalListViewItem *it,const QPoint &pnt,int col);
+ void newProxy();
+ void removeCurrent();
+ void ipV6CheckToggled(bool bEnabled);
+public:
+ virtual void commit();
+};
+
+#endif //!_OPTW_PROXY_H_
diff --git a/src/modules/options/optw_query.cpp b/src/modules/options/optw_query.cpp
new file mode 100644
index 00000000..d0026c6e
--- /dev/null
+++ b/src/modules/options/optw_query.cpp
@@ -0,0 +1,115 @@
+//
+// File : optw_query.cpp
+// Creation date : Mon Oct 29 15:37:16 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+
+#include "optw_query.h"
+
+#include <qlayout.h>
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+#include "kvi_settings.h"
+
+
+#ifdef COMPILE_KDE_SUPPORT
+ #include <kdeversion.h>
+#endif
+
+KviQueryOptionsWidget::KviQueryOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"query_options_widget")
+{
+ createLayout(8,1);
+
+ KviTalGroupBox *g = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("Open Query For","options"));
+ KviBoolSelector *b = addBoolSelector(g, __tr2qs_ctx("Private messages","options"),KviOption_boolCreateQueryOnPrivmsg);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,
+ __tr2qs_ctx("<center>This option enables query window creation " \
+ "when a private message (PRIVMSG) is received.<br>" \
+ "If you disable this, private messages will " \
+ "be shown in the active window or a common channel.</center>","options"));
+#endif
+
+ b = addBoolSelector(g, __tr2qs_ctx("Private notices","options"),KviOption_boolCreateQueryOnNotice);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,
+ __tr2qs_ctx("<center>This option enables query window creation " \
+ "when a private notice (NOTICE) is received.<br>" \
+ "If you disable this, private notices will " \
+ "be shown in the active window or a common channel.</center>","options"));
+#endif
+
+
+ b = addBoolSelector(0,1,0,1,__tr2qs_ctx("Always open queries as minimized","options"),KviOption_boolCreateMinimizedQuery);
+
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,
+ __tr2qs_ctx("<center>This option causes newly created " \
+ "query windows to be immediately minimized.<br>" \
+ "Enable this if you don't like queries " \
+ "popping up while you're typing something in a channel. :D</center>","options"));
+#endif
+
+
+
+ b = addBoolSelector(0,2,0,2, __tr2qs_ctx("Enable target user tracking","options"),KviOption_boolEnableQueryTracing);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,
+ __tr2qs_ctx("<center>This option will enable target user tracking.<br>" \
+ "Some actions of the target user (e.g. joins and parts) " \
+ "will be displayed in the window.<br></center>","options"));
+#endif
+
+#if defined(COMPILE_ON_WINDOWS) || (defined(COMPILE_KDE_SUPPORT) && (KDE_VERSION_MAJOR >= 3) && (KDE_VERSION_MINOR >= 2))
+ b = addBoolSelector(0,3,0,3,__tr2qs_ctx("Flash system taskbar on new query message","options"),KviOption_boolFlashQueryWindowOnNewMessages);
+ #ifdef COMPILE_INFO_TIPS
+ mergeTip(b,
+ __tr2qs_ctx("<center>This option causes the system taskbar entry for KVIrc to flash when a new query message " \
+ "is received and the KVIrc window is not the active.</center>","options"));
+ #endif
+#endif
+
+ b = addBoolSelector(0,4,0,4, __tr2qs_ctx("Popup notifier on new query message","options"),KviOption_boolPopupNotifierOnNewQueryMessages);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,
+ __tr2qs_ctx("<center>This option causes a small notifier window to pop up " \
+ "in the low right corner of the screen when a new message is received " \
+ "and the KVIrc window is not active.</center>","options"));
+#endif
+ b = addBoolSelector(0,5,0,5, __tr2qs_ctx("Show information about query target at the top of the query","options"),KviOption_boolShowExtendedInfoInQueryLabel);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,
+ __tr2qs_ctx("<center>This option enables query window information " \
+ "label. It can show you known information about query target at the top of the window.<br>" \
+ "Uncheck if you think,that it wastes your query space/" \
+ "</center>","options"));
+#endif
+
+ addRowSpacer(0,6,0,6);
+}
+
+KviQueryOptionsWidget::~KviQueryOptionsWidget()
+{
+}
+
+
+#include "m_optw_query.moc"
diff --git a/src/modules/options/optw_query.h b/src/modules/options/optw_query.h
new file mode 100644
index 00000000..bae1c7bc
--- /dev/null
+++ b/src/modules/options/optw_query.h
@@ -0,0 +1,43 @@
+#ifndef _OPTW_QUERY_H_
+#define _OPTW_QUERY_H_
+//
+// File : optw_query.h
+// Creation date : Tue Mar 05 22:31:18 2002 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2002 Szymon Stefanek ([email protected])
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+
+#define KVI_OPTIONS_WIDGET_ICON_KviQueryOptionsWidget KVI_SMALLICON_QUERY
+#define KVI_OPTIONS_WIDGET_NAME_KviQueryOptionsWidget __tr2qs_no_lookup("Query")
+#define KVI_OPTIONS_WIDGET_PARENT_KviQueryOptionsWidget KviIrcOptionsWidget
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviQueryOptionsWidget __tr2qs_no_lookup("chat")
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviQueryOptionsWidget 80000
+#define KVI_OPTIONS_WIDGET_NOTCONTAINED_KviQueryOptionsWidget true
+
+class KviQueryOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviQueryOptionsWidget(QWidget * parent);
+ ~KviQueryOptionsWidget();
+protected:
+};
+
+#endif //_OPTW_away_H_
diff --git a/src/modules/options/optw_servers.cpp b/src/modules/options/optw_servers.cpp
new file mode 100644
index 00000000..0b50bc78
--- /dev/null
+++ b/src/modules/options/optw_servers.cpp
@@ -0,0 +1,1712 @@
+//=============================================================================
+//
+// File : optw_servers.cpp
+// Creation date : Wed Jun 12 2000 03:29:51 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2000-2004 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+#include "optw_servers.h"
+#include "optw_proxy.h"
+#include "kvi_query.h"
+#include "kvi_channel.h"
+#include "kvi_locale.h"
+#include "kvi_iconmanager.h"
+#include "kvi_ircserverdb.h"
+#include "kvi_ipeditor.h"
+#include "kvi_netutils.h"
+#include "kvi_settings.h"
+#include "kvi_filedialog.h"
+#include "kvi_config.h"
+#include "kvi_scripteditor.h"
+#include "kvi_options.h"
+
+#include "kvi_app.h"
+#include "kvi_console.h"
+#include "kvi_ircurl.h"
+#include "kvi_module.h"
+#include "kvi_modulemanager.h"
+#include "kvi_moduleextension.h"
+#include "kvi_msgbox.h"
+#include "kvi_mexserverimport.h"
+#include "kvi_nickserv.h"
+#include "optw_nickserv.h" // for the NickServ rule editor
+#include "kvi_proxydb.h"
+#include "kvi_kvs_script.h"
+#include "kvi_styled_controls.h"
+
+#include <qtoolbutton.h>
+#include <qlineedit.h>
+#include <qcheckbox.h>
+#include "kvi_tal_popupmenu.h"
+#include <qcursor.h>
+#include "kvi_tal_tooltip.h"
+#include <qvalidator.h>
+#include <qmessagebox.h>
+#include "kvi_pointerhashtable.h"
+#include <qcombobox.h>
+#include <qbuttongroup.h>
+#include <qmessagebox.h>
+#include <qinputdialog.h>
+#include <qmessagebox.h>
+
+
+KviNetworkDetailsWidget::KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * n)
+ : QDialog(par,"network_details",true)
+{
+ m_pOnConnectEditor=0;
+ m_pOnLoginEditor=0;
+
+ m_pUserEditor=0;
+ m_pPassEditor=0;
+ m_pNickEditor=0;
+ m_pRealEditor=0;
+ m_pDescEditor=0;
+
+ m_pEncodingEditor=0;
+
+ m_pAutoConnectCheck=0;
+
+ m_pNickServListView=0;
+ m_pNickServCheck=0;
+ m_pAddRuleButton=0;
+ m_pDelRuleButton=0;
+ m_pEditRuleButton=0;
+
+ m_pChannelListSelector=0;
+
+ QGridLayout * g = new QGridLayout(this,4,4,10,4);
+
+ setCaption(__tr2qs_ctx("Network Details","options"));
+ setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_WORLD)));
+
+ QString szTmp = "<font size=\"+1\"><b>";
+ szTmp += n->name();
+ szTmp += "</b></font>";
+
+ QLabel * l = new QLabel(szTmp,this);
+ l->setFrameStyle(QFrame::Raised | QFrame::StyledPanel);
+ l->setAlignment(Qt::AlignCenter);
+ l->setMargin(10);
+ g->addMultiCellWidget(l,0,0,0,3);
+ l->setMinimumWidth(200);
+
+ l = new QLabel(__tr2qs_ctx("Description:","options"),this);
+ g->addWidget(l,1,0);
+ m_pDescEditor = new QLineEdit(this);
+ g->addMultiCellWidget(m_pDescEditor,1,1,1,3);
+ m_pDescEditor->setText(n->description());
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pDescEditor,__tr2qs_ctx("<center>Put here a brief description of the network.</center>","options"));
+#endif
+
+ // Identity tab
+
+ QTabWidget * tw = new QTabWidget(this);
+ g->addMultiCellWidget(tw,2,2,0,3);
+
+ QWidget * tab = new QWidget(tw);
+ QGridLayout * gl = new QGridLayout(tab,4,2,10,4);
+
+ KviTalGroupBox *gbox = new KviTalGroupBox(2,Qt::Horizontal,__tr2qs_ctx("Properties","options"),tab);
+ gl->addMultiCellWidget(gbox,0,0,0,1);
+
+ l = new QLabel(__tr2qs_ctx("Username:","options"),gbox);
+ m_pUserEditor = new QLineEdit(gbox);
+ m_pUserEditor->setText(n->userName());
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pUserEditor,__tr2qs_ctx("<center>This is the <b>username</b> that KVIrc will use to login to servers on this network.\n" \
+ "If this field is left empty (most common case), KVIrc will use the default username " \
+ "specified in the \"Identity\" options tab.</center>","options"));
+#endif
+
+ l = new QLabel(__tr2qs_ctx("Nickname:","options"),gbox);
+ m_pNickEditor = new QLineEdit(gbox);
+ QValidator * v = new QRegExpValidator(QRegExp("[^-0-9 ][^ ]*","options"),gbox);
+ m_pNickEditor->setValidator(v);
+ m_pNickEditor->setText(n->nickName());
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pNickEditor,__tr2qs_ctx("<center>You can specify a \"special\" <b>nickname</b> that will be used to log in to the servers on this network.<br>" \
+ "If this field is left empty (most common case), the default nickname (specified in the \"Identity\" settings) will be used.</center>","options"));
+#endif
+
+ l = new QLabel(__tr2qs_ctx("Real name:","options"),gbox);
+ m_pRealEditor = new QLineEdit(gbox);
+ m_pRealEditor->setText(n->realName());
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pRealEditor,__tr2qs_ctx("<center>You can specify a \"special\" <b>real name</b> that will be used to login with the servers on this network.<br>" \
+ "If you leave this field empty (most common case), the default \"real name\" (specified in the \"Identity\" settings) will be used.</center>","options"));
+#endif
+
+
+ l = new QLabel(__tr2qs_ctx("Encoding:","options"),tab);
+ gl->addWidget(l,1,0);
+ m_pEncodingEditor = new QComboBox(false,tab);
+ m_pEncodingEditor->setDuplicatesEnabled(false);
+ gl->addWidget(m_pEncodingEditor,1,1);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pEncodingEditor,__tr2qs_ctx("<center>This box allows you to choose the preferred encoding for the servers in this network. " \
+ "If you choose \"Use System Encoding\" then the encoding will be set to the systemwide " \
+ "value that you choose in the \"Encoding\" page of the options dialog.</center>","options"));
+#endif
+
+ int i = 0;
+ int current = 0;
+ KviLocale::EncodingDescription * d = KviLocale::encodingDescription(i);
+ QString tmp;
+ m_pEncodingEditor->insertItem(__tr2qs_ctx("Use System Encoding","options"));
+ while(d->szName)
+ {
+ KviQString::sprintf(tmp,"%s (%s)",d->szName,d->szDescription);
+ m_pEncodingEditor->insertItem(tmp);
+ if(KviQString::equalCI(d->szName,n->encoding()))current = i + 1;
+ i = i + 1;
+ d = KviLocale::encodingDescription(i);
+ }
+
+ m_pEncodingEditor->setCurrentItem(current);
+
+ m_pAutoConnectCheck = new KviStyledCheckBox(__tr2qs_ctx("Connect to this network at startup","options"),tab);
+ m_pAutoConnectCheck->setChecked(n->autoConnect());
+ gl->addMultiCellWidget(m_pAutoConnectCheck,2,2,0,1);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pAutoConnectCheck,__tr2qs_ctx("<center>This option will cause KVIrc to automatically connect to this network at startup</center>","options"));
+#endif
+
+
+ l = new QLabel("",tab);
+ gl->addWidget(l,3,0);
+
+ gl->setRowStretch(3,1);
+ gl->setColStretch(1,1);
+
+ tw->addTab(tab,__tr2qs_ctx("General","options"));
+
+ // after login join channels
+ tab = new QWidget(tw);
+
+ gl = new QGridLayout(tab,1,1,10,4);
+
+ if(n->autoJoinChannelList())
+ m_lstChannels = *(n->autoJoinChannelList());
+ m_pChannelListSelector = new KviCahnnelListSelector(tab,
+ __tr2qs_ctx("Channels to join automatically upon connect:","options"),&m_lstChannels,true);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pChannelListSelector,__tr2qs_ctx("<center>Here you can set a list of channels to be joined automatically " \
+ "after a connection to a server in this network has been established. To add a channel, type its name in the " \
+ "text input below and click \"<b>Add</b>\".</center>","options"));
+#endif
+ gl->addWidget(m_pChannelListSelector,0,0);
+
+ tw->addTab(tab,__tr2qs_ctx("Join Channels","options"));
+
+ // after connect execute
+ tab = new QWidget(tw);
+ gl = new QGridLayout(tab,1,1,10,4);
+
+ m_pOnConnectEditor = KviScriptEditor::createInstance(tab);
+ gl->addWidget(m_pOnConnectEditor,0,0);
+ m_pOnConnectEditor->setText(n->onConnectCommand());
+ m_pOnConnectEditor->setMinimumHeight(150);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pOnConnectEditor,__tr2qs_ctx("<center>The following commands will be executed after a connection to a server in this network has been established.<br>" \
+ "<b>Important:</b> Enter commands <b>without</b> a preceding slash (e.g. <tt>quote pass secret</tt> instead of <tt>/quote pass secret</tt>).<br>"\
+ "KVIrc will first send the USER command, then eventually PASS and NICK and then execute this " \
+ "command sequence.</center>","options"));
+#endif
+
+ tw->addTab(tab,__tr2qs_ctx("On Connect","options"));
+
+
+ // after login execute
+ tab = new QWidget(tw);
+ gl = new QGridLayout(tab,1,1,10,4);
+
+ m_pOnLoginEditor = KviScriptEditor::createInstance(tab);
+ gl->addWidget(m_pOnLoginEditor,0,0);
+ m_pOnLoginEditor->setText(n->onLoginCommand());
+
+ m_pOnLoginEditor->setMinimumHeight(150);
+
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pOnLoginEditor,
+ __tr2qs_ctx("<center>The following commands will be executed after a successful login to a server in this network.<br>" \
+ "<b>Important:</b> Enter commands <b>without</b> a preceding slash (e.g. <tt>quote privatelog</tt> instead of <tt>/quote privatelog</tt>).<br>"
+ "This is useful for automatically opening queries, setting variables, etc.</center>","options"));
+#endif
+
+ tw->addTab(tab,__tr2qs_ctx("On Login","options"));
+
+
+ // nick serv rules
+
+ tab = new QWidget(tw);
+ gl = new QGridLayout(tab,3,3,10,5);
+
+ KviNickServRuleSet * rs = n->nickServRuleSet();
+ bool bNickServEnabled = rs ? (rs->isEnabled() && !rs->isEmpty()) : false;
+
+ m_pNickServCheck = new KviStyledCheckBox(__tr2qs_ctx("Enable NickServ Identification","options"),tab);
+ gl->addMultiCellWidget(m_pNickServCheck,0,0,0,2);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pNickServCheck,
+ __tr2qs_ctx("This check enables the automatic identification with NickServ","options"));
+#endif
+ m_pNickServCheck->setChecked(bNickServEnabled);
+
+ m_pNickServListView = new KviTalListView(tab);
+ m_pNickServListView->setSelectionMode(KviTalListView::Single);
+ m_pNickServListView->setAllColumnsShowFocus(true);
+ m_pNickServListView->addColumn(__tr2qs_ctx("Nickname","options"));
+ m_pNickServListView->addColumn(__tr2qs_ctx("NickServ Mask","options"));
+ m_pNickServListView->addColumn(__tr2qs_ctx("NickServ Request Mask","options"));
+ m_pNickServListView->addColumn(__tr2qs_ctx("Identify Command","options"));
+ connect(m_pNickServListView,SIGNAL(selectionChanged()),this,SLOT(enableDisableNickServControls()));
+
+ gl->addMultiCellWidget(m_pNickServListView,1,1,0,2);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pNickServListView,
+ __tr2qs_ctx("<center>This is a list of NickServ identification rules. " \
+ "KVIrc will use them to model its automatic interaction with NickServ on this network.<br>" \
+ "Please be aware that this feature can cause your NickServ passwords to be stolen " \
+ "if used improperly. Make sure that you fully understand the NickServ authentication protocol.<br>" \
+ "In other words, be sure to know what you're doing.<br>" \
+ "Also note that the password that you provide is stored as <b>PLAIN TEXT</b>.</center>","options"));
+#endif
+
+ m_pAddRuleButton = new QPushButton(__tr2qs_ctx("Add Rule","options"),tab);
+ connect(m_pAddRuleButton,SIGNAL(clicked()),this,SLOT(addNickServRule()));
+ gl->addWidget(m_pAddRuleButton,2,0);
+
+
+ m_pEditRuleButton = new QPushButton(__tr2qs_ctx("Edit Rule","options"),tab);
+ connect(m_pEditRuleButton,SIGNAL(clicked()),this,SLOT(editNickServRule()));
+ gl->addWidget(m_pEditRuleButton,2,1);
+
+ m_pDelRuleButton = new QPushButton(__tr2qs_ctx("Delete Rule","options"),tab);
+ connect(m_pDelRuleButton,SIGNAL(clicked()),this,SLOT(delNickServRule()));
+ gl->addWidget(m_pDelRuleButton,2,2);
+
+ connect(m_pNickServCheck,SIGNAL(toggled(bool)),this,SLOT(enableDisableNickServControls()));
+
+ if(rs && rs->rules())
+ {
+ KviPointerList<KviNickServRule> * ll = rs->rules();
+ for(KviNickServRule * rule = ll->first();rule;rule = ll->next())
+ {
+ (void)new KviTalListViewItem(m_pNickServListView,rule->registeredNick(),rule->nickServMask(),rule->messageRegexp(),rule->identifyCommand());
+ }
+ }
+
+ enableDisableNickServControls();
+
+ gl->setRowStretch(1,1);
+
+ tw->addTab(tab,__tr2qs_ctx("NickServ","options"));
+
+ QPushButton * b = new QPushButton(__tr2qs_ctx("&OK","options"),this);
+ b->setMinimumWidth(80);
+ g->addWidget(b,3,2);
+ b->setDefault(true);
+ connect(b,SIGNAL(clicked()),this,SLOT(accept()));
+
+ b = new QPushButton(__tr2qs_ctx("Cancel","options"),this);
+ g->addWidget(b,3,3);
+ b->setMinimumWidth(80);
+ connect(b,SIGNAL(clicked()),this,SLOT(reject()));
+
+
+ g->setRowStretch(2,1);
+ g->setColStretch(1,1);
+
+ tw->setMinimumWidth(375);
+}
+
+
+
+KviNetworkDetailsWidget::~KviNetworkDetailsWidget()
+{
+ if(m_pOnConnectEditor) KviScriptEditor::destroyInstance(m_pOnConnectEditor);
+ if(m_pOnLoginEditor) KviScriptEditor::destroyInstance(m_pOnLoginEditor);
+}
+
+void KviNetworkDetailsWidget::editNickServRule()
+{
+ KviTalListViewItem * it = m_pNickServListView->currentItem();
+ if(!it)return;
+ KviNickServRule r(it->text(0),it->text(1),it->text(2),it->text(3));
+ KviNickServRuleEditor ed(this,false);
+ if(ed.editRule(&r))
+ {
+ it->setText(0,r.registeredNick());
+ it->setText(1,r.nickServMask());
+ it->setText(2,r.messageRegexp());
+ it->setText(3,r.identifyCommand());
+ }
+}
+
+void KviNetworkDetailsWidget::addNickServRule()
+{
+ KviNickServRule r;
+ KviNickServRuleEditor ed(this,false);
+ if(ed.editRule(&r))
+ (void)new KviTalListViewItem(m_pNickServListView,r.registeredNick(),r.nickServMask(),r.messageRegexp(),r.identifyCommand());
+}
+
+void KviNetworkDetailsWidget::delNickServRule()
+{
+ KviTalListViewItem * it = m_pNickServListView->currentItem();
+ if(!it)return;
+ delete it;
+ enableDisableNickServControls();
+}
+
+void KviNetworkDetailsWidget::enableDisableNickServControls()
+{
+ bool bEnabled = m_pNickServCheck->isChecked();
+ m_pNickServListView->setEnabled(bEnabled);
+ m_pAddRuleButton->setEnabled(bEnabled);
+ bEnabled = bEnabled && (m_pNickServListView->childCount() > 0) && m_pNickServListView->currentItem();
+ m_pDelRuleButton->setEnabled(bEnabled);
+ m_pEditRuleButton->setEnabled(bEnabled);
+}
+
+void KviNetworkDetailsWidget::fillData(KviIrcNetwork * n)
+{
+ n->setUserName(m_pUserEditor->text());
+ n->setNickName(m_pNickEditor->text());
+ n->setRealName(m_pRealEditor->text());
+ n->setDescription(m_pDescEditor->text());
+ if(m_pAutoConnectCheck)
+ n->setAutoConnect(m_pAutoConnectCheck->isChecked());
+ if(m_pEncodingEditor)
+ if(m_pEncodingEditor->currentItem() <= 0)n->setEncoding(QString::null);
+ else {
+ KviLocale::EncodingDescription * d = KviLocale::encodingDescription(m_pEncodingEditor->currentItem() - 1);
+ n->setEncoding(d->szName);
+ }
+ if(m_pChannelListSelector)
+ m_pChannelListSelector->commit();
+ if(m_lstChannels.isEmpty())n->setAutoJoinChannelList(0);
+ else n->setAutoJoinChannelList(new QStringList(m_lstChannels));
+ if(m_pNickServListView)
+ {
+ if(m_pNickServListView->childCount() > 0)
+ {
+ KviNickServRuleSet * rs = KviNickServRuleSet::createInstance();
+ rs->setEnabled(m_pNickServCheck->isChecked());
+ KviTalListViewItem * it = m_pNickServListView->firstChild();
+ while(it)
+ {
+ rs->addRule(KviNickServRule::createInstance(it->text(0),it->text(1),it->text(2),it->text(3)));
+ it = it->nextSibling();
+ }
+ n->setNickServRuleSet(rs);
+ } else n->setNickServRuleSet(0);
+ }
+ if(m_pOnConnectEditor)
+ {
+ QString tmp;
+ m_pOnConnectEditor->getText(tmp);
+ n->setOnConnectCommand(tmp);
+ }
+ if(m_pOnLoginEditor)
+ {
+ QString tmp;
+ m_pOnLoginEditor->getText(tmp);
+ n->setOnLoginCommand(tmp);
+ }
+}
+
+
+
+
+
+
+
+KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s)
+ : QDialog(par,"server_details",true)
+{
+ m_szHostname = s->hostName();
+ QGridLayout * g = new QGridLayout(this,4,4,10,4);
+
+ setCaption(__tr2qs_ctx("Server Details","options"));
+ setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SERVER)));
+
+ m_pHeaderLabel = new QLabel("",this); // the text will be set later
+ m_pHeaderLabel->setFrameStyle(QFrame::Raised | QFrame::StyledPanel);
+ m_pHeaderLabel->setAlignment(Qt::AlignCenter);
+ m_pHeaderLabel->setMargin(10);
+ g->addMultiCellWidget(m_pHeaderLabel,0,0,0,3);
+ m_pHeaderLabel->setMinimumWidth(200);
+
+ QLabel * l = new QLabel(__tr2qs_ctx("Description:","options"),this);
+ g->addWidget(l,1,0);
+ m_pDescEditor = new QLineEdit(this);
+ g->addMultiCellWidget(m_pDescEditor,1,1,1,3);
+ m_pDescEditor->setText(s->description());
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pDescEditor,__tr2qs_ctx("<center>This is a brief description of this server. " \
+ "This field has no restrictions but many server lists use it to describe the server's physical location</center>","options"));
+#endif
+
+ // Identity tab
+
+ QTabWidget * tw = new QTabWidget(this);
+ g->addMultiCellWidget(tw,2,2,0,3);
+
+ QWidget * tab = new QWidget(tw);
+ QGridLayout * gl = new QGridLayout(tab,3,1,10,4);
+
+ KviTalGroupBox *gbox = new KviTalGroupBox(2,Qt::Horizontal,__tr2qs_ctx("Properties","options"),tab);
+ gl->addWidget(gbox,0,0);
+
+ l = new QLabel(__tr2qs_ctx("Username:","options"),gbox);
+ m_pUserEditor = new QLineEdit(gbox);
+ m_pUserEditor->setText(s->userName());
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pUserEditor,__tr2qs_ctx("<center>This is the <b>username</b> that KVIrc will use to login to this server.\n" \
+ "If this field is left empty (most common case), KVIrc will first look if an username is specified " \
+ "for the network that this server belongs to, and if that is empty then KVIrc will use the default username " \
+ "specified in the \"Identity\" options tab.</center>","options"));
+#endif
+
+ l = new QLabel(__tr2qs_ctx("Password:","options"),gbox);
+ m_pPassEditor = new QLineEdit(gbox);
+ m_pPassEditor->setEchoMode(QLineEdit::Password);
+ m_pPassEditor->setText(s->password());
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pPassEditor,__tr2qs_ctx("<center>If this server requires a password, put it in this field, otherwise leave it empty.</center>","options"));
+#endif
+
+ l = new QLabel(__tr2qs_ctx("Nickname:","options"),gbox);
+ m_pNickEditor = new QLineEdit(gbox);
+ QValidator * v = new QRegExpValidator(QRegExp("[^-0-9 ][^ ]*"),gbox);
+ m_pNickEditor->setValidator(v);
+ m_pNickEditor->setText(s->nickName());
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pNickEditor,__tr2qs_ctx("<center>You can specify a \"special\" <b>nickname</b> that will be used to log in to this server.<br>" \
+ "If this field is left empty (most common case), KVIrc will first look if a nickname is specified " \
+ "for the network that this server belongs to, and if that is empty then the default nickname (specified in the \"Identity\" settings) will be used.</center>","options"));
+#endif
+
+ l = new QLabel(__tr2qs_ctx("Real name:","options"),gbox);
+ m_pRealEditor = new QLineEdit(gbox);
+ m_pRealEditor->setText(s->realName());
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pRealEditor,__tr2qs_ctx("<center>You can specify a \"special\" <b>real name</b> that will be used to login with this server.<br>" \
+ "If you leave this field empty (most common case), KVIrc will first look if a real name is specified " \
+ "for the network that this server belongs to, and if that is empty the default \"real name\" (specified in the \"Identity\" settings) will be used.</center>","options"));
+#endif
+ gbox = new KviTalGroupBox(1,Qt::Horizontal,__tr2qs_ctx("User Mode","options"),tab);
+ gl->addWidget(gbox,1,0);
+
+ m_pUseDefaultInitUMode = new KviStyledCheckBox(__tr2qs_ctx("Use default user mode","options"),gbox);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pUseDefaultInitUMode,__tr2qs_ctx("<center>If this is enabled, the global initial <b>user mode</b> (configured from"\
+ " the identity dialog) will be used. If disabled, you can configure an initial user mode for this server","options"));
+#endif
+ bool bHasUmode = !(s->initUMode().isEmpty());
+ KviStr szDefUMode = KVI_OPTION_STRING(KviOption_stringDefaultUserMode);
+ m_pUseDefaultInitUMode->setChecked(!bHasUmode);
+ connect(m_pUseDefaultInitUMode,SIGNAL(toggled(bool)),this,SLOT(useDefaultInitUModeToggled(bool)));
+
+ m_pIMode = new KviStyledCheckBox(__tr2qs_ctx("Invisible (+i)","options"),gbox);
+ m_pIMode->setEnabled(bHasUmode);
+ m_pIMode->setChecked(bHasUmode ? s->initUMode().contains('i',false) : szDefUMode.contains('i',false));
+
+ m_pSMode = new KviStyledCheckBox(__tr2qs_ctx("Server notices (+s)","options"),gbox);
+ m_pSMode->setEnabled(bHasUmode);
+ m_pSMode->setChecked(bHasUmode ? s->initUMode().contains('s',false) : szDefUMode.contains('s',false));
+
+ m_pWMode = new KviStyledCheckBox(__tr2qs_ctx("Wallops (+w)","options"),gbox);
+ m_pWMode->setEnabled(bHasUmode);
+ m_pWMode->setChecked(bHasUmode ? s->initUMode().contains('w',false) : szDefUMode.contains('w',false));
+
+ l = new QLabel("",tab);
+ gl->addWidget(l,2,0);
+
+ gl->setRowStretch(2,1);
+ //gl->setColStretch(1,1);
+
+ tw->addTab(tab,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_WHO)),__tr2qs_ctx("Identity","options"));
+
+ // Connection tab
+
+ tab = new QWidget(tw);
+ gl = new QGridLayout(tab,11,1,10,4);
+
+ l = new QLabel(__tr2qs_ctx("Port:","options"),tab);
+ gl->addWidget(l,0,0);
+
+
+ m_pPortEditor = new QLineEdit(tab);
+ gl->addWidget(m_pPortEditor,0,1);
+ QString tmpz;
+ tmpz.setNum(s->port());
+ m_pPortEditor->setText(tmpz);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pPortEditor,__tr2qs_ctx("<center>This is the default <b>port</b> that this server will be contacted on.<br>Usually <b>6667</b> is OK.</center>","options"));
+#endif
+ connect(m_pPortEditor,SIGNAL(textChanged(const QString &)),this,SLOT(portEditorTextChanged(const QString &)));
+
+
+
+ l = new QLabel(__tr2qs_ctx("IP address:","options"),tab);
+ gl->addWidget(l,1,0);
+ m_pIpEditor = new KviIpEditor(tab,KviIpEditor::IpV4);
+ gl->addWidget(m_pIpEditor,1,1);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pIpEditor,__tr2qs_ctx("<center>This is the <b>IP address</b> of this server, it is here for caching purposes.<br>" \
+ "If you leave this field empty, KVIrc will fill it in the first time it connects to the server. " \
+ "If you enable the \"cache IP address\" option below, KVIrc will use it as a \"cached result\" " \
+ "and avoid looking it up again.</center>","options"));
+#endif
+#ifdef COMPILE_IPV6_SUPPORT
+ m_pIpEditor->setAddressType(s->isIpV6() ? KviIpEditor::IpV6 : KviIpEditor::IpV4);
+#else
+ m_pIpEditor->setAddressType(KviIpEditor::IpV4);
+#endif
+
+ if(!m_pIpEditor->setAddress(s->m_szIp))
+ {
+#ifdef COMPILE_IPV6_SUPPORT
+ m_pIpEditor->setAddress(s->isIpV6() ? "0:0:0:0:0:0:0:0" : "0.0.0.0");
+#else
+ m_pIpEditor->setAddress("0.0.0.0");
+#endif
+ }
+
+ m_pCacheIpCheck = new KviStyledCheckBox(__tr2qs_ctx("Cache IP address","options"),tab);
+ gl->addMultiCellWidget(m_pCacheIpCheck,2,2,0,1);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pCacheIpCheck,__tr2qs_ctx("<center>This check will enable <b>IP address caching</b> for this server:<br>" \
+ "DNS lookups can be time-consuming and might be blocking on some platforms; " \
+ "this option will cause KVIrc to look up the server hostname only once.<br><br> " \
+ "Advanced: you can also use this option to force a certain server name to resolve " \
+ "to a fixed ip address when either the dns for that server is temporairly " \
+ "unreachable or you want to avoid the round-robin lookups.</center>","options"));
+#endif
+ m_pCacheIpCheck->setChecked(s->cacheIp());
+
+
+ m_pUseIPV6Check = new KviStyledCheckBox(__tr2qs_ctx("Use IPv6 protocol","options"),tab);
+ gl->addMultiCellWidget(m_pUseIPV6Check,3,3,0,1);
+#ifdef COMPILE_IPV6_SUPPORT
+ m_pUseIPV6Check->setChecked(s->isIpV6());
+#else
+ m_pUseIPV6Check->setEnabled(false);
+#endif
+ connect(m_pUseIPV6Check,SIGNAL(toggled(bool)),this,SLOT(useIPV6CheckToggled(bool)));
+
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pUseIPV6Check,__tr2qs_ctx("<center>This check identifies IPv6 servers.<br>If enabled, KVIrc will attempt to use the IPv6 protocol " \
+ "(thus your OS <b>must</b> have a working IPv6 stack and you <b>must</b> have an IPv6 connection).</center>","options"));
+#endif
+
+
+ m_pUseSSLCheck = new KviStyledCheckBox(__tr2qs_ctx("Use SSL protocol","options"),tab);
+ gl->addMultiCellWidget(m_pUseSSLCheck,4,4,0,1);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pUseSSLCheck,__tr2qs_ctx("<center>This check will cause the connection to use the <b>Secure Socket Layer</b> " \
+ "encryption support. Obviously, this server must have support for this, too. :)</center>","options"));
+#endif
+#ifndef COMPILE_SSL_SUPPORT
+ m_pUseSSLCheck->setEnabled(false);
+#endif
+ m_pUseSSLCheck->setChecked(s->useSSL());
+
+
+ m_pUseAutoConnect = new KviStyledCheckBox(__tr2qs_ctx("Connect to this server at startup","options"),tab);
+ m_pUseAutoConnect->setChecked(s->autoConnect());
+
+ gl->addMultiCellWidget(m_pUseAutoConnect,5,5,0,1);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pUseAutoConnect,__tr2qs_ctx("<center>This option will cause KVIrc to connect to the IRC server when it is started.</center>","options"));
+#endif
+
+ l = new QLabel(__tr2qs_ctx("Encoding:","options"),tab);
+ gl->addWidget(l,6,0);
+ m_pEncodingEditor = new QComboBox(false,tab);
+ m_pEncodingEditor->setDuplicatesEnabled(false);
+ gl->addWidget(m_pEncodingEditor,6,1);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pEncodingEditor,__tr2qs_ctx("<center>This box allows you to choose the preferred encoding for this sever. " \
+ "If you choose \"Use Network Encoding\" then the encoding will be inherited from the " \
+ "network that this server belongs to.</center>","options"));
+#endif
+
+ int i = 0;
+ int current = 0;
+ KviLocale::EncodingDescription * d = KviLocale::encodingDescription(i);
+ QString tmp;
+ m_pEncodingEditor->insertItem(__tr2qs_ctx("Use Network Encoding","options"));
+ while(d->szName)
+ {
+ KviQString::sprintf(tmp,"%s (%s)",d->szName,d->szDescription);
+ m_pEncodingEditor->insertItem(tmp);
+ if(KviQString::equalCI(d->szName,s->encoding()))current = i + 1;
+ i = i + 1;
+ d = KviLocale::encodingDescription(i);
+ }
+
+ m_pEncodingEditor->setCurrentItem(current);
+
+
+ l = new QLabel(__tr2qs_ctx("Link filter:","options"),tab);
+ gl->addWidget(l,7,0);
+ m_pLinkFilterEditor = new QComboBox(true,tab);
+ m_pLinkFilterEditor->setDuplicatesEnabled(false);
+ gl->addWidget(m_pLinkFilterEditor,7,1);
+
+ m_pLinkFilterEditor->insertItem("");
+
+ g_pModuleManager->loadModulesByCaps("linkfilter");
+ KviModuleExtensionDescriptorList * mexl = KviModuleExtensionManager::instance()->getExtensionList("linkfilter");
+
+
+
+ if(mexl)
+ {
+ for(KviModuleExtensionDescriptor * d = mexl->first();d;d = mexl->next())
+ m_pLinkFilterEditor->insertItem(d->name().ptr());
+ } else {
+ if(!s->linkFilter().isEmpty())
+ m_pLinkFilterEditor->insertItem(s->linkFilter());
+ }
+
+ if(!s->linkFilter().isEmpty())
+ m_pLinkFilterEditor->setCurrentText(s->linkFilter());
+ else
+ m_pLinkFilterEditor->setCurrentText("");
+
+
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pLinkFilterEditor,__tr2qs_ctx("<center>This field specifies the name of a module that exports a link filter for this type of server.<br>" \
+ "For plain IRC connections, you don't need any link filters; this is used for incompatible protocols.</center>","options"));
+#endif
+
+ l = new QLabel(__tr2qs_ctx("Id:","options"),tab);
+ gl->addWidget(l,8,0);
+ m_pIdEditor = new QLineEdit(tab);
+ if(s->id().isEmpty())s->generateUniqueId();
+ m_pIdEditor->setText(s->id());
+ gl->addWidget(m_pIdEditor,8,1);
+
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pIdEditor,__tr2qs_ctx("<center>This field allows you to specify a really unique id for this server. " \
+ "You will then be able to use /server -x &lt;this_id&gt; to make the connection. This is especially " \
+ "useful when you have multiple server entries with the same hostname and port in different networks (bouncers?)</center>","options"));
+#endif
+
+
+ l = new QLabel(__tr2qs_ctx("Proxy server:","options"),tab);
+ gl->addWidget(l,9,0);
+ m_pProxyEditor = new QComboBox(tab);
+ gl->addWidget(m_pProxyEditor,9,1);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pProxyEditor,__tr2qs_ctx("<center>This is the <b>proxy</b> that KVIrc will use to connect to thos server.\n" \
+ "If this field is set in \"Default\" KVirc will use global proxy settings, if it is set in \"Direct connection\" " \
+ "KVirc will connect to this server without proxy. You can define new proxy server in global options' \"Proxy servers\" menu.</center>","options"));
+#endif
+
+ m_pProxyEditor->insertItem(__tr2qs_ctx("Default","options"));
+ m_pProxyEditor->insertItem(__tr2qs_ctx("Direct connection","options"));
+
+ KviPointerList<KviProxy> * proxylist = g_pProxyDataBase->proxyList();
+ for(KviProxy * p = proxylist->first();p;p = proxylist->next())
+ {
+ m_pProxyEditor->insertItem(QString("%1:%2").arg(p->hostname()).arg(p->port()));
+ }
+ if(m_pProxyEditor->count() > (s->proxy()+2))
+ m_pProxyEditor->setCurrentItem(s->proxy()+2);
+
+
+ l = new QLabel("",tab);
+ gl->addMultiCellWidget(l,10,10,0,1);
+
+ gl->setRowStretch(10,1);
+
+ tw->addTab(tab,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SOCKETWARNING)),__tr2qs_ctx("Connection","options"));
+
+ // after login join channels
+ tab = new QWidget(tw);
+
+ gl = new QGridLayout(tab,1,1,10,4);
+
+ if(s->autoJoinChannelList())
+ m_lstChannels = *(s->autoJoinChannelList());
+ m_pChannelListSelector = new KviCahnnelListSelector(tab,
+ __tr2qs_ctx("Channels to join automatically upon connect:","options"),&m_lstChannels,true);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pChannelListSelector,__tr2qs_ctx("<center>Here you can set a list of channels to be joined automatically " \
+ "after a connection to this server has been established. To add a channel, type its name in the " \
+ "text input below and click \"<b>Add</b>\".</center>","options"));
+#endif
+ gl->addWidget(m_pChannelListSelector,0,0);
+
+ tw->addTab(tab,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL)),__tr2qs_ctx("Join Channels","options"));
+
+ // after connect execute
+ tab = new QWidget(tw);
+ gl = new QGridLayout(tab,1,1,10,4);
+
+
+ m_pOnConnectEditor = KviScriptEditor::createInstance(tab);
+ gl->addWidget(m_pOnConnectEditor,0,0);
+ m_pOnConnectEditor->setText(s->onConnectCommand());
+ m_pOnConnectEditor->setMinimumHeight(150);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pOnConnectEditor,__tr2qs_ctx("<center>The following commands will be executed after a connection has been established.<br>" \
+ "<b>Important:</b> Enter commands <b>without</b> a preceding slash (e.g. <tt>quote pass secret</tt> instead of <tt>/quote pass secret</tt>).<br>"\
+ "KVIrc will first send the USER command, then eventually PASS and NICK and then execute this " \
+ "command sequence.<br>This is particularly useful for IRC bouncers that require login commands.</center>","options"));
+#endif
+
+ tw->addTab(tab,__tr2qs_ctx("On Connect","options"));
+ // after login execute
+
+ tab = new QWidget(tw);
+ gl = new QGridLayout(tab,1,1,10,4);
+
+ m_pOnLoginEditor = KviScriptEditor::createInstance(tab);
+ gl->addWidget(m_pOnLoginEditor,0,0);
+ m_pOnLoginEditor->setText(s->onLoginCommand());
+
+ m_pOnLoginEditor->setMinimumHeight(150);
+
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pOnLoginEditor,
+ __tr2qs_ctx("<center>The following commands will be executed after a successful login to this server.<br>" \
+ "<b>Important:</b> Enter commands <b>without</b> a preceding slash (e.g. <tt>quote privatelog</tt> instead of <tt>/quote privatelog</tt>).<br>"
+ "This is useful for automatically opening queries, setting variables, etc.</center>","options"));
+#endif
+
+ tw->addTab(tab,__tr2qs_ctx("On Login","options"));
+
+ QPushButton * b = new QPushButton(__tr2qs_ctx("OK","options"),this);
+ b->setMinimumWidth(80);
+ g->addWidget(b,3,2);
+ b->setDefault(true);
+ connect(b,SIGNAL(clicked()),this,SLOT(accept()));
+
+ b = new QPushButton(__tr2qs_ctx("Cancel","options"),this);
+ g->addWidget(b,3,3);
+ b->setMinimumWidth(80);
+ connect(b,SIGNAL(clicked()),this,SLOT(reject()));
+
+ g->setRowStretch(2,1);
+ g->setColStretch(1,1);
+
+ tw->setMinimumWidth(390);
+
+ setHeaderLabelText();
+}
+
+KviServerDetailsWidget::~KviServerDetailsWidget()
+{
+ if(m_pOnConnectEditor) KviScriptEditor::destroyInstance(m_pOnConnectEditor);
+ if(m_pOnLoginEditor) KviScriptEditor::destroyInstance(m_pOnLoginEditor);
+}
+
+void KviServerDetailsWidget::useIPV6CheckToggled(bool)
+{
+#ifdef COMPILE_IPV6_SUPPORT
+ m_pIpEditor->setAddressType(m_pUseIPV6Check->isChecked() ? KviIpEditor::IpV6 : KviIpEditor::IpV4);
+#else
+ m_pIpEditor->setAddressType(KviIpEditor::IpV4);
+#endif
+ setHeaderLabelText();
+}
+
+void KviServerDetailsWidget::portEditorTextChanged(const QString &)
+{
+ setHeaderLabelText();
+}
+
+void KviServerDetailsWidget::setHeaderLabelText()
+{
+ QString szTmp = "<font size=\"+1\"><b>irc";
+ if(m_pUseIPV6Check->isChecked())szTmp += "6";
+ szTmp += "://";
+ szTmp += m_szHostname;
+ szTmp += ":";
+
+ bool bOk;
+
+ QString num = m_pPortEditor->text();
+ unsigned int uPort = num.toUInt(&bOk);
+ if(!bOk)uPort = 6667;
+ num.setNum(uPort);
+ szTmp += num;
+ szTmp += "</b></font>";
+
+ m_pHeaderLabel->setText(szTmp);
+}
+
+void KviServerDetailsWidget::fillData(KviIrcServer * s)
+{
+ s->setUserName(m_pUserEditor->text());
+ s->setPassword(m_pPassEditor->text());
+ s->setNickName(m_pNickEditor->text());
+ s->setRealName(m_pRealEditor->text());
+ if(m_pDescEditor)
+ s->setDescription(m_pDescEditor->text());
+ if(m_pLinkFilterEditor)
+ s->setLinkFilter(m_pLinkFilterEditor->lineEdit()->text());
+ if(m_pEncodingEditor)
+ if(m_pEncodingEditor->currentItem() <= 0)s->m_szEncoding = "";
+ else {
+ KviLocale::EncodingDescription * d = KviLocale::encodingDescription(m_pEncodingEditor->currentItem() - 1);
+ s->m_szEncoding = d->szName;
+ }
+ s->setIpAddress("");
+ if(m_pCacheIpCheck)
+ s->setCacheIp(m_pCacheIpCheck->isChecked());
+ if(m_pUseSSLCheck)
+ s->setUseSSL(m_pUseSSLCheck->isChecked());
+ if(m_pIdEditor)
+ s->setId(m_pIdEditor->text());
+ if(s->id().isEmpty())s->generateUniqueId();
+
+ if(m_pUseDefaultInitUMode)
+ {
+ KviStr szUMode;
+ if(!m_pUseDefaultInitUMode->isChecked())
+ {
+ if(m_pIMode->isChecked())szUMode.append('i');
+ if(m_pWMode->isChecked())szUMode.append('w');
+ if(m_pSMode->isChecked())szUMode.append('s');
+ }
+ s->setInitUMode(szUMode.ptr());
+ }
+
+ QString tmp = m_pPortEditor->text();
+ bool bOk;
+ kvi_u32_t uPort = tmp.toUInt(&bOk);
+ if(!bOk)uPort = 6667;
+ s->m_uPort = uPort;
+#ifdef COMPILE_IPV6_SUPPORT
+ s->setIpV6(m_pUseIPV6Check->isChecked());
+#else
+ s->setIpV6(false);
+#endif
+
+ if(m_pIpEditor)
+ {
+ KviStr tmpAddr = m_pIpEditor->address();
+
+ if(!m_pIpEditor->hasEmptyFields())
+ {
+#ifdef COMPILE_IPV6_SUPPORT
+ if(s->isIpV6())
+ {
+ if((!kvi_strEqualCI(tmpAddr.ptr(),"0:0:0:0:0:0:0:0")) && kvi_isValidStringIp_V6(tmpAddr.ptr()))
+ {
+ s->setIpAddress(tmpAddr.ptr());
+ } else {
+ s->setCacheIp(false);
+ s->setIpAddress("");
+ }
+ } else {
+#endif
+ if((!kvi_strEqualCI(tmpAddr.ptr(),"0.0.0.0")) && kvi_isValidStringIp(tmpAddr.ptr()))
+ {
+ s->setIpAddress(tmpAddr.ptr());
+ } else {
+ s->setCacheIp(false);
+ s->setIpAddress("");
+ }
+#ifdef COMPILE_IPV6_SUPPORT
+ }
+#endif
+ } else {
+ s->setCacheIp(false);
+ s->setIpAddress("");
+ }
+ }
+ if(m_pOnConnectEditor)
+ {
+ QString tmp;
+ m_pOnConnectEditor->getText(tmp);
+ s->setOnConnectCommand(tmp);
+ }
+ if(m_pOnLoginEditor)
+ {
+ QString tmp;
+ m_pOnLoginEditor->getText(tmp);
+ s->setOnLoginCommand(tmp);
+ }
+ if(m_pChannelListSelector)
+ m_pChannelListSelector->commit();
+ if(m_lstChannels.isEmpty())s->setAutoJoinChannelList(0);
+ else s->setAutoJoinChannelList(new QStringList(m_lstChannels));
+ if(m_pUseAutoConnect)
+ s->setAutoConnect(m_pUseAutoConnect->isChecked());
+ if(m_pProxyEditor)
+ s->setProxy(m_pProxyEditor->currentItem()-2);
+}
+
+void KviServerDetailsWidget::useDefaultInitUModeToggled(bool b)
+{
+ m_pIMode->setEnabled(!b);
+ m_pWMode->setEnabled(!b);
+ m_pSMode->setEnabled(!b);
+}
+
+// kvi_app.cpp
+extern KVIRC_API KviIrcServerDataBase * g_pIrcServerDataBase;
+
+KviServerOptionsListViewItem::KviServerOptionsListViewItem(KviTalListView *parent,const QPixmap &pm,const KviIrcNetwork *n)
+ : KviTalListViewItem(parent)
+{
+ setPixmap(0,pm);
+ m_pServerData = 0;
+ m_pNetworkData = new KviIrcNetwork(*n);
+ setText(0,n->name());
+ setText(1,n->description());
+}
+
+KviServerOptionsListViewItem::KviServerOptionsListViewItem(KviTalListViewItem *parent,const QPixmap &pm,const KviIrcServer *s)
+ : KviTalListViewItem(parent)
+{
+ setPixmap(0,pm);
+ m_pServerData = new KviIrcServer(*s);
+ setText(0,s->hostName());
+ setText(1,s->description());
+ m_pNetworkData = 0;
+}
+
+KviServerOptionsListViewItem::~KviServerOptionsListViewItem()
+{
+ if(m_pServerData)delete m_pServerData;
+ if(m_pNetworkData)delete m_pNetworkData;
+}
+
+void KviServerOptionsListViewItem::updateVisibleStrings()
+{
+ if(m_pNetworkData)
+ {
+ setText(0,m_pNetworkData->name());
+ setText(1,m_pNetworkData->description());
+ return;
+ }
+ if(m_pServerData)
+ {
+ setText(0,m_pServerData->hostName());
+ setText(1,m_pServerData->description());
+ }
+}
+
+
+
+
+
+
+
+
+KviServerOptionsWidget::KviServerOptionsWidget(QWidget * parent)
+ : KviOptionsWidget(parent,"server_options_widget")
+{
+ createLayout(4,2);
+
+ m_pContextPopup = new KviTalPopupMenu(this);
+ m_pImportPopup = new KviTalPopupMenu(this);
+
+ connect(m_pImportPopup,SIGNAL(aboutToShow()),this,SLOT(importPopupAboutToShow()));
+ connect(m_pImportPopup,SIGNAL(activated(int)),this,SLOT(importPopupActivated(int)));
+
+ m_pServerDetailsDialog = 0;
+ m_pNetworkDetailsDialog = 0;
+ m_pImportFilter = 0;
+
+ m_pListView = new KviTalListView(this);
+ addWidgetToLayout(m_pListView,0,0,0,0);
+ m_pListView->addColumn(__tr2qs_ctx("Server","options"));
+ m_pListView->addColumn(__tr2qs_ctx("Description","options"));
+ m_pListView->setRootIsDecorated(true);
+ m_pListView->setAllColumnsShowFocus(true);
+ m_pListView->setSelectionMode(KviTalListView::Single);
+ connect(m_pListView,SIGNAL(selectionChanged(KviTalListViewItem *)),
+ this,SLOT(listViewItemSelectionChanged(KviTalListViewItem *)));
+ connect(m_pListView,SIGNAL(rightButtonPressed(KviTalListViewItem *,const QPoint &,int)),
+ this,SLOT(listViewRightButtonPressed(KviTalListViewItem *,const QPoint &,int)));
+ connect(m_pListView,SIGNAL(doubleClicked(KviTalListViewItem*, const QPoint&, int )),
+ this,SLOT(detailsClicked()));
+
+#ifdef COMPILE_INFO_TIPS
+ QString tiptxt = __tr2qs_ctx("<center>This is the list of available IRC servers.<br>" \
+ "Right-click on the list to add or remove servers and perform other actions.<br>"\
+ "Double-click on a item for advanced options.</center>","options");
+ KviTalToolTip::add(m_pListView,tiptxt);
+ KviTalToolTip::add(m_pListView->viewport(),tiptxt);
+#endif
+
+ KviTalVBox * vbox = new KviTalVBox(this);
+ addWidgetToLayout(vbox,1,0,1,0);
+
+ m_pNewNetworkButton = new KviStyledToolButton(vbox);
+ m_pNewNetworkButton->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_WORLD)));
+ m_pNewNetworkButton->setAutoRaise(true);
+ connect(m_pNewNetworkButton,SIGNAL(clicked()),this,SLOT(newNetwork()));
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pNewNetworkButton,__tr2qs_ctx("New Network","options"));
+#endif
+
+ m_pNewServerButton = new KviStyledToolButton(vbox);
+ m_pNewServerButton->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SERVER)));
+ m_pNewServerButton->setAutoRaise(true);
+ connect(m_pNewServerButton,SIGNAL(clicked()),this,SLOT(newServer()));
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pNewServerButton,__tr2qs_ctx("New Server","options"));
+#endif
+
+ m_pRemoveButton = new KviStyledToolButton(vbox);
+ m_pRemoveButton->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CUT)));
+ m_pRemoveButton->setEnabled(false);
+ m_pRemoveButton->setAutoRaise(true);
+ connect(m_pRemoveButton,SIGNAL(clicked()),this,SLOT(removeCurrent()));
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pRemoveButton,__tr2qs_ctx("Remove Network/Server","options"));
+#endif
+
+ QFrame * f = new QFrame(vbox);
+ f->setFrameStyle(QFrame::Sunken | QFrame::HLine);
+
+ m_pCopyServerButton = new KviStyledToolButton(vbox);
+ m_pCopyServerButton->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_COPY)));
+ m_pCopyServerButton->setEnabled(false);
+ m_pCopyServerButton->setAutoRaise(true);
+ connect(m_pCopyServerButton,SIGNAL(clicked()),this,SLOT(copyServer()));
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pCopyServerButton,__tr2qs_ctx("Copy Server","options"));
+#endif
+
+ m_pPasteServerButton = new KviStyledToolButton(vbox);
+ m_pPasteServerButton->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_PASTE)));
+ m_pPasteServerButton->setEnabled(false);
+ m_pPasteServerButton->setAutoRaise(true);
+ connect(m_pPasteServerButton,SIGNAL(clicked()),this,SLOT(pasteServer()));
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pPasteServerButton,__tr2qs_ctx("Paste Server","options"));
+#endif
+
+ f = new QFrame(vbox);
+ f->setFrameStyle(QFrame::Sunken | QFrame::HLine);
+
+ m_pImportButton = new KviStyledToolButton(vbox);
+ m_pImportButton->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_FOLDER)));
+ m_pImportButton->setAutoRaise(true);
+ m_pImportButton->setPopup(m_pImportPopup);
+ m_pImportButton->setPopupDelay(1);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pImportButton,__tr2qs_ctx("Import List","options"));
+#endif
+
+ QFrame * lll = new QFrame(vbox);
+ vbox->setStretchFactor(lll,100);
+
+ KviTalGroupBox *gbox = addGroupBox(0,1,1,1,3,Qt::Horizontal,__tr2qs_ctx("Active Configuration","options"));
+ m_pSrvNetLabel = new QLabel(__tr2qs_ctx("Server:","options"),gbox);
+
+ m_pSrvNetEdit = new QLineEdit(gbox);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pSrvNetEdit,__tr2qs_ctx("<center>This is the name of the currently selected server or network</center>","options"));
+#endif
+
+/*
+ m_pIpV6Check = new KviStyledCheckBox(__tr2qs_ctx("Use IPv6 protocol","options"),gbox);
+
+#ifndef COMPILE_IPV6_SUPPORT
+ m_pIpV6Check->setEnabled(false);
+#endif
+
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pIpV6Check,__tr2qs_ctx("<center>This check identifies IPv6 servers.<br>If enabled, KVIrc will attempt to use the IPv6 protocol " \
+ "(thus your OS <b>must</b> have a working IPv6 stack and you <b>must</b> have an IPv6 connection).</center>","options"));
+#endif
+
+ m_pPortLabel = new QLabel(__tr2qs_ctx("Port:","options"),gbox);
+
+ m_pPortEdit = new QLineEdit(gbox);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pPortEdit,__tr2qs_ctx("<center>This is the default <b>port</b> that this server will be contacted on.<br>Usually <b>6667</b> is OK.</center>","options"));
+#endif
+*/
+
+ m_pDetailsButton = new QPushButton(__tr2qs_ctx("Advanced...","options"),gbox);
+ connect(m_pDetailsButton,SIGNAL(clicked()),this,SLOT(detailsClicked()));
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pDetailsButton,__tr2qs_ctx("<center>Click here to edit advanced options for this entry</center>","options"));
+#endif
+
+ m_pConnectCurrent = new QPushButton(__tr2qs_ctx("Connect &Now","options"),this);
+ addWidgetToLayout(m_pConnectCurrent,0,2,0,2);
+ connect(m_pConnectCurrent,SIGNAL(clicked()),this,SLOT(connectCurrentClicked()));
+
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(m_pConnectCurrent,__tr2qs_ctx("<center>Hit this button to connect to the currently selected server.</center>","options"));
+#endif
+
+ m_pRecentPopup = new KviTalPopupMenu(this);
+ connect(m_pRecentPopup,SIGNAL(aboutToShow()),this,SLOT(recentServersPopupAboutToShow()));
+ connect(m_pRecentPopup,SIGNAL(activated(int)),this,SLOT(recentServersPopupClicked(int)));
+
+ QToolButton * tb = new KviStyledToolButton(this);
+ addWidgetToLayout(tb,1,2,1,2);
+ tb->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)));
+ tb->setPopup(m_pRecentPopup);
+ tb->setPopupDelay(1);
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(tb,__tr2qs_ctx("<center>This button shows a list of recently used servers. It allows you to quickly find them in the list.</center>","options"));
+#endif
+
+
+ KviBoolSelector * b = addBoolSelector(0,3,1,3,__tr2qs_ctx("Show this dialog at startup","options"),KviOption_boolShowServersConnectDialogOnStart);
+
+#ifdef COMPILE_INFO_TIPS
+ KviTalToolTip::add(b,__tr2qs_ctx("<center>If this option is enabled, the Servers dialog will appear every time you start KVIrc</center>","options"));
+#endif
+
+ // KviBoolSelector * c = addBoolSelector(0,6,2,6,__tr("Close after connection","options"),KviOption_boolCloseServerWidgetAfterConnect);
+
+ m_pLastEditedItem = 0;
+
+ m_pClipboard = 0;
+
+ fillServerList();
+
+ layout()->setRowStretch(0,1);
+ //layout()->setColStretch(1,5);
+ //layout()->setColStretch(2,2);
+ layout()->setColStretch(0,1);
+ setMinimumWidth(320);
+}
+
+KviServerOptionsWidget::~KviServerOptionsWidget()
+{
+ if(m_pImportFilter)
+ {
+ disconnect(m_pImportFilter,0,this,0);
+ m_pImportFilter->die();
+ m_pImportFilter = 0;
+ }
+
+ if(m_pClipboard)delete m_pClipboard;
+ if(m_pServerDetailsDialog)delete m_pServerDetailsDialog;
+ if(m_pNetworkDetailsDialog)delete m_pNetworkDetailsDialog;
+}
+
+void KviServerOptionsWidget::recentServersPopupAboutToShow()
+{
+ g_pApp->fillRecentServersPopup(m_pRecentPopup);
+}
+
+void KviServerOptionsWidget::recentServersPopupClicked(int id)
+{
+ KviStr data = m_pRecentPopup->text(id);
+ data.cutToFirst('/');
+ while(data.firstCharIs('/'))data.cutLeft(1);
+ data.cutFromLast(':');
+ data.replaceAll("/","");
+ // we should have a full server name now , with no port
+
+ KviStr port = m_pRecentPopup->text(id);
+ port.cutToLast(':');
+ bool bOk;
+ kvi_u32_t uPort = port.toUInt(&bOk);
+ // we have the port too
+
+ KviTalListViewItem * pFoundNet = 0;
+ KviTalListViewItem * pFoundSrv = 0;
+
+ for(KviTalListViewItem * net = m_pListView->firstChild();net;net = net->nextSibling())
+ {
+ for(KviTalListViewItem * srv = net->firstChild();srv;srv = srv->nextSibling())
+ {
+ KviStr tmp = ((KviServerOptionsListViewItem *)srv)->m_pServerData->hostName();
+ if(kvi_strEqualCI(tmp.ptr(),data.ptr()))
+ {
+ if(((KviServerOptionsListViewItem *)srv)->m_pServerData->port() == uPort)
+ {
+ net->setOpen(true);
+ m_pListView->setCurrentItem(srv);
+ m_pListView->ensureItemVisible(srv);
+ return;
+ } else {
+ if(!pFoundNet)
+ {
+ // the port doesn't match.. check for
+ // another entry with the correct port
+ // but keep track of this entry in case we don't find it
+ pFoundNet = srv;
+ pFoundSrv = net;
+ }
+ }
+ }
+ }
+ }
+
+ // fallback to the server with the wrong port
+ if(pFoundNet)
+ {
+ pFoundNet->setOpen(true);
+ m_pListView->setCurrentItem(pFoundSrv);
+ m_pListView->ensureItemVisible(pFoundSrv);
+ }
+}
+
+
+void KviServerOptionsWidget::connectCurrentClicked()
+{
+ saveLastItem();
+ commit();
+ KviStr szServer = m_pSrvNetEdit->text();
+ if(szServer.isEmpty())return;
+ KviKvsScript::run("server -u",g_pApp->activeConsole());
+}
+
+
+void KviServerOptionsWidget::fillServerList()
+{
+ KviServerOptionsListViewItem * net;
+ KviServerOptionsListViewItem * srv;
+ KviServerOptionsListViewItem * cur = 0;
+
+ KviPointerHashTableIterator<QString,KviIrcServerDataBaseRecord> it(*(g_pIrcServerDataBase->recordDict()));
+
+ while(KviIrcServerDataBaseRecord * r = it.current())
+ {
+ net = new KviServerOptionsListViewItem(m_pListView,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_WORLD)),r->network());
+ KviPointerList<KviIrcServer> * sl = r->serverList();
+ bool bCurrent = r->network()->name() == g_pIrcServerDataBase->currentNetworkName().utf8().data();
+ net->setOpen(bCurrent);
+ for(KviIrcServer * s = sl->first();s;s = sl->next())
+ {
+ srv = new KviServerOptionsListViewItem(net,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SERVER)),s);
+
+ if((s == r->currentServer()) && bCurrent)
+ {
+ m_pListView->setSelected(srv,true);
+ cur = srv;
+ }
+ }
+ ++it;
+ }
+ if(cur)m_pListView->ensureItemVisible(cur);
+}
+
+void KviServerOptionsWidget::listViewItemSelectionChanged(KviTalListViewItem *it)
+{
+ saveLastItem();
+ m_pLastEditedItem = (KviServerOptionsListViewItem *)it;
+
+ if(m_pLastEditedItem)
+ {
+ m_pSrvNetLabel->setEnabled(true);
+ m_pSrvNetEdit->setEnabled(true);
+ m_pDetailsButton->setEnabled(true);
+ m_pConnectCurrent->setEnabled(m_pLastEditedItem->m_pServerData);
+
+ m_pRemoveButton->setEnabled(true);
+ m_pCopyServerButton->setEnabled(m_pLastEditedItem->m_pServerData);
+
+ if(m_pLastEditedItem->m_pServerData)
+ {
+ m_pSrvNetLabel->setText(__tr2qs_ctx("Server:","options"));
+ m_pSrvNetEdit->setText(m_pLastEditedItem->m_pServerData->m_szHostname);
+ } else {
+ m_pSrvNetLabel->setText(__tr2qs_ctx("Network:","options"));
+ m_pSrvNetEdit->setText(it->text(0));
+ }
+ } else {
+ m_pRemoveButton->setEnabled(false);
+ m_pCopyServerButton->setEnabled(true);
+
+ m_pConnectCurrent->setEnabled(false);
+ m_pSrvNetLabel->setEnabled(false);
+ m_pSrvNetEdit->setEnabled(false);
+ m_pSrvNetEdit->setText(__tr2qs_ctx("No selection","options"));
+ m_pDetailsButton->setEnabled(false);
+ }
+}
+
+
+
+void KviServerOptionsWidget::saveLastItem()
+{
+ if(!m_pLastEditedItem)return;
+ if(m_pLastEditedItem->m_pServerData)
+ {
+ KviStr tmp = m_pSrvNetEdit->text();
+ if(tmp.isEmpty())tmp = "irc.unknown.net";
+ m_pLastEditedItem->m_pServerData->m_szHostname = tmp;
+ m_pLastEditedItem->updateVisibleStrings();
+ } else if(m_pLastEditedItem->m_pNetworkData)
+ {
+ QString tmp = m_pSrvNetEdit->text();
+ if(tmp.isEmpty())tmp = __tr2qs_ctx("UnknownNet","options");
+ m_pLastEditedItem->m_pNetworkData->setName(tmp);
+ m_pLastEditedItem->updateVisibleStrings();
+ }
+}
+
+void KviServerOptionsWidget::commit()
+{
+ saveLastItem();
+ g_pIrcServerDataBase->clear();
+ KviServerOptionsListViewItem * it = (KviServerOptionsListViewItem *)m_pListView->firstChild();
+ while(it)
+ {
+ QString tmp = it->m_pNetworkData ? it->m_pNetworkData->name() : QString::null;
+ if(!tmp.isEmpty())
+ {
+ KviIrcNetwork * net = 0;
+ KviIrcServerDataBaseRecord * r = g_pIrcServerDataBase->findRecord(tmp);
+ if(r)
+ {
+ net = r->network();
+ net->copyFrom(*(it->m_pNetworkData));
+ } else {
+ net = new KviIrcNetwork(tmp);
+ net->copyFrom(*(it->m_pNetworkData));
+ r = g_pIrcServerDataBase->insertNetwork(net);
+ }
+ if(it == m_pLastEditedItem)g_pIrcServerDataBase->setCurrentNetwork(net->name());
+
+ KviServerOptionsListViewItem * ch = (KviServerOptionsListViewItem *)it->firstChild();
+ KviIrcServer *srv;
+
+ while(ch)
+ {
+ if(ch->m_pServerData)
+ {
+ if(!ch->m_pServerData->m_szHostname.isEmpty())
+ {
+ srv = r->findServer(ch->m_pServerData);
+ if(!srv)
+ {
+ srv = new KviIrcServer(*(ch->m_pServerData));
+ r->insertServer(srv);
+ } else *srv = *(ch->m_pServerData);
+ if(srv->id().isEmpty())srv->generateUniqueId();
+ if(ch == m_pLastEditedItem)
+ {
+ g_pIrcServerDataBase->setCurrentNetwork(net->name());
+ r->setCurrentServer(srv);
+ }
+ }
+ }
+ ch = (KviServerOptionsListViewItem *)ch->nextSibling();
+ }
+ }
+ it = (KviServerOptionsListViewItem *)it->nextSibling();
+ }
+
+ KviOptionsWidget::commit();
+}
+
+void KviServerOptionsWidget::listViewRightButtonPressed(KviTalListViewItem *it,const QPoint &pnt,int col)
+{
+ int id;
+ bool bServer = (it && ((KviServerOptionsListViewItem *)it)->m_pServerData);
+ m_pContextPopup->clear();
+ m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_WORLD)),__tr2qs_ctx("New Network","options"),this,SLOT(newNetwork()));
+ id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CUT)),__tr2qs_ctx("Remove Network","options"),this,SLOT(removeCurrent()));
+ m_pContextPopup->setItemEnabled(id,!bServer);
+ m_pContextPopup->insertSeparator();
+ id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SERVER)),__tr2qs_ctx("&New Server","options"),this,SLOT(newServer()));
+ id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CUT)),__tr2qs_ctx("Re&move Server","options"),this,SLOT(removeCurrent()));
+ m_pContextPopup->setItemEnabled(id,bServer);
+ id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_COPY)),__tr2qs_ctx("&Copy Server","options"),this,SLOT(copyServer()));
+ m_pContextPopup->setItemEnabled(id,bServer);
+ id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_PASTE)),__tr2qs_ctx("&Paste Server","options"),this,SLOT(pasteServer()));
+ m_pContextPopup->setItemEnabled(id,m_pClipboard);
+
+ m_pContextPopup->insertSeparator();
+ // m_pContextPopup->insertItem(__c2q(__tr("Merge list from server.ini","options")),this,SLOT(importFromIni()));
+ m_pContextPopup->insertItem(__tr2qs_ctx("Clear List","options"),this,SLOT(clearList()));
+ m_pContextPopup->insertSeparator();
+ m_pContextPopup->insertItem(__tr2qs_ctx("Import List","options"),m_pImportPopup);
+ m_pContextPopup->popup(QCursor::pos());
+}
+
+void KviServerOptionsWidget::importPopupAboutToShow()
+{
+ g_pModuleManager->loadModulesByCaps("serverimport");
+ m_pImportPopup->clear();
+
+ KviModuleExtensionDescriptorList * l = KviModuleExtensionManager::instance()->getExtensionList("serverimport");
+
+ if(!l)return;
+
+ int id;
+
+ for(KviModuleExtensionDescriptor * d = l->first();d;d = l->next())
+ {
+ if(d->icon())
+ id = m_pImportPopup->insertItem(*(d->icon()),d->visibleName());
+ else
+ id = m_pImportPopup->insertItem(d->visibleName());
+ m_pImportPopup->setItemParameter(id,d->id());
+ }
+}
+
+void KviServerOptionsWidget::importPopupActivated(int id)
+{
+ // ensure that we have all the modules : they could have been unloaded while the popup was displayed
+ g_pModuleManager->loadModulesByCaps("serverimport");
+
+ KviModuleExtensionDescriptorList * l = KviModuleExtensionManager::instance()->getExtensionList("serverimport");
+
+ if(!l)
+ {
+ // ops.. internal error: I thought to have a module capable of importing servers
+ // but actually it's not the case.. something weird happened (in the best case
+ // the user has just unloaded the module and removed it from disk ?)
+ KviMessageBox::warning(__tr2qs_ctx("Oops... something weird happened:<br>Can't find any module capable of importing servers.","options"));
+ return;
+ }
+
+ if(m_pImportFilter)
+ {
+ disconnect(m_pImportFilter,0,this,0);
+ m_pImportFilter->die();
+ m_pImportFilter = 0;
+ }
+
+ id = m_pImportPopup->itemParameter(id);
+
+ m_pImportFilter = (KviMexServerImport *)KviModuleExtensionManager::instance()->allocateExtension("serverimport",id,0);
+
+ if(!m_pImportFilter)
+ {
+ KviMessageBox::warning(__tr2qs_ctx("Oops... something weird happened:<br>Can't find the module that was capable of this import action. :(","options"));
+ return;
+ }
+
+ connect(m_pImportFilter,SIGNAL(server(const KviIrcServer &,const char *)),this,SLOT(importServer(const KviIrcServer &,const char *)));
+ connect(m_pImportFilter,SIGNAL(destroyed()),this,SLOT(importerDead()));
+
+ m_pImportFilter->start();
+}
+
+void KviServerOptionsWidget::importerDead()
+{
+ m_pImportFilter = 0;
+}
+
+void KviServerOptionsWidget::importServer(const KviIrcServer &s,const char * network)
+{
+ KviServerOptionsListViewItem * net = findNetItem(network);
+ if(!net)
+ {
+ KviIrcNetwork d(network);
+ net = new KviServerOptionsListViewItem(m_pListView,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_WORLD)),&d);
+ net->setOpen(true);
+ }
+
+ for(KviServerOptionsListViewItem * srv = (KviServerOptionsListViewItem *)net->firstChild();srv;srv = (KviServerOptionsListViewItem *)srv->nextSibling())
+ {
+ if((srv)->m_pServerData->useSSL() == s.useSSL())
+ {
+ if(srv->m_pServerData->isIpV6() == s.isIpV6())
+ {
+ if(KviQString::equalCI(srv->m_pServerData->hostName(),s.hostName()))
+ {
+ // update the port
+ srv->m_pServerData->setPort(s.port());
+ if(!s.ipAddress().isEmpty())srv->m_pServerData->setIpAddress(s.ipAddress());
+ if(!s.password().isEmpty())srv->m_pServerData->setPassword(s.password());
+ if(!s.nickName().isEmpty())srv->m_pServerData->setNickName(s.nickName());
+ m_pListView->setCurrentItem(srv);
+ m_pListView->ensureItemVisible(srv);
+ return;
+ }
+ }
+ }
+ }
+
+ // not found : add it!
+ KviServerOptionsListViewItem * newServer = new KviServerOptionsListViewItem(net,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SERVER)),&s);
+ m_pListView->setCurrentItem(newServer);
+ m_pListView->ensureItemVisible(newServer);
+}
+
+void KviServerOptionsWidget::newNetwork()
+{
+ KviIrcNetwork d(__tr2qs_ctx("New Network","options"));
+ KviServerOptionsListViewItem * it = new KviServerOptionsListViewItem(m_pListView,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_WORLD)),&d);
+ it->setOpen(true);
+ m_pListView->setSelected(it,true);
+ m_pListView->ensureItemVisible(it);
+}
+
+void KviServerOptionsWidget::newServer()
+{
+ if(m_pLastEditedItem)
+ {
+ KviServerOptionsListViewItem * net;
+ if(m_pLastEditedItem->m_pServerData)
+ {
+ net = (KviServerOptionsListViewItem *)m_pLastEditedItem->parent();
+ if(!net)return;
+ }
+ else net = m_pLastEditedItem;
+
+ KviIrcServer tmp;
+ tmp.m_szHostname = __tr2qs_ctx("irc.unknown.net","options");
+ tmp.setCacheIp(false);
+ tmp.generateUniqueId();
+
+ KviServerOptionsListViewItem * it = new KviServerOptionsListViewItem(net,
+ *(g_pIconManager->getSmallIcon(KVI_SMALLICON_SERVER)),&tmp);
+
+ net->setOpen(true);
+
+ m_pListView->setSelected(it,true);
+ m_pListView->ensureItemVisible(it);
+ }
+}
+
+void KviServerOptionsWidget::copyServer()
+{
+ if(m_pLastEditedItem)
+ {
+ if(m_pLastEditedItem->m_pServerData)
+ {
+ if(!m_pClipboard)m_pClipboard = new KviIrcServer();
+ *m_pClipboard = *(m_pLastEditedItem->m_pServerData);
+ m_pPasteServerButton->setEnabled(true);
+ }
+ }
+}
+
+void KviServerOptionsWidget::pasteServer()
+{
+ if(m_pClipboard)
+ {
+ if(m_pLastEditedItem)
+ {
+ KviServerOptionsListViewItem * net;
+ if(m_pLastEditedItem->m_pServerData)
+ {
+ net = (KviServerOptionsListViewItem *)m_pLastEditedItem->parent();
+ if(!net)return;
+ }
+ else net = m_pLastEditedItem;
+
+ KviServerOptionsListViewItem * it = new KviServerOptionsListViewItem(net,
+ *(g_pIconManager->getSmallIcon(KVI_SMALLICON_SERVER)),m_pClipboard);
+
+ net->setOpen(true);
+
+ m_pListView->setSelected(it,true);
+ m_pListView->ensureItemVisible(it);
+ }
+ }
+}
+
+void KviServerOptionsWidget::removeCurrent()
+{
+ if(m_pLastEditedItem)
+ {
+ KviTalListViewItem * it = m_pLastEditedItem->itemAbove();
+ if(!it)it = m_pLastEditedItem->firstChild() ? m_pLastEditedItem->nextSibling() : m_pLastEditedItem->itemBelow();
+ delete m_pLastEditedItem;
+ m_pLastEditedItem = 0;
+ if(!it)it = m_pListView->firstChild();
+ if(it)
+ {
+ m_pListView->setSelected(it,true);
+ m_pListView->ensureItemVisible(it);
+ }
+ }
+}
+
+KviServerOptionsListViewItem * KviServerOptionsWidget::findNetItem(const char * netname)
+{
+ KviServerOptionsListViewItem * it = (KviServerOptionsListViewItem *)m_pListView->firstChild();
+ while(it)
+ {
+ KviStr szNetName = it->text(0);
+ if(kvi_strEqualCI(szNetName.ptr(),netname))return it;
+ it = (KviServerOptionsListViewItem *)it->nextSibling();
+ }
+ return 0;
+}
+
+void KviServerOptionsWidget::clearList()
+{
+ m_pListView->clear();
+ m_pLastEditedItem = 0;
+ listViewItemSelectionChanged(0);
+}
+
+void KviServerOptionsWidget::detailsClicked()
+{
+ if(!m_pLastEditedItem)return;
+ if(m_pLastEditedItem->m_pServerData)
+ {
+ saveLastItem();
+
+ m_pServerDetailsDialog = new KviServerDetailsWidget(this,m_pLastEditedItem->m_pServerData);
+
+ int retCode = m_pServerDetailsDialog->exec();
+ if(retCode == QDialog::Accepted)
+ {
+ if(m_pLastEditedItem)
+ {
+ if(m_pLastEditedItem->m_pServerData)
+ {
+ m_pServerDetailsDialog->fillData(m_pLastEditedItem->m_pServerData);
+ saveLastItem();
+ }
+ }
+ }
+
+ delete m_pServerDetailsDialog;
+ m_pServerDetailsDialog = 0;
+ return;
+ }
+ if(m_pLastEditedItem->m_pNetworkData)
+ {
+ saveLastItem();
+
+ m_pNetworkDetailsDialog = new KviNetworkDetailsWidget(this,m_pLastEditedItem->m_pNetworkData);
+
+ int retCode = m_pNetworkDetailsDialog->exec();
+ if(retCode == QDialog::Accepted)
+ {
+ if(m_pLastEditedItem)
+ {
+ if(m_pLastEditedItem->m_pNetworkData)
+ {
+ m_pNetworkDetailsDialog->fillData(m_pLastEditedItem->m_pNetworkData);
+ saveLastItem();
+ }
+ }
+ }
+
+ delete m_pNetworkDetailsDialog;
+ m_pNetworkDetailsDialog = 0;
+ }
+}
+
+#include "m_optw_servers.moc"
diff --git a/src/modules/options/optw_servers.h b/src/modules/options/optw_servers.h
new file mode 100644
index 00000000..ea71c6d3
--- /dev/null
+++ b/src/modules/options/optw_servers.h
@@ -0,0 +1,210 @@
+#ifndef _OPTW_SERVERS_H_
+#define _OPTW_SERVERS_H_
+
+//=============================================================================
+//
+// File : optw_servers.h
+// Creation date : Wed Jun 12 2000 03:29:01 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2000 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+#include "kvi_optionswidget.h"
+#include "kvi_tal_listview.h"
+#include <qdialog.h>
+#include <qbuttongroup.h>
+#include <qtabwidget.h>
+
+class KviIrcServer;
+class KviIrcNetwork;
+class KviIrcNetworkData;
+class KviMexServerImport;
+
+
+
+class KviServerOptionsListViewItem : public KviTalListViewItem
+{
+public:
+ KviServerOptionsListViewItem(KviTalListView *parent,const QPixmap &pm,const KviIrcNetwork *n);
+ KviServerOptionsListViewItem(KviTalListViewItem *parent,const QPixmap &pm,const KviIrcServer *s);
+ ~KviServerOptionsListViewItem();
+public:
+ KviIrcServer * m_pServerData;
+ KviIrcNetwork * m_pNetworkData;
+public:
+ void updateVisibleStrings();
+};
+
+class QLabel;
+class QLineEdit;
+class KviIpEditor;
+class KviIrcServer;
+class QCheckBox;
+class KviTalPopupMenu;
+class KviScriptEditor;
+class QComboBox;
+class QPushButton;
+class QToolButton;
+class KviNickServRule;
+class KviNickServRuleEditor;
+
+
+class KviNetworkDetailsWidget : public QDialog
+{
+ Q_OBJECT
+public:
+ KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * d);
+ ~KviNetworkDetailsWidget();
+protected:
+ KviScriptEditor * m_pOnConnectEditor;
+ KviScriptEditor * m_pOnLoginEditor;
+
+ QLineEdit * m_pUserEditor;
+ QLineEdit * m_pPassEditor;
+ QLineEdit * m_pNickEditor;
+ QLineEdit * m_pRealEditor;
+ QLineEdit * m_pDescEditor;
+
+ QComboBox * m_pEncodingEditor;
+
+ QCheckBox * m_pAutoConnectCheck;
+
+ KviTalListView * m_pNickServListView;
+ QCheckBox * m_pNickServCheck;
+ QPushButton * m_pAddRuleButton;
+ QPushButton * m_pDelRuleButton;
+ QPushButton * m_pEditRuleButton;
+
+ QStringList m_lstChannels;
+ KviCahnnelListSelector * m_pChannelListSelector;
+public:
+ void fillData(KviIrcNetwork * d);
+protected slots:
+ void enableDisableNickServControls();
+ void addNickServRule();
+ void delNickServRule();
+ void editNickServRule();
+};
+
+class KviServerDetailsWidget : public QDialog
+{
+ Q_OBJECT
+public:
+ KviServerDetailsWidget(QWidget * par,KviIrcServer * s);
+ ~KviServerDetailsWidget();
+protected:
+ QString m_szHostname;
+ QLabel * m_pHeaderLabel;
+ KviScriptEditor * m_pOnConnectEditor;
+ KviScriptEditor * m_pOnLoginEditor;
+ QLineEdit * m_pUserEditor;
+ QLineEdit * m_pPassEditor;
+ QLineEdit * m_pNickEditor;
+ QLineEdit * m_pRealEditor;
+ QLineEdit * m_pDescEditor;
+ QLineEdit * m_pIdEditor;
+ QComboBox * m_pLinkFilterEditor;
+ QComboBox * m_pEncodingEditor;
+ KviIpEditor * m_pIpEditor;
+ QCheckBox * m_pCacheIpCheck;
+ QCheckBox * m_pUseSSLCheck;
+ QCheckBox * m_pUseDefaultInitUMode;
+ QCheckBox * m_pIMode;
+ QCheckBox * m_pWMode;
+ QCheckBox * m_pSMode;
+ QCheckBox * m_pUseAutoConnect;
+ QCheckBox * m_pUseIPV6Check;
+ QLineEdit * m_pPortEditor;
+ QStringList m_lstChannels;
+ KviCahnnelListSelector * m_pChannelListSelector;
+
+ QComboBox * m_pProxyEditor;
+protected slots:
+ void useDefaultInitUModeToggled(bool);
+ void portEditorTextChanged(const QString &);
+ void useIPV6CheckToggled(bool);
+public:
+ void setHeaderLabelText();
+ void fillData(KviIrcServer *s);
+};
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviServerOptionsWidget KVI_SMALLICON_SERVER
+#define KVI_OPTIONS_WIDGET_NAME_KviServerOptionsWidget __tr2qs_no_lookup("Servers")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviServerOptionsWidget __tr2qs_no_lookup("connection")
+//#define KVI_OPTIONS_WIDGET_NOPARENT_KviServerOptionsWidget KviConnectionOptionsWidget
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviServerOptionsWidget 99000
+
+class KviServerOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviServerOptionsWidget(QWidget * parent);
+ ~KviServerOptionsWidget();
+protected:
+ KviTalListView * m_pListView;
+ QLabel * m_pSrvNetLabel;
+ QLineEdit * m_pSrvNetEdit;
+ //QLabel * m_pPortLabel;
+ //QLineEdit * m_pPortEdit;
+ QPushButton * m_pDetailsButton;
+ KviTalPopupMenu * m_pRecentPopup;
+ KviTalPopupMenu * m_pContextPopup;
+ KviTalPopupMenu * m_pImportPopup;
+ KviIrcServer * m_pClipboard;
+ //QCheckBox * m_pIpV6Check;
+ QPushButton * m_pConnectCurrent;
+ QPushButton * m_pConnectNew;
+ KviServerOptionsListViewItem * m_pLastEditedItem;
+ KviServerDetailsWidget * m_pServerDetailsDialog;
+ KviNetworkDetailsWidget * m_pNetworkDetailsDialog;
+ KviMexServerImport * m_pImportFilter;
+
+ QToolButton * m_pNewServerButton;
+ QToolButton * m_pNewNetworkButton;
+ QToolButton * m_pRemoveButton;
+ QToolButton * m_pCopyServerButton;
+ QToolButton * m_pPasteServerButton;
+ QToolButton * m_pImportButton;
+private:
+ void fillServerList();
+ void saveLastItem();
+ KviServerOptionsListViewItem * findNetItem(const char * netname);
+protected slots:
+ void importerDead();
+ void importServer(const KviIrcServer & s,const char * network);
+ void importPopupAboutToShow();
+ void listViewItemSelectionChanged(KviTalListViewItem *it);
+ void listViewRightButtonPressed(KviTalListViewItem *it,const QPoint &pnt,int col);
+ void newNetwork();
+ void removeCurrent();
+ void newServer();
+ void copyServer();
+ void pasteServer();
+ void clearList();
+ void detailsClicked();
+ void connectCurrentClicked();
+ void recentServersPopupAboutToShow();
+ void recentServersPopupClicked(int id);
+ void importPopupActivated(int id);
+public:
+ virtual void commit();
+};
+
+#endif //!_OPTW_SERVERS_H_
diff --git a/src/modules/options/optw_sound.cpp b/src/modules/options/optw_sound.cpp
new file mode 100644
index 00000000..9fec0a0c
--- /dev/null
+++ b/src/modules/options/optw_sound.cpp
@@ -0,0 +1,310 @@
+//=============================================================================
+//
+// File : optw_sound.cpp
+// Creation date : Fri Sep 6 02:18:23 2002 GMT by Szymon Stefanek
+//
+// This file is part of the KVsound sound client distribution
+// Copyright (C) 2002-2006 Szymon Stefanek (pragma at kvsound dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+#include "optw_sound.h"
+
+#include "kvi_settings.h"
+#include "kvi_locale.h"
+#include "kvi_options.h"
+#include "kvi_modulemanager.h"
+#include "kvi_pointerlist.h"
+#include "kvi_string.h"
+
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include "kvi_tal_hbox.h"
+
+#ifdef COMPILE_INFO_TIPS
+ #include "kvi_tal_tooltip.h"
+#endif
+
+// FIXME: This module doesn't Cancel properly when auto-detection is performed!
+
+
+
+KviSoundOptionsWidget::KviSoundOptionsWidget(QWidget * pParent)
+: KviOptionsWidget(pParent)
+{
+}
+
+KviSoundOptionsWidget::~KviSoundOptionsWidget()
+{
+}
+
+
+KviSoundGeneralOptionsWidget::KviSoundGeneralOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"sound_system_options_widget")
+{
+#ifdef COMPILE_ON_WINDOWS
+ createLayout(4,1);
+#else
+ createLayout(3,1);
+#endif
+ KviTalGroupBox * g = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("Sound System","options"),true);
+
+ KviTalToolTip::add(g,__tr2qs_ctx("This allows you to select the sound system to be used with KVIrc.","options"));
+
+ KviTalHBox * h = new KviTalHBox(g);
+
+ m_pSoundSystemBox = new QComboBox(false,h);
+
+ m_pSoundAutoDetectButton = new QPushButton(__tr2qs_ctx("Auto-detect","options"),h);
+ connect(m_pSoundAutoDetectButton,SIGNAL(clicked()),this,SLOT(soundAutoDetect()));
+
+ m_pSoundTestButton = new QPushButton(__tr2qs_ctx("Test","options"),h);
+ connect(m_pSoundTestButton,SIGNAL(clicked()),this,SLOT(soundTest()));
+
+
+ g = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("Media Player","options"),true);
+
+ KviTalToolTip::add(g,__tr2qs_ctx("This allows you to select the preferred media player to be used with " \
+ "the mediaplayer.* module commands and functions.","options"));
+
+ h = new KviTalHBox(g);
+
+ m_pMediaPlayerBox = new QComboBox(false,h);
+
+ m_pMediaAutoDetectButton = new QPushButton(__tr2qs_ctx("Auto-detect","options"),h);
+ connect(m_pMediaAutoDetectButton,SIGNAL(clicked()),this,SLOT(mediaAutoDetect()));
+
+ m_pMediaTestButton = new QPushButton(__tr2qs_ctx("Test","options"),h);
+ connect(m_pMediaTestButton,SIGNAL(clicked()),this,SLOT(mediaTest()));
+
+ addRowSpacer(0,2,0,2);
+
+ soundFillBox();
+ mediaFillBox();
+ // FIXME!
+ m_pSoundTestButton->setEnabled(false);
+ m_pMediaTestButton->setEnabled(false);
+
+ g = addGroupBox(0,2,0,2,1,Qt::Horizontal,__tr2qs_ctx("ID3 tags' encoding","options"),true);
+
+ KviTalToolTip::add(g,__tr2qs_ctx("This allows you to select encoding of mp3 tags.","options"));
+
+ h = new KviTalHBox(g);
+
+ m_pTagsEncodingCombo = new QComboBox(false,h);
+ m_pTagsEncodingCombo->insertItem(__tr2qs_ctx("Use Language Encoding","options"));
+
+ int i = 0;
+ int iMatch = 0;
+
+ KviLocale::EncodingDescription * d = KviLocale::encodingDescription(i);
+ while(d->szName)
+ {
+ if(KviQString::equalCI(d->szName,KVI_OPTION_STRING(KviOption_stringMp3TagsEncoding)))iMatch = i + 1;
+ m_pTagsEncodingCombo->insertItem(d->szName);
+ i++;
+ d = KviLocale::encodingDescription(i);
+ }
+ m_pTagsEncodingCombo->setCurrentItem(iMatch);
+
+#ifdef COMPILE_ON_WINDOWS
+ g = addGroupBox(0,3,0,3,1,Qt::Horizontal,__tr2qs_ctx("Winamp messages ecoding","options"),true);
+
+ KviTalToolTip::add(g,__tr2qs_ctx("This allows you to select encoding of winamp messages.","options"));
+
+ h = new KviTalHBox(g);
+
+ m_pWinampEncodingCombo = new QComboBox(false,h);
+
+ m_pWinampEncodingCombo->insertItem(__tr2qs_ctx("Use Language Encoding","options"));
+ i = 0;
+ iMatch = 0;
+
+ d = KviLocale::encodingDescription(i);
+ while(d->szName)
+ {
+ if(KviQString::equalCI(d->szName,KVI_OPTION_STRING(KviOption_stringWinampTextEncoding)))iMatch = i + 1;
+ m_pWinampEncodingCombo->insertItem(d->szName);
+ i++;
+ d = KviLocale::encodingDescription(i);
+ }
+ m_pWinampEncodingCombo->setCurrentItem(iMatch);
+#endif
+}
+
+
+KviSoundGeneralOptionsWidget::~KviSoundGeneralOptionsWidget()
+{
+}
+
+void KviSoundGeneralOptionsWidget::soundTest()
+{
+}
+
+void KviSoundGeneralOptionsWidget::mediaTest()
+{
+}
+
+
+void KviSoundGeneralOptionsWidget::soundAutoDetect()
+{
+ KviModule * m = g_pModuleManager->getModule("snd");
+ if(!m)return;
+ m->ctrl("detectSoundSystem",0);
+ soundFillBox();
+}
+
+void KviSoundGeneralOptionsWidget::mediaAutoDetect()
+{
+ KviModule * m = g_pModuleManager->getModule("mediaplayer");
+ if(!m)return;
+ m->ctrl("detectMediaPlayer",0);
+ mediaFillBox();
+}
+
+
+void KviSoundGeneralOptionsWidget::soundFillBox()
+{
+
+ QStringList l;
+ QStringList::Iterator it;
+ int cnt;
+ int i;
+ KviModule * m = g_pModuleManager->getModule("snd");
+
+
+ if(!m)goto disable;
+
+
+ if(!m->ctrl("getAvailableSoundSystems",&l))goto disable;
+
+ m_pSoundSystemBox->clear();
+
+ for ( it = l.begin(); it != l.end(); ++it )
+ {
+ m_pSoundSystemBox->insertItem(*it);
+ }
+
+ cnt = m_pSoundSystemBox->count();
+
+ for(i=0;i<cnt;i++)
+ {
+ QString t = m_pSoundSystemBox->text(i);
+ if(KviQString::equalCI(t,KVI_OPTION_STRING(KviOption_stringSoundSystem)))
+ {
+ m_pSoundSystemBox->setCurrentItem(i);
+ break;
+ }
+ }
+
+ return;
+disable:
+ m_pSoundSystemBox->clear();
+ m_pSoundSystemBox->setEnabled(false);
+ m_pSoundTestButton->setEnabled(false);
+ m_pSoundAutoDetectButton->setEnabled(false);
+}
+
+void KviSoundGeneralOptionsWidget::mediaFillBox()
+{
+ QStringList l;
+ QStringList::Iterator it;
+ int cnt;
+ int i;
+ KviModule * m = g_pModuleManager->getModule("mediaplayer");
+
+ if(!m)goto disable;
+ if(!m->ctrl("getAvailableMediaPlayers",&l))goto disable;
+ m_pMediaPlayerBox->clear();
+ for ( it = l.begin(); it != l.end(); ++it )
+ {
+ m_pMediaPlayerBox->insertItem(*it);
+ }
+ cnt = m_pMediaPlayerBox->count();
+
+ for(i=0;i<cnt;i++)
+ {
+ QString t = m_pMediaPlayerBox->text(i);
+ if(KviQString::equalCI(t,KVI_OPTION_STRING(KviOption_stringPreferredMediaPlayer)))
+ {
+ m_pMediaPlayerBox->setCurrentItem(i);
+ break;
+ }
+ }
+
+ return;
+disable:
+ m_pMediaPlayerBox->clear();
+ m_pMediaPlayerBox->setEnabled(false);
+ m_pMediaTestButton->setEnabled(false);
+ m_pMediaAutoDetectButton->setEnabled(false);
+}
+
+
+void KviSoundGeneralOptionsWidget::commit()
+{
+ KviOptionsWidget::commit();
+ KVI_OPTION_STRING(KviOption_stringSoundSystem) = m_pSoundSystemBox->currentText();
+ KVI_OPTION_STRING(KviOption_stringPreferredMediaPlayer) = m_pMediaPlayerBox->currentText();
+
+ int idx = m_pTagsEncodingCombo->currentItem();
+ if(idx <= 0)
+ {
+ // guess from locale
+ KVI_OPTION_STRING(KviOption_stringMp3TagsEncoding) = "";
+ } else {
+ KVI_OPTION_STRING(KviOption_stringMp3TagsEncoding) = m_pTagsEncodingCombo->text(idx);
+ }
+
+
+#ifdef COMPILE_ON_WINDOWS
+ idx = m_pWinampEncodingCombo->currentItem();
+ if(idx <= 0)
+ {
+ // guess from locale
+ KVI_OPTION_STRING(KviOption_stringWinampTextEncoding) = "";
+ } else {
+ KVI_OPTION_STRING(KviOption_stringWinampTextEncoding) = m_pWinampEncodingCombo->text(idx);
+ }
+#endif
+}
+
+KviSoundsOptionsWidget::KviSoundsOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"sound_options_widget")
+{
+ createLayout(5,2);
+ addLabel(0,0,0,0,__tr2qs_ctx("New Query opened","options"));
+ addSoundSelector(1,0,1,0,"",KviOption_stringOnNewQueryOpenedSound);
+
+ addLabel(0,1,0,1,__tr2qs_ctx("New message in inactive query","options"));
+ addSoundSelector(1,1,1,1,"",KviOption_stringOnQueryMessageSound);
+
+ addLabel(0,2,0,2,__tr2qs_ctx("Highlighted message in inactive window","options"));
+ addSoundSelector(1,2,1,2,"",KviOption_stringOnHighlightedMessageSound);
+
+ addLabel(0,3,0,3,__tr2qs_ctx("Me have been kicked","options"));
+ addSoundSelector(1,3,1,3,"",KviOption_stringOnMeKickedSound);
+
+ addRowSpacer(0,4,1,4);
+
+}
+
+KviSoundsOptionsWidget::~KviSoundsOptionsWidget()
+{
+}
+
+#include "m_optw_sound.moc"
diff --git a/src/modules/options/optw_sound.h b/src/modules/options/optw_sound.h
new file mode 100644
index 00000000..37b3c0ed
--- /dev/null
+++ b/src/modules/options/optw_sound.h
@@ -0,0 +1,94 @@
+#ifndef _OPTW_SOUND_H_
+#define _OPTW_SOUND_H_
+//=============================================================================
+//
+// File : optw_sound.h
+// Creation date : Fri Sep 6 02:18:21 2002 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2002-2006 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+#include "kvi_optionswidget.h"
+#include <qcombobox.h>
+#include <qpushbutton.h>
+
+#define KVI_OPTIONS_WIDGET_ICON_KviSoundOptionsWidget KVI_SMALLICON_SOUND
+#define KVI_OPTIONS_WIDGET_NAME_KviSoundOptionsWidget __tr2qs_no_lookup("Sound")
+#define KVI_OPTIONS_WIDGET_PARENT_KviSoundOptionsWidget KviGeneralOptOptionsWidget
+#define KVI_OPTIONS_WIDGET_CONTAINER_KviSoundOptionsWidget true
+
+
+class KviSoundOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviSoundOptionsWidget(QWidget * parent);
+ ~KviSoundOptionsWidget();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviSoundGeneralOptionsWidget KVI_SMALLICON_SOUND
+#define KVI_OPTIONS_WIDGET_NAME_KviSoundGeneralOptionsWidget __tr2qs_no_lookup("Sound System")
+#define KVI_OPTIONS_WIDGET_PARENT_KviSoundGeneralOptionsWidget KviSoundOptionsWidget
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviSoundGeneralOptionsWidget __tr2qs_no_lookup("sound,xmms,audio,play,amarok")
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviSoundGeneralOptionsWidget 70000
+
+class KviSoundGeneralOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviSoundGeneralOptionsWidget(QWidget * parent);
+ ~KviSoundGeneralOptionsWidget();
+protected:
+ QComboBox * m_pSoundSystemBox;
+ QPushButton * m_pSoundTestButton;
+ QPushButton * m_pSoundAutoDetectButton;
+ QComboBox * m_pMediaPlayerBox;
+ QPushButton * m_pMediaTestButton;
+ QPushButton * m_pMediaAutoDetectButton;
+
+#ifdef COMPILE_ON_WINDOWS
+ QComboBox * m_pWinampEncodingCombo;
+#endif
+ QComboBox * m_pTagsEncodingCombo;
+protected:
+ void soundFillBox();
+ void mediaFillBox();
+ virtual void commit();
+protected slots:
+ void soundTest();
+ void soundAutoDetect();
+ void mediaTest();
+ void mediaAutoDetect();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviSoundsOptionsWidget KVI_SMALLICON_SOUND
+#define KVI_OPTIONS_WIDGET_NAME_KviSoundsOptionsWidget __tr2qs_no_lookup("Sounds")
+#define KVI_OPTIONS_WIDGET_PARENT_KviSoundsOptionsWidget KviSoundOptionsWidget
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviSoundsOptionsWidget __tr2qs_no_lookup("sound,events")
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviSoundsOptionsWidget 80000
+
+class KviSoundsOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviSoundsOptionsWidget(QWidget * parent);
+ ~KviSoundsOptionsWidget();
+};
+
+#endif //_OPTW_SOUND_H_
diff --git a/src/modules/options/optw_ssl.cpp b/src/modules/options/optw_ssl.cpp
new file mode 100644
index 00000000..bf3ef46a
--- /dev/null
+++ b/src/modules/options/optw_ssl.cpp
@@ -0,0 +1,35 @@
+//
+// File : optw_ssl.cpp
+// Creation date : Thu Jul 20 20:52:30 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "optw_ssl.h"
+
+#include <qlayout.h>
+#include <kvi_tal_groupbox.h>
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+//#warning "Info tips"
+
+
+
+#include "m_optw_ssl.moc"
diff --git a/src/modules/options/optw_ssl.h b/src/modules/options/optw_ssl.h
new file mode 100644
index 00000000..9b7db6de
--- /dev/null
+++ b/src/modules/options/optw_ssl.h
@@ -0,0 +1,29 @@
+#ifndef _OPTW_SSL_H_
+#define _OPTW_SSL_H_
+//
+// File : optw_ssl.h
+// Creation date : Thu Jul 20 20:52:30 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+
+
+
+#endif //_OPTW_SSL_H_
diff --git a/src/modules/options/optw_taskbar.cpp b/src/modules/options/optw_taskbar.cpp
new file mode 100644
index 00000000..1b146d39
--- /dev/null
+++ b/src/modules/options/optw_taskbar.cpp
@@ -0,0 +1,255 @@
+//
+// File : optw_taskbar.cpp
+// Creation date : Wed Jan 16 04:30:39 2002 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "optw_taskbar.h"
+
+#include "kvi_settings.h"
+#include "kvi_locale.h"
+#include "kvi_options.h"
+
+
+KviTaskBarOptionsWidget::KviTaskBarOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"taskbar_options_widget")
+{
+
+ createLayout(7,1);
+
+ addBoolSelector(0,0,0,0,__tr2qs_ctx("Use tree taskbar","options"),KviOption_boolUseTreeWindowListTaskBar);
+ addBoolSelector(0,1,0,1,__tr2qs_ctx("Sort windows by name","options"),KviOption_boolSortTaskBarItemsByName);
+ addBoolSelector(0,2,0,2,__tr2qs_ctx("Show window icons in taskbar","options"),KviOption_boolUseTaskBarIcons);
+ KviBoolSelector * b = addBoolSelector(0,3,0,3,__tr2qs_ctx("Show activity meter in taskbar","options"),KviOption_boolUseTaskBarActivityMeter);
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(b,__tr2qs_ctx("<center>This option enables the usage of the taskbar activity meter. " \
+ "Each window entry will have a small indicator of the activity that is going on in that window. " \
+ "The indicator is a small square that changes colors, dark colors mean low activity, " \
+ "while bright colors signal high activity. KVIrc also uses some heuristics to determine " \
+ "whether the activity is somewhat \"human\" or it is generated by automated entities (such as bots " \
+ "or IRC servers). \"Human\" activity causes the indicator to be shaded red while automated " \
+ "activity causes the indicator to be shaded blue.</center>","options"));
+#endif
+ addBoolSelector(0,4,0,4,__tr2qs_ctx("Show IRC context indicator in taskbar","options"),KviOption_boolUseTaskBarIrcContextIndicator);
+ addBoolSelector(0,5,0,5,__tr2qs_ctx("Enable window tooltips","options"),KviOption_boolShowTaskBarToolTips);
+ addRowSpacer(0,6,0,6);
+}
+
+
+KviTaskBarOptionsWidget::~KviTaskBarOptionsWidget()
+{
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+KviTreeTaskBarOptionsWidget::KviTreeTaskBarOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"treetaskbar_options_widget")
+{
+}
+
+KviTreeTaskBarOptionsWidget::~KviTreeTaskBarOptionsWidget()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+KviTreeTaskBarForegroundOptionsWidget::KviTreeTaskBarForegroundOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"treetaskbar_options_widget")
+{
+ createLayout(3,1);
+
+ KviTalGroupBox *g = addGroupBox(0,0,0,0,2,Qt::Horizontal,__tr2qs_ctx("Text/Alert Colors","options"));
+
+ addColorSelector(g,__tr2qs_ctx("Normal:","options"),KviOption_colorTreeTaskBarForeground);
+ addColorSelector(g,__tr2qs_ctx("Selected:","options"),KviOption_colorTreeTaskBarActiveForeground);
+ addColorSelector(g,__tr2qs_ctx("Alert Level 1:","options"),KviOption_colorTreeTaskBarHighlight1Foreground);
+ addColorSelector(g,__tr2qs_ctx("Alert Level 2:","options"),KviOption_colorTreeTaskBarHighlight2Foreground);
+ addColorSelector(g,__tr2qs_ctx("Alert Level 3:","options"),KviOption_colorTreeTaskBarHighlight3Foreground);
+ addColorSelector(g,__tr2qs_ctx("Alert Level 4:","options"),KviOption_colorTreeTaskBarHighlight4Foreground);
+ addColorSelector(g,__tr2qs_ctx("Alert Level 5:","options"),KviOption_colorTreeTaskBarHighlight5Foreground);
+
+ addColorSelector(0,1,0,1,__tr2qs_ctx("Progress bar color:","options"),KviOption_colorTreeTaskBarProgress);
+
+ addRowSpacer(0,2,0,2);
+}
+
+
+KviTreeTaskBarForegroundOptionsWidget::~KviTreeTaskBarForegroundOptionsWidget()
+{
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+KviTreeTaskBarBackgroundOptionsWidget::KviTreeTaskBarBackgroundOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"treetaskbar_options_widget")
+{
+ createLayout(4,2);
+
+ KviTalGroupBox * g = addGroupBox(0,0,1,0,2,Qt::Horizontal,__tr2qs_ctx("Background Colors","options"));
+ addColorSelector(g,__tr2qs_ctx("Normal:","options"),KviOption_colorTreeTaskBarBackground);
+ addColorSelector(g,__tr2qs_ctx("Selected:","options"),KviOption_colorTreeTaskBarActiveBackground);
+
+ addPixmapSelector(0,1,1,1,__tr2qs_ctx("Background image:","options"),KviOption_pixmapTreeTaskBarBackground);
+
+ addLabel(0,2,0,2,__tr2qs_ctx("Horizontal align:","options"));
+ m_pHorizontalAlign=new QComboBox(this);
+ addWidgetToLayout(m_pHorizontalAlign,1,2,1,2);
+
+ addLabel(0,3,0,3,__tr2qs_ctx("Vertical align:","options"));
+ m_pVerticalAlign=new QComboBox(this);
+ addWidgetToLayout(m_pVerticalAlign,1,3,1,3);
+
+ m_pHorizontalAlign->insertItem(__tr2qs_ctx("Tile","options"));
+ m_pHorizontalAlign->insertItem(__tr2qs_ctx("Left","options"));
+ m_pHorizontalAlign->insertItem(__tr2qs_ctx("Right","options"));
+ m_pHorizontalAlign->insertItem(__tr2qs_ctx("Center","options"));
+
+ m_pVerticalAlign->insertItem(__tr2qs_ctx("Tile","options"));
+ m_pVerticalAlign->insertItem(__tr2qs_ctx("Top","options"));
+ m_pVerticalAlign->insertItem(__tr2qs_ctx("Bottom","options"));
+ m_pVerticalAlign->insertItem(__tr2qs_ctx("Center","options"));
+
+ switch( KVI_OPTION_UINT(KviOption_uintTreeTaskBarPixmapAlign) & Qt::AlignHorizontal_Mask)
+ {
+ case Qt::AlignLeft:
+ m_pHorizontalAlign->setCurrentItem(1);
+ break;
+ case Qt::AlignRight:
+ m_pHorizontalAlign->setCurrentItem(2);
+ break;
+ case Qt::AlignHCenter:
+ m_pHorizontalAlign->setCurrentItem(3);
+ break;
+ default:
+ m_pHorizontalAlign->setCurrentItem(0);
+ }
+
+ switch( KVI_OPTION_UINT(KviOption_uintTreeTaskBarPixmapAlign) & Qt::AlignVertical_Mask)
+ {
+ case Qt::AlignTop:
+ m_pVerticalAlign->setCurrentItem(1);
+ break;
+ case Qt::AlignBottom:
+ m_pVerticalAlign->setCurrentItem(2);
+ break;
+ case Qt::AlignVCenter:
+ m_pVerticalAlign->setCurrentItem(3);
+ break;
+ default:
+ m_pVerticalAlign->setCurrentItem(0);
+ }
+
+ layout()->setRowStretch(1,1);
+}
+
+
+KviTreeTaskBarBackgroundOptionsWidget::~KviTreeTaskBarBackgroundOptionsWidget()
+{
+}
+
+void KviTreeTaskBarBackgroundOptionsWidget::commit()
+{
+ KviOptionsWidget::commit();
+
+ int iFlags=0;
+ switch(m_pHorizontalAlign->currentItem())
+ {
+ case 1:
+ iFlags|=Qt::AlignLeft;
+ break;
+ case 2:
+ iFlags|=Qt::AlignRight;
+ break;
+ case 3:
+ iFlags|=Qt::AlignHCenter;
+ break;
+ }
+ switch(m_pVerticalAlign->currentItem())
+ {
+ case 1:
+ iFlags|=Qt::AlignTop;
+ break;
+ case 2:
+ iFlags|=Qt::AlignBottom;
+ break;
+ case 3:
+ iFlags|=Qt::AlignVCenter;
+ break;
+ }
+
+ KVI_OPTION_UINT(KviOption_uintTreeTaskBarPixmapAlign)=iFlags;
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+KviTreeTaskBarFeaturesOptionsWidget::KviTreeTaskBarFeaturesOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"treetaskbar_options_widget")
+{
+ createLayout(4,1);
+
+ addBoolSelector(0,0,1,0,__tr2qs_ctx("Show header","options"),KviOption_boolShowTreeTaskbarHeader);
+
+ addUIntSelector(0,1,0,1,__tr2qs_ctx("Minimum width:","options"),KviOption_uintTreeTaskBarMinimumWidth,24,1024,125);
+ addUIntSelector(0,2,0,2,__tr2qs_ctx("Maximum width:","options"),KviOption_uintTreeTaskBarMaximumWidth,24,9999,125);
+
+ addRowSpacer(0,3,0,3);
+}
+
+
+KviTreeTaskBarFeaturesOptionsWidget::~KviTreeTaskBarFeaturesOptionsWidget()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+KviClassicTaskBarOptionsWidget::KviClassicTaskBarOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"classictaskbar_options_widget")
+{
+ createLayout(8,1);
+ addFontSelector(0,0,0,0,__tr2qs_ctx("Font:","options"),KviOption_fontTaskbar);
+ KviTalGroupBox *g = addGroupBox(0,1,0,1,2,Qt::Horizontal,__tr2qs_ctx("Text/Alert Colors","options"));
+ addColorSelector(g,__tr2qs_ctx("Normal:","options"),KviOption_colorTaskBarNormalText);
+ addColorSelector(g,__tr2qs_ctx("Minimized:","options"), KviOption_colorTaskBarMinimizedText);
+ addColorSelector(g,__tr2qs_ctx("Alert Level 1:","options"),KviOption_colorTaskBarHighlight1Text);
+ addColorSelector(g,__tr2qs_ctx("Alert Level 2:","options"),KviOption_colorTaskBarHighlight2Text);
+ addColorSelector(g,__tr2qs_ctx("Alert Level 3:","options"),KviOption_colorTaskBarHighlight3Text);
+ addColorSelector(g,__tr2qs_ctx("Alert Level 4:","options"),KviOption_colorTaskBarHighlight4Text);
+ addColorSelector(g,__tr2qs_ctx("Alert Level 5:","options"),KviOption_colorTaskBarHighlight5Text);
+ addColorSelector(0,2,0,2,__tr2qs_ctx("Progress bar color:","options"),KviOption_colorTaskBarProgressBar);
+ addUIntSelector(0,3,0,3,__tr2qs_ctx("Minimum width of buttons:","options"),KviOption_uintTaskBarButtonMinWidth,24,9999,100);
+ //addUIntSelector(0,4,0,4,__tr2qs_ctx("Maximum number of rows:","options"),KviOption_uintTaskBarMaximumRows,1,16,2);
+ addBoolSelector(0,4,0,4,__tr2qs_ctx("Set maximum button width","options"),KviOption_boolClassicTaskBarSetMaximumButtonWidth);
+ addUIntSelector(0,5,0,5,__tr2qs_ctx("Maximum width of buttons:","options"),KviOption_uintClassicTaskBarMaximumButtonWidth,24,9999,100);
+ addBoolSelector(0,6,0,6,__tr2qs_ctx("Use flat buttons","options"),KviOption_boolUseFlatClassicTaskbarButtons);
+ addRowSpacer(0,7,0,7);
+}
+
+
+KviClassicTaskBarOptionsWidget::~KviClassicTaskBarOptionsWidget()
+{
+}
+
+#include "m_optw_taskbar.moc"
diff --git a/src/modules/options/optw_taskbar.h b/src/modules/options/optw_taskbar.h
new file mode 100644
index 00000000..66990c26
--- /dev/null
+++ b/src/modules/options/optw_taskbar.h
@@ -0,0 +1,125 @@
+#ifndef _OPTW_TASKBAR_H_
+#define _OPTW_TASKBAR_H_
+
+//===============================================================================
+//
+// File : optw_taskbar.h
+// Creation date : Wed Jan 16 04:30:41 2002 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2002-2006 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//===============================================================================
+
+
+#include "kvi_optionswidget.h"
+#include <qcombobox.h>
+
+#define KVI_OPTIONS_WIDGET_ICON_KviTaskBarOptionsWidget KVI_SMALLICON_CLASSICTASKBAR
+#define KVI_OPTIONS_WIDGET_NAME_KviTaskBarOptionsWidget __tr2qs_no_lookup("Taskbar")
+#define KVI_OPTIONS_WIDGET_MINIMAL_USER_EXPERIENCE_LEVEL_KviTaskBarOptionsWidget 2
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviTaskBarOptionsWidget __tr2qs_no_lookup("theme")
+#define KVI_OPTIONS_WIDGET_GROUP_KviTaskBarOptionsWidget "theme"
+
+class KviTaskBarOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviTaskBarOptionsWidget(QWidget * parent);
+ ~KviTaskBarOptionsWidget();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviTreeTaskBarOptionsWidget KVI_SMALLICON_TREETASKBAR
+#define KVI_OPTIONS_WIDGET_NAME_KviTreeTaskBarOptionsWidget __tr2qs_no_lookup("Tree Taskbar")
+#define KVI_OPTIONS_WIDGET_PARENT_KviTreeTaskBarOptionsWidget KviTaskBarOptionsWidget
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviTreeTaskBarOptionsWidget __tr2qs_no_lookup("theme")
+#define KVI_OPTIONS_WIDGET_GROUP_KviTreeTaskBarOptionsWidget "theme"
+#define KVI_OPTIONS_WIDGET_CONTAINER_KviTreeTaskBarOptionsWidget true
+
+class KviTreeTaskBarOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviTreeTaskBarOptionsWidget(QWidget * pParent);
+ ~KviTreeTaskBarOptionsWidget();
+};
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviTreeTaskBarForegroundOptionsWidget KVI_SMALLICON_TREETASKBAR
+#define KVI_OPTIONS_WIDGET_NAME_KviTreeTaskBarForegroundOptionsWidget __tr2qs_no_lookup("Foreground")
+#define KVI_OPTIONS_WIDGET_PARENT_KviTreeTaskBarForegroundOptionsWidget KviTreeTaskBarOptionsWidget
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviTreeTaskForegroundBarOptionsWidget __tr2qs_no_lookup("theme")
+#define KVI_OPTIONS_WIDGET_GROUP_KviTreeTaskBarForegroundOptionsWidget "theme"
+
+class KviTreeTaskBarForegroundOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviTreeTaskBarForegroundOptionsWidget(QWidget * parent);
+ ~KviTreeTaskBarForegroundOptionsWidget();
+};
+
+
+#define KVI_OPTIONS_WIDGET_ICON_KviTreeTaskBarBackgroundOptionsWidget KVI_SMALLICON_TREETASKBAR
+#define KVI_OPTIONS_WIDGET_NAME_KviTreeTaskBarBackgroundOptionsWidget __tr2qs_no_lookup("Background")
+#define KVI_OPTIONS_WIDGET_PARENT_KviTreeTaskBarBackgroundOptionsWidget KviTreeTaskBarOptionsWidget
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviTreeTaskBackgroundBarOptionsWidget __tr2qs_no_lookup("theme")
+#define KVI_OPTIONS_WIDGET_GROUP_KviTreeTaskBarBackgroundOptionsWidget "theme"
+
+class KviTreeTaskBarBackgroundOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+private:
+ QComboBox* m_pHorizontalAlign;
+ QComboBox* m_pVerticalAlign;
+public:
+ KviTreeTaskBarBackgroundOptionsWidget(QWidget * parent);
+ ~KviTreeTaskBarBackgroundOptionsWidget();
+
+ virtual void commit();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviTreeTaskBarFeaturesOptionsWidget KVI_SMALLICON_TREETASKBAR
+#define KVI_OPTIONS_WIDGET_NAME_KviTreeTaskBarFeaturesOptionsWidget __tr2qs_no_lookup("Features")
+#define KVI_OPTIONS_WIDGET_PARENT_KviTreeTaskBarFeaturesOptionsWidget KviTreeTaskBarOptionsWidget
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviTreeTaskFeaturesBarOptionsWidget __tr2qs_no_lookup("theme")
+#define KVI_OPTIONS_WIDGET_GROUP_KviTreeTaskBarFeaturesOptionsWidget "theme"
+
+class KviTreeTaskBarFeaturesOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviTreeTaskBarFeaturesOptionsWidget(QWidget * parent);
+ ~KviTreeTaskBarFeaturesOptionsWidget();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviClassicTaskBarOptionsWidget KVI_SMALLICON_CLASSICTASKBAR
+#define KVI_OPTIONS_WIDGET_NAME_KviClassicTaskBarOptionsWidget __tr2qs_no_lookup("Classic Taskbar")
+#define KVI_OPTIONS_WIDGET_PARENT_KviClassicTaskBarOptionsWidget KviTaskBarOptionsWidget
+#define KVI_OPTIONS_WIDGET_MINIMAL_USER_EXPERIENCE_LEVEL_KviClassicTaskBarOptionsWidget 2
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviClassicTaskBarOptionsWidget __tr2qs_no_lookup("theme")
+#define KVI_OPTIONS_WIDGET_GROUP_KviClassicTaskBarOptionsWidget "theme"
+
+class KviClassicTaskBarOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviClassicTaskBarOptionsWidget(QWidget * parent);
+ ~KviClassicTaskBarOptionsWidget();
+};
+
+#endif //_OPTW_TASKBAR_H_
diff --git a/src/modules/options/optw_textencoding.cpp b/src/modules/options/optw_textencoding.cpp
new file mode 100644
index 00000000..431cdad0
--- /dev/null
+++ b/src/modules/options/optw_textencoding.cpp
@@ -0,0 +1,139 @@
+//
+// File : optw_textencoding.cpp
+// Creation date : Sat Aug 11 2001 03:29:52 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+#include "optw_textencoding.h"
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+#include "kvi_qstring.h"
+#include "kvi_app.h"
+#include "kvi_fileutils.h"
+
+#include <qdir.h>
+#include <qmessagebox.h>
+
+QString g_szPrevSettedLocale;
+
+KviTextEncodingOptionsWidget::KviTextEncodingOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"textencoding_options_widget")
+{
+ createLayout(5,2);
+
+ addLabel(0,0,0,0,__tr2qs_ctx("Default text encoding:","options"));
+
+ m_pTextEncodingCombo = new QComboBox(this);
+ addWidgetToLayout(m_pTextEncodingCombo,1,0,1,0);
+
+ m_pTextEncodingCombo->insertItem(__tr2qs_ctx("Use Language Encoding","options"));
+ int i = 0;
+ int iMatch = 0;
+ KviLocale::EncodingDescription * d = KviLocale::encodingDescription(i);
+ while(d->szName)
+ {
+ if(KviQString::equalCI(d->szName,KVI_OPTION_STRING(KviOption_stringDefaultTextEncoding)))iMatch = i + 1;
+ m_pTextEncodingCombo->insertItem(d->szName);
+ i++;
+ d = KviLocale::encodingDescription(i);
+ }
+
+ m_pTextEncodingCombo->setCurrentItem(iMatch);
+
+ addLabel(0,1,0,1,__tr2qs_ctx("Force language:","options"));
+
+ m_pForcedLocaleCombo = new QComboBox(this);
+
+ addWidgetToLayout(m_pForcedLocaleCombo,1,1,1,1);
+
+ QLabel * l = new QLabel(__tr2qs_ctx("<b>Note:</b> You need to restart KVirc to apply a language changing","options"),this);
+ addWidgetToLayout(l,0,2,1,2);
+
+ m_pForcedLocaleCombo->insertItem(__tr2qs_ctx("Automatic detection","options"));
+ m_pForcedLocaleCombo->insertItem(__tr2qs_ctx("en","options"));
+
+ QString szLangFile=QString("%1/.kvirc_force_locale").arg(QDir::homeDirPath());
+
+ bool bIsDefaultLocale = !KviFileUtils::fileExists(szLangFile);
+ //We Have setted locale, but not restarted kvirc
+ if(!g_szPrevSettedLocale.isEmpty())
+ {
+ m_szLanguage=g_szPrevSettedLocale;
+ } else {
+ m_szLanguage=KviLocale::localeName();
+ }
+
+ QString szLocaleDir;
+ g_pApp->getGlobalKvircDirectory(szLocaleDir,KviApp::Locale);
+
+ QStringList list=QDir(szLocaleDir).entryList("kvirc_*.mo",QDir::Files);
+
+ i = 0;
+ iMatch = 0;
+
+ for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
+ QString szTmp=*it;
+ szTmp.replace("kvirc_","");
+ szTmp.replace(".mo","");
+ m_pForcedLocaleCombo->insertItem(szTmp);
+ if(KviQString::equalCI(szTmp,m_szLanguage))
+ iMatch = i + 2;
+ i++;
+ }
+ if(bIsDefaultLocale)
+ m_pForcedLocaleCombo->setCurrentItem(0);
+ else if(KviQString::equalCI(m_szLanguage,"en"))
+ m_pForcedLocaleCombo->setCurrentItem(1);
+ else
+ m_pForcedLocaleCombo->setCurrentItem(iMatch);
+ addRowSpacer(0,3,1,3);
+}
+
+KviTextEncodingOptionsWidget::~KviTextEncodingOptionsWidget()
+{
+}
+
+void KviTextEncodingOptionsWidget::commit()
+{
+ int idx = m_pTextEncodingCombo->currentItem();
+ if(idx <= 0)
+ {
+ // guess from locale
+ KVI_OPTION_STRING(KviOption_stringDefaultTextEncoding) = "";
+ } else {
+ KVI_OPTION_STRING(KviOption_stringDefaultTextEncoding) = m_pTextEncodingCombo->text(idx);
+ }
+
+ idx=m_pForcedLocaleCombo->currentItem();
+ QString szLangFile=QString("%1/.kvirc_force_locale").arg(QDir::homeDirPath());
+ if(idx==0) {
+ if(KviFileUtils::fileExists(szLangFile))
+ KviFileUtils::removeFile(szLangFile);
+ } else {
+ g_szPrevSettedLocale=m_pForcedLocaleCombo->text(idx);
+ if(!KviFileUtils::writeFile(szLangFile,m_pForcedLocaleCombo->text(idx)))
+ {
+ QMessageBox::critical(this,"KVIrc",__tr2qs_ctx("Unable to write language information to","options")+"\n"+szLangFile,__tr2qs_ctx("Ok","options"));
+ }
+ }
+/* if(!KviQString::equalCI(m_pForcedLocaleCombo->text(idx),m_szLanguage))
+ QMessageBox::information(0,"KVIrc",__tr2qs_ctx("You need to restart KVirc to apply a language changing","options"),QMessageBox::Ok);*/
+}
+
+#include "m_optw_textencoding.moc"
diff --git a/src/modules/options/optw_textencoding.h b/src/modules/options/optw_textencoding.h
new file mode 100644
index 00000000..75bdeb75
--- /dev/null
+++ b/src/modules/options/optw_textencoding.h
@@ -0,0 +1,50 @@
+#ifndef _OPTW_TEXTENCODING_H_
+#define _OPTW_TEXTENCODING_H_
+
+//
+// File : optw_textencoding.h
+// Creation date : Sat Mar 02 2002 12:09:19 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2002 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+
+#include <qcombobox.h>
+
+#define KVI_OPTIONS_WIDGET_ICON_KviTextEncodingOptionsWidget KVI_SMALLICON_TEXTENCODING
+#define KVI_OPTIONS_WIDGET_NAME_KviTextEncodingOptionsWidget __tr2qs_no_lookup("Language")
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviTextEncodingOptionsWidget 50000
+#define KVI_OPTIONS_WIDGET_PARENT_KviTextEncodingOptionsWidget KviGeneralOptOptionsWidget
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviTextEncodingOptionsWidget __tr2qs_no_lookup("language,encoding,charset,codepage")
+
+class KviTextEncodingOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviTextEncodingOptionsWidget(QWidget * parent);
+ ~KviTextEncodingOptionsWidget();
+protected:
+ QString m_szLanguage;
+ QComboBox * m_pTextEncodingCombo;
+ QComboBox * m_pForcedLocaleCombo;
+public:
+ virtual void commit();
+};
+
+#endif //!_OPTW_TEXTENCODING_H_
diff --git a/src/modules/options/optw_texticons.cpp b/src/modules/options/optw_texticons.cpp
new file mode 100644
index 00000000..d1752c0f
--- /dev/null
+++ b/src/modules/options/optw_texticons.cpp
@@ -0,0 +1,244 @@
+//
+// File : optw_texticons.cpp
+// Creation date : Fri May 24 2002 00:16:13 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2002 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "optw_texticons.h"
+
+#include "kvi_iconmanager.h"
+#include "kvi_texticonmanager.h"
+#include "kvi_locale.h"
+#include "kvi_filedialog.h"
+
+#include <qlayout.h>
+#include <qcursor.h>
+#include "kvi_tal_hbox.h"
+
+
+KviTextIconEditor::KviTextIconEditor(QWidget * par,KviTextIcon * icon,KviTextIconTableItem* item)
+: KviTalHBox(par),m_pTableItem(item)
+{
+ m_pIconButton=new QToolButton(this);
+ m_pBrowseButton=new QToolButton(this);
+ m_pBrowseButton->setSizePolicy(QSizePolicy(QSizePolicy::Maximum,QSizePolicy::Maximum));
+ m_pBrowseButton->setText("...");
+ m_pIcon = icon;
+ m_pPopup = 0;
+ updateIcon();
+ connect(m_pIconButton,SIGNAL(clicked()),this,SLOT(doPopup()));
+ connect(m_pBrowseButton,SIGNAL(clicked()),this,SLOT(chooseFromFile()));
+}
+
+
+KviTextIconEditor::~KviTextIconEditor()
+{
+
+}
+
+void KviTextIconEditor::doPopup()
+{
+ if(!m_pPopup)
+ {
+ m_pPopup = new KviTalPopupMenu(this);
+ KviIconWidget * iw = new KviIconWidget(m_pPopup);
+ connect(iw,SIGNAL(selected(int)),this,SLOT(iconSelected(int)));
+ m_pPopup->insertItem(iw);
+ }
+ m_pPopup->popup(QCursor::pos());
+}
+
+void KviTextIconEditor::iconSelected(int id)
+{
+ m_pIcon->setId(id);
+ updateIcon();
+}
+
+void KviTextIconEditor::chooseFromFile()
+{
+ QString szFile;
+ KviFileDialog::askForOpenFileName(szFile,"Choose icon filename",QString::null,"*.png","options");
+ if(!szFile.isEmpty())
+ {
+ if(g_pIconManager->getPixmap(szFile))
+ {
+ m_pIcon->setFilename(szFile);
+// debug("%s %s %i |%s| %p",__FILE__,__FUNCTION__,__LINE__,m_pIcon->filename().utf8().data(),m_pIcon);
+ updateIcon();
+ }
+ }
+}
+
+void KviTextIconEditor::updateIcon()
+{
+ if(m_pIcon)
+ {
+ QPixmap* pix=m_pIcon->pixmap();
+ if(pix)
+ m_pIconButton->setPixmap(*pix);
+ }
+}
+
+KviTextIconTableItem::KviTextIconTableItem(KviTalTable * t,KviTextIcon * icon)
+: KviTalTableItem(t,KviTalTableItem::WhenCurrent,QString::null)
+{
+ if(icon)
+ m_pIcon=icon;
+ else
+ m_pIcon=new KviTextIcon(0);
+ QPixmap* pix=m_pIcon->pixmap();
+ if(pix)
+ setPixmap(*pix);
+}
+
+KviTextIconTableItem::~KviTextIconTableItem()
+{
+ delete m_pIcon;
+}
+
+void KviTextIconTableItem::setId(int id)
+{
+ m_pIcon->setId(id);
+ QPixmap* pix=m_pIcon->pixmap();
+ if(pix)
+ setPixmap(*pix);
+}
+
+QWidget * KviTextIconTableItem::createEditor() const
+{
+ return new KviTextIconEditor(table()->viewport(),m_pIcon,(KviTextIconTableItem*)this);
+}
+
+
+void KviTextIconTableItem::setContentFromEditor(QWidget * w)
+{
+ if(w->inherits("KviTextIconEditor"))
+ {
+ QPixmap* pix=m_pIcon->pixmap();
+ if(pix)
+ setPixmap(*pix);
+ }
+}
+
+KviTextIconsOptionsWidget::KviTextIconsOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"texticons_options_widget")
+{
+ createLayout(2,2);
+
+ KviPointerHashTableIterator<QString,KviTextIcon> it(*(g_pTextIconManager->textIconDict()));
+
+ m_pTable = new KviTalTable(g_pTextIconManager->textIconDict()->count(),2,this);
+
+#ifdef COMPILE_INFO_TIPS
+ mergeTip(m_pTable->viewport(),__tr2qs_ctx("This table contains the text icon associations.<br>" \
+ "KVirc will use them to display the CTRL+I escape sequences and eventually the " \
+ "emoticons.","options"));
+#endif
+
+ int idx = 0;
+ while(KviTextIcon * i = it.current())
+ {
+ m_pTable->setText(idx,0,it.currentKey());
+ m_pTable->setItem(idx,1,new KviTextIconTableItem(m_pTable,new KviTextIcon(i)));
+ ++idx;
+ ++it;
+ }
+
+ layout()->addMultiCellWidget(m_pTable,0,0,0,1);
+
+ m_pAdd = new QPushButton(__tr2qs_ctx("Add","options"),this);
+ layout()->addWidget(m_pAdd,1,0);
+ connect(m_pAdd,SIGNAL(clicked()),this,SLOT(addClicked()));
+
+ m_pDel = new QPushButton(__tr2qs_ctx("Delete","options"),this);
+ layout()->addWidget(m_pDel,1,1);
+ connect(m_pDel,SIGNAL(clicked()),this,SLOT(delClicked()));
+
+ m_pDel->setEnabled(false);
+
+ connect(m_pTable,SIGNAL(selectionChanged()),this,SLOT(selectionChanged()));
+}
+
+KviTextIconsOptionsWidget::~KviTextIconsOptionsWidget()
+{
+}
+
+void KviTextIconsOptionsWidget::selectionChanged()
+{
+ int i = m_pTable->currentRow();
+ m_pDel->setEnabled(i >= 0 && i < m_pTable->numRows());
+}
+
+void KviTextIconsOptionsWidget::addClicked()
+{
+ m_pTable->setNumRows(m_pTable->numRows() + 1);
+ m_pTable->setText(m_pTable->numRows() - 1,0,__tr2qs_ctx("unnamed","options"));
+ m_pTable->setItem(m_pTable->numRows() - 1,1,new KviTextIconTableItem(m_pTable,0));
+ m_pDel->setEnabled(true);
+}
+
+void KviTextIconsOptionsWidget::delClicked()
+{
+ int i = m_pTable->currentRow();
+
+ if((i > -1) && (i < m_pTable->numRows()))
+ {
+ // remove row i
+ m_pTable->clearCell(i,0);
+ m_pTable->clearCell(i,1);
+ m_pTable->clearCell(i,2);
+
+ for(;i < (m_pTable->numRows() - 1);i++)
+ {
+ m_pTable->swapRows(i,i+1);
+ }
+
+ m_pTable->setNumRows(m_pTable->numRows() - 1);
+ if(m_pTable->numRows() == 0)m_pDel->setEnabled(false);
+ }
+}
+
+void KviTextIconsOptionsWidget::commit()
+{
+
+ KviOptionsWidget::commit();
+ g_pTextIconManager->clear();
+ int n = m_pTable->numRows();
+ for(int i=0;i < n;i++)
+ {
+ QString szVal = m_pTable->text(i,0);
+ if(!szVal.isEmpty())
+ {
+ KviTextIconTableItem * it = (KviTextIconTableItem *)m_pTable->item(i,1);
+ if(it)
+ {
+ g_pTextIconManager->insert(szVal,*(it->icon()));
+ }
+ }
+ }
+ g_pTextIconManager->checkDefaultAssociations();
+
+ for(int i=0; i<n; i++)
+ for (int j=0; j<m_pTable->numCols(); j++)
+ if (m_pTable->item(i,j))
+ m_pTable->clearCell(i,j);
+
+}
+
+#include "m_optw_texticons.moc"
diff --git a/src/modules/options/optw_texticons.h b/src/modules/options/optw_texticons.h
new file mode 100644
index 00000000..652c7da9
--- /dev/null
+++ b/src/modules/options/optw_texticons.h
@@ -0,0 +1,105 @@
+#ifndef _OPTW_TEXTICONS_H_
+#define _OPTW_TEXTICONS_H_
+
+//
+// File : optw_texticons.h
+// Creation date : Fri May 24 2002 00:14:02 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2002 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+#include "kvi_texticonmanager.h"
+#define KVI_OPTIONS_WIDGET_ICON_KviTextIconsOptionsWidget KVI_SMALLICON_BIGGRIN
+#define KVI_OPTIONS_WIDGET_NAME_KviTextIconsOptionsWidget __tr2qs_no_lookup("Text icons")
+#define KVI_OPTIONS_WIDGET_PARENT_KviTextIconsOptionsWidget KviToolsOptionsWidget
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviTextIconsOptionsWidget __tr2qs_no_lookup("smileys,emoticons")
+
+
+
+#include <qtoolbutton.h>
+#include "kvi_tal_popupmenu.h"
+#include "kvi_tal_hbox.h"
+
+#ifdef COMPILE_USE_QT4
+#include <q3table.h>
+#define KviTalTable Q3Table
+#define KviTalTableItem Q3TableItem
+#else
+#include <qtable.h>
+#define KviTalTable QTable
+#define KviTalTableItem QTableItem
+#endif
+
+class KviTextIconTableItem;
+
+class KviTextIconEditor : public KviTalHBox
+{
+ Q_OBJECT
+public:
+ KviTextIconEditor(QWidget * par,KviTextIcon * icon,KviTextIconTableItem* item);
+ ~KviTextIconEditor();
+protected:
+ KviTextIconTableItem *m_pTableItem;
+ KviTextIcon *m_pIcon;
+ KviTalPopupMenu *m_pPopup;
+ QToolButton *m_pIconButton;
+ QToolButton *m_pBrowseButton;
+public:
+ void updateIcon();
+ KviTextIcon* icon() { return m_pIcon; };
+protected slots:
+ void iconSelected(int);
+ void doPopup();
+ void chooseFromFile();
+};
+
+class KviTextIconTableItem : public KviTalTableItem
+{
+ friend class KviTextIconsOptionsWidget;
+public:
+ KviTextIconTableItem(KviTalTable * t,KviTextIcon * icon);
+ ~KviTextIconTableItem();
+protected:
+ KviTextIcon * m_pIcon;
+public:
+ KviTextIcon * icon() { return m_pIcon; };
+ void setId(int id);
+ virtual QWidget * createEditor() const;
+ virtual void setContentFromEditor(QWidget * w);
+};
+
+class KviTextIconsOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviTextIconsOptionsWidget(QWidget * parent);
+ ~KviTextIconsOptionsWidget();
+protected:
+ KviTalTable * m_pTable;
+ QPushButton * m_pAdd;
+ QPushButton * m_pDel;
+public:
+ virtual void commit();
+protected slots:
+ void selectionChanged();
+ void addClicked();
+ void delClicked();
+};
+
+#endif //!_OPTW_TEXTICONS_H_
diff --git a/src/modules/options/optw_theme.cpp b/src/modules/options/optw_theme.cpp
new file mode 100644
index 00000000..e3afeba4
--- /dev/null
+++ b/src/modules/options/optw_theme.cpp
@@ -0,0 +1,26 @@
+//=============================================================================
+//
+// File : optw_theme.cpp
+// Creation date : Sun May 25 2003 18:00:00 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2003 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+
+#include "m_optw_theme.moc"
diff --git a/src/modules/options/optw_theme.h b/src/modules/options/optw_theme.h
new file mode 100644
index 00000000..ee8945c2
--- /dev/null
+++ b/src/modules/options/optw_theme.h
@@ -0,0 +1,30 @@
+#ifndef _OPTW_THEME_H_
+#define _OPTW_THEME_H_
+
+//=============================================================================
+//
+// File : optw_theme.h
+// Creation date : Sun May 25 2003 18:03:11 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2003-2006 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+
+
+#endif //!_OPTW_THEME_H_
diff --git a/src/modules/options/optw_tools.cpp b/src/modules/options/optw_tools.cpp
new file mode 100644
index 00000000..b46b9a01
--- /dev/null
+++ b/src/modules/options/optw_tools.cpp
@@ -0,0 +1,50 @@
+//=============================================================================
+//
+// File : optw_tools.cpp
+// Creation date : Wed Ott 19 16:15:16 2005 GMT by Grifisx & Noldor
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2005 Grifisx & Noldor
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+#include "optw_tools.h"
+
+#include <qlayout.h>
+
+#include "kvi_settings.h"
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+KviToolsOptionsWidget::KviToolsOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"tools_options_widget")
+{
+
+ createLayout(1,1);
+
+ QLabel * l;
+ l = addLabel(0,0,0,0,__tr2qs_ctx("This section contains irc tools<br>"\
+ "<p>like<b> away, lag and logging system. </b> " \
+ "</p>","options"));
+
+}
+
+KviToolsOptionsWidget::~KviToolsOptionsWidget()
+{
+}
+
+#include "m_optw_tools.moc"
diff --git a/src/modules/options/optw_tools.h b/src/modules/options/optw_tools.h
new file mode 100644
index 00000000..9ebf35e8
--- /dev/null
+++ b/src/modules/options/optw_tools.h
@@ -0,0 +1,46 @@
+#ifndef _OPTW_TOOLS_H_
+#define _OPTW_TOOLS_H_
+
+//=============================================================================
+//
+// File : optw_tools.h
+//
+// This file is part of the KVirc irc client distribution
+// Creation date : Wed Ott 19 16:15:16 2005 GMT by Grifisx & Noldor
+//
+// Copyright (C) 2005 Grifisx & Noldor
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=============================================================================
+
+#include "kvi_settings.h"
+#include "kvi_optionswidget.h"
+#include "kvi_selectors.h"
+
+#define KVI_OPTIONS_WIDGET_ICON_KviToolsOptionsWidget KVI_SMALLICON_ADDONS
+#define KVI_OPTIONS_WIDGET_NAME_KviToolsOptionsWidget __tr2qs_no_lookup("Tools")
+#define KVI_OPTIONS_WIDGET_PARENT_KviToolsOptionsWidget KviIrcOptionsWidget
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviToolsOptionsWidget 50000
+#define KVI_OPTIONS_WIDGET_NOTCONTAINED_KviToolsOptionsWidget true
+
+class KviToolsOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviToolsOptionsWidget(QWidget * parent);
+ ~KviToolsOptionsWidget();
+};
+
+#endif //!_OPTW_FOLDERS_H_
diff --git a/src/modules/options/optw_topiclabel.cpp b/src/modules/options/optw_topiclabel.cpp
new file mode 100644
index 00000000..71bc2b64
--- /dev/null
+++ b/src/modules/options/optw_topiclabel.cpp
@@ -0,0 +1,43 @@
+//
+// File : optw_topiclabel.cpp
+// Creation date : Mon Sep 24 02:44:55 CEST 2001 by Krzysztof Godlewski
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+#include "optw_topiclabel.h"
+
+KviTopicLabelLookOptionsWidget::KviTopicLabelLookOptionsWidget(QWidget *p):KviOptionsWidget(p, "topic_label_look_options_widget")
+{
+ createLayout(4, 1);
+
+ addFontSelector(0, 0, 0, 0, __tr2qs_ctx("Font","options"), KviOption_fontLabel);
+ addColorSelector(0, 1, 0, 1, __tr2qs_ctx("Foreground color","options"), KviOption_colorLabelForeground);
+ addColorSelector(0, 2, 0, 2, __tr2qs_ctx("Background color","options"), KviOption_colorLabelBackground);
+ addPixmapSelector(0, 3, 0, 3, __tr2qs_ctx("Background image","options"), KviOption_pixmapLabelBackground);
+
+ layout()->setRowStretch(3, 1);
+}
+
+KviTopicLabelLookOptionsWidget::~KviTopicLabelLookOptionsWidget()
+{
+}
+
+#include "m_optw_topiclabel.moc"
diff --git a/src/modules/options/optw_topiclabel.h b/src/modules/options/optw_topiclabel.h
new file mode 100644
index 00000000..1185fae6
--- /dev/null
+++ b/src/modules/options/optw_topiclabel.h
@@ -0,0 +1,41 @@
+//
+// File : optw_topiclabel.cpp
+// Creation date : Mon Sep 24 02:44:55 CEST 2001 by Krzysztof Godlewski
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#ifndef OPTW_TOPICLABEL_H
+#define OPTW_TOPICLABEL_H
+
+#include "kvi_optionswidget.h"
+
+#define KVI_OPTIONS_WIDGET_ICON_KviTopicLabelLookOptionsWidget KVI_SMALLICON_TOPIC
+#define KVI_OPTIONS_WIDGET_NAME_KviTopicLabelLookOptionsWidget __tr2qs_no_lookup("Labels")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviTopicLabelLookOptionsWidget __tr2qs_no_lookup("theme,topic")
+#define KVI_OPTIONS_WIDGET_GROUP_KviTopicLabelLookOptionsWidget "theme"
+
+class KviTopicLabelLookOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviTopicLabelLookOptionsWidget(QWidget *);
+ ~KviTopicLabelLookOptionsWidget();
+};
+
+#endif /* !OPTW_TOPICLABEL_H */
diff --git a/src/modules/options/optw_transport.cpp b/src/modules/options/optw_transport.cpp
new file mode 100644
index 00000000..d7cf3971
--- /dev/null
+++ b/src/modules/options/optw_transport.cpp
@@ -0,0 +1,33 @@
+//
+// File : optw_transport.cpp
+// Creation date : Mon Nov 13 2000 14:14:22 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2000 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "optw_transport.h"
+
+#include <kvi_tal_groupbox.h>
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+
+
+
+#include "m_optw_transport.moc"
diff --git a/src/modules/options/optw_transport.h b/src/modules/options/optw_transport.h
new file mode 100644
index 00000000..971c215f
--- /dev/null
+++ b/src/modules/options/optw_transport.h
@@ -0,0 +1,29 @@
+#ifndef _OPTW_TRANSPORT_H_
+#define _OPTW_TRANSPORT_H_
+
+//
+// File : optw_transport.h
+// Creation date : Mon Nov 13 2000 14:13:11 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2000 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+#include "kvi_tal_listview.h"
+
+#endif //!_OPTW_TRANSPORT_H_
diff --git a/src/modules/options/optw_tray.cpp b/src/modules/options/optw_tray.cpp
new file mode 100644
index 00000000..e988ba54
--- /dev/null
+++ b/src/modules/options/optw_tray.cpp
@@ -0,0 +1,91 @@
+//
+// File : optw_tray.cpp
+// Creation date : Mon 14 Aug 2006 by Alexey Uzhva
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2002 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+
+#include "optw_tray.h"
+
+#include <qlayout.h>
+#include "kvi_tal_tooltip.h"
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+//#warning "Info tips"
+
+
+KviTrayOptionsWidget::KviTrayOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"tray_options_widget")
+{
+ createLayout(7,1);
+
+ m_pEnable = addBoolSelector(0,0,0,0, __tr2qs_ctx("Enable tray icon","options"), KviOption_boolShowDockExtension);
+ m_pCloseInTray = addBoolSelector(0,1,0,1,__tr2qs_ctx("Close in tray","options"),KviOption_boolCloseInTray);
+ m_pMinimizeInTray = addBoolSelector(0,2,0,2,__tr2qs_ctx("Minimize in tray","options"),KviOption_boolMinimizeInTray);
+
+ m_pEnableFlashing = addBoolSelector(0,3,0,3,__tr2qs_ctx("Enable tray icon flashing","options"),KviOption_boolEnableTrayIconFlashing);
+ m_pLevelBasedNotify = addBoolSelector(0,4,0,4,__tr2qs_ctx("Enable level-based message notification (not a message-type based)","options"),KviOption_boolUseLevelBasedTrayNotification);
+
+ m_pLevelsGroup = addGroupBox(0,5,0,5,1,Qt::Horizontal,__tr2qs_ctx("Select message levels to notify","options"));
+
+ addUIntSelector(m_pLevelsGroup,__tr2qs_ctx("Minimum level for low-priority messages","options"),
+ KviOption_uintMinTrayLowLevelMessage,
+ 1,5,1,true);
+
+ addUIntSelector(m_pLevelsGroup,__tr2qs_ctx("Minimum level for high-priority message","options"),
+ KviOption_uintMinTrayHighLevelMessage,
+ 1,5,4,true);
+
+ addRowSpacer(0,6,0,6);
+
+ connect(m_pEnable,SIGNAL(toggled(bool)),this,SLOT(setEnabled(bool)));
+ connect(m_pLevelBasedNotify,SIGNAL(toggled(bool)),this,SLOT(setEnabled(bool)));
+ setEnabled(true);
+}
+
+KviTrayOptionsWidget::~KviTrayOptionsWidget()
+{
+}
+
+void KviTrayOptionsWidget::setEnabled(bool bEnabled)
+{
+ if(m_pEnable->isChecked())
+ {
+ m_pEnableFlashing->setEnabled(true);
+ m_pLevelBasedNotify->setEnabled(true);
+ m_pCloseInTray->setEnabled(true);
+ m_pMinimizeInTray->setEnabled(true);
+ if(m_pLevelBasedNotify->isChecked())
+ m_pLevelsGroup->setEnabled(true);
+ else
+ m_pLevelsGroup->setEnabled(false);
+
+ } else {
+ m_pCloseInTray->setEnabled(false);
+ m_pMinimizeInTray->setEnabled(false);
+ m_pEnableFlashing->setEnabled(false);
+ m_pLevelBasedNotify->setEnabled(false);
+ m_pLevelsGroup->setEnabled(false);
+ }
+}
+
+
+#include "m_optw_tray.moc"
diff --git a/src/modules/options/optw_tray.h b/src/modules/options/optw_tray.h
new file mode 100644
index 00000000..5be68f36
--- /dev/null
+++ b/src/modules/options/optw_tray.h
@@ -0,0 +1,50 @@
+#ifndef _OPTW_TRAY_H_
+#define _OPTW_TRAY_H_
+//
+// File : optw_tray.h
+// Creation date : Mon 14 Aug 2006 by Alexey Uzhva
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2002 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+#include <qcombobox.h>
+
+#define KVI_OPTIONS_WIDGET_ICON_KviTrayOptionsWidget KVI_SMALLICON_DOCKWIDGET
+#define KVI_OPTIONS_WIDGET_NAME_KviTrayOptionsWidget __tr2qs_no_lookup("Tray icon")
+#define KVI_OPTIONS_WIDGET_PARENT_KviTrayOptionsWidget KviInterfaceFeaturesOptionsWidget
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviTrayOptionsWidget __tr2qs_no_lookup("tray,dockwidget")
+
+class KviTrayOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviTrayOptionsWidget(QWidget * parent);
+ ~KviTrayOptionsWidget();
+protected:
+ KviBoolSelector * m_pEnable;
+ KviBoolSelector * m_pEnableFlashing;
+ KviBoolSelector * m_pLevelBasedNotify;
+ KviBoolSelector * m_pMinimizeInTray;
+ KviBoolSelector * m_pCloseInTray;
+ KviTalGroupBox * m_pLevelsGroup;
+protected slots:
+ void setEnabled(bool);
+};
+
+#endif //_OPTW_TRAY_H_
diff --git a/src/modules/options/optw_uparser.cpp b/src/modules/options/optw_uparser.cpp
new file mode 100644
index 00000000..01036fb6
--- /dev/null
+++ b/src/modules/options/optw_uparser.cpp
@@ -0,0 +1,62 @@
+//
+// File : optw_uparser.cpp
+// Creation date : Sat Oct 27 16:32:26 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+
+#include "optw_uparser.h"
+
+#include <qlayout.h>
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+#include <qlabel.h>
+
+
+KviUParserOptionsWidget::KviUParserOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"uparser_options_widget")
+{
+ createLayout(11,1);
+
+ addBoolSelector(0,0,0,0,__tr2qs_ctx("Disable parser warnings","options"),KviOption_boolAvoidParserWarnings);
+ addBoolSelector(0,1,0,1,__tr2qs_ctx("Disable broken event handlers","options"),KviOption_boolDisableBrokenEventHandlers);
+ addBoolSelector(0,2,0,2,__tr2qs_ctx("Kill broken timers","options"),KviOption_boolKillBrokenTimers);
+ addBoolSelector(0,3,0,3,__tr2qs_ctx("Send unknown commands as /RAW","options"),KviOption_boolSendUnknownCommandsAsRaw);
+
+ addSeparator(0,4,0,4);
+
+ addBoolSelector(0,5,0,5,__tr2qs_ctx("Automatically unload unused modules","options"),KviOption_boolCleanupUnusedModules);
+ addBoolSelector(0,6,0,6,__tr2qs_ctx("Ignore module versions (dangerous)","options"),KviOption_boolIgnoreModuleVersions);
+
+ addSeparator(0,7,0,7);
+
+ addBoolSelector(0,8,0,8,__tr2qs_ctx("Relay errors and warnings to debug window","options"),KviOption_boolScriptErrorsToDebugWindow);
+ addBoolSelector(0,9,0,9,__tr2qs_ctx("Create minimized debug window","options"),KviOption_boolShowMinimizedDebugWindow);
+
+ addRowSpacer(0,10,0,10);
+}
+
+KviUParserOptionsWidget::~KviUParserOptionsWidget()
+{
+}
+
+
+#include "m_optw_uparser.moc"
diff --git a/src/modules/options/optw_uparser.h b/src/modules/options/optw_uparser.h
new file mode 100644
index 00000000..1e35fe92
--- /dev/null
+++ b/src/modules/options/optw_uparser.h
@@ -0,0 +1,40 @@
+#ifndef _OPTW_UPARSER_H_
+#define _OPTW_UPARSER_H_
+//
+// File : optw_uparser.h
+// Creation date : Sat Oct 27 16:32:27 2001 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+
+#define KVI_OPTIONS_WIDGET_ICON_KviUParserOptionsWidget KVI_SMALLICON_PARSERWARNING
+#define KVI_OPTIONS_WIDGET_NAME_KviUParserOptionsWidget __tr2qs_no_lookup("Scripting Engine")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviUParserOptionsWidget __tr2qs_no_lookup("scripting,kvs,debug")
+#define KVI_OPTIONS_WIDGET_PARENT_KviUParserOptionsWidget KviGeneralOptOptionsWidget
+
+class KviUParserOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviUParserOptionsWidget(QWidget * parent);
+ ~KviUParserOptionsWidget();
+};
+
+#endif //_OPTW_UPARSER_H_
diff --git a/src/modules/options/optw_urlhandlers.cpp b/src/modules/options/optw_urlhandlers.cpp
new file mode 100644
index 00000000..48ea2297
--- /dev/null
+++ b/src/modules/options/optw_urlhandlers.cpp
@@ -0,0 +1,127 @@
+#ifndef _OPTW_URLHANDLERS_CPP_
+#define _OPTW_URLHANDLERS_CPP_
+//
+// File : optw_urlhandlers.cpp
+// Creation date : Fri Aug 23 02:57:40 2002 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2002 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "optw_urlhandlers.h"
+
+#include <qlayout.h>
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+
+#include <qlabel.h>
+
+
+KviUrlHandlersOptionsWidget::KviUrlHandlersOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"urlhandlers_options_widget")
+{
+#ifdef COMPILE_ON_WINDOWS
+ #define START_ROW 1
+#else
+ #define START_ROW 0
+#endif
+
+ createLayout(START_ROW+7,1);
+
+#ifdef COMPILE_ON_WINDOWS
+ KviBoolSelector *b = addBoolSelector(0,0,0,0,__tr2qs_ctx("Use system URL handlers","options"),KviOption_boolUseSystemUrlHandlers);
+#endif
+
+ m_pHttpHandler=addStringSelector(0,START_ROW+0,0,START_ROW+0,__tr2qs_ctx("<b>http://</b> handler command:","options"),KviOption_stringUrlHttpCommand);
+ m_pHttpsHandler=addStringSelector(0,START_ROW+1,0,START_ROW+1,__tr2qs_ctx("<b>https://</b> handler command:","options"),KviOption_stringUrlHttpsCommand);
+ m_pFtpHandler=addStringSelector(0,START_ROW+2,0,START_ROW+2,__tr2qs_ctx("<b>ftp://</b> handler command:","options"),KviOption_stringUrlFtpCommand);
+ m_pMailtoHandler=addStringSelector(0,START_ROW+3,0,START_ROW+3,__tr2qs_ctx("<b>mailto:</b> handler command:","options"),KviOption_stringUrlMailtoCommand);
+ m_pFileHandler=addStringSelector(0,START_ROW+4,0,START_ROW+4,__tr2qs_ctx("<b>file://</b> handler command:","options"),KviOption_stringUrlFileCommand);
+ m_pOtherHandler=addStringSelector(0,START_ROW+5,0,START_ROW+5,__tr2qs_ctx("Unknown protocol handler command:","options"),KviOption_stringUrlUnknownCommand);
+
+#ifdef COMPILE_ON_WINDOWS
+ m_pHttpHandler->setEnabled(!KVI_OPTION_BOOL(KviOption_boolUseSystemUrlHandlers));
+ m_pHttpsHandler->setEnabled(!KVI_OPTION_BOOL(KviOption_boolUseSystemUrlHandlers));
+ m_pFtpHandler->setEnabled(!KVI_OPTION_BOOL(KviOption_boolUseSystemUrlHandlers));
+ m_pFileHandler->setEnabled(!KVI_OPTION_BOOL(KviOption_boolUseSystemUrlHandlers));
+ m_pMailtoHandler->setEnabled(!KVI_OPTION_BOOL(KviOption_boolUseSystemUrlHandlers));
+ m_pOtherHandler->setEnabled(!KVI_OPTION_BOOL(KviOption_boolUseSystemUrlHandlers));
+
+ connect(b,SIGNAL(toggled(bool)),this,SLOT(toggleEditors(bool)));
+
+#endif
+
+ addRowSpacer(0,START_ROW+6,0,START_ROW+6);
+}
+
+KviUrlHandlersOptionsWidget::~KviUrlHandlersOptionsWidget()
+{
+}
+
+void KviUrlHandlersOptionsWidget::toggleEditors(bool bToggled)
+{
+ m_pHttpHandler->setEnabled(!bToggled);
+ m_pHttpsHandler->setEnabled(!bToggled);
+ m_pFtpHandler->setEnabled(!bToggled);
+ m_pFileHandler->setEnabled(!bToggled);
+ m_pMailtoHandler->setEnabled(!bToggled);
+ m_pOtherHandler->setEnabled(!bToggled);
+}
+
+void KviUrlHandlersOptionsWidget::commit()
+{
+ KviOptionsWidget::commit();
+
+#ifdef COMPILE_ON_WINDOWS
+ KVI_OPTION_STRING(KviOption_stringUrlHttpCommand).replace("\\\\","@MAGIC@","options");
+ KVI_OPTION_STRING(KviOption_stringUrlHttpCommand).replace("\\","\\\\","options");
+ KVI_OPTION_STRING(KviOption_stringUrlHttpCommand).replace("@MAGIC@","\\\\","options");
+
+ KVI_OPTION_STRING(KviOption_stringUrlHttpsCommand).replace("\\\\","@MAGIC@","options");
+ KVI_OPTION_STRING(KviOption_stringUrlHttpsCommand).replace("\\","\\\\","options");
+ KVI_OPTION_STRING(KviOption_stringUrlHttpsCommand).replace("@MAGIC@","\\\\","options");
+
+ KVI_OPTION_STRING(KviOption_stringUrlFtpCommand).replace("\\\\","@MAGIC@","options");
+ KVI_OPTION_STRING(KviOption_stringUrlFtpCommand).replace("\\","\\\\","options");
+ KVI_OPTION_STRING(KviOption_stringUrlFtpCommand).replace("@MAGIC@","\\\\","options");
+
+ KVI_OPTION_STRING(KviOption_stringUrlMailtoCommand).replace("\\\\","@MAGIC@","options");
+ KVI_OPTION_STRING(KviOption_stringUrlMailtoCommand).replace("\\","\\\\","options");
+ KVI_OPTION_STRING(KviOption_stringUrlMailtoCommand).replace("@MAGIC@","\\\\","options");
+
+ KVI_OPTION_STRING(KviOption_stringUrlFileCommand).replace("\\\\","@MAGIC@","options");
+ KVI_OPTION_STRING(KviOption_stringUrlFileCommand).replace("\\","\\\\","options");
+ KVI_OPTION_STRING(KviOption_stringUrlFileCommand).replace("@MAGIC@","\\\\","options");
+
+ KVI_OPTION_STRING(KviOption_stringUrlUnknownCommand).replace("\\\\","@MAGIC@","options");
+ KVI_OPTION_STRING(KviOption_stringUrlUnknownCommand).replace("\\","\\\\","options");
+ KVI_OPTION_STRING(KviOption_stringUrlUnknownCommand).replace("@MAGIC@","\\\\","options");
+
+ //Check for escaped " in url handler ( \" )
+ KVI_OPTION_STRING(KviOption_stringUrlHttpCommand).replace("\\\\\"","\\\"","options");
+ KVI_OPTION_STRING(KviOption_stringUrlHttpsCommand).replace("\\\\\"","\\\"","options");
+ KVI_OPTION_STRING(KviOption_stringUrlFtpCommand).replace("\\\\\"","\\\"","options");
+ KVI_OPTION_STRING(KviOption_stringUrlMailtoCommand).replace("\\\\\"","\\\"","options");
+ KVI_OPTION_STRING(KviOption_stringUrlFileCommand).replace("\\\\\"","\\\"","options");
+ KVI_OPTION_STRING(KviOption_stringUrlUnknownCommand).replace("\\\\\"","\\\"","options");
+#endif
+}
+
+#include "m_optw_urlhandlers.moc"
+
+#endif //_OPTW_URLHANDLERS_CPP_
diff --git a/src/modules/options/optw_urlhandlers.h b/src/modules/options/optw_urlhandlers.h
new file mode 100644
index 00000000..9ed6c188
--- /dev/null
+++ b/src/modules/options/optw_urlhandlers.h
@@ -0,0 +1,52 @@
+#ifndef _OPTW_URLHANDLERS_H_
+#define _OPTW_URLHANDLERS_H_
+//
+// File : optw_urlhandlers.h
+// Creation date : Fri Aug 23 02:57:41 2002 GMT by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2002 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+
+#define KVI_OPTIONS_WIDGET_ICON_KviUrlHandlersOptionsWidget KVI_SMALLICON_WORLD
+#define KVI_OPTIONS_WIDGET_NAME_KviUrlHandlersOptionsWidget __tr2qs_no_lookup("URL handlers")
+#define KVI_OPTIONS_WIDGET_PARENT_KviUrlHandlersOptionsWidget KviGeneralOptOptionsWidget
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviUrlHandlersOptionsWidget 70000
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviUrlHandlersOptionsWidget __tr2qs_no_lookup("url,programs")
+
+class KviUrlHandlersOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviUrlHandlersOptionsWidget(QWidget * parent);
+ ~KviUrlHandlersOptionsWidget();
+private:
+ KviStringSelector* m_pHttpHandler;
+ KviStringSelector* m_pHttpsHandler;
+ KviStringSelector* m_pFtpHandler;
+ KviStringSelector* m_pMailtoHandler;
+ KviStringSelector* m_pFileHandler;
+ KviStringSelector* m_pOtherHandler;
+public:
+ virtual void commit();
+public slots:
+ void toggleEditors(bool);
+};
+
+#endif //_OPTW_URLHANDLERS_H_
diff --git a/src/modules/options/optw_userlist.cpp b/src/modules/options/optw_userlist.cpp
new file mode 100644
index 00000000..07b39d0d
--- /dev/null
+++ b/src/modules/options/optw_userlist.cpp
@@ -0,0 +1,245 @@
+//
+// File : optw_userlist.cpp
+// Creation date : Sat Aug 11 2001 03:29:52 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+#include "optw_userlist.h"
+
+#include <qlayout.h>
+
+#include "kvi_options.h"
+#include "kvi_locale.h"
+#include "kvi_userlistview.h"
+
+//#warning "Info tips"
+
+KviUserListLookOptionsWidget::KviUserListLookOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"userlistlook_options_widget")
+{
+}
+
+KviUserListLookOptionsWidget::~KviUserListLookOptionsWidget()
+{
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+KviUserListLookForegroundOptionsWidget::KviUserListLookForegroundOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"userlistlook_foreground_options_widget")
+{
+ createLayout(2,2);
+
+ addFontSelector(0,0,1,0,__tr2qs_ctx("Font:","options"),KviOption_fontUserListView);
+
+ KviTalGroupBox * g = addGroupBox(0,1,1,1,1,Qt::Horizontal,__tr2qs_ctx("Nickname Colors","options"));
+ addColorSelector(g,__tr2qs_ctx("Normal:","options"),KviOption_colorUserListViewNormalForeground);
+ addColorSelector(g,__tr2qs_ctx("Selected:","options"),KviOption_colorUserListViewSelectionForeground);
+ addColorSelector(g,__tr2qs_ctx("Channel owner:","options"),KviOption_colorUserListViewChanOwnerForeground);
+ addColorSelector(g,__tr2qs_ctx("Channel admin:","options"),KviOption_colorUserListViewChanAdminForeground);
+ addColorSelector(g,__tr2qs_ctx("Op:","options"),KviOption_colorUserListViewOpForeground);
+ addColorSelector(g,__tr2qs_ctx("Half-op:","options"),KviOption_colorUserListViewHalfOpForeground);
+ addColorSelector(g,__tr2qs_ctx("Voice:","options"),KviOption_colorUserListViewVoiceForeground);
+ addColorSelector(g,__tr2qs_ctx("User-op:","options"),KviOption_colorUserListViewUserOpForeground);
+ addColorSelector(g,__tr2qs_ctx("Away:","options"),KviOption_colorUserListViewAwayForeground);
+
+ KviTalHBox * hb = new KviTalHBox(g);
+ hb->setSpacing(4);
+ KviBoolSelector * b = addBoolSelector(hb,__tr2qs_ctx("Use different color for own nick:","options"),KviOption_boolUseDifferentColorForOwnNick);
+ KviColorSelector * s = addColorSelector(hb,"",KviOption_colorUserListViewOwnForeground,KVI_OPTION_BOOL(KviOption_boolUseDifferentColorForOwnNick));
+ connect(b,SIGNAL(toggled(bool)),s,SLOT(setEnabled(bool)));
+
+ addRowSpacer(0,3,0,3);
+}
+
+KviUserListLookForegroundOptionsWidget::~KviUserListLookForegroundOptionsWidget()
+{
+}
+
+KviUserListGridOptionsWidget::KviUserListGridOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent)
+{
+ createLayout(5,1);
+ KviBoolSelector* b = addBoolSelector(0,0,0,0,__tr2qs_ctx("Draw nickname grid","options"),KviOption_boolUserListViewDrawGrid);
+
+ KviColorSelector* s = addColorSelector(0,1,0,1,__tr2qs_ctx("Grid color:","options"),KviOption_colorUserListViewGrid,KVI_OPTION_BOOL(KviOption_boolUserListViewDrawGrid));
+ connect(b,SIGNAL(toggled(bool)),s,SLOT(setEnabled(bool)));
+
+ KviTalHBox* hb = new KviTalHBox(this);
+ addWidgetToLayout(hb,0,2,0,2);
+ hb->setSpacing(4);
+
+ QLabel * l = new QLabel(__tr2qs_ctx("Grid type:","options"),hb);
+ l->setEnabled(KVI_OPTION_BOOL(KviOption_boolUserListViewDrawGrid));
+ connect(b,SIGNAL(toggled(bool)),l,SLOT(setEnabled(bool)));
+ m_pGridTypeCombo = new QComboBox(false,hb);
+ m_pGridTypeCombo->insertItem(__tr2qs_ctx("3D Grid","options"));
+ m_pGridTypeCombo->insertItem(__tr2qs_ctx("3D Buttons","options"));
+ m_pGridTypeCombo->insertItem(__tr2qs_ctx("Plain Grid","options"));
+ m_pGridTypeCombo->insertItem(__tr2qs_ctx("Dotted Grid","options"));
+ m_pGridTypeCombo->setCurrentItem(KVI_OPTION_UINT(KviOption_uintUserListViewGridType));
+ m_pGridTypeCombo->setEnabled(KVI_OPTION_BOOL(KviOption_boolUserListViewDrawGrid));
+ connect(b,SIGNAL(toggled(bool)),m_pGridTypeCombo,SLOT(setEnabled(bool)));
+ addRowSpacer(0,3,0,3);
+}
+
+KviUserListGridOptionsWidget::~KviUserListGridOptionsWidget()
+{
+}
+
+void KviUserListGridOptionsWidget::commit()
+{
+ KviOptionsWidget::commit();
+ KVI_OPTION_UINT(KviOption_uintUserListViewGridType) = m_pGridTypeCombo->currentItem();
+ if(KVI_OPTION_UINT(KviOption_uintUserListViewGridType) > KVI_USERLISTVIEW_GRIDTYPE_MAXIMUM)
+ KVI_OPTION_UINT(KviOption_uintUserListViewGridType) = KVI_USERLISTVIEW_GRIDTYPE_DEFAULT;
+
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////
+
+KviUserListLookBackgroundOptionsWidget::KviUserListLookBackgroundOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"userlistlook_background_options_widget")
+{
+ createLayout(3,2);
+
+ KviTalGroupBox * g = addGroupBox(0,0,1,0,1,Qt::Horizontal,__tr2qs_ctx("Background Colors","options"));
+ addColorSelector(g,__tr2qs_ctx("Normal:","options"),KviOption_colorUserListViewBackground);
+ addColorSelector(g,__tr2qs_ctx("Selected:","options"),KviOption_colorUserListViewSelectionBackground);
+
+
+ addPixmapSelector(0,1,1,1,__tr2qs_ctx("Background image:","options"),KviOption_pixmapUserListViewBackground);
+
+ addLabel(0,2,0,2,__tr2qs_ctx("Horizontal Alignment:","options"));
+ m_pHorizontalAlign=new QComboBox(this);
+ addWidgetToLayout(m_pHorizontalAlign,1,2,1,2);
+
+ addLabel(0,3,0,3,__tr2qs_ctx("Vertical Alignment:","options"));
+ m_pVerticalAlign=new QComboBox(this);
+ addWidgetToLayout(m_pVerticalAlign,1,3,1,3);
+
+ m_pHorizontalAlign->insertItem(__tr2qs_ctx("Tile","options"));
+ m_pHorizontalAlign->insertItem(__tr2qs_ctx("Left","options"));
+ m_pHorizontalAlign->insertItem(__tr2qs_ctx("Right","options"));
+ m_pHorizontalAlign->insertItem(__tr2qs_ctx("Center","options"));
+
+ m_pVerticalAlign->insertItem(__tr2qs_ctx("Tile","options"));
+ m_pVerticalAlign->insertItem(__tr2qs_ctx("Top","options"));
+ m_pVerticalAlign->insertItem(__tr2qs_ctx("Bottom","options"));
+ m_pVerticalAlign->insertItem(__tr2qs_ctx("Center","options"));
+
+ switch( KVI_OPTION_UINT(KviOption_uintUserListPixmapAlign) & Qt::AlignHorizontal_Mask)
+ {
+ case Qt::AlignLeft:
+ m_pHorizontalAlign->setCurrentItem(1);
+ break;
+ case Qt::AlignRight:
+ m_pHorizontalAlign->setCurrentItem(2);
+ break;
+ case Qt::AlignHCenter:
+ m_pHorizontalAlign->setCurrentItem(3);
+ break;
+ default:
+ m_pHorizontalAlign->setCurrentItem(0);
+ }
+
+ switch( KVI_OPTION_UINT(KviOption_uintUserListPixmapAlign) & Qt::AlignVertical_Mask)
+ {
+ case Qt::AlignTop:
+ m_pVerticalAlign->setCurrentItem(1);
+ break;
+ case Qt::AlignBottom:
+ m_pVerticalAlign->setCurrentItem(2);
+ break;
+ case Qt::AlignVCenter:
+ m_pVerticalAlign->setCurrentItem(3);
+ break;
+ default:
+ m_pVerticalAlign->setCurrentItem(0);
+ }
+
+
+
+ //layout()->setColStretch(0,1);
+ layout()->setRowStretch(1,1);
+}
+
+KviUserListLookBackgroundOptionsWidget::~KviUserListLookBackgroundOptionsWidget()
+{
+}
+
+
+void KviUserListLookBackgroundOptionsWidget::commit()
+{
+ KviOptionsWidget::commit();
+
+ int iFlags=0;
+ switch(m_pHorizontalAlign->currentItem())
+ {
+ case 1:
+ iFlags|=Qt::AlignLeft;
+ break;
+ case 2:
+ iFlags|=Qt::AlignRight;
+ break;
+ case 3:
+ iFlags|=Qt::AlignHCenter;
+ break;
+ }
+ switch(m_pVerticalAlign->currentItem())
+ {
+ case 1:
+ iFlags|=Qt::AlignTop;
+ break;
+ case 2:
+ iFlags|=Qt::AlignBottom;
+ break;
+ case 3:
+ iFlags|=Qt::AlignVCenter;
+ break;
+ }
+
+ KVI_OPTION_UINT(KviOption_uintUserListPixmapAlign)=iFlags;
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+KviUserListFeaturesOptionsWidget::KviUserListFeaturesOptionsWidget(QWidget * parent)
+: KviOptionsWidget(parent,"userlistfeatures_options_widget")
+{
+ createLayout(7,1);
+
+ KviBoolSelector *b = addBoolSelector(0,0,0,0,__tr2qs_ctx("Show gender icons","options"),KviOption_boolDrawGenderIcons);
+ b = addBoolSelector(0,1,0,1,__tr2qs_ctx("Show user channel icons","options"),KviOption_boolShowUserChannelIcons);
+ b = addBoolSelector(0,2,0,2,__tr2qs_ctx("Show user channel activity indicator","options"),KviOption_boolShowUserChannelState);
+ b = addBoolSelector(0,3,0,3,__tr2qs_ctx("Hide users label","options"),KviOption_boolDisableUserListLabel);
+ b = addBoolSelector(0,4,0,4,__tr2qs_ctx("Enable user tooltips","options"),KviOption_boolShowUserListViewToolTips);
+ b = addBoolSelector(0,5,0,5,__tr2qs_ctx("Hide avatars","options"),KviOption_boolDisableAvatars);
+
+ addRowSpacer(0,6,0,6);
+}
+
+KviUserListFeaturesOptionsWidget::~KviUserListFeaturesOptionsWidget()
+{
+}
+
+#include "m_optw_userlist.moc"
diff --git a/src/modules/options/optw_userlist.h b/src/modules/options/optw_userlist.h
new file mode 100644
index 00000000..d5fd4c12
--- /dev/null
+++ b/src/modules/options/optw_userlist.h
@@ -0,0 +1,114 @@
+#ifndef _OPTW_USERLIST_H_
+#define _OPTW_USERLIST_H_
+
+//
+// File : optw_userlist.h
+// Creation date : Sat Mar 02 2002 12:09:19 CEST by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2002-2006 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
+#include "kvi_optionswidget.h"
+#include <qcombobox.h>
+
+#define KVI_OPTIONS_WIDGET_ICON_KviUserListLookOptionsWidget KVI_SMALLICON_USERLIST
+#define KVI_OPTIONS_WIDGET_NAME_KviUserListLookOptionsWidget __tr2qs_no_lookup("Userlist")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviUserListLookOptionsWidget __tr2qs_no_lookup("theme,userlist,channel")
+#define KVI_OPTIONS_WIDGET_GROUP_KviUserListLookOptionsWidget "theme"
+#define KVI_OPTIONS_WIDGET_CONTAINER_KviUserListLookOptionsWidget true
+
+class KviUserListLookOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviUserListLookOptionsWidget(QWidget * parent);
+ ~KviUserListLookOptionsWidget();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviUserListLookBackgroundOptionsWidget KVI_SMALLICON_TRANSPARENT
+#define KVI_OPTIONS_WIDGET_NAME_KviUserListLookBackgroundOptionsWidget __tr2qs_no_lookup("Background")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviUserListLookBackgroundOptionsWidget __tr2qs_no_lookup("theme,userlist,channel,background")
+#define KVI_OPTIONS_WIDGET_GROUP_KviUserListLookBackgroundOptionsWidget "theme"
+#define KVI_OPTIONS_WIDGET_PARENT_KviUserListLookBackgroundOptionsWidget KviUserListLookOptionsWidget
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviUserListLookBackgroundOptionsWidget 30
+
+
+class KviUserListLookBackgroundOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviUserListLookBackgroundOptionsWidget(QWidget * parent);
+ ~KviUserListLookBackgroundOptionsWidget();
+protected:
+ QComboBox* m_pHorizontalAlign;
+ QComboBox* m_pVerticalAlign;
+public:
+ virtual void commit();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviUserListLookForegroundOptionsWidget KVI_SMALLICON_USERLIST
+#define KVI_OPTIONS_WIDGET_NAME_KviUserListLookForegroundOptionsWidget __tr2qs_no_lookup("Foreground")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviUserListLookForegroundOptionsWidget __tr2qs_no_lookup("theme,userlist,channel,colors")
+#define KVI_OPTIONS_WIDGET_GROUP_KviUserListLookForegroundOptionsWidget "theme"
+#define KVI_OPTIONS_WIDGET_PARENT_KviUserListLookForegroundOptionsWidget KviUserListLookOptionsWidget
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviUserListLookForegroundOptionsWidget 20
+
+
+class KviUserListLookForegroundOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviUserListLookForegroundOptionsWidget(QWidget * parent);
+ ~KviUserListLookForegroundOptionsWidget();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviUserListGridOptionsWidget KVI_SMALLICON_GUI
+#define KVI_OPTIONS_WIDGET_NAME_KviUserListGridOptionsWidget __tr2qs_no_lookup("Nickname Grid")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviUserListGridOptionsWidget __tr2qs_no_lookup("theme,userlist,channel,grid")
+#define KVI_OPTIONS_WIDGET_GROUP_KviUserListGridOptionsWidget "theme"
+#define KVI_OPTIONS_WIDGET_PARENT_KviUserListGridOptionsWidget KviUserListLookOptionsWidget
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviUserListGridOptionsWidget 30
+
+
+class KviUserListGridOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviUserListGridOptionsWidget(QWidget * parent);
+ ~KviUserListGridOptionsWidget();
+protected:
+ QComboBox * m_pGridTypeCombo;
+public:
+ virtual void commit();
+};
+
+#define KVI_OPTIONS_WIDGET_ICON_KviUserListFeaturesOptionsWidget KVI_SMALLICON_GUI
+#define KVI_OPTIONS_WIDGET_NAME_KviUserListFeaturesOptionsWidget __tr2qs_no_lookup("Features")
+#define KVI_OPTIONS_WIDGET_KEYWORDS_KviUserListFeaturesOptionsWidget __tr2qs_no_lookup("userlist,channel")
+#define KVI_OPTIONS_WIDGET_PARENT_KviUserListFeaturesOptionsWidget KviUserListLookOptionsWidget
+#define KVI_OPTIONS_WIDGET_PRIORITY_KviUserListFeaturesOptionsWidget 10
+
+class KviUserListFeaturesOptionsWidget : public KviOptionsWidget
+{
+ Q_OBJECT
+public:
+ KviUserListFeaturesOptionsWidget(QWidget * parent);
+ ~KviUserListFeaturesOptionsWidget();
+};
+
+#endif //!_OPTW_USERLIST_H_