From 366db1568224186624cc61ac31b13c7dc28eed40 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 16 Dec 2010 16:44:15 +0000 Subject: [PATCH] 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 --- src/settings/general/behaviorsettingspage.cpp | 39 +------------------ src/settings/general/behaviorsettingspage.h | 13 ------- 2 files changed, 2 insertions(+), 50 deletions(-) diff --git a/src/settings/general/behaviorsettingspage.cpp b/src/settings/general/behaviorsettingspage.cpp index 0864a4bba8..542fa10939 100644 --- a/src/settings/general/behaviorsettingspage.cpp +++ b/src/settings/general/behaviorsettingspage.cpp @@ -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("" + - i18nc("@action:button", "Configure...") + - ""); - } 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" diff --git a/src/settings/general/behaviorsettingspage.h b/src/settings/general/behaviorsettingspage.h index 331e458068..d92feb9399 100644 --- a/src/settings/general/behaviorsettingspage.h +++ b/src/settings/general/behaviorsettingspage.h @@ -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();