changeset 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 52af44e745b5
children a72f04c67ac9
files frontends/src/primitivus/profile_manager.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
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)