Remove the dynamic "Configure Tooltips..." button. The tooltip configuration is context specific anyhow and can be done inside the properties dialog.

svn path=/trunk/KDE/kdebase/apps/; revision=1207031
This commit is contained in:
Peter Penz 2010-12-16 16:44:15 +00:00
parent bf4689bb64
commit 366db15682
2 changed files with 2 additions and 50 deletions

View file

@ -48,7 +48,6 @@ BehaviorSettingsPage::BehaviorSettingsPage(const KUrl& url, QWidget* parent) :
m_confirmDelete(0),
m_renameInline(0),
m_showToolTips(0),
m_configureToolTips(0),
m_showSelectionToggle(0),
m_naturalSorting(0)
{
@ -85,15 +84,7 @@ BehaviorSettingsPage::BehaviorSettingsPage(const KUrl& url, QWidget* parent) :
m_renameInline = new QCheckBox(i18nc("@option:check", "Rename inline"), this);
// 'Show tooltips'
QWidget* toolTipContainer = new QWidget(this);
QHBoxLayout* toolTipsLayout = new QHBoxLayout(toolTipContainer);
toolTipsLayout->setMargin(0);
m_showToolTips = new QCheckBox(i18nc("@option:check", "Show tooltips"), toolTipContainer);
m_configureToolTips = new QLabel(toolTipContainer);
toolTipsLayout->addWidget(m_showToolTips);
toolTipsLayout->addWidget(m_configureToolTips, 1, Qt::AlignLeft);
m_showToolTips = new QCheckBox(i18nc("@option:check", "Show tooltips"), this);
// 'Show selection marker'
m_showSelectionToggle = new QCheckBox(i18nc("@option:check", "Show selection marker"), this);
@ -104,7 +95,7 @@ BehaviorSettingsPage::BehaviorSettingsPage(const KUrl& url, QWidget* parent) :
topLayout->addWidget(propsBox);
topLayout->addWidget(confirmBox);
topLayout->addWidget(m_renameInline);
topLayout->addWidget(toolTipContainer);
topLayout->addWidget(m_showToolTips);
topLayout->addWidget(m_showSelectionToggle);
topLayout->addWidget(m_naturalSorting);
topLayout->addStretch();
@ -118,8 +109,6 @@ BehaviorSettingsPage::BehaviorSettingsPage(const KUrl& url, QWidget* parent) :
connect(m_confirmClosingMultipleTabs, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_renameInline, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_showToolTips, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_showToolTips, SIGNAL(toggled(bool)), this, SLOT(updateConfigureButton()));
connect(m_configureToolTips, SIGNAL(linkActivated(const QString&)), this, SLOT(configureToolTips()));
connect(m_showSelectionToggle, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_naturalSorting, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
}
@ -176,28 +165,6 @@ void BehaviorSettingsPage::restoreDefaults()
m_confirmDelete->setChecked(CONFIRM_DELETE);
}
void BehaviorSettingsPage::updateConfigureButton()
{
if (m_showToolTips->isChecked()) {
m_configureToolTips->setText("<a href=\"configure\">" +
i18nc("@action:button", "Configure...") +
"</a>");
} else {
m_configureToolTips->setText(QString());
}
}
void BehaviorSettingsPage::configureToolTips()
{
FileMetaDataConfigurationDialog* dialog = new FileMetaDataConfigurationDialog();
dialog->setDescription(i18nc("@label::textbox",
"Select which data should be shown in the tooltip:"));
dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->show();
dialog->raise();
dialog->activateWindow();
}
void BehaviorSettingsPage::loadSettings()
{
GeneralSettings* settings = DolphinSettings::instance().generalSettings();
@ -217,8 +184,6 @@ void BehaviorSettingsPage::loadSettings()
m_showToolTips->setChecked(settings->showToolTips());
m_showSelectionToggle->setChecked(settings->showSelectionToggle());
m_naturalSorting->setChecked(KGlobalSettings::naturalSorting());
updateConfigureButton();
}
#include "behaviorsettingspage.moc"

View file

@ -44,19 +44,6 @@ public:
/** @see SettingsPageBase::restoreDefaults() */
virtual void restoreDefaults();
private slots:
/**
* Updates the visibility state of the configure
* button m_configureToolTips.
*/
void updateConfigureButton();
/**
* Opens a dialog which allows the user to specify which
* meta data should be shown in the tooltip.
*/
void configureToolTips();
private:
void loadSettings();