Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 7fd517d6 authored by Marco Martin's avatar Marco Martin

follow settings for tooltips

parent 5ff2bf3f
......@@ -245,6 +245,7 @@ void SettingsBase::configUpdated()
KWindowConfig::saveWindowSize(configDialog->windowHandle(), dialogConfig);
BaseConfig::setActiveView( possibleViews.keys().at(viewSelection.checkedId()) );
BaseConfig::setShowToolTips( configWidget.ChTooltips->isChecked() );
activeView->setShowToolTips( configWidget.ChTooltips->isChecked() );
activeView->saveConfiguration();
changePlugin();
}
......@@ -337,6 +338,7 @@ void SettingsBase::changePlugin()
tooltipManagers << new ToolTipManager( view );
}
}
activeView->setShowToolTips( BaseConfig::showToolTips() );
changeAboutMenu( activeView->aboutData(), aboutViewAction, i18n("About Active View") );
viewChange(false);
......
......@@ -32,12 +32,13 @@
class BaseMode::Private {
public:
Private() {}
Private() : showToolTips(true) {}
QList<QAction*> actionsList;
KService::Ptr service;
MenuItem *rootItem;
KConfigGroup config;
bool showToolTips;
};
BaseMode::BaseMode( QObject* parent )
......@@ -89,6 +90,16 @@ const KService::Ptr& BaseMode::service() const
return d->service;
}
void BaseMode::setShowToolTips( bool show)
{
d->showToolTips = show;
}
bool BaseMode::showToolTips() const
{
return d->showToolTips;
}
void BaseMode::searchChanged( const QString& text )
{
Q_UNUSED( text );
......
......@@ -159,6 +159,16 @@ public:
*/
const KService::Ptr& service() const;
/**
* tells the config view wether to make use of tooltips or not
*/
void setShowToolTips( bool show);
/**
* @returns true if the view should use tooltips
*/
bool showToolTips() const;
public Q_SLOTS:
/**
* Called when the text in the search box changes allowing the display to be filtered.
......
......@@ -175,7 +175,9 @@ void SidebarMode::triggerGlobalAction(const QString &name)
void SidebarMode::requestToolTip(int index, const QRectF &rect)
{
d->toolTipManager->requestToolTip(d->proxyModel->index(index, 0), rect.toRect());
if (showToolTips()) {
d->toolTipManager->requestToolTip(d->proxyModel->index(index, 0), rect.toRect());
}
}
void SidebarMode::hideToolTip()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment