[gmenu-dbusmenu-proxy] Fix radio button state detection
ClosedPublic

Authored by broulik on Mar 6 2020, 9:15 AM.

Details

Summary

Instead of comparing the state of the action to the action name, compare it to the argument the action will invoke it with.
In contrast to checkboxes, which are independent actions with a boolean state, radio menu items all refer to the same action (e.g. "Zoom") and then pass the new state ("zoom-100", "zoom-200", etc) as target when invoking the action.

CCBUG: 418385

Test Plan

5.18

  • View modes in mediainfo-gui is now correctly shown in the menu
  • Zoom and view modes in Inkscape and Gimp are correctly indicated now
  • LibreOffice is still quite borked overall (but that is also without this patch)

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Mar 6 2020, 9:15 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 6 2020, 9:15 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Mar 6 2020, 9:15 AM
apol accepted this revision.Mar 9 2020, 12:05 AM
This revision is now accepted and ready to land.Mar 9 2020, 12:05 AM
This revision was automatically updated to reflect the committed changes.