Skip to content
  • Ahmad Samir's avatar
    Improve handling of the fallback profile · feb21808
    Ahmad Samir authored
    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
    aftersaving 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, sincechangeProfile 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 ratherthan the fallback one. This also means that the
    profile ptr that the currentSession is using will point to the
    modified/saved profile and not thefallback 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.
    feb21808