diff src/memory/memory.py @ 1595:a3d0cfa5b7a6

core, bridge: added a profileSetDefault method
author Goffi <goffi@goffi.org>
date Sat, 14 Nov 2015 19:18:10 +0100
parents 0df9c6247474
children fd7f41d8cbdf
line wrap: on
line diff
--- a/src/memory/memory.py	Sat Nov 14 19:18:10 2015 +0100
+++ b/src/memory/memory.py	Sat Nov 14 19:18:10 2015 +0100
@@ -433,6 +433,16 @@
         """
         return self.params.getProfileName(profile_key, return_profile_keys)
 
+    def profileSetDefault(self, profile):
+        """Set default profile
+
+        @param profile: %(doc_profile)s
+        """
+        # we want to be sure that the profile exists
+        profile = self.getProfileName(profile)
+
+        self.memory_data['Profile_default'] = profile
+
     def asyncCreateProfile(self, name, password=''):
         """Create a new profile
         @param name: profile name