diff frontends/src/primitivus/profile_manager.py @ 1698:7923dc51143e

primitivus (profile manager): session is started for newly create profiles
author Goffi <goffi@goffi.org>
date Fri, 27 Nov 2015 16:58:16 +0100
parents 66f0e877625b
children d17772b0fe22
line wrap: on
line diff
--- a/frontends/src/primitivus/profile_manager.py	Fri Nov 27 16:57:49 2015 +0100
+++ b/frontends/src/primitivus/profile_manager.py	Fri Nov 27 16:58:16 2015 +0100
@@ -91,6 +91,10 @@
         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)