mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
refs #661, info in context menu when force reload is unavailable
(KB/RW slack discussion)
This commit is contained in:
@@ -48,6 +48,17 @@ namespace BlackGui
|
||||
if (this->m_action) { m_action->setChecked(checked); }
|
||||
}
|
||||
|
||||
bool CMenuAction::isActionEnabled() const
|
||||
{
|
||||
if (!this->m_action) { return false; }
|
||||
return this->m_action->isEnabled();
|
||||
}
|
||||
|
||||
void CMenuAction::setActionEnabled(bool enabled)
|
||||
{
|
||||
if (this->m_action) { m_action->setEnabled(enabled); }
|
||||
}
|
||||
|
||||
bool CMenuAction::hasNoPathWithSeparator() const
|
||||
{
|
||||
return this->m_separator && this->hasNoPath();
|
||||
@@ -244,6 +255,11 @@ namespace BlackGui
|
||||
return action;
|
||||
}
|
||||
|
||||
CMenuAction CMenuActions::addAction(const QIcon &actionIcon, const QString &text, const QString &path)
|
||||
{
|
||||
return this->addAction(actionIcon, text, path, nullptr);
|
||||
}
|
||||
|
||||
CMenuAction CMenuActions::addAction(const QIcon &actionIcon, const QString &text, const QString &path, const BlackMisc::CSlot<void ()> &slot, const QKeySequence &shortcut)
|
||||
{
|
||||
return this->addAction(actionIcon, text, path, slot.object(), slot, shortcut);
|
||||
|
||||
Reference in New Issue
Block a user