Disable menu actions when read-only/locked
ClosedPublic

Authored by jnoack on Mar 14 2018, 9:54 PM.

Details

Summary

This patch addresses the following points:

  • Ignore most DBus methods
  • Disable the following actions:

clear-history, clear-history-and-reset, edit-current-profile, switch-profile
adjust-history, send-signal, zmodem-upload, edit-rename (tab bar)

  • Session updates all views correctly when readonly changes

Test Plan
  • Actions do not show when locked
  • DBus methods are ignored when locked
  • Multiple views in one session get correctly updated

Diff Detail

Repository
R319 Konsole
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jnoack created this revision.Mar 14 2018, 9:54 PM
Restricted Application added a project: Konsole. · View Herald TranscriptMar 14 2018, 9:54 PM
Restricted Application added a subscriber: Konsole. · View Herald Transcript
jnoack requested review of this revision.Mar 14 2018, 9:54 PM
jnoack edited the summary of this revision. (Show Details)Mar 14 2018, 9:55 PM
jnoack added a reviewer: Konsole.

I'd rather they menu items were disabled - not removed.

I think almost all under Edit and View menus should be disabled.

Should you be allowed to close a read-only tab?

ngraham added a subscriber: ngraham.EditedMar 15 2018, 2:08 AM

EDIT: +1 for disabling rather than hiding the affected menu items.

If you hide all the menus the UI will look quite a bit different and IMHO confusing to the use. When disabled, the user knows they menu items are there but can't be used ATM.

I'm sorry, I wrote my comment backwards. I agree with you, Kurt: +1 for disabling rather than hiding.

jnoack updated this revision to Diff 29605.Mar 15 2018, 3:40 PM

Don't hide disabled actions

hindenburg retitled this revision from Konsole: Disable more actions when locked to Disable menu actions when read-only/locked.Mar 20 2018, 12:42 AM
hindenburg edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Mar 20 2018, 12:45 AM
This revision was automatically updated to reflect the committed changes.