primitivus (profile manager): session is started for newly create profiles

This commit is contained in:
Goffi 2015-11-27 16:58:16 +01:00
commit a03b45c7f6

View file

@ -91,6 +91,10 @@ class ProfileManager(QuickProfileManager, urwid.WidgetWrap):
self.host.bridge.asyncCreateProfile(name, callback=lambda: self.newProfileCreated(name), errback=self.profileCreationFailure)
def newProfileCreated(self, profile):
# new profile will be selected, and a selected profile assume the session is started
self.host.bridge.profileStartSession('', profile, callback=lambda dummy: self.newProfileSessionStarted(profile), errback=self.profileCreationFailure)
def newProfileSessionStarted(self, profile):
self.host.removePopUp()
self.refillProfiles()
self.list_profile.selectValue(profile)