Skip to content

Improve handling of the fallback profile

Ahmad Samir requested to merge work/ahmad/profile-fallback into master

Modify changeProfile to always work on the Profile::Ptr arg it's called on, this is needed to be able to call setProfile from EditProfileDialog after saving the fallback profile; the fallback profile is special in many ways, most important of which is that it's never saved to a .profile on disk, since changeProfile is going to give the newly saved profile a unique name, e.g. "Profile 1", we need to update the EditProfileDialog with the new profile, so that saving settings works and actually modifies the new profile rather than the fallback one. This also means that the profile ptr that the current Session is using will point to the modified/saved profile and not the fallback one.

After the fallback profile is "saved" to a new profile, we init another instance of the fallback profile, so that it's always availabe in the "Switch profile" context menu.

Reserve the profile name "Default" for the fallback profile.

Edited by Ahmad Samir

Merge request reports