diff options
Diffstat (limited to 'src/modules/options/optw_nickserv.cpp')
| -rw-r--r-- | src/modules/options/optw_nickserv.cpp | 42 |
1 files changed, 9 insertions, 33 deletions
diff --git a/src/modules/options/optw_nickserv.cpp b/src/modules/options/optw_nickserv.cpp index eca74f339..caa881792 100644 --- a/src/modules/options/optw_nickserv.cpp +++ b/src/modules/options/optw_nickserv.cpp @@ -24,19 +24,20 @@ #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" +#include "kvi_tal_tooltip.h" +#include "kvi_tal_listview.h" + +#include <QLayout> +#include <QLineEdit> +#include <QPushButton> +#include <QCheckBox> +#include <QMessageBox> + // kvi_app.cpp extern KVIRC_API KviNickServRuleSet * g_pNickServRuleSet; @@ -56,23 +57,19 @@ KviNickServRuleEditor::KviNickServRuleEditor(QWidget * par,bool bUseServerMaskFi 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>NickServ!service@services.dalnet</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); @@ -81,29 +78,24 @@ KviNickServRuleEditor::KviNickServRuleEditor(QWidget * par,bool bUseServerMaskFi 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 <yourpassword></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) @@ -112,11 +104,9 @@ KviNickServRuleEditor::KviNickServRuleEditor(QWidget * par,bool bUseServerMaskFi 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 { @@ -124,11 +114,7 @@ KviNickServRuleEditor::KviNickServRuleEditor(QWidget * par,bool bUseServerMaskFi } -#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); @@ -155,8 +141,6 @@ KviNickServRuleEditor::~KviNickServRuleEditor() { } - - bool KviNickServRuleEditor::validate() { QString s = m_pRegisteredNickEdit->text(); @@ -209,7 +193,6 @@ void KviNickServRuleEditor::okPressed() accept(); } - bool KviNickServRuleEditor::editRule(KviNickServRule * r) { m_pRegisteredNickEdit->setText(r->registeredNick().isEmpty() ? QString("MyNick") : r->registeredNick()); @@ -230,7 +213,6 @@ bool KviNickServRuleEditor::editRule(KviNickServRule * r) } - KviNickServOptionsWidget::KviNickServOptionsWidget(QWidget * parent) : KviOptionsWidget(parent,"nickserv_options_widget") { @@ -243,10 +225,8 @@ KviNickServOptionsWidget::KviNickServOptionsWidget(QWidget * parent) 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); @@ -260,7 +240,6 @@ KviNickServOptionsWidget::KviNickServOptionsWidget(QWidget * parent) 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>" \ @@ -271,7 +250,6 @@ KviNickServOptionsWidget::KviNickServOptionsWidget(QWidget * parent) "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())); @@ -299,8 +277,6 @@ KviNickServOptionsWidget::KviNickServOptionsWidget(QWidget * parent) enableDisableNickServControls(); gl->setRowStretch(1,1); - - } KviNickServOptionsWidget::~KviNickServOptionsWidget() |
