Skip to content

EditProfileDialog: Distinguish between OK/Apply and Save operations

Jonathan Marten requested to merge marten/konsole:profile-saving-433160 into master

There is potential confusion as to whether the profile will be saved permanently, or changes will just apply to the current session, depending on how Konsole was invoked. In order to make the actions explicit, a new "Save" option is added to the profile editing dialogue. The action is always therefore "Ok"/"Apply" applies the changes for the current session, "Save" saves them permanently.

OK/Apply can be used even if there is no profile name or it cannot be saved, to change the current profile settings only.

Appropriate messages are shown on the dialogue's "General" page if the profile is not valid or cannot be saved. The message has been moved to the bottom so that there is not the disconcerting effect of the other fields moving around as the message appears or disappears.

An enum has been added to the EditProfileDialog constructor to specify whether it is being called for the "Edit Current Profile" operation (in which case the buttons are Ok/Apply/Save/Cancel) or from "Manage Profiles" (in which case the buttons are Save/Cancel). Unfortunately this is an internal API change (but detectable by the compiler), it's not possible to specify the difference after construction because the buttons are created there.

The former isProfileNameValid() is split up into that as the verifier (returning a ProfileStatus enum) and updateProfileNameMessage() to show a message. The former is used in updateButtons() to enable the Save button. The latter is only called when the profile name is edited, because that is the only field that can affect the message.

When called by "Edit Current Profile":


When called from "Manage Profiles":



Merge request reports