comparison 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
comparison
equal deleted inserted replaced
1697:52af44e745b5 1698:7923dc51143e
89 """Create the profile""" 89 """Create the profile"""
90 name = edit.get_edit_text() 90 name = edit.get_edit_text()
91 self.host.bridge.asyncCreateProfile(name, callback=lambda: self.newProfileCreated(name), errback=self.profileCreationFailure) 91 self.host.bridge.asyncCreateProfile(name, callback=lambda: self.newProfileCreated(name), errback=self.profileCreationFailure)
92 92
93 def newProfileCreated(self, profile): 93 def newProfileCreated(self, profile):
94 # new profile will be selected, and a selected profile assume the session is started
95 self.host.bridge.profileStartSession('', profile, callback=lambda dummy: self.newProfileSessionStarted(profile), errback=self.profileCreationFailure)
96
97 def newProfileSessionStarted(self, profile):
94 self.host.removePopUp() 98 self.host.removePopUp()
95 self.refillProfiles() 99 self.refillProfiles()
96 self.list_profile.selectValue(profile) 100 self.list_profile.selectValue(profile)
97 self.current.profile=profile 101 self.current.profile=profile
98 self.getConnectionParams(profile) 102 self.getConnectionParams(profile)