Provide a setting to turn on/off tooltips. The tooltip implementation itself will be committed before the feature freeze (20th of April).

CCMAIL:  konst.heil@stud.uni-heidelberg.de

svn path=/trunk/KDE/kdebase/apps/; revision=794772
This commit is contained in:
Peter Penz 2008-04-08 15:42:12 +00:00
parent ec19eaa2c5
commit 4b859a3621
4 changed files with 16 additions and 1 deletions

View file

@ -40,6 +40,10 @@
<label context="@label">Show selection toggle</label>
<default>true</default>
</entry>
<entry name="ShowToolTips" type="Bool">
<label context="@label">Show tooltips</label>
<default>false</default>
</entry>
<entry name="ShowCopyMoveMenu" type="Bool">
<label context="@label">Show 'Copy To' and 'Move To' commands in context menu</label>
<default>false</default>

View file

@ -120,6 +120,10 @@ DolphinView::DolphinView(QWidget* parent,
applyViewProperties(url);
m_topLayout->addWidget(itemView());
if (DolphinSettings::instance().generalSettings()->showToolTips()) {
// TODO: instantiate ToolTipManager here...
}
}
DolphinView::~DolphinView()

View file

@ -48,7 +48,8 @@ GeneralViewSettingsPage::GeneralViewSettingsPage(const KUrl& url,
m_maxPreviewSize(0),
m_spinBox(0),
m_useFileThumbnails(0),
m_showSelectionToggle(0)
m_showSelectionToggle(0),
m_showToolTips(0)
{
const int spacing = KDialog::spacingHint();
const int margin = KDialog::marginHint();
@ -100,6 +101,9 @@ GeneralViewSettingsPage::GeneralViewSettingsPage(const KUrl& url,
m_showSelectionToggle = new QCheckBox(i18nc("@option:check", "Show selection toggle"), this);
connect(m_showSelectionToggle, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
m_showToolTips = new QCheckBox(i18nc("@option:check", "Show tooltips"), this);
connect(m_showToolTips, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
// Add a dummy widget with no restriction regarding
// a vertical resizing. This assures that the dialog layout
// is not stretched vertically.
@ -142,6 +146,7 @@ void GeneralViewSettingsPage::applySettings()
globalConfig.sync();
settings->setShowSelectionToggle(m_showSelectionToggle->isChecked());
settings->setShowToolTips(m_showToolTips->isChecked());
}
void GeneralViewSettingsPage::restoreDefaults()
@ -190,6 +195,7 @@ void GeneralViewSettingsPage::loadSettings()
m_useFileThumbnails->setChecked(useFileThumbnails);
m_showSelectionToggle->setChecked(settings->showSelectionToggle());
m_showToolTips->setChecked(settings->showToolTips());
}
#include "generalviewsettingspage.moc"

View file

@ -67,6 +67,7 @@ private:
QSpinBox* m_spinBox;
QCheckBox* m_useFileThumbnails;
QCheckBox* m_showSelectionToggle;
QCheckBox* m_showToolTips;
};
#endif