Commit cef4f7fd authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Always send enabled and visible property along

The code assumes being enabled is the default, which is true, however
when we signal an action change from disabled to enabled, we would not send
along the enabled property and thus it never updated.
For simplicity, just always send it along.
parent 093da790
......@@ -928,9 +928,9 @@ QVariantMap Menu::gMenuToDBusMenuProperties(const QVariantMap &source) const
enabled = actionOk && action.enabled;
if (!enabled) {
result.insert(QStringLiteral("enabled"), false);
// we used to only send this if not enabled but then dbusmenuimporter does not
// update the enabled state when it changes from disabled to enabled
result.insert(QStringLiteral("enabled"), enabled);
bool visible = true;
const QString hiddenWhen = source.value(QStringLiteral("hidden-when")).toString();
......@@ -943,9 +943,7 @@ QVariantMap Menu::gMenuToDBusMenuProperties(const QVariantMap &source) const
visible = true;
if (!visible) {
result.insert(QStringLiteral("visible"), false);
result.insert(QStringLiteral("visible"), visible);
QString icon = source.value(QStringLiteral("icon")).toString();
if (icon.isEmpty()) {
Supports Markdown
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