diff options
| author | 2008-04-12 15:49:54 +0000 | |
|---|---|---|
| committer | 2008-04-12 15:49:54 +0000 | |
| commit | e0e3f00c8564377ffa7713fb8f3c10cb73412553 (patch) | |
| tree | 718dd64a5beea45a8586240c79a1ca6bbe8f632e /src | |
| parent | more work on about module (diff) | |
| download | KVIrc-e0e3f00c8564377ffa7713fb8f3c10cb73412553.tar.gz KVIrc-e0e3f00c8564377ffa7713fb8f3c10cb73412553.tar.bz2 KVIrc-e0e3f00c8564377ffa7713fb8f3c10cb73412553.zip | |
removed COMPILE_INFO_TIPS macro
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@1464 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src')
| -rw-r--r-- | src/kvilib/config/kvi_wincfg.h | 2 | ||||
| -rw-r--r-- | src/modules/options/dialog.cpp | 16 | ||||
| -rw-r--r-- | src/modules/options/optw_ctcp.cpp | 2 | ||||
| -rw-r--r-- | src/modules/reguser/dialog.cpp | 19 | ||||
| -rw-r--r-- | src/modules/reguser/edituser.cpp | 8 |
5 files changed, 6 insertions, 41 deletions
diff --git a/src/kvilib/config/kvi_wincfg.h b/src/kvilib/config/kvi_wincfg.h index d0168a8a2..26fa8ed49 100644 --- a/src/kvilib/config/kvi_wincfg.h +++ b/src/kvilib/config/kvi_wincfg.h @@ -47,7 +47,7 @@ /* #undef COMPILE_USE_GSM */ /* define if you want the info tips to be compiled in */ -#define COMPILE_INFO_TIPS 1 +/* #define COMPILE_INFO_TIPS 1 */ /* define if you want to compile the KDE 2.x support */ /* #undef COMPILE_KDE_SUPPORT */ diff --git a/src/modules/options/dialog.cpp b/src/modules/options/dialog.cpp index 26505f633..4863946de 100644 --- a/src/modules/options/dialog.cpp +++ b/src/modules/options/dialog.cpp @@ -139,17 +139,13 @@ KviOptionsDialog::KviOptionsDialog(QWidget * par,const QString &szGroup) 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>" \ @@ -210,7 +206,6 @@ KviOptionsDialog::KviOptionsDialog(QWidget * par,const QString &szGroup) 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. " \ @@ -219,7 +214,6 @@ KviOptionsDialog::KviOptionsDialog(QWidget * par,const QString &szGroup) "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); @@ -242,8 +236,7 @@ KviOptionsDialog::KviOptionsDialog(QWidget * par,const QString &szGroup) int idx = m_pWidgetStack->indexOf(m_pFrontWidget); m_pWidgetStack->widget(idx)->raise(); -// Ok,Cancel,Help - + // 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())); @@ -329,10 +322,9 @@ bool KviOptionsDialog::recursiveSearch(KviOptionsListViewItem * pItem,const QStr 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")) szText.append(((QWidget *)o)->toolTip()); -#endif if(!szText.isEmpty()) { bool bOk = true; @@ -569,7 +561,6 @@ KviOptionsListViewItem * KviOptionsDialog::findItemByPage(KviOptionsListViewItem return 0; } - void KviOptionsDialog::pageWantsToSwitchToAdvancedPage(KviOptionsWidget * pPage) { // unused @@ -637,6 +628,7 @@ void KviOptionsDialog::recursiveCommit(KviOptionsListViewItem *it) } //refreshListView(); // <-- this tends to jump into infinite recursion } + void KviOptionsDialog::keyPressEvent( QKeyEvent * e ) { if(e->key()==Qt::Key_Return) diff --git a/src/modules/options/optw_ctcp.cpp b/src/modules/options/optw_ctcp.cpp index 46ef2a389..25c759226 100644 --- a/src/modules/options/optw_ctcp.cpp +++ b/src/modules/options/optw_ctcp.cpp @@ -53,10 +53,8 @@ KviCtcpOptionsWidget::KviCtcpOptionsWidget(QWidget * parent) // 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); diff --git a/src/modules/reguser/dialog.cpp b/src/modules/reguser/dialog.cpp index 01b317fe5..e2952f727 100644 --- a/src/modules/reguser/dialog.cpp +++ b/src/modules/reguser/dialog.cpp @@ -178,13 +178,11 @@ KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) m_pListView->setSelectionMode(KviTalListView::Extended);
m_pListView->setRootIsDecorated(TRUE);
-#ifdef COMPILE_INFO_TIPS
QToolTip::add(m_pListView,__tr2qs("<center>This is the list of registered users. " \
"KVIrc can automatically recognize and associate properties to them.<br>" \
"Use the buttons on the right to add, edit and remove entries. " \
"The \"notify\" column allows you to quickly add users to the notify list. " \
"Notify list fine-tuning can be performed by editing the entry properties.</center>"));
-#endif // COMPILE_INFO_TIPS
connect(m_pListView,SIGNAL(pressed(KviTalListViewItem *,const QPoint &,int)),this,SLOT(itemPressed(KviTalListViewItem *,const QPoint &,int)));
connect(m_pListView,SIGNAL(doubleClicked(KviTalListViewItem *)),this,SLOT(itemDoubleClicked(KviTalListViewItem *)));
@@ -197,41 +195,31 @@ KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) m_pWizardAddButton = new QPushButton(__tr2qs("Add (Wizard)..."),vbox);
connect(m_pWizardAddButton,SIGNAL(clicked()),this,SLOT(addWizardClicked()));
-#ifdef COMPILE_INFO_TIPS
QToolTip::add(m_pWizardAddButton,__tr2qs("Add a registered user by means of a user-friendly wizard."));
-#endif // COMPILE_INFO_TIPS
m_pWizardAddButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NEWITEMBYWIZARD)));
m_pAddButton = new QPushButton(__tr2qs("&Add..."),vbox);
connect(m_pAddButton,SIGNAL(clicked()),this,SLOT(addClicked()));
-#ifdef COMPILE_INFO_TIPS
QToolTip::add(m_pAddButton,__tr2qs("Open the edit dialog to create a new user entry."));
-#endif // COMPILE_INFO_TIPS
m_pAddButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NEWITEM)));
m_pAddGroupButton = new QPushButton(__tr2qs("&Add Group..."),vbox);
connect(m_pAddGroupButton,SIGNAL(clicked()),this,SLOT(addGroupClicked()));
-#ifdef COMPILE_INFO_TIPS
QToolTip::add(m_pAddGroupButton,__tr2qs("Adds a new group"));
-#endif // COMPILE_INFO_TIPS
m_pAddGroupButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NEWITEM)));
m_pRemoveButton = new QPushButton(__tr2qs("Re&move"),vbox);
connect(m_pRemoveButton,SIGNAL(clicked()),this,SLOT(removeClicked()));
m_pRemoveButton->setEnabled(false);
-#ifdef COMPILE_INFO_TIPS
QToolTip::add(m_pRemoveButton,__tr2qs("Remove the currently selected entries."));
-#endif // COMPILE_INFO_TIPS
m_pRemoveButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DELETEITEM)));
m_pEditButton = new QPushButton(__tr2qs("&Edit..."),vbox);
connect(m_pEditButton,SIGNAL(clicked()),this,SLOT(editClicked()));
m_pEditButton->setEnabled(false);
-#ifdef COMPILE_INFO_TIPS
QToolTip::add(m_pEditButton,__tr2qs("Edit the first selected entry."));
-#endif // COMPILE_INFO_TIPS
m_pEditButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_EDITITEM)));
QFrame * f = new QFrame(vbox);
@@ -240,17 +228,13 @@ KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) m_pExportButton = new QPushButton(__tr("Export To..."),vbox);
m_pExportButton->setEnabled(false);
connect(m_pExportButton,SIGNAL(clicked()),this,SLOT(exportClicked()));
-#ifdef COMPILE_INFO_TIPS
QToolTip::add(m_pExportButton,__tr2qs("Export the selected entries to a file.<br>All the data associated with the selected registered users will be exported.<br>You (or anyone else) can later import the entries by using the \"Import\" button."));
-#endif // COMPILE_INFO_TIPS
m_pExportButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_FLOPPY)));
m_pImportButton = new QPushButton(__tr("Import From..."),vbox);
connect(m_pImportButton,SIGNAL(clicked()),this,SLOT(importClicked()));
-#ifdef COMPILE_INFO_TIPS
QToolTip::add(m_pImportButton,__tr2qs("Import entries from a file exported earlier by the \"export\" function of this dialog."));
-#endif // COMPILE_INFO_TIPS
m_pImportButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_FOLDER)));
@@ -297,8 +281,7 @@ KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) KviRegisteredUsersDialog::~KviRegisteredUsersDialog()
{
#ifndef Q_OS_MACX
- if(!parent())KVI_OPTION_RECT(KviOption_rectRegisteredUsersDialogGeometry) = QRect(pos().x(),pos().y(),
- size().width(),size().height());
+ if(!parent())KVI_OPTION_RECT(KviOption_rectRegisteredUsersDialogGeometry) = QRect(pos().x(),pos().y(),size().width(),size().height());
#else
if(!parent())KVI_OPTION_RECT(KviOption_rectRegisteredUsersDialogGeometry) = geometry();
#endif
diff --git a/src/modules/reguser/edituser.cpp b/src/modules/reguser/edituser.cpp index 471b211c4..71a600ba6 100644 --- a/src/modules/reguser/edituser.cpp +++ b/src/modules/reguser/edituser.cpp @@ -235,9 +235,7 @@ KviReguserMaskDialog::KviReguserMaskDialog(QWidget * p,KviIrcMask * m) m_pNickEdit = new QLineEdit(b);
//m_pNickEdit->setMinimumWidth(120);
m_pNickEdit->setAlignment(Qt::AlignRight);
-#ifdef COMPILE_INFO_TIPS
QToolTip::add(m_pNickEdit,__tr2qs("<center>This the <b>nickname</b> that will match this user, default value is the registered name.</center>"));
-#endif
l = new QLabel("<center><b>!</b></center>",b);
l->setAlignment(Qt::AlignCenter);
@@ -246,9 +244,7 @@ KviReguserMaskDialog::KviReguserMaskDialog(QWidget * p,KviIrcMask * m) m_pUserEdit = new QLineEdit(b);
//m_pUserEdit->setMinimumWidth(120);
m_pUserEdit->setAlignment(Qt::AlignCenter);
-#ifdef COMPILE_INFO_TIPS
QToolTip::add(m_pUserEdit,__tr2qs("<center>This the <b>username</b> that will match this user. <b>*</b> will match any username.</center>"));
-#endif
l = new QLabel("<center><b>@</b></center>",b);
l->setAlignment(Qt::AlignCenter);
@@ -257,9 +253,7 @@ KviReguserMaskDialog::KviReguserMaskDialog(QWidget * p,KviIrcMask * m) m_pHostEdit = new QLineEdit(b);
//m_pHostEdit->setMinimumWidth(120);
m_pHostEdit->setAlignment(Qt::AlignLeft);
-#ifdef COMPILE_INFO_TIPS
QToolTip::add(m_pHostEdit,__tr2qs("<center>This the <b>hostname</b> that will match this user. <b>*</b> will match any hostname.</center>"));
-#endif
// just a spacer
// l = new QLabel("<nobr> <nobr>",this);
@@ -400,9 +394,7 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste l->setEnabled(m_pNotifyCheck->isChecked());
g->addWidget(l,1,0);
connect(m_pNotifyCheck,SIGNAL(toggled(bool)),l,SLOT(setEnabled(bool)));
-#ifdef COMPILE_INFO_TIPS
QToolTip::add(m_pNotifyCheck,__tr2qs("<center>You can enter a space separated list of nicknames.</center>"));
-#endif
m_pNotifyNick = new QLineEdit(p2);
|
